pax_global_header00006660000000000000000000000064126646551770014535gustar00rootroot0000000000000052 comment=9a3b6bf6ebee49370aaf15abc1bdeb4b1986a67d .composer-auth.json000066400000000000000000000004151266465517700146400ustar00rootroot00000000000000{ "github-oauth": { "github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS", "github.com": "This token is reserved for testing the symfony/symfony repository", "github.com": "52270bad1071a099c8d24629f2db2b7f07db960d" } } .editorconfig000066400000000000000000000002031266465517700135510ustar00rootroot00000000000000; top-most EditorConfig file root = true ; Unix-style newlines [*] end_of_line = LF [*.php] indent_style = space indent_size = 4 .github/000077500000000000000000000000001266465517700124415ustar00rootroot00000000000000.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000006571266465517700162520ustar00rootroot00000000000000| Q | A | ------------- | --- | Branch | master for features and deprecations / lowest applicable and maintained version otherwise | Bug fix? | yes/no | New feature? | yes/no | BC breaks? | yes/no | Deprecations? | yes/no | Tests pass? | yes/no | Fixed tickets | comma-separated list of tickets fixed by the PR, if any | License | MIT | Doc PR | reference to the documentation PR, if any .gitignore000066400000000000000000000001431266465517700130670ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml .php_cs.cache composer.phar package.tar /packages.json /.phpunit .php_cs000066400000000000000000000027461266465517700123670ustar00rootroot00000000000000setUsingLinter(false) ->setUsingCache(true) ->finder( Symfony\CS\Finder\DefaultFinder::create() ->in(__DIR__) ->exclude(array( // directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code 'src/Symfony/Component/DependencyInjection/Tests/Fixtures', 'src/Symfony/Component/Routing/Tests/Fixtures/dumper', // fixture templates 'src/Symfony/Component/Templating/Tests/Fixtures/templates', // resource templates 'src/Symfony/Bundle/FrameworkBundle/Resources/views/Form', )) // file content autogenerated by `var_export` ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') // autogenerated xmls ->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_1.xml') ->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_2.xml') // yml ->notPath('src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml') // test template ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php') // explicit heredoc test ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php') ) ; .travis.php000066400000000000000000000030651266465517700132040ustar00rootroot00000000000000 $_SERVER['argc']) { echo "Usage: commit-range branch dir1 dir2 ... dirN\n"; exit(1); } $dirs = $_SERVER['argv']; array_shift($dirs); $range = array_shift($dirs); $branch = array_shift($dirs); $packages = array(); $flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0; foreach ($dirs as $dir) { if (!`git diff --name-only $range -- $dir`) { 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://'.__DIR__.'/', )); $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' *"); $package->version = $branch.'.x-dev'; $package->dist['type'] = 'tar'; $package->dist['url'] = 'file://'.__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); foreach ($versions->package->versions as $version => $package) { $packages[$package->name] += array($version => $package); } } file_put_contents('packages.json', json_encode(compact('packages'), $flags)); .travis.yml000066400000000000000000000120021266465517700132050ustar00rootroot00000000000000language: php sudo: false git: depth: 1 addons: apt_packages: - parallel - language-pack-fr-base env: global: - MIN_PHP=5.3.9 matrix: include: - php: hhvm - php: 5.3 - php: 5.4 - php: 5.5 - php: 5.6 env: deps=high - php: 7.0 env: deps=low fast_finish: true cache: directories: - .phpunit - php-$MIN_PHP services: mongodb before_install: # Matrix lines for intermediate PHP versions are skipped for pull requests - if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi; # A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${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 [[ $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 - echo session.gc_probability = 0 >> $INI_FILE - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE); fi; - if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $INI_FILE); fi; - if [[ $TRAVIS_PHP_VERSION = 5.* && ! $deps ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi; - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; - if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; - if [[ $deps != skip ]]; then composer self-update; fi; - if [[ $deps != skip ]]; then ./phpunit install; fi; - export PHPUNIT=$(readlink -f ./phpunit) install: - if [[ $deps != 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 [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; 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 [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi; script: - if [[ ! $deps ]]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi; - if [[ ! $deps ]]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi; - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${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 --prefer-dist; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY; fi; - if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --prefer-dist --prefer-lowest --prefer-stable; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi; - if [[ $deps = skip ]]; then echo This matrix line is skipped for pull requests.; fi; CHANGELOG-2.2.md000066400000000000000000000564611266465517700132250ustar00rootroot00000000000000CHANGELOG for 2.2.x =================== This changelog references the relevant changes (bug and security fixes) done in 2.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/v2.2.0...v2.2.1 * 2.2.11 (2013-12-02) * bug #9656 [DoctrineBridge] normalized class names in the ORM type guesser (fabpot) * bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh) * bug #9643 [WebProfilerBundle] Fixed js escaping in time.html.twig (hason) * bug #9639 Modified guessDefaultEscapingStrategy to not escape txt templates (fabpot) * bug #9314 [Form] Fix DateType for 32bits computers. (WedgeSama) * bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason) * bug #9625 [HttpFoundation] Do not return an empty session id if the session was closed (Taluu) * bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99) * bug #9535 No Entity Manager defined exception (armetiz) * bug #9485 [Acl] Fix for issue #9433 (guilro) * bug #9516 [AclProvider] Fix incorrect behavior when partial results returned from cache (superdav42) * bug #9537 [FrameworkBundle] Fix mistake in translation's service definition. (phpmike) * bug #9367 [Process] Check if the pipe array is empty before calling stream_select() (jfposton) * bug #9469 [Propel1] re-factor Propel1 ModelChoiceList (havvg) * 2.2.10 (2013-11-13) * bug #9499 Request::overrideGlobals() may call invalid ini value (denkiryokuhatsuden) * bug #9212 [Validator] Force Luhn Validator to only work with strings (Richtermeister) * bug #9431 [DependencyInjection] fixed YamlDumper did not make services private. (realityking) * bug #9412 [HttpFoundation] added content length header to BinaryFileResponse (kbond) * bug #9388 [Form] Fixed: The "data" option is taken into account even if it is NULL (bschussek) * bug #9391 [Serializer] Fixed the error handling when decoding invalid XML to avoid a Warning (stof) * bug #9378 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive (matthieuprat) * bug #9354 [Process] Fix #9343 : revert file handle usage on Windows platform (romainneutron) * bug #9333 [Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek) * bug #9338 [DoctrineBridge] Added type check to prevent calling clear() on arrays (bschussek) * bug #9327 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek) * bug #9308 [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays (bschussek) * bug #9274 [Yaml] Fixed the escaping of strings starting with a dash when dumping (stof) * bug #9270 [Templating] Fix in ChainLoader.php (janschoenherr) * bug #9246 [Session] fixed wrong started state (tecbot) * 2.2.9 (2013-10-10) * [Security] limited the password length passed to encoders * bug #9237 [FrameworkBundle] assets:install command should mirror .dotfiles (.htaccess) (FineWolf) * bug #9223 [Translator] PoFileDumper - PO headers (Padam87) * bug #9257 [Process] Fix 9182 : random failure on pipes tests (romainneutron) * bug #9222 [Bridge] [Propel1] Fixed guessed relations (ClementGautier) * bug #9214 [FramworkBundle] Check event listener services are not abstract (lyrixx) * bug #9207 [HttpKernel] Check for lock existence before unlinking (ollietb) * bug #9184 Fixed cache warmup of paths which contain back-slashes (fabpot) * bug #9192 [Form] remove MinCount and MaxCount constraints in ValidatorTypeGuesser (franek) * bug #9190 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response (realsim) * bug #9188 [Form] add support for Length and Range constraint in ValidatorTypeGuesser (franek) * bug #8809 [Form] enforce correct timezone (Burgov) * bug #9169 Fixed client insulation when using the terminable event (fabpot) * bug #9154 Fix problem with Windows file links (backslash in JavaScript string) (fabpot) * bug #9103 [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values (stloyd) * 2.2.8 (2013-09-25) * same as 2.2.7 * 2.2.7 (2013-09-25) * 8980954: bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com" * 3108c71: [Locale] added support for the position argument to NumberFormatter::parse() * 0774c79: [Locale] added some more stubs for the number formatter * e5282e8: [DomCrawler]Crawler guess charset from html * 0e80d88: fixes RequestDataCollector bug, visible when used on Drupal8 * c8d0342: [Console] fixed exception rendering when nested styles * a47d663: [Console] fixed the formatter for single-char tags * c6c35b3: [Console] Escape exception message during the rendering of an exception * 0e437c5: [BrowserKit] Fixed the handling of parameters when redirecting * 958ec09: NativeSessionStorage regenerate * 0d6af5c: Use setTimeZone if this method exists. * 773e716: [HttpFoundation] Fixed the way path to directory is trimmed. * 42019f6: [Console] Fixed argument parsing when a single dash is passed. * b591419: [HttpFoundation] removed double-slashes (closes #8388) * 4f5b8f0: [HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create() * 4c1dbc7: [TwigBridge] fixed form rendering when used in a template with dynamic inheritance * 8444339: [HttpKernel] added a check for private event listeners/subscribers * ce7de37: [DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes #8425) * 37102dc: [Process] Close unix pipes before calling `proc_close` to avoid a deadlock * 8c2a733: [HttpFoundation] fixed format duplication in Request * 1e75cf9: [Process] Fix #8970 : read output once the process is finished, enable pipe tests on Windows * ed83752: [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted * 30aa1de: [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys * 49f5027: [HttpKernel] fixer HInclude src (closes #8951) * c567262: Fixed escaping of service identifiers in configuration * 4a76c76: [Process][2.2] Fix Process component on windows * 65814ba: Request->getPort() should prefer HTTP_HOST over SERVER_PORT * e75d284: Fixing broken http auth digest in some circumstances (php-fpm + apache). * 899f176: [Security] fixed a leak in ExceptionListener * 2fd8a7a: [Security] fixed a leak in the ContextListener * 4e9d990: Ignore posix_istatty warnings * 2d34e78: [BrowserKit] fixed method/files/content when redirecting a request * 64e1655: [BrowserKit] removed some headers when redirecting a request * 96a4b00: [BrowserKit] fixed headers when redirecting if history is set to false (refs #8697) * c931eb7: [HttpKernel] fixed route parameters storage in the Request data collector (closes #8867) * 96bb731: optimized circular reference checker * 91234cd: [HttpKernel] changed fragment URLs to be relative by default (closes #8458) * 4922a80: [FrameworkBundle] added support for double-quoted strings in the extractor (closes #8797) * 0d07af8: [BrowserKit] Pass headers when `followRedirect()` is called * d400b5a: Return BC compatibility for `@Route` parameters and default values * 2.2.6 (2013-08-26) * f936b41: clearToken exception is thrown at wrong place. * d0faf55: [Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed * 566d79c: [Yaml] fixed embedded folded string parsing * 0951b8d: [Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used * 4563f1b: [Yaml] Fix comment containing a colon on a scalar line being parsed as a hash. * 7e87eb1: fixed request format when forwarding a request * ccaaedf: [Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms) * 00bc270: [Form] Fixed: submit() reacts to dynamic modifications of the form children * 05fdb12: Fixed issue #6932 - Inconsistent locale handling in subrequests * b3c3159: fixed locale of sub-requests when explicitely set by the developer (refs #8821) * b72bc0b: [Locale] fixed build-data exit code in case of an error * 9bb7a3d: fixed request format of sub-requests when explicitely set by the developer (closes #8787) * fa35597: Sets _format attribute only if it wasn't set previously by the user. * f946108: fixed the format of the request used to render an exception * 51022c3: Fix typo in the check_path validator * 5f7219e: added a missing use statement (closes #8808) * 262879d: fix for Process:isSuccessful() * 0723c10: [Process] Use a consistent way to reset data of the process latest run * 85a9c9d: [HttpFoundation] Fixed removing a nonexisting namespaced attribute. * 191d320: [Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector * c6ecd83: SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event * 99adcf1: {HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage * ab9a96b: Fixes for hasParameterOption and getParameterOption methods of ArgvInput * dbd0855: Added sleep() workaround for windows php rename bug * fa769a2: [Process] Add more precision to Process::stop timeout * 3ef517b: [Process] Fix #8739 * 18896d5a: [Validator] fixed the wrong isAbstract() check against the class (fixed #8589) * e8e76ec: [TwigBridge] Prevent code extension to display warning * 1a73b44: added missing support for the new output API in PHP 5.4+ * e0c7d3d: Fixed bug introduced in #8675 * 0b965fb: made the filesystem loader compatible with Twig 2.0 * 322f880: replaced deprecated Twig features * 2.2.5 (2013-08-07) * c35cc5b: added trusted hosts check * 6d555bc: Fixed metadata serialization * cd51d82: [Form] fixed wrong call to setTimeZone() (closes #8644) * 5c359a8: Fix issue with \DateTimeZone::UTC / 'UTC' for PHP 5.4 * 97cbb19: [Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser * c138304: [routing] added ability for apache matcher to handle array values * b41cf82: [Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes #8589) * 3553c71: return 0 if there is no valid data * ae7fa11: [Twig] fixed TwigEngine::exists() method when a template contains a syntax error (closes #8546) * 28e0709: [Validator] fixed ConstraintViolation:: incorrect when nested * 890934d: handle Optional and Required constraints from XML or YAML sources correctly * a2eca45: Fixed #8455: PhpExecutableFinder::find() does not always return the correct binary * 485d53a: [DependencyInjection] Fix Container::camelize to convert beginning and ending chars * 2317443: [Security] fixed issue where authentication listeners clear unrelated tokens * 2ebb783: fix issue #8499 modelChoiceList call getPrimaryKey on a non object * d3eb9b7: [Validator] Fixed groups argument misplace for validateValue method from validator class * 2.2.4 (2013-07-15) * 52e530d: Fixed NativeSessionStorage:regenerate when does not exists * bb59f40: Reverts JSON_NUMERIC_CHECK * 9c5f8c6: [Yaml] removed wrong comment removal inside a string block * 2dc1ee0: [HtppKernel] fixed inline fragment renderer * 06b69b8: fixed inline fragment renderer * 91bb757: ProgressHelper shows percentage complete. * 9d1004b: fix handling of a default 'template' as a string * 82dbaee: [HttpKernel] fixed the inline renderer when passing objects as attributes (closes #7124) * 6dbd1e1: [WebProfiler] fix content-type parameter * a830001: Passed the config when building the Configuration in ConfigurableExtension * c875d0a: [Form] fixed INF usage which does not work on Solaris (closes #8246) * 2.2.3 (2013-06-19) * c0da3ae: [Process] Disable exception on stream_select timeout * 77f2aa8: [HttpFoundation] fixed issue with session_regenerate_id (closes #7380) * bcbbb28: Throw exception if value is passed to VALUE_NONE input, long syntax * 6b71513: fixed date type format pattern regex * 842f3fa: do not re-register commands each time a Console\Application is run * 0991cd0: [Process] moved env check to the Process class (refs #8227) * 8764944: fix issue where $_ENV contains array vals * 4139936: [DomCrawler] Fix handling file:// without a host * de289d2: [Form] corrected interface bind() method defined against in deprecation notice * 0c0a3e9: [Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245) * 849f3ed: [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol * 25e3abd: fix many-to-many Propel1 ModelChoiceList * bce6bd2: [DomCrawler] Fixed a fatal error when setting a value in a malformed field name. * 445b2e3: [Console] fix status code when Exception::getCode returns something like 0.1 * bbfde62: Fixed exit code for exceptions with error code 0 * afad9c7: instantiate valid commands only * 6d2135b: force the Content-Type to html in the web profiler controllers * 2.2.2 (2013-06-02) * 2038329: [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065) * 169c0b9: [Finder] Fix iteration fails with non-rewindable streams * 45b68e0: [Finder] Fix unexpected duplicate sub path related AppendIterator issue * 5321600: Fixed two bugs in HttpCache * 5c317b7: [Console] fix and refactor exit code handling * 1469953: [CssSelector] Fix :nth-last-child() translation * 91b8490: Fix Crawler::children() to not trigger a notice for childless node * 0a4837d: Fixed XML syntax. * a5441b2: Fixed parsing of leading blank lines in folded scalars. Closes #7989. * ef87ba7: [Form] Fixed a method name. * e8d5d16: Fixed Loader import * 60edc58: Fixed fatal error in normalize/denormalizeObject. * 05b987f: [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI * e4913f8: [Filesystem] Fix regression introduced in 10dea948 * 5b7e1e6: added a missing check for the provider key * b0e3ea5: [Validator] fixed wrong URL for XSD * 59b78c7: [Validator] Fixed: $traverse and $deep is passed to the visitor from Validator::validate() * bcb5400: [Form] Fixed transform()/reverseTransform() to always throw TransformationFailedExceptions * 7b2ebbf: [Form] Fixed: String validation groups are never interpreted as callbacks * 0610750: if the repository method returns an array ensure that it's internal poin... * dcced01: [Form] Improved multi-byte handling of NumberToLocalizedStringTransformer * 2b554d7: remove validation related headers when needed * 2a531d7: Fix getPort() returning 80 instead of 443 when X-FORWARDED-PROTO is set to https * 10dea94: [Filesystem] copy() is not working when open_basedir is set * 8757ad4: [Process] Fix #5594 : `termsig` must be used instead of `stopsig` in exceptions when a process is signaled * be34917: [Console] find command even if its name is a namespace too (closes #7860) * 3c97004: Reset all catalogues when adding resource to fallback locale (#7715, #7819) * 0fb35a4: Added reloading of fallback catalogues when calling addResource() (#7715) * 9e49bc8: Re-added context information to log list * 06e21ff: Filesystem::touch() not working with different owners (utime/atime issue) * d98118a: [Config] #7644 add tests for passing number looking attributes as strings * 36d057b: [HttpFoundation][BrowserKit] fixed path when converting a cookie to a string * 495d0e3: [HttpFoundation] fixed empty domain= in Cookie::__toString() * c2bc707: fixed detection of secure cookies received over https * af819a7: [2.2] Pass ESI header to subrequests * 54bcf5c: [Translator] added additional conversion for encodings other than utf-8 * 67b5797: fixed source messages to accept pluralized messages [Validator][translation][japanese] add messages for new validator * 8a434ed: fix a DI circular reference recognition bug * 22bf965: [DependencyInjection] fixed wrong exception class * 5abf887: Fix default value handling for multi-value options * da156d3: fix overwriting of request's locale if attribute _locale is missing * 1adbe3c: [HttpKernel] truncate profiler token to 6 chars (see #7665) * d552e4c: [HttpFoundation] do not use server variable PATH_INFO because it is already decoded and thus symfony is fragile to double encoding of the path * 4c51ec7: Fix download over SSL using IE < 8 and binary file response * 46909fa: [Console] Fix merging of application definition, fixes #7068, replaces #7158 * 972bde7: [HttpKernel] fixed the Kernel when the ClassLoader component is not available (closes #7406) * f163226: fixed output of bag values * 047212a: [Yaml] fixed handling an empty value * 94a9cdc: [Routing][XML Loader] Add a possibility to set a default value to null * 302d44f: [Console] fixed handling of "0" input on ask * 383a84b: fixed handling of "0" input on ask * 0f0c29c: [HttpFoundation] Fixed bug in key searching for NamespacedAttributeBag * 7fc429f: [Form] DateTimeToRfc3339Transformer use proper transformation exteption in reverse transformation * 9fcd2f6: [HttpFoundation] fixed the creation of sub-requests under some circumstances for IIS * 8a9e898: Fix finding ACLs from ObjectIdentity's with different types * a3826ab: #7531: [HttpKernel][Config] FileLocator adds NULL as global resource path * 9d71ebe: Fix autocompletion of command names when namespaces conflict * bec8ff1: Fix timeout in Process::stop method * 3780fdb: Fix Process timeout * 99256e4: [HttpKernel] Remove args from 5.3 stack traces to avoid filling log files, fixes #7259 * e8cae94: fix overwriting of request's locale if attribute _locale is missing * c4da2d9: [HttpFoundation] getClientIp is fixed. * 2.2.1 (2013-04-06) * 751abe1: Doctrine cannot handle bare random non-utf8 strings * 673fd9b: idAsIndex should be true with a smallint or bigint id field. * 64a1d39: Fixed long multibyte parameter logging in DbalLogger:startQuery * 4cf06c1: Keep the file extension in the temporary copy and test that it exists (closes #7482) * 64ac34d: [Security] fixed wrong interface * 9875c4b: Added '@@' escaping strategy for YamlFileLoader and YamlDumper * bbcdfe2: [Yaml] fixed bugs with folded scalar parsing * 5afea04: [Form] made DefaultCsrfProvider using session_status() when available * c928ddc: [HttpFoudantion] fixed Request::getPreferredLanguage() * e6b7515: [DomCrawler] added support for query string with slash * 633c051: Fixed invalid file path for hiddeninput.exe on Windows. * 7ef90d2: fix xsd definition for strict-requirements * 39445c5: [WebProfilerBundle] Fixed the toolbar styles to apply them in IE8 * 601da45: [ClassLoader] fixed heredocs handling * 17dc2ff: [HttpRequest] fixes Request::getLanguages() bug * 67fbbac: [DoctrineBridge] Fixed non-utf-8 recognition * e51432a: sub-requests are now created with the same class as their parent * cc3a40e: [FrameworkBundle] changed temp kernel name in cache:clear * d7a7434: [Routing] fix url generation for optional parameter having a null value * ef53456: [DoctrineBridge] Avoids blob values to be logged by doctrine * 6575df6: [Security] use current request attributes to generate redirect url? * 7216cb0: [Validator] fix showing wrong max file size for upload errors * c423f16: [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge * 7d87ecd: [FrameworkBundle] fixed cache:clear command's warmup * 5ad4bd1: [TwigBridge] now enter/leave scope on Twig_Node_Module * fe4cc24: [TwigBridge] fixed fixed scope & trans_default_domain node visitor * fc47589: [BrowserKit] added ability to ignored malformed set-cookie header * 602cdee: replace INF to PHP_INT_MAX inside Finder component. * 5bc30bb: [Translation] added xliff loader/dumper with resname support * 663c796: Property accessor custom array object fix * 4f3771d: [2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions * a735cbd: fix xargs pipe to work with spaces in dir names * 15bf033: [FrameworkBundle] fix router debug command * d16d193: [FramworkBundle] removed unused property of trans update command * 523ef29: Fix warning for buildXml method * 7241be9: [Finder] fixed a potential issue on Solaris where INF value is wrong (refs #7269) * 1d3da29: [FrameworkBundle] avoids cache:clear to break if new/old folders already exist * b9cdb9a: [HttpKernel] Fixed possible profiler token collision (closes #7272, closes #7171) * d1f5d25: [FrameworkBundle] Fixes invalid serialized objects in cache * c82c754: RedisProfilerStorage wrong db-number/index-number selected * e86fefa: Unset loading[$id] in ContainerBuilder on exception * 709518b: Default validation message translation fix. * c0687cd: remove() should not use deprecated getParent() so it does not trigger deprecation internally * 708c0d3: adjust routing tests to not use prefix in addCollection * acff735: [Routing] trigger deprecation warning for deprecated features that will be removed in 2.3 * 41ad9d8: [Routing] make xml loader more tolerant * 73bead7: [ClassLoader] made DebugClassLoader idempotent * a4ec677: [DomCrawler] Fix relative path handling in links * 6681df0: [Console] fixed StringInput binding * 5bf2f71: [Console] added deprecation annotation * 8d9cd42: Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129 * c97ee8d: [Translator] mention that the message id may also be an object that can be cast to string in TranslatorInterface and fix the IdentityTranslator that did not respect this * 5a36b2d: [Translator] fix MessageCatalogueInterface::getFallbackCatalogue that can return null * 2.2.0 (2013-03-01) * 5b19c89: [Console] fixed unparsed StringInput tokens * e92b76c: Mask PHP_AUTH_PW header in profiler * bae83c7: [TwigBridge] fixed trans twig extractor * f40adbc: [Finder] adds adapter selection/unselection capabilities * 8f8ba38: [DomCrawler] fix handling of schemes by Link::getUri() * 83382bc: [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056) * b1ea8e5: Fixed handling absent href attribute in base tag * 83a61cf: fixed paths/notPaths regex for shell adapters * 32c5bf7: fix issue 4911 * 13b8ce0: Adds expandable globs support to shell adapters * 850bd5a: [HttpFoundation] Fixed messed up headers * 4ecc246: Fixes AppCache + ESI + Stopwatch problem * 0690709: added a DebuClassLoader::findFile() method to make the wrapping less invasive * da22926: [Validator] gracefully handle transChoice errors * 635b1fc: StringInput resets the given options * 2.2.0-RC3 (2013-02-24) * b2080c4: [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes #6750) * b7bd630: [Form] Fixed TimeType not to render a "size" attribute in select tags * 368f62f: Expanded fault-tolerance for unusual cookie dates * 171cff0: [FrameworkBundle] Fix a BC for Hinclude global template * 3e40c17: [HttpKernel] fixed locale management when exiting sub-requests * 3933912: fixed HInclude renderer (closes #7113) * 189fba6: Removed some leaking deprecation warning in the Form component * d0e4b76: [HttpFoundation] fixed, overwritten CONTENT_TYPE * 609636e: [Config] tweaked dumper to indent multi-line info * 0eff68f: Fix REMOTE_ADDR for cached subrequests * 54d7d25: [HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html * f842ae6: [FrameworkBundle] CSRF should be on by default * cb319ac: [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254) * de0f7b7: [HttpFoundation] Added getter for httpMethodParameterOverride state CHANGELOG-2.3.md000066400000000000000000002066161266465517700132250ustar00rootroot00000000000000CHANGELOG for 2.3.x =================== This changelog references the relevant changes (bug and security fixes) done in 2.3 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/v2.3.0...v2.3.1 * 2.3.37 (2016-01-14) * security #17359 do not ship with a custom rng implementation (xabbuh, fabpot) * bug #17326 [Console] Display console application name even when no version set (polc) * bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur) * bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase) * bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity) * bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen) * bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) * bug #17276 [Process] Fix potential race condition (nicolas-grekas) * bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal) * bug #17159 [Yaml] recognize when a block scalar is left (xabbuh) * bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma) * bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas) * 2.3.36 (2015-12-26) * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) * bug #16826 Embedded identifier support (mihai-stancu) * bug #17129 [Config] Fix array sort on normalization in edge case (romainneutron) * bug #17094 [Process] More robustness and deterministic tests (nicolas-grekas) * bug #17112 [PropertyAccess] Reorder elements array after PropertyPathBuilder::replace (alekitto) * bug #16797 [Filesystem] Recursively widen non-executable directories (Slamdunk) * bug #17040 [Console] Avoid extra blank lines when rendering exceptions (ogizanagi) * 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 #16860 [Yaml] do not remove "comments" in scalar blocks (xabbuh) * 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 #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh) * bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas) * bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion) * bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh) * bug #16799 Improve error message for undefined DIC aliases (mpdude) * bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan) * bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas) * bug #16733 [Console] do not encode backslashes in console default description (Tobion) * bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude) * bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion) * 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 #16386 Bug #16343 [Router] Too many Routes ? (jelte) * 2.3.35 (2015-11-23) * security #16631 CVE-2015-8124: Session Fixation in the "Remember Me" Login Feature (xabbuh) * security #16630 CVE-2015-8125: Potential Remote Timing Attack Vulnerability in Security Remember-Me Service (xabbuh) * bug #16588 Sent out a status text for unknown HTTP headers. (dawehner) * bug #16295 [DependencyInjection] Unescape parameters for all types of injection (Nicofuma) * bug #16574 [Process] Fix PhpProcess with phpdbg runtime (nicolas-grekas) * 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) * bug #16292 fix race condition at mkdir (#16258) (ewgRa) * bug #16462 [PropertyAccess] Fix dynamic property accessing. (dunglas) * bug #16294 [PropertyAccess] Major performance improvement (dunglas) * bug #16331 fixed Twig deprecation notices (fabpot) * bug #16306 [DoctrineBridge] Fix issue which prevent the profiler to explain a query (Baachi) * bug #16359 Use mb_detect_encoding with $strict = true (nicolas-grekas) * bug #16144 [Security] don't allow to install the split Security packages (xabbuh) * 2.3.34 (2015-10-27) * bug #16288 [Process] Inherit env vars by default in PhpProcess (nicolas-grekas) * bug #16302 [DoctrineBridge] Fix required guess of boolean fields (enumag) * bug #16177 [HttpFoundation] Fixes /0 subnet handling in IpUtils (ultrafez) * bug #16259 [Validator] Allow an empty path in a URL with only a fragment or a query (jakzal) * bug #16226 [filesystem] makeRelativePath does not work correctly from root (jaytaph, fabpot) * bug #16182 [Process] Workaround buggy PHP warning (cbj4074) * bug #16095 [Console] Add additional ways to detect OS400 platform (johnkary) * bug #15793 [Yaml] Allow tabs before comments at the end of a line (superdav42) * bug #16152 Fix URL validator failure with empty string (fabpot, bocharsky-bw) * bug #15121 fixed #15118 [Filesystem] mirroring a symlink copies absolute file path (danepowell) * bug #15161 avoid duplicated path with addPrefix (remicollet) * bug #16133 compatibility with Security component split (xabbuh) * bug #16123 Command list ordering fix (spdionis, fabpot) * bug #14842 [Security][bugfix] "Remember me" cookie cleared on logout with custom "secure"/"httponly" config options (MacDada) * bug #13627 [Security] InMemoryUserProvider now concerns whether user's password is changed when refreshing (issei-m) * bug #16090 Fix PropertyAccessor modifying array in object when array key does no… (pierredup) * bug #16111 Throw exception if tempnam returns false in ProcessPipes (pierredup) * bug #16053 [Console] use PHP_OS instead of php_uname('s') (xabbuh) * bug #15860 [Yaml] Fix improper comments removal (ogizanagi) * bug #16050 [TwigBundle] fix useless and failing test (Tobion) * bug #15482 [Yaml] Improve newline handling in folded scalar blocks (teohhanhui) * bug #15976 [Console] do not make the getHelp() method smart (xabbuh) * bug #15799 [HttpFoundation] NativeSessionStorage `regenerate` method wrongly sets storage as started (iambrosi) * bug #15533 [Console] Fix input validation when required arguments are missing (jakzal) * bug #15915 Detect Mintty for color support on Windows (stof) * bug #15906 Forbid serializing a Crawler (stof) * bug #15682 [Form] Added exception when setAutoInitialize() is called when locked (jaytaph) * bug #15846 [FrameworkBundle] Advanced search templates of bundles (yethee) * bug #15895 [Security] Allow user providers to be defined in many files (lyrixx) * 2.3.33 (2015-09-25) * bug #15821 [EventDispatcher] fix memory leak in getListeners (Tobion) * bug #15826 [Finder] Optimize the hot-path (nicolas-grekas) * bug #15802 [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories (nicolas-grekas) * bug #15803 [Finder] Exclude files based on path before applying the sorting (stof) * bug #13794 [DomCrawler] Invalid uri created from forms if base tag present (danez) * bug #15637 Use ObjectManager interface instead of EntityManager (gnat42) * bug #14802 [HttpKernel] fix broken multiline (sstok) * bug #14841 [DoctrineBridge] Fixed #14840 (saksmt) * bug #15770 [Yaml] Fix the parsing of float keys (jmgq) * bug #15771 [Console] Ensure the console output is only detected as decorated when both stderr and stdout support colors (Seldaek) * bug #15750 Add tests to the recently added exceptions thrown from YamlFileLoaders (jakzal) * bug #15718 Fix that two DirectoryResources with different patterns would be deduplicated (mpdude) * bug #14916 [WebProfilerBundle] Added tabindex="-1" to not interfer with normal UX (drAlberT) * bug #15725 Dispatch console.terminate *after* console.exception (Seldaek) * bug #15731 improve exceptions when parsing malformed files (xabbuh) * bug #15729 [Kernel] Integer version constants (Tobion) * bug #15527 [Translator][fallback catalogues] fixed circular reference. (aitboudad) * 2.3.32 (2015-09-01) * bug #15601 [console] Use the description when no help is available (Nicofuma) * bug #15603 [HttpKernel] Do not normalize the kernel root directory path #15567 (leofeyer) * bug #15428 Fix the validation of form resources to register the default theme (stof) * bug #15619 [Translation] Fix the string casting in the XliffFileLoader (stof) * bug #15575 Add appveyor.yml for C.I. on Windows (nicolas-grekas) * bug #15611 [Translation][Xliff Loader] Support omitting the node in an .xlf file. (leofeyer) * bug #15549 [FrameworkBundle] Fix precedence of xdebug.file_link_format (nicolas-grekas) * bug #15589 made Symfony compatible with both Twig 1.x and 2.x (fabpot) * bug #15535 made Symfony compatible with both Twig 1.x and 2.x (fabpot) * bug #14372 [DoctrineBridge][Form] fix EntityChoiceList when indexing by primary foreign key (giosh94mhz) * bug #15489 Implement the support of timezone objects in the stub IntlDateFormatter (stof) * bug #15426 [Serializer] Add support for variadic arguments in the GetSetNormalizer (stof) * bug #15480 [Yaml] Nested merge keys (mathroc) * bug #15445 do not remove space between attributes (greg0ire) * bug #15263 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() (axiac) * bug #15425 [Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader (wdalmut, stof) * bug #15074 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? (nuncanada) * bug #15380 do not dump leading backslashes in class names (xabbuh) * bug #15376 [ClassMapGenerator] Skip ::class constant (WouterJ) * bug #15170 [Config] type specific check for emptiness (xabbuh) * bug #15411 Fix the handling of null as locale in the stub intl classes (stof) * bug #15413 Fix the return value on error for intl methods returning arrays (stof) * bug #15392 Fix missing _route parameter notice in RouterListener logging case (Haehnchen) * bug #15386 [php7] Fix for substr() always returning a string (nicolas-grekas) * bug #15355 [Security] Do not save the target path in the session for a stateless firewall (lyrixx) * bug #15330 [Console] Fix console output with closed stdout (jakzal) * bug #15326 [Security] fix check for empty usernames (xabbuh) * bug #15249 [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content (dunglas) * bug #15282 [HttpFoundation] Behaviour change in PHP7 for substr (Nicofuma) * 2.3.31 (2015-07-13) * bug #15248 Added 'default' color (jaytaph) * bug #15243 Reload the session after regenerating its id (jakzal) * bug #15202 [Security] allow to use `method` in XML configs (xabbuh) * bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer) * bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx) * bug #15110 Add a way to reset the singleton (dawehner) * bug #15163 Update DateTimeToArrayTransformer.php (zhil) * bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi) * bug #15146 Towards 100% HHVM compat (nicolas-grekas) * bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart) * bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh) * bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas) * bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh) * bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan) * bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET) * bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne) * bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz) * bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary) * bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart) * bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad) * bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada) * bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas) * bug #15000 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas) * bug #14897 Allow new lines in Messages translated with transchoice() (replacement for #14867) (azine) * bug #14895 [Form] Support DateTimeImmutable in transform() (c960657) * bug #14859 Improve the config validation in TwigBundle (stof) * bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi) * bug #14807 [Security][Acl] enforce string identifiers (xabbuh) * 2.3.30 (2015-05-30) * bug #14262 [REVERTED] [TwigBundle] Refresh twig paths when resources change. (aitboudad) * 2.3.29 (2015-05-26) * security #14759 CVE-2015-4050 [HttpKernel] Do not call the FragmentListener if _controller is already defined (jakzal) * bug #14715 [Form] Check instance of FormBuilderInterface instead of FormBuilder (dosten) * bug #14678 [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts (MacDada) * bug #14635 [HttpKernel] Handle an array vary header in the http cache store (jakzal) * bug #14513 [console][formater] allow format toString object. (aitboudad) * bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez) * bug #14593 [Security][Firewall] Avoid redirection to XHR URIs (asiragusa) * bug #14618 [DomCrawler] Throw an exception if a form field path is incomplete (jakzal) * bug #14698 Fix HTML escaping of to-source links (nicolas-grekas) * bug #14690 [HttpFoundation] IpUtils::checkIp4() should allow `/0` networks (zerkms) * bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad) * bug #13633 [ServerBag] Handled bearer authorization header in REDIRECT_ form (Lance0312) * bug #13637 [CSS] WebProfiler break words (nicovak) * bug #14633 [EventDispatcher] make listeners removable from an executed listener (xabbuh) * 2.3.28 (2015-05-10) * bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason) * bug #14501 [ProxyBridge] Fix proxy classnames generation (xphere) * bug #14498 [FrameworkBundle] Added missing log in server:run command (lyrixx) * bug #14484 [SecurityBundle][WebProfiler] check authenticated user by tokenClass instead of username. (aitboudad) * bug #14497 [HttpFoundation] Allow curly braces in trusted host patterns (sgrodzicki) * bug #14436 Show a better error when the port is in use (dosten) * bug #14463 [Validator] Fixed Choice when an empty array is used in the "choices" option (webmozart) * bug #14402 [FrameworkBundle][Translation] Check for 'xlf' instead of 'xliff' (xelaris) * bug #14272 [FrameworkBundle] Workaround php -S ignoring auto_prepend_file (nicolas-grekas) * bug #14345 [FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors (nicolas-grekas) * bug #14325 [Routing][DependencyInjection] Support .yaml extension in YAML loaders (thunderer) * bug #14344 [Translation][fixed test] refresh cache when resources are no longer fresh. (aitboudad) * bug #14268 [Translator] Cache does not take fallback locales into consideration (sf2.3) (mpdude) * bug #14192 [HttpKernel] Embed the original exception as previous to bounced exceptions (nicolas-grekas) * bug #14102 [Enhancement] netbeans - force interactive shell when limited detection (cordoval) * bug #14191 [StringUtil] Fixed singularification of 'movies' (GerbenWijnja) * 2.3.27 (2015-04-01) * security #14167 CVE-2015-2308 (nicolas-grekas) * security #14166 CVE-2015-2309 (neclimdul) * bug #14010 Replace GET parameters when changed in form (WouterJ) * bug #13991 [Dependency Injection] Improve PhpDumper Performance for huge Containers (BattleRattle) * bug #13997 [2.3+][Form][DoctrineBridge] Improved loading of entities and documents (guilhermeblanco) * bug #13953 [Translation][MoFileLoader] fixed load empty translation. (aitboudad) * bug #13912 [DependencyInjection] Highest precedence for user parameters (lyrixx) * 2.3.26 (2015-03-17) * bug #13927 Fixing wrong variable name from #13519 (weaverryan) * bug #13519 [DependencyInjection] fixed service resolution for factories (fabpot) * bug #13901 [Bundle] Fix charset config (nicolas-grekas, bamarni) * bug #13911 [HttpFoundation] MongoDbSessionHandler::read() now checks for valid session age (bzikarsky) * bug #13890 Fix XSS in Debug exception handler (fabpot) * bug #13744 minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource (bijibox) * bug #13708 [HttpFoundation] fixed param order for Nginx's x-accel-mapping (phansys) * bug #13767 [HttpKernel] Throw double-bounce exceptions (nicolas-grekas) * bug #13769 [Form] NativeRequestHandler file handling fix (mpajunen) * bug #13779 [FrameworkBundle] silence E_USER_DEPRECATED in insulated clients (nicolas-grekas) * bug #13715 Enforce UTF-8 charset for core controllers (WouterJ) * bug #13683 [PROCESS] make sure /dev/tty is readable (staabm) * bug #13733 [Process] Fixed PhpProcess::getCommandLine() result (francisbesset) * bug #13618 [PropertyAccess] Fixed invalid feedback -> foodback singularization (WouterJ) * bug #13630 [Console] fixed ArrayInput, if array contains 0 key. (arima-ryunosuke) * bug #13647 [FrameworkBundle] Fix title and placeholder rendering in php form templates (jakzal) * bug #13607 [Console] Fixed output bug, if escaped string in a formatted string. (tronsha) * bug #13466 [Security] Remove ContextListener's onKernelResponse listener as it is used (davedevelopment) * bug #12864 [Console][Table] Fix cell padding with multi-byte (ttsuruoka) * bug #13375 [YAML] Fix one-liners to work with multiple new lines (Alex Pott) * bug #13545 fixxed order of usage (OskarStark) * bug #13567 [Routing] make host matching case-insensitive (Tobion) * 2.3.25 (2015-01-30) * bug #13528 [Validator] reject ill-formed strings (nicolas-grekas) * bug #13525 [Validator] UniqueEntityValidator - invalidValue fixed. (Dawid Sajdak) * bug #13527 [Validator] drop grapheme_strlen in LengthValidator (nicolas-grekas) * bug #13376 [FrameworkBundle][config] allow multiple fallback locales. (aitboudad) * bug #12972 Make the container considered non-fresh if the environment parameters are changed (thewilkybarkid) * bug #13309 [Console] fixed 10531 (nacmartin) * bug #13352 [Yaml] fixed parse shortcut Key after unindented collection. (aitboudad) * bug #13039 [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info (rk3rn3r) * bug #13250 [Twig][Bridge][TranslationDefaultDomain] add support of named arguments. (aitboudad) * bug #13332 [Console] ArgvInput and empty tokens (Taluu) * bug #13293 [EventDispatcher] Add missing checks to RegisterListenersPass (znerol) * bug #13262 [Yaml] Improve YAML boolean escaping (petert82, larowlan) * bug #13420 [Debug] fix loading order for legacy classes (nicolas-grekas) * bug #13371 fix missing comma in YamlDumper (garak) * bug #13365 [HttpFoundation] Make use of isEmpty() method (xelaris) * bug #13347 [Console] Helper\TableHelper->addRow optimization (boekkooi) * bug #13346 [PropertyAccessor] Allow null value for a array (2.3) (boekkooi) * bug #13170 [Form] Set a child type to text if added to the form without a type. (jakzal) * bug #13334 [Yaml] Fixed #10597: Improved Yaml directive parsing (VictoriaQ) * 2.3.24 (2015-01-07) * bug #13286 [Security] Don't destroy the session on buggy php releases. (derrabus) * bug #12417 [HttpFoundation] Fix an issue caused by php's Bug #66606. (wusuopu) * bug #13200 Don't add Accept-Range header on unsafe HTTP requests (jaytaph) * bug #12491 [Security] Don't send remember cookie for sub request (blanchonvincent) * bug #12574 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri (nyroDev) * bug #13185 Fixes Issue #13184 - incremental output getters now return empty strings (Bailey Parker) * bug #13145 [DomCrawler] Fix behaviour with tag (dkop, WouterJ) * bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot) * bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot) * bug #12572 [HttpFoundation] fix checkip6 (Neime) * bug #13075 [Config] fix error handler restoration in test (nicolas-grekas) * bug #13081 [FrameworkBundle] forward error reporting level to insulated Client (nicolas-grekas) * bug #13053 [FrameworkBundle] Fixed Translation loader and update translation command. (saro0h) * bug #13048 [Security] Delete old session on auth strategy migrate (xelaris) * bug #12999 [FrameworkBundle] fix cache:clear command (nicolas-grekas) * bug #13004 add a limit and a test to FlattenExceptionTest. (Daniel Wehner) * bug #12961 fix session restart on PHP 5.3 (Tobion) * bug #12761 [Filesystem] symlink use RealPath instead LinkTarget (aitboudad) * bug #12855 [DependencyInjection] Perf php dumper (nicolas-grekas) * bug #12894 [FrameworkBundle][Template name] avoid error message for the shortcut n... (aitboudad) * bug #12858 [ClassLoader] Fix undefined index in ClassCollectionLoader (szicsu) * 2.3.23 (2014-12-03) * bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip) * bug #12784 [DependencyInjection] make paths relative to __DIR__ in the generated container (nicolas-grekas) * bug #12716 [ClassLoader] define constant only if it wasn't defined before (xabbuh) * bug #12553 [Debug] fix error message on double exception (nicolas-grekas) * bug #12550 [FrameworkBundle] backport #12489 (xabbuh) * bug #12570 Fix initialized() with aliased services (Daniel Wehner) * bug #12137 [FrameworkBundle] cache:clear command fills *.php.meta files with wrong data (Strate) * 2.3.22 (2014-11-20) * bug #12525 [Bundle][FrameworkBundle] be smarter when guessing the document root (xabbuh) * bug #12296 [SecurityBundle] Authentication entry point is only registered with firewall exception listener, not with authentication listeners (rjkip) * bug #12393 [DependencyInjection] inlined factory not referenced (boekkooi) * bug #12436 [Filesystem] Fixed case for empty folder (yosmanyga) * bug #12370 [Yaml] improve error message for multiple documents (xabbuh) * bug #12170 [Form] fix form handling with OPTIONS request method (Tobion) * bug #12235 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns (webmozart) * bug #12326 [Session] remove invalid hack in session regenerate (Tobion) * bug #12341 [Kernel] ensure session is saved before sending response (Tobion) * bug #12329 [Routing] serialize the compiled route to speed things up (Tobion) * bug #12316 Break infinite loop while resolving aliases (chx) * bug #12313 [Security][listener] change priority of switchuser (aitboudad) * 2.3.21 (2014-10-24) * bug #11696 [Form] Fix #11694 - Enforce options value type check in some form types (kix) * bug #12209 [FrameworkBundle] Fixed ide links (hason) * bug #12208 Add missing argument (WouterJ) * bug #12197 [TwigBundle] do not pass a template reference to twig (Tobion) * bug #12196 [TwigBundle] show correct fallback exception template in debug mode (Tobion) * bug #12187 [CssSelector] don't raise warnings when exception is thrown (xabbuh) * bug #11998 [Intl] Integrated ICU data into Intl component #2 (webmozart) * bug #11920 [Intl] Integrated ICU data into Intl component #1 (webmozart) * 2.3.20 (2014-09-28) * bug #9453 [Form][DateTime] Propagate invalid_message & invalid_message_parameters to date & time (egeloen) * bug #11058 [Security] bug #10242 Missing checkPreAuth from RememberMeAuthenticationProvider (glutamatt) * bug #12004 [Form] Fixed ValidatorTypeGuesser to guess properties without constraints not to be required (webmozart) * bug #11904 Make twig ExceptionController conformed with ExceptionListener (megazoll) * bug #11924 [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler (rpg600, webmozart) * bug #11079 Response::isNotModified returns true when If-Modified-Since is later than Last-Modified (skolodyazhnyy) * bug #11989 [Finder][Urgent] Remove asterisk and question mark from folder name in test to prevent windows file system issues. (Adam) * bug #11908 [Translation] [Config] Clear libxml errors after parsing xliff file (pulzarraider) * bug #11937 [HttpKernel] Make sure HttpCache is a trusted proxy (thewilkybarkid) * bug #11970 [Finder] Escape location for regex searches (ymc-dabe) * bug #11837 Use getPathname() instead of string casting to get BinaryFileReponse file path (nervo) * bug #11513 [Translation] made XliffFileDumper support CDATA sections. (hhamon) * bug #11907 [Intl] Improved bundle reader implementations (webmozart) * bug #11874 [Console] guarded against non-traversable aliases (thierrymarianne) * bug #11799 [YAML] fix handling of empty sequence items (xabbuh) * bug #11906 [Intl] Fixed a few bugs in TextBundleWriter (webmozart) * bug #11459 [Form][Validator] All index items after children are to be considered grand-children when resolving ViolationPath (Andrew Moore) * bug #11715 [Form] FormBuilder::getIterator() now deals with resolved children (issei-m) * bug #11892 [SwiftmailerBridge] Bump allowed versions of swiftmailer (ymc-dabe) * bug #11918 [DependencyInjection] remove `service` parameter type from XSD (xabbuh) * bug #11905 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle (webmozart) * bug #11497 Use separated function to resolve command and related arguments (JJK801) * bug #11374 [DI] Added safeguards against invalid config in the YamlFileLoader (stof) * bug #11897 [FrameworkBundle] Remove invalid markup (flack) * bug #11860 [Security] Fix usage of unexistent method in DoctrineAclCache. (mauchede) * bug #11850 [YAML] properly mask escape sequences in quoted strings (xabbuh) * bug #11856 [FrameworkBundle] backport more error information from 2.6 to 2.3 (xabbuh) * bug #11843 [Yaml] improve error message when detecting unquoted asterisks (xabbuh) * 2.3.19 (2014-09-03) * security #11832 CVE-2014-6072 (fabpot) * security #11831 CVE-2014-5245 (stof) * security #11830 CVE-2014-4931 (aitboudad, Jérémy Derussé) * security #11829 CVE-2014-6061 (damz, fabpot) * security #11828 CVE-2014-5244 (nicolas-grekas, larowlan) * bug #10197 [FrameworkBundle] PhpExtractor bugfix and improvements (mtibben) * bug #11772 [Filesystem] Add FTP stream wrapper context option to enable overwrite (Damian Sromek) * bug #11788 [Yaml] fixed mapping keys containing a quoted # (hvt, fabpot) * bug #11160 [DoctrineBridge] Abstract Doctrine Subscribers with tags (merk) * bug #11768 [ClassLoader] Add a __call() method to XcacheClassLoader (tstoeckler) * bug #11726 [Filesystem Component] mkdir race condition fix #11626 (kcassam) * bug #11677 [YAML] resolve variables in inlined YAML (xabbuh) * bug #11639 [DependencyInjection] Fixed factory service not within the ServiceReferenceGraph. (boekkooi) * bug #11778 [Validator] Fixed wrong translations for Collection constraints (samicemalone) * bug #11756 [DependencyInjection] fix @return anno created by PhpDumper (jakubkulhan) * bug #11711 [DoctrineBridge] Fix empty parameter logging in the dbal logger (jakzal) * bug #11692 [DomCrawler] check for the correct field type (xabbuh) * bug #11672 [Routing] fix handling of nullable XML attributes (xabbuh) * bug #11624 [DomCrawler] fix the axes handling in a bc way (xabbuh) * bug #11676 [Form] Fixed #11675 ValueToDuplicatesTransformer accept "0" value (Nek-) * bug #11695 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise (webmozart) * bug #11529 [WebProfilerBundle] Fixed double height of canvas (hason) * bug #11641 [WebProfilerBundle ] Fix toolbar vertical alignment (blaugueux) * bug #11559 [Validator] Convert objects to string in comparison validators (webmozart) * feature #11510 [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field (catchamonkey) * bug #11408 [HttpFoundation] Update QUERY_STRING when overrideGlobals (yguedidi) * bug #11633 [FrameworkBundle] add missing attribute to XSD (xabbuh) * bug #11601 [Validator] Allow basic auth in url when using UrlValidator. (blaugueux) * bug #11609 [Console] fixed style creation when providing an unknown tag option (fabpot) * bug #10914 [HttpKernel] added an analyze of environment parameters for built-in server (mauchede) * bug #11598 [Finder] Shell escape and windows support (Gordon Franke, gimler) * bug #11499 [BrowserKit] Fixed relative redirects for ambiguous paths (pkruithof) * bug #11516 [BrowserKit] Fix browser kit redirect with ports (dakota) * bug #11545 [Bundle][FrameworkBundle] built-in server: exit when docroot does not exist (xabbuh) * bug #11560 Plural fix (1emming) * bug #11558 [DependencyInjection] Fixed missing 'factory-class' attribute in XmlDumper output (kerdany) * bug #11548 [Component][DomCrawler] fix axes handling in Crawler::filterXPath() (xabbuh) * bug #11422 [DependencyInjection] Self-referenced 'service_container' service breaks garbage collection (sun) * bug #11428 [Serializer] properly handle null data when denormalizing (xabbuh) * bug #10687 [Validator] Fixed string conversion in constraint violations (eagleoneraptor, webmozart) * bug #11475 [EventDispatcher] don't count empty listeners (xabbuh) * bug #11436 fix signal handling in wait() on calls to stop() (xabbuh, romainneutron) * bug #11469 [BrowserKit] Fixed server HTTP_HOST port uri conversion (bcremer, fabpot) * bug #11425 Fix issue described in #11421 (Ben, ben-rosio) * bug #11423 Pass a Scope instance instead of a scope name when cloning a container in the GrahpvizDumper (jakzal) * bug #11120 [Process] Reduce I/O load on Windows platform (romainneutron) * bug #11342 [Form] Check if IntlDateFormatter constructor returned a valid object before using it (romainneutron) * bug #11411 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object (webmozart) * bug #11403 [Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator (takeit) * bug #11381 [Process] Use correct test for empty string in UnixPipes (whs, romainneutron) * 2.3.18 (2014-07-15) * [Security] Forced validate of locales passed to the translator * feature #11367 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671) (Andrew Moore) * bug #11386 Remove Spaceless Blocks from Twig Form Templates (chrisguitarguy) * bug #9719 [TwigBundle] fix configuration tree for paths (mdavis1982, cordoval) * bug #11244 [HttpFoundation] Remove body-related headers when sending the response, if body is empty (SimonSimCity) * 2.3.17 (2014-07-07) * bug #11238 [Translation] Added unescaping of ids in PoFileLoader (JustBlackBird) * bug #11194 [DomCrawler] Remove the query string and the anchor of the uri of a link (benja-M-1) * bug #11272 [Console] Make sure formatter is the same. (akimsko) * bug #11259 [Config] Fixed failed config schema loads due to libxml_disable_entity_loader usage (ccorliss) * bug #11234 [ClassLoader] fixed PHP warning on PHP 5.3 (fabpot) * bug #11179 [Process] Fix ExecutableFinder with open basedir (cs278) * bug #11242 [CssSelector] Refactored the CssSelector to remove the circular object graph (stof) * bug #11219 [DomCrawler] properly handle buttons with single and double quotes insid... (xabbuh) * bug #11220 [Components][Serializer] optional constructor arguments can be omitted during the denormalization process (xabbuh) * bug #11186 Added missing `break` statement (apfelbox) * bug #11169 [Console] Fixed notice in DialogHelper (florianv) * bug #11144 [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6 (kicken) * bug #10966 PHP Fatal error when getContainer method of ContainerAwareCommand has be... (kevinvergauwen) * bug #10981 [HttpFoundation] Fixed isSecure() check to be compliant with the docs (Jannik Zschiesche) * bug #11092 [HttpFoundation] Fix basic authentication in url with PHP-FPM (Kdecherf) * bug #10808 [DomCrawler] Empty select with attribute name="foo[]" bug fix (darles) * bug #11063 [HttpFoundation] fix switch statement (Tobion) * bug #11009 [HttpFoundation] smaller fixes for PdoSessionHandler (Tobion) * bug #11041 Remove undefined variable $e (skydiablo) * 2.3.16 (2014-05-31) * bug #11014 [Validator] Remove property and method targets from the optional and required constraints (jakzal) * bug #10983 [DomCrawler] Fixed charset detection in html5 meta charset tag (77web) * bug #10979 Make rootPath part of regex greedy (artursvonda) * bug #10995 [TwigBridge][Trans]set %count% only on transChoice from the current context. (aitboudad) * bug #10987 [DomCrawler] Fixed a forgotten case of complex XPath queries (stof) * 2.3.15 (2014-05-22) * reverted #10908 * 2.3.14 (2014-05-22) * bug #10849 [WIP][Finder] Fix wrong implementation on sortable callback comparator (ProPheT777) * bug #10929 [Process] Add validation on Process input (romainneutron) * bug #10958 [DomCrawler] Fixed filterXPath() chaining loosing the parent DOM nodes (stof, robbertkl) * bug #10953 [HttpKernel] fixed file uploads in functional tests without file selected (realmfoo) * bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque) * bug #10908 [HttpFoundation] implement session locking for PDO (Tobion) * bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot) * bug #10926 [DomCrawler] Fixed the initial state for options without value attribute (stof) * bug #10925 [DomCrawler] Fixed the handling of boolean attributes in ChoiceFormField (stof) * bug #10777 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed (tucksaun) * bug #10909 [PropertyAccess] Fixed plurals for -ves words (csarrazi) * bug #10899 Explicitly define the encoding. (jakzal) * bug #10897 [Console] Fix a console test (jakzal) * bug #10896 [HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined (alquerci, fabpot) * bug #10841 [DomCrawler] Fixed image input case sensitive (geoffrey-brier) * bug #10714 [Console]Improve formatter for double-width character (denkiryokuhatsuden) * bug #10872 [Form] Fixed TrimListenerTest as of PHP 5.5 (webmozart) * bug #10762 [BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string (thewilkybarkid) * bug #10863 [Security] Add check for supported attributes in AclVoter (artursvonda) * bug #10833 [TwigBridge][Transchoice] set %count% from the current context. (aitboudad) * bug #10820 [WebProfilerBundle] Fixed profiler seach/homepage with empty token (tucksaun) * bug #10815 Fixed issue #5427 (umpirsky) * bug #10817 [Debug] fix #10313: FlattenException not found (nicolas-grekas) * bug #10803 [Debug] fix ErrorHandlerTest when context is not an array (nicolas-grekas) * bug #10801 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292 (nicolas-grekas) * bug #10797 [HttpFoundation] Allow File instance to be passed to BinaryFileResponse (anlutro) * bug #10643 [TwigBridge] Removed strict check when found variables inside a translation (goetas) * 2.3.13 (2014-04-27) * bug #10789 [Console] Fixed the rendering of exceptions on HHVM with a terminal width (stof) * bug #10773 [WebProfilerBundle ] Fixed an edge case on WDT loading (tucksaun) * bug #10763 [Process] Disable TTY mode on Windows platform (romainneutron) * bug #10772 [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator (jakzal) * bug #10757 [Process] Setting STDIN while running should not be possible (romainneutron) * bug #10749 Fixed incompatibility of x509 auth with nginx (alcaeus) * bug #10735 [Translation] [PluralizationRules] Little correction for case 'ar' (klyk50) * bug #10720 [HttpFoundation] Fix DbalSessionHandler (Tobion) * bug #10721 [HttpFoundation] status 201 is allowed to have a body (Tobion) * bug #10728 [Process] Fix #10681, process are failing on Windows Server 2003 (romainneutron) * bug #10733 [DomCrawler] Textarea value should default to empty string instead of null. (Berdir) * bug #10723 [Security] fix DBAL connection typehint (Tobion) * bug #10700 Fixes various inconsistencies in the code (fabpot) * bug #10697 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. (idn2104) * bug #10652 [HttpFoundation] fix PDO session handler under high concurrency (Tobion) * bug #10669 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates (stloyd) * bug #10670 [Templating] PhpEngine should propagate charset to its helpers (stloyd) * bug #10665 [DependencyInjection] Fix ticket #10663 - Added setCharset method call to PHP templating engine (koku) * bug #10654 Changed the typehint of the EsiFragmentRenderer to the interface (stof) * bug #10649 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host (romainneutron) * 2.3.12 (2014-04-03) * bug #10586 Fixes URL validator to accept single part urls (merk) * bug #10591 [Form] Buttons are now disabled if their containing form is disabled (webmozart) * bug #10579 HHVM fixes (fabpot) * bug #10564 fixed the profiler when an uncalled listener throws an exception when instantiated (fabpot) * bug #10568 [Form] Fixed hashing of choice lists containing non-UTF-8 characters (webmozart) * bug #10536 Avoid levenshtein comparison when using ContainerBuilder. (catch56) * bug #10549 Fixed server values in BrowserKit (fabpot) * bug #10540 [HttpKernel] made parsing controllers more robust (fabpot) * bug #10545 [DependencyInjection] Fixed YamlFileLoader imports path (jrnickell) * bug #10523 [Debug] Check headers sent before sending PHP response (GromNaN) * bug #10275 [Validator] Fixed ACE domain checks on UrlValidator (#10031) (aeoris) * bug #10123 handle array root element (greg0ire) * bug #10532 Fixed regression when using Symfony on filesystems without chmod support (fabpot) * bug #10502 [HttpKernel] Fix #10437: Catch exceptions when reloading a no-cache request (romainneutron) * bug #10493 Fix libxml_use_internal_errors and libxml_disable_entity_loader usage (romainneutron) * bug #9784 [HttpFoundation] Removed ini check to make Uploadedfile work on Google App Engine (micheleorselli) * bug #10416 [Form] Allow options to be grouped by objects (felds) * bug #10410 [Form] Fix "Array was modified outside object" in ResizeFormListener. (Chekote) * bug #10494 [Validator] Minor fix in IBAN validator (sprain) * bug #10491 Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute (fabpot) * bug #10479 [Process] Fix escaping on Windows (romainneutron) * bug #10480 [Process] Fixed fatal errors in getOutput and getErrorOutput when process was not started (romainneutron) * bug #10420 [Process] Make Process::start non-blocking on Windows platform (romainneutron) * bug #10455 [Process] Fix random failures in test suite on TravisCI (romainneutron) * bug #10448 [Process] Fix quoted arguments escaping (romainneutron) * bug #10444 [DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles() (romainneutron) * bug #10423 [Config] XmlUtils::convertDomElementToArray does not handle '0' (bendavies) * bug #10153 [Process] Fixed data in pipe being truncated if not read before process termination (astephens25) * bug #10429 [Process] Fix #9160 : escaping an argument with a trailing backslash on windows fails (romainneutron) * bug #10412 [Process] Fix process status in TTY mode (romainneutron) * bug #10382 10158 get vary multiple (bbinkovitz) * bug #10251 [Form] Fixes empty file-inputs getting treated as extra field. (jenkoian) * bug #10351 [HttpKernel] fix stripComments() normalizing new-lines (sstok) * bug #10348 Update FileLoader to fix issue #10339 (msumme) * 2.3.11 (2014-02-27) * bug #10146 [WebProfilerBundle] fixed parsing Mongo DSN and added Test for it (malarzm) * bug #10299 [Finder] () is also a valid delimiter (WouterJ) * bug #10255 [FrameworkBundle] Fixed wrong redirect url if path contains some query parameters (pulzarraider) * bug #10285 Bypass sigchild detection if phpinfo is not available (Seldaek) * bug #10269 [Form] Revert "Fix "Array was modified outside object" in ResizeFormListener." (norzechowicz) * 2.3.10 (2014-02-12) * bug #10231 [Console] removed problematic regex (fabpot) * bug #10245 [DomCrawler] Added support for tags to be treated as links (shamess) * bug #10232 [Form] Fix "Array was modified outside object" in ResizeFormListener. (Chekote) * bug #10215 [Routing] reduced recursion in dumper (arnaud-lb) * bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl) * bug #10205 [DomCrawler] Fixed incorrect handling of image inputs (robbertkl) * bug #10191 [HttpKernel] fixed wrong reference in TraceableEventDispatcher (fabpot) * bug #10195 [Debug] Fixed recursion level incrementing in FlattenException::flattenArgs(). (sun) * bug #10151 [Form] Update DateTime objects only if the actual value has changed (peterrehm) * bug #10140 allow the TextAreaFormField to be used with valid/invalid HTML (dawehner) * bug #10131 added lines to exceptions for the trans and transchoice tags (fabpot) * bug #10119 [Validator] Minor fix in XmlFileLoader (florianv) * bug #10078 [BrowserKit] add non-standard port to HTTP_HOST server param (kbond) * bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco) * bug #10053 [Form] fixed allow render 0 numeric input value (dczech) * bug #10033 [HttpKernel] Bugfix - Logger Deprecation Notice (Rican7) * bug #10023 [FrameworkBundle] Thrown an HttpException instead returning a Response in RedirectController::redirectAction() (jakzal) * bug #9985 Prevent WDT from creating a session (mvrhov) * bug #10000 [Console] Fixed the compatibility with HHVM (stof) * bug #9979 [Doctrine Bridge][Validator] Fix for null values in assosiated properties when using UniqueEntityValidator (vpetrovych) * bug #9983 [TwigBridge] Update min. version of Twig (stloyd) * bug #9970 [CssSelector] fixed numeric attribute issue (jfsimon) * bug #9747 [DoctrineBridge] Fix: Add type detection. Needed by pdo_dblib (iamluc) * bug #9962 [Process] Fix #9861 : Revert TTY mode (romainneutron) * bug #9960 [Form] Update minimal requirement in composer.json (stloyd) * bug #9952 [Translator] Fix Empty translations with Qt files (vlefort) * bug #9948 [WebProfilerBundle] Fixed profiler toolbar icons for XHTML. (rafalwrzeszcz) * bug #9933 Propel1 exception message (jaugustin) * bug #9949 [BrowserKit] Throw exception on invalid cookie expiration timestamp (anlutro) * 2.3.9 (2014-01-05) * bug #9938 [Process] Add support SAPI cli-server (peter-gribanov) * bug #9940 [EventDispatcher] Fix hardcoded listenerTag name in error message (lemoinem) * bug #9908 [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class (stloyd) * bug #9902 [Security] fixed pre/post authentication checks (fabpot) * bug #9899 [Filesystem | WCM] 9339 fix stat on url for filesystem copy (cordoval) * bug #9589 [DependencyInjection] Fixed #9020 - Added support for collections in service#parameters (lavoiesl) * bug #9889 [Console] fixed column width when using the Table helper with some decoration in cells (fabpot) * bug #9323 [DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support (bronze1man) * bug #8997 [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role. (pawaclawczyk) * bug #9557 [DoctrineBridge] Fix for cache-key conflict when having a \Traversable as choices (DRvanR) * bug #9879 [Security] Fix ExceptionListener to catch correctly AccessDeniedException if is not first exception (fabpot) * bug #9885 [Dependencyinjection] Fixed handling of inlined references in the AnalyzeServiceReferencesPass (fabpot) * bug #9884 [DomCrawler] Fixed creating form objects from named form nodes (jakzal) * bug #9882 Add support for HHVM in the getting of the PHP executable (fabpot) * bug #9850 [Validator] Fixed IBAN validator with 0750447346 value (stewe) * bug #9865 [Validator] Fixes message value for objects (jongotlin) * bug #9441 [Form][DateTimeToArrayTransformer] Check for hour, minute & second validity (egeloen) * bug #9867 #9866 [Filesystem] Fixed mirror for symlinks (COil) * bug #9806 [Security] Fix parent serialization of user object (ddeboer) * bug #9834 [DependencyInjection] Fixed support for backslashes in service ids. (jakzal) * bug #9826 fix #9356 [Security] Logger should manipulate the user reloaded from provider (matthieuauger) * bug #9769 [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases (jzawadzki) * bug #9697 [Config] fix 5528 let ArrayNode::normalizeValue respect order of value array provided (cordoval) * bug #9701 [Config] fix #7243 allow 0 as arraynode name (cordoval) * bug #9795 [Form] Fixed issue in BaseDateTimeTransformer when invalid timezone cause Trans... (tyomo4ka) * bug #9714 [HttpFoundation] BinaryFileResponse should also return 416 or 200 on some range-requets (SimonSimCity) * bug #9601 [Routing] Remove usage of deprecated _scheme requirement (Danez) * bug #9489 [DependencyInjection] Add normalization to tag options (WouterJ) * bug #9135 [Form] [Validator] fix maxLength guesser (franek) * bug #9790 [Filesystem] Changed the mode for a target file in copy() to be write only (jakzal) * 2.3.8 (2013-12-16) * bug #9758 [Console] fixed TableHelper when cell value has new line (k-przybyszewski) * bug #9760 [Routing] Fix router matching pattern against multiple hosts (karolsojko) * bug #9674 [Form] rename validators.ua.xlf to validators.uk.xlf (craue) * bug #9722 [Validator]Fixed getting wrong msg when value is an object in Exception (aitboudad) * bug #9750 allow TraceableEventDispatcher to reuse event instance in nested events (evillemez) * bug #9718 [validator] throw an exception if isn't an instance of ConstraintValidatorInterface. (aitboudad) * bug #9716 Reset the box model to content-box in the web debug toolbar (stof) * bug #9711 [FrameworkBundle] Allowed "0" as a checkbox value in php templates (jakzal) * bug #9665 [Bridge/Doctrine] ORMQueryBuilderLoader - handled the scenario when no entity manager is passed with closure query builder (jakzal) * bug #9656 [DoctrineBridge] normalized class names in the ORM type guesser (fabpot) * bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh) * bug #9648 [Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler (fabpot) * bug #9643 [WebProfilerBundle] Fixed js escaping in time.html.twig (hason) * bug #9641 [Debug] Avoid notice from being "eaten" by fatal error. (fabpot) * bug #9639 Modified guessDefaultEscapingStrategy to not escape txt templates (fabpot) * bug #9314 [Form] Fix DateType for 32bits computers. (WedgeSama) * bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason) * bug #9625 [HttpFoundation] Do not return an empty session id if the session was closed (Taluu) * bug #9637 [Validator] Replaced inexistent interface (jakzal) * bug #9605 Adjusting CacheClear Warmup method to namespaced kernels (rdohms) * bug #9610 Container::camelize also takes backslashes into consideration (ondrejmirtes) * bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99) * bug #9535 No Entity Manager defined exception (armetiz) * bug #9485 [Acl] Fix for issue #9433 (guilro) * bug #9516 [AclProvider] Fix incorrect behavior when partial results returned from cache (superdav42) * bug #9352 [Intl] make currency bundle merge fallback locales when accessing data, ... (shieldo) * bug #9537 [FrameworkBundle] Fix mistake in translation's service definition. (phpmike) * bug #9367 [Process] Check if the pipe array is empty before calling stream_select() (jfposton) * bug #9211 [Form] Fixed memory leak in FormValidator (bschussek) * bug #9469 [Propel1] re-factor Propel1 ModelChoiceList (havvg) * 2.3.7 (2013-11-14) * bug #9499 Request::overrideGlobals() may call invalid ini value (denkiryokuhatsuden) * bug #9420 [Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1 (giosh94mhz) * bug #9212 [Validator] Force Luhn Validator to only work with strings (Richtermeister) * bug #9476 Fixed bug with lazy services (peterrehm) * bug #9431 [DependencyInjection] fixed YamlDumper did not make services private. (realityking) * bug #9416 fixed issue with clone now the children of the original form are preserved and the clone form is given new children (yjv) * bug #9412 [HttpFoundation] added content length header to BinaryFileResponse (kbond) * bug #9395 [HttpKernel] fixed memory limit display in MemoryDataCollector (hhamon) * bug #9388 [Form] Fixed: The "data" option is taken into account even if it is NULL (bschussek) * bug #9391 [Serializer] Fixed the error handling when decoding invalid XML to avoid a Warning (stof) * bug #9378 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive (matthieuprat) * bug #9354 [Process] Fix #9343 : revert file handle usage on Windows platform (romainneutron) * bug #9334 [Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek) * bug #9333 [Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek) * bug #9338 [DoctrineBridge] Added type check to prevent calling clear() on arrays (bschussek) * bug #9328 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek) * bug #9327 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek) * bug #9308 [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays (bschussek) * bug #9274 [Yaml] Fixed the escaping of strings starting with a dash when dumping (stof) * bug #9270 [Templating] Fix in ChainLoader.php (janschoenherr) * bug #9246 [Session] fixed wrong started state (tecbot) * 2.3.6 (2013-10-10) * [Security] limited the password length passed to encoders * bug #9259 [Process] Fix latest merge from 2.2 in 2.3 (romainneutron) * bug #9237 [FrameworkBundle] assets:install command should mirror .dotfiles (.htaccess) (FineWolf) * bug #9223 [Translator] PoFileDumper - PO headers (Padam87) * bug #9257 [Process] Fix 9182 : random failure on pipes tests (romainneutron) * bug #9222 [Bridge] [Propel1] Fixed guessed relations (ClementGautier) * bug #9214 [FramworkBundle] Check event listener services are not abstract (lyrixx) * bug #9207 [HttpKernel] Check for lock existence before unlinking (ollietb) * bug #9184 Fixed cache warmup of paths which contain back-slashes (fabpot) * bug #9192 [Form] remove MinCount and MaxCount constraints in ValidatorTypeGuesser (franek) * bug #9190 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response (realsim) * bug #9188 [Form] add support for Length and Range constraint in ValidatorTypeGuesser (franek) * bug #8809 [Form] enforce correct timezone (Burgov) * bug #9169 Fixed client insulation when using the terminable event (fabpot) * bug #9154 Fix problem with Windows file links (backslash in JavaScript string) (fabpot) * bug #9153 [DependencyInjection] Prevented inlining of lazy loaded private service definitions (jakzal) * bug #9103 [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values (stloyd) * 2.3.5 (2013-09-27) * 8980954: bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com" * bb59ac2: fixed HTML5 form attribute handling XPath query * 3108c71: [Locale] added support for the position argument to NumberFormatter::parse() * 0774c79: [Locale] added some more stubs for the number formatter * e5282e8: [DomCrawler]Crawler guess charset from html * 0e80d88: fixes RequestDataCollector bug, visible when used on Drupal8 * c8d0342: [Console] fixed exception rendering when nested styles * a47d663: [Console] fixed the formatter for single-char tags * c6c35b3: [Console] Escape exception message during the rendering of an exception * 04e730e: [DomCrawler] fixed HTML5 form attribute handling * 0e437c5: [BrowserKit] Fixed the handling of parameters when redirecting * d84df4c: [Process] Properly close pipes after a Process::stop call * b3ae29d: fixed bytes conversion when used on 32-bits systems * a273e79: [Form] Fixed: "required" attribute is not added to {%- 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 -%} {% set attr = choice.attr %} {%- 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 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 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_enctype -%} {% if multipart %}enctype="multipart/form-data"{% endif %} {%- endblock form_enctype -%} {%- 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 read_only and attr.readonly is not defined %} readonly="readonly"{% endif -%} {%- if disabled %} disabled="disabled"{% endif -%} {%- if required %} required="required"{% endif -%} {%- for attrname, attrvalue in attr -%} {{- " " -}} {%- if attrname in ['placeholder', 'title'] -%} {{- attrname }}="{{ 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 }}="{{ 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 }}="{{ 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 }}="{{ 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 -%} src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig000066400000000000000000000017631266465517700270310ustar00rootroot00000000000000{% 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 -%} src/Symfony/Bridge/Twig/Tests/000077500000000000000000000000001266465517700165445ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/AppVariableTest.php000066400000000000000000000075641266465517700223170ustar00rootroot00000000000000appVariable = 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->getMock('Symfony\Component\HttpFoundation\Request'); $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 testGetUser() { $this->setTokenStorage($user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface')); $this->assertEquals($user, $this->appVariable->getUser()); } public function testGetUserWithUsernameAsTokenUser() { $this->setTokenStorage($user = 'username'); $this->assertNull($this->appVariable->getUser()); } public function testGetUserWithNoToken() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $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 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->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStackMock->method('getCurrentRequest')->willReturn($request); $this->appVariable->setRequestStack($requestStackMock); } protected function setTokenStorage($user) { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $this->appVariable->setTokenStorage($tokenStorage); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenStorage->method('getToken')->willReturn($token); $token->method('getUser')->willReturn($user); } } src/Symfony/Bridge/Twig/Tests/Command/000077500000000000000000000000001266465517700201225ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php000066400000000000000000000061151266465517700237030ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->assertRegExp('/^OK in /', $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('/^KO in /', $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('/^KO in /', $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); } } } } src/Symfony/Bridge/Twig/Tests/Extension/000077500000000000000000000000001266465517700205205ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Extension/AssetExtensionTest.php000066400000000000000000000044571266465517700250570ustar00rootroot00000000000000 * * 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\AssetExtension; use Symfony\Component\Asset\Package; use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; class AssetExtensionTest extends \PHPUnit_Framework_TestCase { /** * @group legacy */ public function testLegacyGetAssetUrl() { $extension = $this->createExtension(new Package(new StaticVersionStrategy('22', '%s?version=%s'))); $this->assertEquals('me.png?version=42', $extension->getAssetUrl('me.png', null, false, '42')); $this->assertEquals('http://localhost/me.png?version=22', $extension->getAssetUrl('me.png', null, true)); $this->assertEquals('http://localhost/me.png?version=42', $extension->getAssetUrl('me.png', null, true, '42')); } /** * @group legacy */ public function testGetAssetUrlWithPackageSubClass() { $extension = $this->createExtension(new PathPackage('foo', new StaticVersionStrategy('22', '%s?version=%s'))); $this->assertEquals('/foo/me.png?version=42', $extension->getAssetUrl('me.png', null, false, 42)); } /** * @group legacy */ public function testGetAssetUrlWithEmptyVersionStrategy() { $extension = $this->createExtension(new PathPackage('foo', new EmptyVersionStrategy())); $this->assertEquals('/foo/me.png?42', $extension->getAssetUrl('me.png', null, false, 42)); } private function createExtension(Package $package) { $foundationExtension = $this->getMockBuilder('Symfony\Bridge\Twig\Extension\HttpFoundationExtension')->disableOriginalConstructor()->getMock(); $foundationExtension ->expects($this->any()) ->method('generateAbsoluteUrl') ->will($this->returnCallback(function ($arg) { return 'http://localhost/'.$arg; })) ; return new AssetExtension(new Packages($package), $foundationExtension); } } src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php000066400000000000000000000037631266465517700246510ustar00rootroot00000000000000 * * 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\CodeExtension; class CodeExtensionTest extends \PHPUnit_Framework_TestCase { protected $helper; public function testFormatFile() { $expected = sprintf('%s at line 25', __FILE__, __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('txmt://open?url=file://%f&line=%l', '/root', 'UTF-8'); } } src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php000066400000000000000000000070441266465517700247000ustar00rootroot00000000000000 * * 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\DumpExtension; use Symfony\Component\VarDumper\VarDumper; use Symfony\Component\VarDumper\Cloner\VarCloner; class DumpExtensionTest extends \PHPUnit_Framework_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->getMock('Twig_LoaderInterface'), 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", ), ); } } src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php000066400000000000000000000016411266465517700261270ustar00rootroot00000000000000 * * 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\ExpressionExtension; use Symfony\Component\ExpressionLanguage\Expression; class ExpressionExtensionTest extends \PHPUnit_Framework_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); } } src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/000077500000000000000000000000001266465517700223315ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php000066400000000000000000000010571266465517700271560ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubTranslator.php000066400000000000000000000014521266465517700260330ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/000077500000000000000000000000001266465517700243275ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/000077500000000000000000000000001266465517700252725ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/child_label.html.twig000066400000000000000000000001261266465517700313520ustar00rootroot00000000000000{% block form_label %} {% endblock form_label %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/custom_widgets.html.twig000066400000000000000000000012611266465517700321710ustar00rootroot00000000000000{% 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 %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/page_dynamic_extends.html.twig000066400000000000000000000000631266465517700333020ustar00rootroot00000000000000{% extends dynamic_template_name ~ '.html.twig' %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/parent_label.html.twig000066400000000000000000000001131266465517700315540ustar00rootroot00000000000000{% block form_label %} {% endblock form_label %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme.html.twig000066400000000000000000000003571266465517700302400ustar00rootroot00000000000000{% block form_widget_simple %} {% spaceless %} {% set type = type|default('text') %} {% endspaceless %} {% endblock form_widget_simple %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_extends.html.twig000066400000000000000000000004321266465517700317640ustar00rootroot00000000000000{% extends 'form_div_layout.html.twig' %} {% block form_widget_simple %} {% spaceless %} {% set type = type|default('text') %} {% endspaceless %} {% endblock form_widget_simple %} src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/templates/form/theme_use.html.twig000066400000000000000000000004261266465517700311110ustar00rootroot00000000000000{% use 'form_div_layout.html.twig' %} {% block form_widget_simple %} {% spaceless %} {% set type = type|default('text') %} {% endspaceless %} {% endblock form_widget_simple %} src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php000066400000000000000000000112511266465517700321220ustar00rootroot00000000000000 * * 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 { /** * @var FormExtension */ protected $extension; protected $testableFeatures = array( 'choice_attr', ); protected function setUp() { parent::setUp(); $rendererEngine = new TwigRendererEngine(array( 'bootstrap_3_horizontal_layout.html.twig', 'custom_widgets.html.twig', )); $renderer = new TwigRenderer($rendererEngine, $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')); $this->extension = new FormExtension($renderer); $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($this->extension); $this->extension->initRuntime($environment); } protected function tearDown() { parent::tearDown(); $this->extension = null; } protected function renderForm(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form', $vars); } protected function renderEnctype(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'enctype'); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { if ($label !== null) { $vars += array('label' => $label); } return (string) $this->extension->renderer->searchAndRenderBlock($view, 'label', $vars); } protected function renderErrors(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'errors'); } protected function renderWidget(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'widget', $vars); } protected function renderRow(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'row', $vars); } protected function renderRest(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'rest', $vars); } protected function renderStart(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_start', $vars); } protected function renderEnd(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_end', $vars); } protected function setTheme(FormView $view, array $themes) { $this->extension->renderer->setTheme($view, $themes); } public function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php000066400000000000000000000112001266465517700300420ustar00rootroot00000000000000 * * 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 { /** * @var FormExtension */ protected $extension; protected $testableFeatures = array( 'choice_attr', ); protected function setUp() { parent::setUp(); $rendererEngine = new TwigRendererEngine(array( 'bootstrap_3_layout.html.twig', 'custom_widgets.html.twig', )); $renderer = new TwigRenderer($rendererEngine, $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')); $this->extension = new FormExtension($renderer); $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($this->extension); $this->extension->initRuntime($environment); } protected function tearDown() { parent::tearDown(); $this->extension = null; } protected function renderForm(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form', $vars); } protected function renderEnctype(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'enctype'); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { if ($label !== null) { $vars += array('label' => $label); } return (string) $this->extension->renderer->searchAndRenderBlock($view, 'label', $vars); } protected function renderErrors(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'errors'); } protected function renderWidget(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'widget', $vars); } protected function renderRow(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'row', $vars); } protected function renderRest(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'rest', $vars); } protected function renderStart(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_start', $vars); } protected function renderEnd(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_end', $vars); } protected function setTheme(FormView $view, array $themes) { $this->extension->renderer->setTheme($view, $themes); } public function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php000066400000000000000000000165471266465517700265470ustar00rootroot00000000000000 * * 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 { /** * @var FormExtension */ protected $extension; protected $testableFeatures = array( 'choice_attr', ); protected function setUp() { parent::setUp(); $rendererEngine = new TwigRendererEngine(array( 'form_div_layout.html.twig', 'custom_widgets.html.twig', )); $renderer = new TwigRenderer($rendererEngine, $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')); $this->extension = new FormExtension($renderer); $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($this->extension); $this->extension->initRuntime($environment); } protected function tearDown() { parent::tearDown(); $this->extension = null; } public function testThemeBlockInheritanceUsingUse() { $view = $this->factory ->createNamed('name', 'email') ->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', 'email') ->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', 'email') ->createView() ; $renderer = $this->extension->renderer; $renderer->setTheme($view, array('page_dynamic_extends.html.twig')); $renderer->searchAndRenderBlock($view, 'row'); } public function isSelectedChoiceProvider() { // The commented cases should not be necessary anymore, because the // choice lists should assure that both values passed here are always // strings return array( // array(true, 0, 0), array(true, '0', '0'), array(true, '1', '1'), // array(true, false, 0), // array(true, true, 1), array(true, '', ''), // array(true, null, ''), 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, $this->extension->isSelectedChoice($choice, $value)); } protected function renderForm(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form', $vars); } protected function renderEnctype(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'enctype'); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { if ($label !== null) { $vars += array('label' => $label); } return (string) $this->extension->renderer->searchAndRenderBlock($view, 'label', $vars); } protected function renderErrors(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'errors'); } protected function renderWidget(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'widget', $vars); } protected function renderRow(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'row', $vars); } protected function renderRest(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'rest', $vars); } protected function renderStart(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_start', $vars); } protected function renderEnd(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_end', $vars); } protected function setTheme(FormView $view, array $themes) { $this->extension->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')), ); } public function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php000066400000000000000000000112371266465517700270430ustar00rootroot00000000000000 * * 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 { /** * @var FormExtension */ protected $extension; protected $testableFeatures = array( 'choice_attr', ); protected function setUp() { parent::setUp(); $rendererEngine = new TwigRendererEngine(array( 'form_table_layout.html.twig', 'custom_widgets.html.twig', )); $renderer = new TwigRenderer($rendererEngine, $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')); $this->extension = new FormExtension($renderer); $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($this->extension); $this->extension->initRuntime($environment); } protected function tearDown() { parent::tearDown(); $this->extension = null; } protected function renderForm(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form', $vars); } protected function renderEnctype(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'enctype'); } protected function renderLabel(FormView $view, $label = null, array $vars = array()) { if ($label !== null) { $vars += array('label' => $label); } return (string) $this->extension->renderer->searchAndRenderBlock($view, 'label', $vars); } protected function renderErrors(FormView $view) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'errors'); } protected function renderWidget(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'widget', $vars); } protected function renderRow(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'row', $vars); } protected function renderRest(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->searchAndRenderBlock($view, 'rest', $vars); } protected function renderStart(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_start', $vars); } protected function renderEnd(FormView $view, array $vars = array()) { return (string) $this->extension->renderer->renderBlock($view, 'form_end', $vars); } protected function setTheme(FormView $view, array $themes) { $this->extension->renderer->setTheme($view, $themes); } public function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php000066400000000000000000000124131266465517700267350ustar00rootroot00000000000000 * * 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\HttpFoundationExtension; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RequestContext; class HttpFoundationExtensionTest extends \PHPUnit_Framework_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', '/'), ); } } src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php000066400000000000000000000051011266465517700260430ustar00rootroot00000000000000 * * 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\HttpKernelExtension; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Fragment\FragmentHandler; class HttpKernelExtensionTest extends \PHPUnit_Framework_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(array(), false, $context); $this->setExpectedException('InvalidArgumentException', 'The "inline" renderer does not exist.'); $renderer->render('/foo'); } protected function getFragmentHandler($return) { $strategy = $this->getMock('Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface'); $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('/'))); $renderer = new FragmentHandler(array($strategy), false, $context); return $renderer; } 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($renderer)); return $twig->render('index'); } } src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php000066400000000000000000000037521266465517700254240ustar00rootroot00000000000000 * * 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\RoutingExtension; class RoutingExtensionTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getEscapingTemplates */ public function testEscaping($template, $mustBeEscaped) { $twig = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), array('debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0)); $twig->addExtension(new RoutingExtension($this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'))); $nodes = $twig->parse($twig->tokenize($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), ); } } src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php000066400000000000000000000047431266465517700257520ustar00rootroot00000000000000 * * 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\StopwatchExtension; class StopwatchExtensionTest extends \PHPUnit_Framework_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" %}symfony2 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->getMock('Symfony\Component\Stopwatch\Stopwatch'); $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; } } src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php000066400000000000000000000221301266465517700262620ustar00rootroot00000000000000 * * 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\TranslationExtension; use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Loader\ArrayLoader; class TranslationExtensionTest extends \PHPUnit_Framework_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()->getSource('index'), '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'); } } src/Symfony/Bridge/Twig/Tests/Fixtures/000077500000000000000000000000001266465517700203555ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/000077500000000000000000000000001266465517700223705ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/syntax_error.twig000066400000000000000000000000201266465517700260130ustar00rootroot00000000000000{% syntax error src/Symfony/Bridge/Twig/Tests/Fixtures/extractor/with_translations.html.twig000066400000000000000000000000331266465517700277770ustar00rootroot00000000000000

{{ 'Hi!'|trans }}

src/Symfony/Bridge/Twig/Tests/Node/000077500000000000000000000000001266465517700174315ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php000066400000000000000000000062051266465517700225200ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\Node\DumpNode; class DumpNodeTest extends \PHPUnit_Framework_TestCase { public function testNoVar() { $node = new DumpNode('bar', null, 7); $env = new \Twig_Environment($this->getMock('Twig_LoaderInterface')); $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->getMock('Twig_LoaderInterface')); $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->getMock('Twig_LoaderInterface')); $compiler = new \Twig_Compiler($env); $expected = <<<'EOTXT' if ($this->env->isDebug()) { // line 7 \Symfony\Component\VarDumper\VarDumper::dump(%foo%); } EOTXT; $expected = preg_replace('/%(.*?)%/', PHP_VERSION_ID >= 50400 ? '(isset($context["$1"]) ? $context["$1"] : null)' : '$this->getContext($context, "$1")', $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->getMock('Twig_LoaderInterface')); $compiler = new \Twig_Compiler($env); $expected = <<<'EOTXT' if ($this->env->isDebug()) { // line 7 \Symfony\Component\VarDumper\VarDumper::dump(array( "foo" => %foo%, "bar" => %bar%, )); } EOTXT; $expected = preg_replace('/%(.*?)%/', PHP_VERSION_ID >= 50400 ? '(isset($context["$1"]) ? $context["$1"] : null)' : '$this->getContext($context, "$1")', $expected); $this->assertSame($expected, $compiler->compile($node)->getSource()); } } src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php000066400000000000000000000045301266465517700226720ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\Node\FormThemeNode; class FormThemeTest extends \PHPUnit_Framework_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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getExtension(\'form\')->renderer->setTheme(%s, "tpl1");', $this->getVariableGetter('form') ), trim($compiler->compile($node)->getSource()) ); } protected function getVariableGetter($name) { if (PHP_VERSION_ID >= 50400) { return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); } return sprintf('$this->getContext($context, "%s")', $name); } } src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php000066400000000000000000000241711266465517700255600ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode; class SearchAndRenderBlockNodeTest extends \PHPUnit_Framework_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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); // "label" => null must not be included in the output! // Otherwise the default label is overwritten with null. $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); // "label" => null must not be included in the output! // Otherwise the default label is overwritten with null. $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); // "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->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); $this->assertEquals( sprintf( '$this->env->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); // "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->getExtension(\'form\')->renderer->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->getMock('Twig_LoaderInterface'))); // "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->getExtension(\'form\')->renderer->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 >= 50400) { return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); } return sprintf('$this->getContext($context, "%s")', $name); } } src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php000066400000000000000000000041021266465517700226740ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\Node\TransNode; /** * @author Asmir Mustafic */ class TransNodeTest extends \PHPUnit_Framework_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->getMock('Twig_LoaderInterface'), array('strict_variables' => true)); $compiler = new \Twig_Compiler($env); $this->assertEquals( sprintf( 'echo $this->env->getExtension(\'translator\')->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 >= 50400) { return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name); } return sprintf('$this->getContext($context, "%s", true)', $name); } protected function getVariableGetterWithStrictCheck($name) { if (version_compare(\Twig_Environment::VERSION, '2.0.0-DEV', '>=')) { return sprintf('(isset($context["%s"]) || array_key_exists("%s", $context) ? $context["%s"] : $this->notFound("%s", 0))', $name, $name, $name, $name); } if (PHP_VERSION_ID >= 50400) { return sprintf('(isset($context["%s"]) ? $context["%s"] : $this->getContext($context, "%s"))', $name, $name, $name); } return sprintf('$this->getContext($context, "%s")', $name); } } src/Symfony/Bridge/Twig/Tests/NodeVisitor/000077500000000000000000000000001266465517700210115ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/NodeVisitor/ScopeTest.php000066400000000000000000000010411266465517700234270ustar00rootroot00000000000000 * * 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\NodeVisitor\Scope; class ScopeTest extends \PHPUnit_Framework_TestCase { public function testScopeInitiation() { $scope = new Scope(); $scope->enter(); $this->assertNull($scope->get('test')); } } src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php000066400000000000000000000066511266465517700315130ustar00rootroot00000000000000 * * 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\NodeVisitor\TranslationDefaultDomainNodeVisitor; use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; class TranslationDefaultDomainNodeVisitorTest extends \PHPUnit_Framework_TestCase { private static $message = 'message'; private static $domain = 'domain'; /** @dataProvider getDefaultDomainAssignmentTestData */ public function testDefaultDomainAssignment(\Twig_Node $node) { $env = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), 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->getMock('Twig_LoaderInterface'), 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), )), ); } } src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php000066400000000000000000000044021266465517700270460ustar00rootroot00000000000000 * * 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\NodeVisitor\TranslationNodeVisitor; class TranslationNodeVisitorTest extends \PHPUnit_Framework_TestCase { /** @dataProvider getMessagesExtractionTestData */ public function testMessagesExtraction(\Twig_Node $node, array $expectedMessages) { $env = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), 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))), ); } } src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php000066400000000000000000000046251266465517700247640ustar00rootroot00000000000000 * * 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, null ); } 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) ); } } src/Symfony/Bridge/Twig/Tests/TokenParser/000077500000000000000000000000001266465517700210015ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php000066400000000000000000000070211266465517700264160ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; use Symfony\Bridge\Twig\Node\FormThemeNode; class FormThemeTokenParserTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getTestsForFormTheme */ public function testCompile($source, $expected) { $env = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); $env->addTokenParser(new FormThemeTokenParser()); $stream = $env->tokenize($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' ), ), ); } } src/Symfony/Bridge/Twig/Tests/Translation/000077500000000000000000000000001266465517700210425ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php000066400000000000000000000130001266465517700252130ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Translation\TwigExtractor; use Symfony\Component\Translation\MessageCatalogue; class TwigExtractorTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getExtractData */ public function testExtract($template, $messages) { $loader = $this->getMock('Twig_LoaderInterface'); $twig = new \Twig_Environment($loader, array( 'strict_variables' => true, 'debug' => true, 'cache' => false, 'autoescape' => false, )); $twig->addExtension(new TranslationExtension($this->getMock('Symfony\Component\Translation\TranslatorInterface'))); $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 * @expectedExceptionMessageRegExp /Unclosed "block" in ".*extractor(\/|\\)syntax_error\.twig" at line 1/ * @dataProvider resourcesWithSyntaxErrorsProvider */ public function testExtractSyntaxError($resources) { $twig = new \Twig_Environment($this->getMock('Twig_LoaderInterface')); $twig->addExtension(new TranslationExtension($this->getMock('Symfony\Component\Translation\TranslatorInterface'))); $extractor = new TwigExtractor($twig); $extractor->extract($resources, new MessageCatalogue('en')); } /** * @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->getMock('Symfony\Component\Translation\TranslatorInterface'))); $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')))), ); } } src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php000066400000000000000000000040711266465517700221570ustar00rootroot00000000000000 * * 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 Symfony\Bridge\Twig\TwigEngine; use Symfony\Component\Templating\TemplateReference; class TwigEngineTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); return new TwigEngine($twig, $parser); } } src/Symfony/Bridge/Twig/TokenParser/000077500000000000000000000000001266465517700176775ustar00rootroot00000000000000src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php000066400000000000000000000022041266465517700234710ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php000066400000000000000000000032671266465517700244640ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bridge/Twig/TokenParser/StopwatchTokenParser.php000066400000000000000000000030041266465517700245370ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php000066400000000000000000000047041266465517700247750ustar00rootroot00000000000000 * * 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->getLine(), $stream->getFilename()); } $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'; } } src/Symfony/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php000066400000000000000000000022331266465517700263120ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php000066400000000000000000000053221266465517700236570ustar00rootroot00000000000000 * * 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->getFilename()); } } // {% 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->getLine(), $stream->getFilename()); } $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'; } } src/Symfony/Bridge/Twig/Translation/000077500000000000000000000000001266465517700177405ustar00rootroot00000000000000src/Symfony/Bridge/Twig/Translation/TwigExtractor.php000066400000000000000000000056401266465517700232640ustar00rootroot00000000000000 * * 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) { $e->setTemplateFile($file->getRelativePathname()); } elseif ($file instanceof \SplFileInfo) { $e->setTemplateFile($file->getRealPath()); } throw $e; } } } /** * {@inheritdoc} */ public function setPrefix($prefix) { $this->prefix = $prefix; } protected function extractTemplate($template, MessageCatalogue $catalogue) { $visitor = $this->twig->getExtension('translator')->getTranslationNodeVisitor(); $visitor->enable(); $this->twig->parse($this->twig->tokenize($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); } } src/Symfony/Bridge/Twig/TwigEngine.php000066400000000000000000000071441266465517700202210ustar00rootroot00000000000000 * * 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) { return $loader->exists((string) $name); } try { // cast possible TemplateReferenceInterface to string because the // EngineInterface supports them but Twig_LoaderInterface does not $loader->getSource((string) $name); } 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_TemplateInterface A \Twig_TemplateInterface 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); } } } src/Symfony/Bridge/Twig/composer.json000066400000000000000000000041131266465517700201630ustar00rootroot00000000000000{ "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.3.9", "twig/twig": "~1.23|~2.0" }, "require-dev": { "symfony/asset": "~2.7", "symfony/finder": "~2.3", "symfony/form": "~2.7,>=2.7.8", "symfony/http-kernel": "~2.3", "symfony/intl": "~2.3", "symfony/routing": "~2.2", "symfony/templating": "~2.1", "symfony/translation": "~2.7", "symfony/yaml": "~2.0,>=2.0.5", "symfony/security": "~2.6", "symfony/security-acl": "~2.6", "symfony/stopwatch": "~2.2", "symfony/console": "~2.7", "symfony/var-dumper": "~2.6", "symfony/expression-language": "~2.4" }, "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": "2.7-dev" } } } src/Symfony/Bridge/Twig/phpunit.xml.dist000066400000000000000000000014651266465517700206230ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Bundle/000077500000000000000000000000001266465517700145455ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/000077500000000000000000000000001266465517700167255ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/.gitignore000066400000000000000000000000421266465517700207110ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Bundle/DebugBundle/DebugBundle.php000066400000000000000000000030671266465517700216240ustar00rootroot00000000000000 * * 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('var_dumper.cli_dumper'); $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()); } } src/Symfony/Bundle/DebugBundle/DependencyInjection/000077500000000000000000000000001266465517700226465ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/000077500000000000000000000000001266465517700244205ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php000066400000000000000000000027221266465517700313310ustar00rootroot00000000000000 * * 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('templating.helper.code.file_link_format')) { $definition->replaceArgument(1, $container->getParameter('templating.helper.code.file_link_format')); } if (!$container->hasParameter('web_profiler.debug_toolbar.mode') || WebDebugToolbarListener::DISABLED === $container->getParameter('web_profiler.debug_toolbar.mode')) { $definition->replaceArgument(3, null); } } } src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php000066400000000000000000000030261266465517700261670ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php000066400000000000000000000036111266465517700263030ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/DebugBundle/LICENSE000066400000000000000000000020511266465517700177300ustar00rootroot00000000000000Copyright (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. src/Symfony/Bundle/DebugBundle/Resources/000077500000000000000000000000001266465517700206775ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Resources/config/000077500000000000000000000000001266465517700221445ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Resources/config/schema/000077500000000000000000000000001266465517700234045ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd000066400000000000000000000010621266465517700255050ustar00rootroot00000000000000 src/Symfony/Bundle/DebugBundle/Resources/config/services.xml000066400000000000000000000033731266465517700245170ustar00rootroot00000000000000 null %kernel.charset% null null %kernel.charset% src/Symfony/Bundle/DebugBundle/Resources/views/000077500000000000000000000000001266465517700220345ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/000077500000000000000000000000001266465517700236165ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig000066400000000000000000000104661266465517700264310ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set dumps_count = collector.dumpsCount %} {% if dumps_count %} {% set icon %} {{ dumps_count }} {% endset %} {% set text %}
dump()
{% for dump in collector.getDumps('html') %}
in {% 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' with { 'link': true } %} {% endif %} {% endblock %} {% block menu %} {{- "" -}} {{- "" -}} dump() {{ collector.dumpsCount }} {% endblock %} {% block panel %}

dump()

{% if collector.dumpsCount %}
    {% for dump in collector.getDumps('html') %}
  • in {% if dump.line %} {% set link = dump.file|file_link(dump.line) %} {% if link %} {{ dump.name }} {% else %} {{ dump.name }} {% endif %} {% else %} {{ dump.name }} {% endif %} line {{ dump.line }}: {% if dump.fileExcerpt %}{{ dump.fileExcerpt|raw }}{% else %}{{ dump.file|file_excerpt(dump.line) }}{% endif %} {{ dump.data|raw }}
  • {% endfor %}
{% else %}

No dumped variable

{% endif %} {% endblock %} src/Symfony/Bundle/DebugBundle/Tests/000077500000000000000000000000001266465517700200275ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/000077500000000000000000000000001266465517700237505ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/Compiler/000077500000000000000000000000001266465517700255225ustar00rootroot00000000000000src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/Compiler/DumpDataCollectorPassTest.php000066400000000000000000000066501266465517700332770ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testProcessWithFileLinkFormatParameter() { $container = new ContainerBuilder(); $container->addCompilerPass(new DumpDataCollectorPass()); $container->setParameter('templating.helper.code.file_link_format', 'file-link-format'); $definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, null)); $container->setDefinition('data_collector.dump', $definition); $container->compile(); $this->assertSame('file-link-format', $definition->getArgument(1)); } 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)); } } src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php000066400000000000000000000034411266465517700302460ustar00rootroot00000000000000 * * 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 Symfony\Bundle\DebugBundle\DependencyInjection\DebugExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; class DebugExtensionTest extends \PHPUnit_Framework_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', ), ); $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(); } } src/Symfony/Bundle/DebugBundle/composer.json000066400000000000000000000022721266465517700214520ustar00rootroot00000000000000{ "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.3.9", "symfony/http-kernel": "~2.6", "symfony/twig-bridge": "~2.6", "symfony/var-dumper": "~2.6" }, "require-dev": { "symfony/config": "~2.3", "symfony/dependency-injection": "~2.3", "symfony/web-profiler-bundle": "~2.3" }, "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": "2.7-dev" } } } src/Symfony/Bundle/DebugBundle/phpunit.xml.dist000066400000000000000000000014651266465517700221060ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Bundle/FrameworkBundle/000077500000000000000000000000001266465517700176345ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/.gitignore000066400000000000000000000000421266465517700216200ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md000066400000000000000000000151511266465517700214500ustar00rootroot00000000000000CHANGELOG ========= 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. src/Symfony/Bundle/FrameworkBundle/CacheWarmer/000077500000000000000000000000001266465517700220155ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php000066400000000000000000000024421266465517700261120ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php000066400000000000000000000064371266465517700254430ustar00rootroot00000000000000 * * 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\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 array An array of templates of type 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 array An array of templates of type 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 array An array of templates of type 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; } } src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinderInterface.php000066400000000000000000000011341266465517700272510ustar00rootroot00000000000000 * * 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(); } src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php000066400000000000000000000031701266465517700274040ustar00rootroot00000000000000 * * 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\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) { $templates = array(); foreach ($this->finder->findAllTemplates() as $template) { $templates[$template->getLogicalName()] = $this->locator->locate($template); } $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; } } src/Symfony/Bundle/FrameworkBundle/Client.php000066400000000000000000000122241266465517700215640ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Bundle/FrameworkBundle/Command/000077500000000000000000000000001266465517700212125ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php000066400000000000000000000076651266465517700261310ustar00rootroot00000000000000 * * 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\Output\OutputInterface; 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(OutputInterface $output) { $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() : ''); } $message = 'Available registered bundles with their extension alias if available:'; if ($output instanceof StyleInterface) { $output->writeln(' '.$message); $output->table($headers, $rows); } else { $output->writeln($message); $table = new Table($output); $table->setHeaders($headers)->setRows($rows)->render($output); } } protected function findExtension($name) { $bundles = $this->initializeBundles(); 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(); } $extension = $bundle->getContainerExtension(); if ($extension && $name === $extension->getAlias()) { return $extension; } } 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); } 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; } } src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php000066400000000000000000000136471266465517700260260ustar00rootroot00000000000000 * * 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\Filesystem\Exception\IOException; use Symfony\Component\Finder\Finder; /** * Command that places bundle web assets into a given directory. * * @author Fabien Potencier */ class AssetsInstallCommand extends ContainerAwareCommand { /** * {@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} * * @throws \InvalidArgumentException When the target directory does not exist or symlink cannot be used */ 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'))); } $filesystem = $this->getContainer()->get('filesystem'); // Create the bundles directory otherwise symlink will fail. $bundlesDir = $targetArg.'/bundles/'; $filesystem->mkdir($bundlesDir, 0777); // relative implies symlink $symlink = $input->getOption('symlink') || $input->getOption('relative'); if ($symlink) { $output->writeln('Trying to install assets as symbolic links.'); } else { $output->writeln('Installing assets as hard copies.'); } foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) { if (is_dir($originDir = $bundle->getPath().'/Resources/public')) { $targetDir = $bundlesDir.preg_replace('/bundle$/', '', strtolower($bundle->getName())); $output->writeln(sprintf('Installing assets for %s into %s', $bundle->getNamespace(), $targetDir)); $filesystem->remove($targetDir); if ($symlink) { if ($input->getOption('relative')) { $relativeOriginDir = $filesystem->makePathRelative($originDir, realpath($bundlesDir)); } else { $relativeOriginDir = $originDir; } try { $filesystem->symlink($relativeOriginDir, $targetDir); if (!file_exists($targetDir)) { throw new IOException('Symbolic link is broken'); } $output->writeln('The assets were installed using symbolic links.'); } catch (IOException $e) { if (!$input->getOption('relative')) { $this->hardCopy($originDir, $targetDir); $output->writeln('It looks like your system doesn\'t support symbolic links, so the assets were installed by copying them.'); } // try again without the relative option try { $filesystem->symlink($originDir, $targetDir); if (!file_exists($targetDir)) { throw new IOException('Symbolic link is broken'); } $output->writeln('It looks like your system doesn\'t support relative symbolic links, so the assets were installed by using absolute symbolic links.'); } catch (IOException $e) { $this->hardCopy($originDir, $targetDir); $output->writeln('It looks like your system doesn\'t support symbolic links, so the assets were installed by copying them.'); } } } else { $this->hardCopy($originDir, $targetDir); } } } } /** * @param string $originDir * @param string $targetDir */ private function hardCopy($originDir, $targetDir) { $filesystem = $this->getContainer()->get('filesystem'); $filesystem->mkdir($targetDir, 0777); // We use a custom iterator to ignore VCS files $filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir)); } } src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php000066400000000000000000000220241266465517700251740ustar00rootroot00000000000000 * * 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\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) { $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'); $output->writeln(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 ($output->isVerbose()) { $output->writeln(' Clearing outdated warmup directory'); } $filesystem->remove($warmupDir); } if ($output->isVerbose()) { $output->writeln(' 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 ($output->isVerbose()) { $output->writeln(' Removing old cache directory'); } $filesystem->remove($oldCacheDir); if ($output->isVerbose()) { $output->writeln(' Done'); } } /** * @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 kernel/container related classes $fileSearch = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()).'*'; $search = array( $tempKernel->getName().ucfirst($tempKernel->getEnvironment()), sprintf('\'kernel.name\' => \'%s\'', $tempKernel->getName()), sprintf('key="kernel.name">%s<', $tempKernel->getName()), ); $replace = array( $realKernel->getName().ucfirst($realKernel->getEnvironment()), sprintf('\'kernel.name\' => \'%s\'', $realKernel->getName()), sprintf('key="kernel.name">%s<', $realKernel->getName()), ); foreach (Finder::create()->files()->name($fileSearch)->in($warmupDir) as $file) { $content = str_replace($search, $replace, file_get_contents($file)); file_put_contents(str_replace($search, $replace, $file), $content); unlink($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 kernel name must be changed too $name = var_export(substr($parent->getName(), 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()); } } src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php000066400000000000000000000037431266465517700254300ustar00rootroot00000000000000 * * 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; /** * 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) { $kernel = $this->getContainer()->get('kernel'); $output->writeln(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')); } } src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php000066400000000000000000000064141266465517700254030ustar00rootroot00000000000000 * * 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\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') ->setAliases(array( 'config:debug', )) ->setDefinition(array( new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'), )) ->setDescription('Dumps the current configuration for an extension') ->setHelp(<<%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 EOF ) ; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $output = new SymfonyStyle($input, $output); if (false !== strpos($input->getFirstArgument(), ':d')) { $output->caution('The use of "config:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:config" instead.'); } $name = $input->getArgument('name'); if (empty($name)) { $this->listBundles($output); return; } $extension = $this->findExtension($name); $container = $this->compileContainer(); $configs = $container->getExtensionConfig($extension->getAlias()); $configuration = $extension->getConfiguration($configs, $container); $this->validateConfiguration($extension, $configuration); $configs = $container->getParameterBag()->resolveValue($configs); $processor = new Processor(); $config = $processor->processConfiguration($configuration, $configs); if ($name === $extension->getAlias()) { $output->writeln(sprintf('# Current configuration for extension with alias: "%s"', $name)); } else { $output->writeln(sprintf('# Current configuration for "%s"', $name)); } $output->writeln(Yaml::dump(array($extension->getAlias() => $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; } } src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php000066400000000000000000000067231266465517700271040ustar00rootroot00000000000000 * * 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) { $output = new SymfonyStyle($input, $output); $name = $input->getArgument('name'); if (empty($name)) { $this->listBundles($output); 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': $output->writeln(sprintf('# %s', $message)); $dumper = new YamlReferenceDumper(); break; case 'xml': $output->writeln(sprintf('', $message)); $dumper = new XmlReferenceDumper(); break; default: $output->writeln($message); throw new \InvalidArgumentException('Only the yaml and xml formats are supported.'); } $output->writeln($dumper->dump($configuration, $extension->getNamespace())); } } src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php000066400000000000000000000025641266465517700261330ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php000066400000000000000000000203561266465517700261210ustar00rootroot00000000000000 * * 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\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\Console\Question\ChoiceQuestion; /** * 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') ->setAliases(array( 'container:debug', )) ->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 his name with the --parameter option: php %command.full_name% --parameter=kernel.debug EOF ) ; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if (false !== strpos($input->getFirstArgument(), ':d')) { $output->writeln('The use of "container:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:container" instead.'); } $this->validateInput($input); if ($input->getOption('parameters')) { $object = $this->getContainerBuilder()->getParameterBag(); $options = array(); } elseif ($parameter = $input->getOption('parameter')) { $object = $this->getContainerBuilder(); $options = array('parameter' => $parameter); } elseif ($input->getOption('tags')) { $object = $this->getContainerBuilder(); $options = array('group_by' => 'tags', 'show_private' => $input->getOption('show-private')); } elseif ($tag = $input->getOption('tag')) { $object = $this->getContainerBuilder(); $options = array('tag' => $tag, 'show_private' => $input->getOption('show-private')); } elseif ($name = $input->getArgument('name')) { $object = $this->getContainerBuilder(); $name = $this->findProperServiceName($input, $output, $object, $name); $options = array('id' => $name); } else { $object = $this->getContainerBuilder(); $options = array('show_private' => $input->getOption('show-private')); } $helper = new DescriptorHelper(); $options['format'] = $input->getOption('format'); $options['raw_text'] = $input->getOption('raw'); $helper->describe($output, $object, $options); if (!$input->getArgument('name') && $input->isInteractive()) { $output->writeln('To search for a service, re-run this command with a search term. 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, OutputInterface $output, 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)); } $question = new ChoiceQuestion('Choose a number for more information on the service', $matchingServices); $question->setErrorMessage('Service %s is invalid.'); return $this->getHelper('question')->ask($input, $output, $question); } 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; } } src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php000066400000000000000000000056671266465517700272770ustar00rootroot00000000000000 * * 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\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(<<%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) { $dispatcher = $this->getEventDispatcher(); if ($event = $input->getArgument('event')) { if (!$dispatcher->hasListeners($event)) { $formatter = $this->getHelperSet()->get('formatter'); $formattedBlock = $formatter->formatBlock( sprintf('[NOTE] The event "%s" does not have any registered listeners.', $event), 'fg=yellow', true ); $output->writeln($formattedBlock); return; } $options = array('event' => $event); } else { $options = array(); } $helper = new DescriptorHelper(); $options['format'] = $input->getOption('format'); $options['raw_text'] = $input->getOption('raw'); $helper->describe($output, $dispatcher, $options); } /** * Loads the Event Dispatcher from the container. * * @return EventDispatcherInterface */ protected function getEventDispatcher() { return $this->getContainer()->get('event_dispatcher'); } } src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php000066400000000000000000000055661266465517700267750ustar00rootroot00000000000000 * * 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\Routing\Matcher\Dumper\ApacheMatcherDumper; use Symfony\Component\Routing\RouterInterface; /** * RouterApacheDumperCommand. * * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * * @author Fabien Potencier */ class RouterApacheDumperCommand 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:dump-apache') ->setDefinition(array( new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller'), new InputOption('base-uri', null, InputOption::VALUE_REQUIRED, 'The base URI'), )) ->setDescription('[DEPRECATED] Dumps all routes as Apache rewrite rules') ->setHelp(<<<'EOF' The %command.name% dumps all routes as Apache rewrite rules. These can then be used with the ApacheUrlMatcher to use Apache for route matching. php %command.full_name% EOF ) ; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $formatter = $this->getHelper('formatter'); $output->writeln($formatter->formatSection('warning', 'The router:dump-apache command is deprecated since version 2.5 and will be removed in 3.0', 'comment')); $router = $this->getContainer()->get('router'); $dumpOptions = array(); if ($input->getArgument('script_name')) { $dumpOptions['script_name'] = $input->getArgument('script_name'); } if ($input->getOption('base-uri')) { $dumpOptions['base_uri'] = $input->getOption('base-uri'); } $dumper = new ApacheMatcherDumper($router->getRouteCollection()); $output->writeln($dumper->dump($dumpOptions), OutputInterface::OUTPUT_RAW); } } src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php000066400000000000000000000100111266465517700254420ustar00rootroot00000000000000 * * 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\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') ->setAliases(array( 'router:debug', )) ->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) { if (false !== strpos($input->getFirstArgument(), ':d')) { $output->writeln('The use of "router:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:router" instead.'); } $name = $input->getArgument('name'); $helper = new DescriptorHelper(); if ($name) { $route = $this->getContainer()->get('router')->getRouteCollection()->get($name); if (!$route) { throw new \InvalidArgumentException(sprintf('The route "%s" does not exist.', $name)); } $this->convertController($route); $helper->describe($output, $route, array( 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'name' => $name, )); } else { $routes = $this->getContainer()->get('router')->getRouteCollection(); foreach ($routes as $route) { $this->convertController($route); } $helper->describe($output, $routes, array( 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'show_controllers' => $input->getOption('show-controllers'), )); } } 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) { } } } } src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php000066400000000000000000000076021266465517700254640ustar00rootroot00000000000000 * * 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\Input\ArrayInput; 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) { $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')); $matches = false; foreach ($traces as $trace) { if (TraceableUrlMatcher::ROUTE_ALMOST_MATCHES == $trace['level']) { $output->writeln(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { $output->writeln(sprintf('Route "%s" matches', $trace['name'])); $routerDebugcommand = $this->getApplication()->find('debug:router'); $output->writeln(''); $routerDebugcommand->run(new ArrayInput(array('name' => $trace['name'])), $output); $matches = true; } elseif ($input->getOption('verbose')) { $output->writeln(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log'])); } } if (!$matches) { $output->writeln(sprintf('None of the routes match the path "%s"', $input->getArgument('path_info'))); return 1; } } } src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php000066400000000000000000000030601266465517700244670ustar00rootroot00000000000000 * * 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 (PHP_VERSION_ID < 50400 || 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; } list($hostname, $port) = explode(':', $address); $fp = @fsockopen($hostname, $port, $errno, $errstr, 5); if (false !== $fp) { fclose($fp); return true; } return false; } } src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php000066400000000000000000000120741266465517700251610ustar00rootroot00000000000000 * * 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\Process\PhpExecutableFinder; use Symfony\Component\Process\ProcessBuilder; /** * 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: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) { $documentRoot = $input->getOption('docroot'); if (null === $documentRoot) { $documentRoot = $this->getContainer()->getParameter('kernel.root_dir').'/../web'; } if (!is_dir($documentRoot)) { $output->writeln(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, ':')) { $output->writeln('The address has to be of the form bind-address:port.'); return 1; } if ($this->isOtherServerProcessRunning($address)) { $output->writeln(sprintf('A process is already listening on http://%s.', $address)); return 1; } if ('prod' === $env) { $output->writeln('Running PHP built-in server in production environment is NOT recommended!'); } $output->writeln(sprintf("Server running on http://%s\n", $address)); $output->writeln('Quit the server with CONTROL-C.'); if (null === $builder = $this->createPhpProcessBuilder($output, $address, $input->getOption('router'), $env)) { return 1; } $builder->setWorkingDirectory($documentRoot); $builder->setTimeout(null); $process = $builder->getProcess(); if (OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { $process->disableOutput(); } $this ->getHelper('process') ->run($output, $process, null, null, OutputInterface::VERBOSITY_VERBOSE); if (!$process->isSuccessful()) { $output->writeln('Built-in server terminated unexpectedly'); if ($process->isOutputDisabled()) { $output->writeln('Run the command again with -v option for more details'); } } return $process->getExitCode(); } private function createPhpProcessBuilder(OutputInterface $output, $address, $router, $env) { $router = $router ?: $this ->getContainer() ->get('kernel') ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) ; if (!file_exists($router)) { $output->writeln(sprintf('The given router script "%s" does not exist', $router)); return; } $router = realpath($router); $finder = new PhpExecutableFinder(); if (false === $binary = $finder->find()) { $output->writeln('Unable to find PHP binary to run server'); return; } return new ProcessBuilder(array($binary, '-S', $address, $router)); } } src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php000066400000000000000000000166061266465517700255170ustar00rootroot00000000000000 * * 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\Question\ConfirmationQuestion; 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\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: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:start') ->setDescription('Starts PHP built-in web server in the background') ->setHelp(<<%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) { if (!extension_loaded('pcntl')) { $output->writeln('This command needs the pcntl extension to run.'); $output->writeln('You can either install it or use the server:run command instead to run the built-in web server.'); if ($this->getHelper('question')->ask($input, $output, new ConfirmationQuestion('Do you want to start server:run immediately? [Yn] ', true))) { $command = $this->getApplication()->find('server:run'); return $command->run($input, $output); } return 1; } $documentRoot = $input->getOption('docroot'); if (null === $documentRoot) { $documentRoot = $this->getContainer()->getParameter('kernel.root_dir').'/../web'; } if (!is_dir($documentRoot)) { $output->writeln(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, $output)) { return 1; } $address = $input->getArgument('address'); if (false === strpos($address, ':')) { $output->writeln('The address has to be of the form bind-address:port.'); return 1; } if ($this->isOtherServerProcessRunning($address)) { $output->writeln(sprintf('A process is already listening on http://%s.', $address)); return 1; } if ('prod' === $env) { $output->writeln('Running PHP built-in server in production environment is NOT recommended!'); } $pid = pcntl_fork(); if ($pid < 0) { $output->writeln('Unable to start the server process'); return 1; } if ($pid > 0) { $output->writeln(sprintf('Web server listening on http://%s', $address)); return; } if (posix_setsid() < 0) { $output->writeln('Unable to set the child process as session leader'); return 1; } if (null === $process = $this->createServerProcess($output, $address, $documentRoot, $router)) { return 1; } $process->disableOutput(); $process->start(); $lockFile = $this->getLockFile($address); touch($lockFile); if (!$process->isRunning()) { $output->writeln('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 OutputInterface $output An OutputInterface instance * * @return string|bool The absolute file path of the router script, or false on failure */ private function determineRouterScript($router, $env, OutputInterface $output) { if (null === $router) { $router = $this ->getContainer() ->get('kernel') ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) ; } if (false === $path = realpath($router)) { $output->writeln(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 OutputInterface $output A OutputInterface 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(OutputInterface $output, $address, $documentRoot, $router) { $finder = new PhpExecutableFinder(); if (false === $binary = $finder->find()) { $output->writeln('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); } } src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php000066400000000000000000000037521266465517700257030ustar00rootroot00000000000000 * * 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; /** * 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'), )) ->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) { $address = $input->getArgument('address'); // remove an orphaned lock file if (file_exists($this->getLockFile($address)) && !$this->isServerRunning($address)) { unlink($this->getLockFile($address)); } if (file_exists($this->getLockFile($address))) { $output->writeln(sprintf('Web server still listening on http://%s', $address)); } else { $output->writeln(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; } } src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php000066400000000000000000000035511266465517700253420ustar00rootroot00000000000000 * * 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; /** * 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:8000'), )) ->setName('server:stop') ->setDescription('Stops PHP\'s built-in web server that was started with the server:start command') ->setHelp(<<%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) { $address = $input->getArgument('address'); $lockFile = $this->getLockFile($address); if (!file_exists($lockFile)) { $output->writeln(sprintf('No web server is listening on http://%s', $address)); return 1; } unlink($lockFile); $output->writeln(sprintf('Stopped the web server listening on http://%s', $address)); } } src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php000066400000000000000000000232721266465517700264750ustar00rootroot00000000000000 * * 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\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; use Symfony\Component\Translation\Translator; /** * 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') ->setAliases(array( 'translation:debug', )) ->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'), )) ->setDescription('Displays translation messages information') ->setHelp(<<%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 EOF ) ; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $output = new SymfonyStyle($input, $output); if (false !== strpos($input->getFirstArgument(), ':d')) { $output->caution('The use of "translation:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:translation" instead.'); } $locale = $input->getArgument('locale'); $domain = $input->getOption('domain'); $loader = $this->getContainer()->get('translation.loader'); $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])); } } } // Extract used messages $extractedCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { $path .= 'views'; if (is_dir($path)) { $this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue); } } // Load defined messages $currentCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { $path .= 'translations'; if (is_dir($path)) { $loader->loadMessages($path, $currentCatalogue); } } // 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); } $output->warning($outputMessage); return; } // Load the fallback catalogues $fallbackCatalogues = array(); $translator = $this->getContainer()->get('translator'); if ($translator instanceof Translator) { 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; } } // 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; } } $output->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 (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($string)) { 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; } } src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php000066400000000000000000000203171266465517700266660ustar00rootroot00000000000000 * * 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\DiffOperation; 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 parse templates to extract translation messages and add 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('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'), )) ->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} */ protected function execute(InputInterface $input, OutputInterface $output) { $output = new SymfonyStyle($input, $output); // check presence of force or dump-message if ($input->getOption('force') !== true && $input->getOption('dump-messages') !== true) { $output->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)) { $output->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])); } } } $output->title('Symfony translation update command'); $output->text(sprintf('Generating "%s" translation files for "%s"', $input->getArgument('locale'), $currentName)); // load any messages from templates $extractedCatalogue = new MessageCatalogue($input->getArgument('locale')); $output->text('Parsing templates'); $extractor = $this->getContainer()->get('translation.extractor'); $extractor->setPrefix($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')); $output->text('Loading translation files'); $loader = $this->getContainer()->get('translation.loader'); foreach ($transPaths as $path) { $path .= 'translations'; if (is_dir($path)) { $loader->loadMessages($path, $currentCatalogue); } } // process catalogues $operation = $input->getOption('clean') ? new DiffOperation($currentCatalogue, $extractedCatalogue) : new MergeOperation($currentCatalogue, $extractedCatalogue); // Exit if no messages found. if (!count($operation->getDomains())) { $output->warning('No translation found.'); return; } // show compiled list of messages if ($input->getOption('dump-messages') === true) { $output->newLine(); foreach ($operation->getDomains() as $domain) { $output->section(sprintf('Displaying messages for domain %s:', $domain)); $newKeys = array_keys($operation->getNewMessages($domain)); $allKeys = array_keys($operation->getMessages($domain)); $output->listing(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))) )); } if ($input->getOption('output-format') == 'xlf') { $output->writeln('Xliff output version is 1.2'); } } if ($input->getOption('no-backup') === true) { $writer->disableBackup(); } // save the files if ($input->getOption('force') === true) { $output->text('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'))); } $output->newLine(); $output->success('Success'); } } src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php000066400000000000000000000123511266465517700247550ustar00rootroot00000000000000 * * 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\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Finder\Finder; use Symfony\Component\Yaml\Exception\ParseException; use Symfony\Component\Yaml\Parser; /** * Validates YAML files syntax and outputs encountered errors. * * @author Grégoire Pineau */ class YamlLintCommand extends Command { protected function configure() { $this ->setName('lint:yaml') ->setAliases(array('yaml:lint')) ->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 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 all YAML files in a bundle: php %command.full_name% @AcmeDemoBundle You can also pass the YAML contents from STDIN: cat filename | php %command.full_name% EOF ) ; } protected function execute(InputInterface $input, OutputInterface $output) { if (false !== strpos($input->getFirstArgument(), ':l')) { $output->writeln('The use of "yaml:lint" command is deprecated since version 2.7 and will be removed in 3.0. Use the "lint:yaml" instead.'); } $filename = $input->getArgument('filename'); if (!$filename) { if (0 !== ftell(STDIN)) { throw new \RuntimeException('Please provide a filename or pipe file content to STDIN.'); } $content = ''; while (!feof(STDIN)) { $content .= fread(STDIN, 1024); } return $this->display($input, $output, array($this->validate($content))); } if (0 !== strpos($filename, '@') && !is_readable($filename)) { throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); } $files = array(); if (is_file($filename)) { $files = array($filename); } elseif (is_dir($filename)) { $files = Finder::create()->files()->in($filename)->name('*.yml'); } else { $dir = $this->getApplication()->getKernel()->locateResource($filename); $files = Finder::create()->files()->in($dir)->name('*.yml'); } $filesInfo = array(); foreach ($files as $file) { $filesInfo[] = $this->validate(file_get_contents($file), $file); } return $this->display($input, $output, $filesInfo); } private function validate($content, $file = null) { $parser = new Parser(); try { $parser->parse($content); } catch (ParseException $e) { return array('file' => $file, 'valid' => false, 'message' => $e->getMessage()); } return array('file' => $file, 'valid' => true); } private function display(InputInterface $input, OutputInterface $output, $files) { switch ($input->getOption('format')) { case 'txt': return $this->displayTxt($output, $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, $filesInfo) { $errors = 0; foreach ($filesInfo as $info) { if ($info['valid'] && $output->isVerbose()) { $output->writeln('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); } elseif (!$info['valid']) { ++$errors; $output->writeln(sprintf('KO in %s', $info['file'])); $output->writeln(sprintf('>> %s', $info['message'])); } } $output->writeln(sprintf('%d/%d valid files', count($filesInfo) - $errors, count($filesInfo))); return min($errors, 1); } private function displayJson(OutputInterface $output, $filesInfo) { $errors = 0; array_walk($filesInfo, function (&$v) use (&$errors) { $v['file'] = (string) $v['file']; if (!$v['valid']) { ++$errors; } }); $output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0)); return min($errors, 1); } } src/Symfony/Bundle/FrameworkBundle/Console/000077500000000000000000000000001266465517700212365ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Console/Application.php000066400000000000000000000076471266465517700242300ustar00rootroot00000000000000 * * 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.' - '.$kernel->getName().'/'.$kernel->getEnvironment().($kernel->isDebug() ? '/debug' : '')); $this->getDefinition()->addOption(new InputOption('--shell', '-s', InputOption::VALUE_NONE, 'Launch the shell.')); $this->getDefinition()->addOption(new InputOption('--process-isolation', null, InputOption::VALUE_NONE, 'Launch commands from shell as a separate process.')); $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')); if (true === $input->hasParameterOption(array('--shell', '-s'))) { $shell = new Shell($this); $shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation'))); $shell->run(); return 0; } return parent::doRun($input, $output); } /** * {@inheritdoc} */ public function get($name) { $this->registerCommands(); return parent::get($name); } /** * {@inheritdoc} */ public function all($namespace = null) { $this->registerCommands(); return parent::all($namespace); } 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)); } } } } src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/000077500000000000000000000000001266465517700233545ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php000066400000000000000000000230511266465517700262040ustar00rootroot00000000000000 * * 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\Helper\Table; 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 */ private $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->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); } /** * Writes content to output. * * @param Table $table * @param bool $decorated */ protected function renderTable(Table $table, $decorated = false) { if (!$decorated) { $table->getStyle()->setCellRowFormat('%s'); $table->getStyle()->setCellRowContentFormat('%s'); $table->getStyle()->setCellHeaderFormat('%s'); } $table->render(); } /** * 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); } // 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; } } src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php000066400000000000000000000271171266465517700270450ustar00rootroot00000000000000 * * 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; if (defined('JSON_PRETTY_PRINT')) { $flags |= JSON_PRETTY_PRINT; } $this->write(json_encode($data, $flags)."\n"); } /** * @param Route $route * * @return array */ protected function getRouteData(Route $route) { $requirements = $route->getRequirements(); unset($requirements['_scheme'], $requirements['_method']); 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' => $requirements ?: '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(), 'scope' => $definition->getScope(), 'public' => $definition->isPublic(), 'synthetic' => $definition->isSynthetic(), 'lazy' => $definition->isLazy(), ); if (method_exists($definition, 'isSynchronized')) { $data['synchronized'] = $definition->isSynchronized(false); } $data['abstract'] = $definition->isAbstract(); $data['file'] = $definition->getFile(); if ($definition->getFactoryClass(false)) { $data['factory_class'] = $definition->getFactoryClass(false); } if ($definition->getFactoryService(false)) { $data['factory_service'] = $definition->getFactoryService(false); } if ($definition->getFactoryMethod(false)) { $data['factory_method'] = $definition->getFactoryMethod(false); } 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; } } if (!$omitTags) { $data['tags'] = array(); if (count($definition->getTags())) { 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) { $data[] = $this->getCallableData($listener); } } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { foreach ($eventListeners as $eventListener) { $data[$eventListened][] = $this->getCallableData($eventListener); } } } 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.'); } } src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php000066400000000000000000000330271266465517700277130ustar00rootroot00000000000000 * * 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()) { $requirements = $route->getRequirements(); unset($requirements['_scheme'], $requirements['_method']); $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: '.($requirements ? $this->formatRouterConfig($requirements) : '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".'- Scope: `'.$definition->getScope().'`' ."\n".'- Public: '.($definition->isPublic() ? 'yes' : 'no') ."\n".'- Synthetic: '.($definition->isSynthetic() ? 'yes' : 'no') ."\n".'- Lazy: '.($definition->isLazy() ? 'yes' : 'no') ; if (method_exists($definition, 'isSynchronized')) { $output .= "\n".'- Synchronized: '.($definition->isSynchronized(false) ? 'yes' : 'no'); } $output .= "\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no'); if ($definition->getFile()) { $output .= "\n".'- File: `'.$definition->getFile().'`'; } if ($definition->getFactoryClass(false)) { $output .= "\n".'- Factory Class: `'.$definition->getFactoryClass(false).'`'; } if ($definition->getFactoryService(false)) { $output .= "\n".'- Factory Service: `'.$definition->getFactoryService(false).'`'; } if ($definition->getFactoryMethod(false)) { $output .= "\n".'- Factory Method: `'.$definition->getFactoryMethod(false).'`'; } 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.'`'; } } 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%s\n\n%s\n", $options['id'], str_repeat('~', strlen($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%s\n\n%s\n", $options['id'], str_repeat('~', strlen($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); } } 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); } } } } /** * {@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 (!count($array)) { return 'NONE'; } $string = ''; ksort($array); foreach ($array as $name => $value) { $string .= "\n".' - `'.$name.'`: '.$this->formatValue($value); } return $string; } } src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php000066400000000000000000000423621266465517700270570ustar00rootroot00000000000000 * * 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\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']; $headers = array('Name', 'Method', 'Scheme', 'Host', 'Path'); $table = new Table($this->getOutput()); $table->setStyle('compact'); $table->setHeaders($showControllers ? array_merge($headers, array('Controller')) : $headers); 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; } $table->addRow($row); } $this->writeText($this->formatSection('router', 'Current routes')."\n", $options); $table->render(); } /** * {@inheritdoc} */ protected function describeRoute(Route $route, array $options = array()) { $requirements = $route->getRequirements(); unset($requirements['_scheme'], $requirements['_method']); // fixme: values were originally written as raw $description = array( 'Path '.$route->getPath(), 'Path Regex '.$route->compile()->getRegex(), 'Host '.('' !== $route->getHost() ? $route->getHost() : 'ANY'), 'Host Regex '.('' !== $route->getHost() ? $route->compile()->getHostRegex() : ''), 'Scheme '.($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY'), 'Method '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY'), 'Class '.get_class($route), 'Defaults '.$this->formatRouterConfig($route->getDefaults()), 'Requirements '.($requirements ? $this->formatRouterConfig($requirements) : 'NO CUSTOM'), 'Options '.$this->formatRouterConfig($route->getOptions()), ); if (isset($options['name'])) { array_unshift($description, 'Name '.$options['name']); array_unshift($description, $this->formatSection('router', sprintf('Route "%s"', $options['name']))); } $this->writeText(implode("\n", $description)."\n", $options); } /** * {@inheritdoc} */ protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) { $table = new Table($this->getOutput()); $table->setStyle('compact'); $table->setHeaders(array('Parameter', 'Value')); foreach ($this->sortParameters($parameters) as $parameter => $value) { $table->addRow(array($parameter, $this->formatParameter($value))); } $this->writeText($this->formatSection('container', 'List of parameters')."\n", $options); $table->render(); } /** * {@inheritdoc} */ protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) { $showPrivate = isset($options['show_private']) && $options['show_private']; $description = array($this->formatSection('container', 'Tagged services')); foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { $description[] = $this->formatSection('tag', $tag); $description = array_merge($description, array_keys($definitions)); $description[] = ''; } $this->writeText(implode("\n", $description), $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->describeContainerAlias($service, $options); } elseif ($service instanceof Definition) { $this->describeContainerDefinition($service, $options); } else { $description = $this->formatSection('container', sprintf('Information for service %s', $options['id'])) ."\n".sprintf('Service Id %s', isset($options['id']) ? $options['id'] : '-') ."\n".sprintf('Class %s', get_class($service)); $this->writeText($description, $options); } } /** * {@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) { $label = 'Public and private services'; } else { $label = 'Public services'; } if ($showTag) { $label .= ' with tag '.$options['tag'].''; } $this->writeText($this->formatSection('container', $label)."\n", $options); $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); $table = new Table($this->getOutput()); $table->setStyle('compact'); $table->setHeaders(array_merge(array('Service ID'), $tagsNames, array('Class name'))); 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) { $table->addRow(array_merge(array($serviceId), $tagValues, array($definition->getClass()))); } else { $table->addRow(array_merge(array(' "'), $tagValues, array(''))); } } } else { $table->addRow(array($serviceId, $definition->getClass())); } } elseif ($definition instanceof Alias) { $alias = $definition; $table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); } else { // we have no information (happens with "service_container") $table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); } } $table->render(); } /** * {@inheritdoc} */ protected function describeContainerDefinition(Definition $definition, array $options = array()) { $description = isset($options['id']) ? array($this->formatSection('container', sprintf('Information for service %s', $options['id']))) : array(); $description[] = sprintf('Service Id %s', isset($options['id']) ? $options['id'] : '-'); $description[] = sprintf('Class %s', $definition->getClass() ?: '-'); $tags = $definition->getTags(); if (count($tags)) { $description[] = 'Tags'; foreach ($tags as $tagName => $tagData) { foreach ($tagData as $parameters) { $description[] = sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function ($key, $value) { return sprintf('%s: %s', $key, $value); }, array_keys($parameters), array_values($parameters)))); } } } else { $description[] = 'Tags -'; } $description[] = sprintf('Scope %s', $definition->getScope()); $description[] = sprintf('Public %s', $definition->isPublic() ? 'yes' : 'no'); $description[] = sprintf('Synthetic %s', $definition->isSynthetic() ? 'yes' : 'no'); $description[] = sprintf('Lazy %s', $definition->isLazy() ? 'yes' : 'no'); if (method_exists($definition, 'isSynchronized')) { $description[] = sprintf('Synchronized %s', $definition->isSynchronized(false) ? 'yes' : 'no'); } $description[] = sprintf('Abstract %s', $definition->isAbstract() ? 'yes' : 'no'); if ($definition->getFile()) { $description[] = sprintf('Required File %s', $definition->getFile() ?: '-'); } if ($definition->getFactoryClass(false)) { $description[] = sprintf('Factory Class %s', $definition->getFactoryClass(false)); } if ($definition->getFactoryService(false)) { $description[] = sprintf('Factory Service %s', $definition->getFactoryService(false)); } if ($definition->getFactoryMethod(false)) { $description[] = sprintf('Factory Method %s', $definition->getFactoryMethod(false)); } if ($factory = $definition->getFactory()) { if (is_array($factory)) { if ($factory[0] instanceof Reference) { $description[] = sprintf('Factory Service %s', $factory[0]); } elseif ($factory[0] instanceof Definition) { throw new \InvalidArgumentException('Factory is not describable.'); } else { $description[] = sprintf('Factory Class %s', $factory[0]); } $description[] = sprintf('Factory Method %s', $factory[1]); } else { $description[] = sprintf('Factory Function %s', $factory); } } $this->writeText(implode("\n", $description)."\n", $options); } /** * {@inheritdoc} */ protected function describeContainerAlias(Alias $alias, array $options = array()) { $this->writeText(sprintf("This service is an alias for the service %s\n", (string) $alias), $options); } /** * {@inheritdoc} */ protected function describeContainerParameter($parameter, array $options = array()) { $this->writeText($this->formatParameter($parameter), $options); } /** * {@inheritdoc} */ protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = array()) { $event = array_key_exists('event', $options) ? $options['event'] : null; $label = 'Registered listeners'; if (null !== $event) { $label .= sprintf(' for event %s', $event); } else { $label .= ' by event'; } $this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); $registeredListeners = $eventDispatcher->getListeners($event); if (null !== $event) { $this->writeText("\n"); $table = new Table($this->getOutput()); $table->getStyle()->setCellHeaderFormat('%s'); $table->setHeaders(array('Order', 'Callable')); foreach ($registeredListeners as $order => $listener) { $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); } $table->render(); } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $this->writeText(sprintf("\n[Event] %s\n", $eventListened), $options); $table = new Table($this->getOutput()); $table->getStyle()->setCellHeaderFormat('%s'); $table->setHeaders(array('Order', 'Callable')); foreach ($eventListeners as $order => $eventListener) { $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); } $table->render(); } } } /** * {@inheritdoc} */ protected function describeCallable($callable, array $options = array()) { $this->writeText($this->formatCallable($callable), $options); } /** * @param array $array * * @return string */ private function formatRouterConfig(array $array) { if (!count($array)) { return 'NONE'; } $string = ''; ksort($array); foreach ($array as $name => $value) { $string .= ($string ? "\n".str_repeat(' ', 13) : '').$name.': '.$this->formatValue($value); } return $string; } /** * @param string $section * @param string $message * * @return string */ private function formatSection($section, $message) { return sprintf('[%s] %s', $section, $message); } /** * @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 ); } } src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php000066400000000000000000000454411266465517700266740ustar00rootroot00000000000000 * * 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 (count($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))); } } $requirements = $route->getRequirements(); unset($requirements['_scheme'], $requirements['_method']); if (count($requirements)) { $routeXML->appendChild($requirementsXML = $dom->createElement('requirements')); foreach ($requirements as $attribute => $pattern) { $requirementsXML->appendChild($requirementXML = $dom->createElement('requirement')); $requirementXML->setAttribute('key', $attribute); $requirementXML->appendChild(new \DOMText($pattern)); } } if (count($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 (method_exists($definition, 'getFactoryMethod')) { if ($definition->getFactoryClass(false)) { $serviceXML->setAttribute('factory-class', $definition->getFactoryClass(false)); } if ($definition->getFactoryService(false)) { $serviceXML->setAttribute('factory-service', $definition->getFactoryService(false)); } if ($definition->getFactoryMethod(false)) { $serviceXML->setAttribute('factory-method', $definition->getFactoryMethod(false)); } } 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('scope', $definition->getScope()); $serviceXML->setAttribute('public', $definition->isPublic() ? 'true' : 'false'); $serviceXML->setAttribute('synthetic', $definition->isSynthetic() ? 'true' : 'false'); $serviceXML->setAttribute('lazy', $definition->isLazy() ? 'true' : 'false'); if (method_exists($definition, 'isSynchronized')) { $serviceXML->setAttribute('synchronized', $definition->isSynchronized(false) ? 'true' : 'false'); } $serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false'); $serviceXML->setAttribute('file', $definition->getFile()); if (!$omitTags) { $tags = $definition->getTags(); if (count($tags) > 0) { $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) { foreach ($registeredListeners as $listener) { $callableXML = $this->getCallableDocument($listener); $eventDispatcherXML->appendChild($eventDispatcherXML->ownerDocument->importNode($callableXML->childNodes->item(0), true)); } } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $eventDispatcherXML->appendChild($eventXML = $dom->createElement('event')); $eventXML->setAttribute('name', $eventListened); foreach ($eventListeners as $eventListener) { $callableXML = $this->getCallableDocument($eventListener); $eventXML->appendChild($eventXML->ownerDocument->importNode($callableXML->childNodes->item(0), true)); } } } return $dom; } /** * @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.'); } } src/Symfony/Bundle/FrameworkBundle/Console/Helper/000077500000000000000000000000001266465517700224555ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php000066400000000000000000000021441266465517700264450ustar00rootroot00000000000000 * * 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()) ; } } src/Symfony/Bundle/FrameworkBundle/Console/Shell.php000066400000000000000000000017761266465517700230310ustar00rootroot00000000000000 * * 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\Console\Shell as BaseShell; /** * Shell. * * @author Fabien Potencier */ class Shell extends BaseShell { /** * Returns the shell header. * * @return string The header string */ protected function getHeader() { return << _____ __ / ____| / _| | (___ _ _ _ __ ___ | |_ ___ _ __ _ _ \___ \| | | | '_ ` _ \| _/ _ \| '_ \| | | | ____) | |_| | | | | | | || (_) | | | | |_| | |_____/ \__, |_| |_| |_|_| \___/|_| |_|\__, | __/ | __/ | |___/ |___/ EOF .parent::getHeader(); } } src/Symfony/Bundle/FrameworkBundle/Controller/000077500000000000000000000000001266465517700217575ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php000066400000000000000000000302401266465517700246120ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\DependencyInjection\ContainerAware; 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\FormTypeInterface; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; 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 */ class Controller extends ContainerAware { /** * Generates a URL from the given parameters. * * @param string $route The name of the route * @param mixed $parameters An array of parameters * @param bool|string $referenceType The type of reference (one of the constants in UrlGeneratorInterface) * * @return string The generated URL * * @see UrlGeneratorInterface */ public 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 */ public function forward($controller, array $path = array(), array $query = array()) { $path['_controller'] = $controller; $subRequest = $this->container->get('request_stack')->getCurrentRequest()->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 */ public 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); } /** * 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)) { throw $this->createAccessDeniedException($message); } } /** * 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 */ public function renderView($view, array $parameters = array()) { return $this->container->get('templating')->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 */ public function render($view, array $parameters = array(), Response $response = null) { return $this->container->get('templating')->renderResponse($view, $parameters, $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 */ public function stream($view, array $parameters = array(), StreamedResponse $response = null) { $templating = $this->container->get('templating'); $callback = function () use ($templating, $view, $parameters) { $templating->stream($view, $parameters); }; 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 */ public 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 */ public 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|FormTypeInterface $type The built type of the form * @param mixed $data The initial data for the form * @param array $options Options for the form * * @return Form */ public 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 */ public function createFormBuilder($data = null, array $options = array()) { return $this->container->get('form.factory')->createBuilder('form', $data, $options); } /** * Shortcut to return the request service. * * @return Request * * @deprecated since version 2.4, to be removed in 3.0. * Ask Symfony to inject the Request object into your controller * method instead by type hinting it in the method's signature. */ public function getRequest() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED); return $this->container->get('request_stack')->getCurrentRequest(); } /** * Shortcut to return the Doctrine Registry service. * * @return Registry * * @throws \LogicException If DoctrineBundle is not available */ public 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() */ public 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 */ public 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 */ public function get($id) { if ('request' === $id) { @trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED); } 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)); } } src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php000066400000000000000000000120761266465517700265770ustar00rootroot00000000000000 * * 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) { $originalController = $controller; if (3 !== count($parts = explode(':', $controller))) { throw new \InvalidArgumentException(sprintf('The "%s" controller is not a valid "a:b:c" controller string.', $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; } } return $alternative; } } src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php000066400000000000000000000054471266465517700263470ustar00rootroot00000000000000 * * 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) { $controller = parent::instantiateController($class); if ($controller instanceof ContainerAwareInterface) { $controller->setContainer($this->container); } return $controller; } } src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php000066400000000000000000000123421266465517700262770ustar00rootroot00000000000000 * * 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\ContainerAware; 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 extends ContainerAware { /** * 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); } } src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php000066400000000000000000000030431266465517700263070ustar00rootroot00000000000000 * * 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\ContainerAware; use Symfony\Component\HttpFoundation\Response; /** * TemplateController. * * @author Fabien Potencier */ class TemplateController extends ContainerAware { /** * 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) { /** @var $response \Symfony\Component\HttpFoundation\Response */ $response = $this->container->get('templating')->renderResponse($template); 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; } } src/Symfony/Bundle/FrameworkBundle/DataCollector/000077500000000000000000000000001266465517700223545ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/DataCollector/AjaxDataCollector.php000066400000000000000000000014401266465517700264100ustar00rootroot00000000000000 * * 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\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollector; /** * 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'; } } src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php000066400000000000000000000017431266465517700270130ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/000077500000000000000000000000001266465517700235555ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/000077500000000000000000000000001266465517700253275ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheClearerPass.php000066400000000000000000000021401266465517700315760ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddCacheWarmerPass.php000066400000000000000000000026001266465517700314570ustar00rootroot00000000000000 * * 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 warmers. * * @author Fabien Potencier */ class AddCacheWarmerPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('cache_warmer')) { return; } $warmers = array(); foreach ($container->findTaggedServiceIds('kernel.cache_warmer') as $id => $attributes) { $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; $warmers[$priority][] = new Reference($id); } if (empty($warmers)) { return; } // sort by priority and flatten krsort($warmers); $warmers = call_user_func_array('array_merge', $warmers); $container->getDefinition('cache_warmer')->replaceArgument(0, $warmers); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConsoleCommandPass.php000066400000000000000000000034331266465517700322040ustar00rootroot00000000000000 * * 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; /** * AddConsoleCommandPass. * * @author Grégoire Pineau */ class AddConsoleCommandPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { $commandServices = $container->findTaggedServiceIds('console.command'); foreach ($commandServices as $id => $tags) { $definition = $container->getDefinition($id); if (!$definition->isPublic()) { throw new \InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be public.', $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')) { throw new \InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "Symfony\\Component\\Console\\Command\\Command".', $id)); } $container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $class)), $id); } $container->setParameter('console.command.ids', array_keys($commandServices)); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddConstraintValidatorsPass.php000066400000000000000000000021631266465517700334570ustar00rootroot00000000000000 * * 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; 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; } $validators[$container->getDefinition($id)->getClass()] = $id; } $container->getDefinition('validator.validator_factory')->replaceArgument(1, $validators); } } AddExpressionLanguageProvidersPass.php000066400000000000000000000030631266465517700347240ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler * * 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))); } } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddValidatorInitializersPass.php000066400000000000000000000021051266465517700336120ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CompilerDebugDumpPass.php000066400000000000000000000025531266465517700322430ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php000066400000000000000000000025721266465517700337230ustar00rootroot00000000000000 * * 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) } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php000066400000000000000000000036521266465517700276000ustar00rootroot00000000000000 * * 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; /** * 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 { public function process(ContainerBuilder $container) { if (!$container->hasDefinition('form.extension')) { return; } $definition = $container->getDefinition('form.extension'); // Builds an array with service IDs as keys and tag aliases as values $types = array(); foreach ($container->findTaggedServiceIds('form.type') as $serviceId => $tag) { $alias = isset($tag[0]['alias']) ? $tag[0]['alias'] : $serviceId; // Flip, because we want tag aliases (= type identifiers) as keys $types[$alias] = $serviceId; } $definition->replaceArgument(1, $types); $typeExtensions = array(); foreach ($container->findTaggedServiceIds('form.type_extension') as $serviceId => $tag) { $alias = isset($tag[0]['alias']) ? $tag[0]['alias'] : $serviceId; $typeExtensions[$alias][] = $serviceId; } $definition->replaceArgument(2, $typeExtensions); // Find all services annotated with "form.type_guesser" $guessers = array_keys($container->findTaggedServiceIds('form.type_guesser')); $definition->replaceArgument(3, $guessers); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FragmentRendererPass.php000066400000000000000000000040041266465517700321170ustar00rootroot00000000000000 * * 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; @trigger_error('The '.__NAMESPACE__.'\FragmentRendererPass class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead.', E_USER_DEPRECATED); use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds services tagged kernel.fragment_renderer as HTTP content rendering strategies. * * @author Fabien Potencier * * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead. */ class FragmentRendererPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('fragment.handler')) { return; } $definition = $container->getDefinition('fragment.handler'); foreach (array_keys($container->findTaggedServiceIds('kernel.fragment_renderer')) as $id) { // We must assume that the class value has been correctly filled, even if the service is created by a factory $class = $container->getDefinition($id)->getClass(); $refClass = new \ReflectionClass($class); $interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'; if (!$refClass->implementsInterface($interface)) { throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); } $definition->addMethodCall('addRenderer', array(new Reference($id))); } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php000066400000000000000000000034751266465517700323400ustar00rootroot00000000000000 * * 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; } // skip if the symfony/translation version is lower than 2.6 if (!interface_exists('Symfony\Component\Translation\TranslatorBagInterface')) { 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()); $refClass = new \ReflectionClass($class); if ($refClass->implementsInterface('Symfony\Component\Translation\TranslatorInterface') && $refClass->implementsInterface('Symfony\Component\Translation\TranslatorBagInterface')) { $container->getDefinition('translator.logging')->setDecoratedService('translator'); $container->getDefinition('translation.warmer')->replaceArgument(0, new Reference('translator.logging.inner')); } } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php000066400000000000000000000036611266465517700304570ustar00rootroot00000000000000 * * 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 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); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/RoutingResolverPass.php000066400000000000000000000021311266465517700320350ustar00rootroot00000000000000 * * 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))); } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php000066400000000000000000000043071266465517700310040ustar00rootroot00000000000000 * * 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; /** * 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 { 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); $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); $container->getDefinition('serializer')->replaceArgument(1, $encoders); } private function findAndSortTaggedServices($tagName, ContainerBuilder $container) { $services = $container->findTaggedServiceIds($tagName); if (empty($services)) { throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName)); } $sortedServices = array(); foreach ($services as $serviceId => $tags) { foreach ($tags as $tag) { $priority = isset($tag['priority']) ? $tag['priority'] : 0; $sortedServices[$priority][] = new Reference($serviceId); } } krsort($sortedServices); // Flatten the array return call_user_func_array('array_merge', $sortedServices); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingAssetHelperPass.php000066400000000000000000000041221266465517700331320ustar00rootroot00000000000000 * * 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\Definition; use Symfony\Component\DependencyInjection\Reference; @trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); /** * @deprecated since 2.7, will be removed in 3.0 */ class TemplatingAssetHelperPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (!$container->hasDefinition('templating.helper.assets')) { return; } $assetsHelperDefinition = $container->getDefinition('templating.helper.assets'); $args = $assetsHelperDefinition->getArguments(); if ('request' === $this->getPackageScope($container, $args[0])) { $assetsHelperDefinition->setScope('request'); return; } if (!array_key_exists(1, $args)) { return; } if (!is_array($args[1])) { return; } foreach ($args[1] as $arg) { if ('request' === $this->getPackageScope($container, $arg)) { $assetsHelperDefinition->setScope('request'); break; } } } private function getPackageScope(ContainerBuilder $container, $package) { if ($package instanceof Reference) { return $container->findDefinition((string) $package)->getScope(); } if ($package instanceof Definition) { return $package->getScope(); } // Someone did some voodoo with a compiler pass. So we ignore this // 'package'. Can we be sure, it's a package anyway? } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingPass.php000066400000000000000000000023101266465517700307670ustar00rootroot00000000000000 * * 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; class TemplatingPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if ($container->hasDefinition('templating')) { return; } 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)); } } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationDumperPass.php000066400000000000000000000021001266465517700323330ustar00rootroot00000000000000 * * 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))); } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationExtractorPass.php000066400000000000000000000024351266465517700330650ustar00rootroot00000000000000 * * 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.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))); } } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslatorPass.php000066400000000000000000000027521266465517700310260ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php000066400000000000000000000754001266465517700271030ustar00rootroot00000000000000 * * 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 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 // Check deprecations before the config is processed to ensure // the setting has been explicitly defined in a configuration file. ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); }) ->then(function ($v) { @trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since version 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED); return $v; }) ->end() ->validate() ->ifTrue(function ($v) { return !isset($v['assets']); }) ->then(function ($v) { if (!isset($v['templating']) || !$v['templating']['assets_version'] && !count($v['templating']['assets_base_urls']['http']) && !count($v['templating']['assets_base_urls']['ssl']) && !count($v['templating']['packages']) ) { $v['assets'] = array( 'version' => null, 'version_format' => '%%s?%%s', 'base_path' => '', 'base_urls' => array(), 'packages' => array(), ); } return $v; }) ->end() ->validate() ->ifTrue(function ($v) { return isset($v['templating']); }) ->then(function ($v) { if ($v['templating']['assets_version'] || count($v['templating']['assets_base_urls']['http']) || count($v['templating']['assets_base_urls']['ssl']) || count($v['templating']['packages']) ) { @trigger_error('The assets settings under framework.templating are deprecated since version 2.7 and will be removed in 3.0. Use the framework.assets configuration key instead', E_USER_DEPRECATED); // convert the old configuration to the new one if (isset($v['assets'])) { throw new \LogicException('You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.'); } $v['assets'] = array( 'version' => $v['templating']['assets_version'], 'version_format' => $v['templating']['assets_version_format'], 'base_path' => '', 'base_urls' => array_values(array_unique(array_merge($v['templating']['assets_base_urls']['http'], $v['templating']['assets_base_urls']['ssl']))), 'packages' => array(), ); foreach ($v['templating']['packages'] as $name => $config) { $v['assets']['packages'][$name] = array( 'version' => null === $config['version'] ? null : (string) $config['version'], 'version_format' => $config['version_format'], 'base_path' => '', 'base_urls' => array_values(array_unique(array_merge($config['base_urls']['http'], $config['base_urls']['ssl']))), ); } } unset($v['templating']['assets_version'], $v['templating']['assets_version_format'], $v['templating']['assets_base_urls'], $v['templating']['packages']); return $v; }) ->end() ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['validation']['api']); }) ->then(function ($v) { @trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED); 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->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); return $treeBuilder; } private function addCsrfSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('csrf_protection') ->canBeEnabled() ->children() ->scalarNode('field_name') ->defaultValue('_token') ->info('Deprecated since version 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead') ->end() ->end() ->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')->defaultNull()->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() ->scalarNode('username')->defaultValue('')->end() ->scalarNode('password')->defaultValue('')->end() ->scalarNode('lifetime')->defaultValue(86400)->end() ->arrayNode('matcher') ->canBeUnset() ->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 addRouterSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('router') ->info('router configuration') ->canBeUnset() ->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') ->canBeUnset() ->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')->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') ->canBeUnset() ->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) { $organizeUrls = function ($urls) { $urls += array( 'http' => array(), 'ssl' => array(), ); foreach ($urls as $i => $url) { if (is_int($i)) { if (0 === strpos($url, 'https://') || 0 === strpos($url, '//')) { $urls['http'][] = $urls['ssl'][] = $url; } else { $urls['http'][] = $url; } unset($urls[$i]); } } return $urls; }; $rootNode ->children() ->arrayNode('templating') ->info('templating configuration') ->canBeUnset() ->children() ->scalarNode('assets_version')->defaultNull()->info('Deprecated since 2.7, will be removed in 3.0. Use the new assets entry instead.')->end() ->scalarNode('assets_version_format')->defaultValue('%%s?%%s')->info('Deprecated since 2.7, will be removed in 3.0. Use the new assets entry instead.')->end() ->scalarNode('hinclude_default_template')->defaultNull()->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('assets_base_url') ->children() ->arrayNode('assets_base_urls') ->info('Deprecated since 2.7, will be removed in 3.0. Use the new assets entry instead.') ->performNoDeepMerging() ->addDefaultsIfNotSet() ->beforeNormalization() ->ifTrue(function ($v) { return !is_array($v); }) ->then(function ($v) { return array($v); }) ->end() ->beforeNormalization() ->always() ->then($organizeUrls) ->end() ->children() ->arrayNode('http') ->prototype('scalar')->end() ->end() ->arrayNode('ssl') ->prototype('scalar')->end() ->end() ->end() ->end() ->scalarNode('cache')->end() ->end() ->fixXmlConfig('engine') ->children() ->arrayNode('engines') ->example(array('twig')) ->isRequired() ->requiresAtLeastOneElement() ->beforeNormalization() ->ifTrue(function ($v) { return !is_array($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() ->fixXmlConfig('package') ->children() ->arrayNode('packages') ->info('Deprecated since 2.7, will be removed in 3.0. Use the new assets entry instead.') ->useAttributeAsKey('name') ->prototype('array') ->fixXmlConfig('base_url') ->children() ->scalarNode('version') ->defaultNull() ->beforeNormalization() ->ifTrue(function ($v) { return '' === $v; }) ->then(function ($v) { return; }) ->end() ->end() ->scalarNode('version_format')->defaultValue('%%s?%%s')->end() ->arrayNode('base_urls') ->performNoDeepMerging() ->addDefaultsIfNotSet() ->beforeNormalization() ->ifTrue(function ($v) { return !is_array($v); }) ->then(function ($v) { return array($v); }) ->end() ->beforeNormalization() ->always() ->then($organizeUrls) ->end() ->children() ->arrayNode('http') ->prototype('scalar')->end() ->end() ->arrayNode('ssl') ->prototype('scalar')->end() ->end() ->end() ->end() ->end() ->end() ->end() ->end() ->end() ->end() ; } private function addAssetsSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('assets') ->info('assets configuration') ->canBeUnset() ->fixXmlConfig('base_url') ->children() ->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() ->fixXmlConfig('package') ->children() ->arrayNode('packages') ->useAttributeAsKey('name') ->prototype('array') ->fixXmlConfig('base_url') ->children() ->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() ->end() ->end() ->end() ->end() ->end() ; } private function addTranslatorSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('translator') ->info('translator configuration') ->canBeEnabled() ->fixXmlConfig('fallback') ->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() ->end() ->end() ->end() ; } private function addValidationSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('validation') ->info('validation configuration') ->canBeEnabled() ->children() ->scalarNode('cache') ->beforeNormalization() // Can be removed in 3.0, once ApcCache support is dropped ->ifString()->then(function ($v) { return 'apc' === $v ? 'validator.mapping.cache.apc' : $v; }) ->end() ->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() ->enumNode('api') ->info('Deprecated since version 2.7, to be removed in 3.0') ->values(array('2.4', '2.5', '2.5-bc', 'auto')) ->beforeNormalization() // XML/YAML parse as numbers, not as strings ->ifTrue(function ($v) { return is_scalar($v); }) ->then(function ($v) { return (string) $v; }) ->end() ->end() ->end() ->end() ->end() ; } private function addAnnotationsSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('annotations') ->info('annotation configuration') ->addDefaultsIfNotSet() ->children() ->scalarNode('cache')->defaultValue('file')->end() ->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end() ->booleanNode('debug')->defaultValue('%kernel.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() ->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() ; } } src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php000066400000000000000000001221601266465517700301220ustar00rootroot00000000000000 * * 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 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\Validator\Validation; /** * FrameworkExtension. * * @author Fabien Potencier * @author Jeremy Mikola * @author Kévin Dunglas */ class FrameworkExtension extends Extension { private $formConfigEnabled = false; private $translationConfigEnabled = false; private $sessionConfigEnabled = 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(__DIR__.'/../Resources/config')); $loader->load('web.xml'); $loader->load('services.xml'); $loader->load('fragment_renderer.xml'); // 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. $loader->load('translation.xml'); // Property access is used by both the Form and the Validator component $loader->load('property_access.xml'); $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); 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 (!empty($config['test'])) { $loader->load('test.xml'); } if (isset($config['session'])) { $this->sessionConfigEnabled = true; $this->registerSessionConfiguration($config['session'], $container, $loader); } if (isset($config['request'])) { $this->registerRequestConfiguration($config['request'], $container, $loader); } $loader->load('security.xml'); 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.'); } if ($this->isConfigEnabled($container, $config['form']['csrf_protection'])) { $config['csrf_protection']['enabled'] = true; } } $this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader); if (isset($config['assets'])) { $this->registerAssetsConfiguration($config['assets'], $container, $loader); } if (isset($config['templating'])) { $this->registerTemplatingConfiguration($config['templating'], $config['ide'], $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); if (isset($config['router'])) { $this->registerRouterConfiguration($config['router'], $container, $loader); } $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader); $this->registerPropertyAccessConfiguration($config['property_access'], $container); if (isset($config['serializer'])) { $this->registerSerializerConfiguration($config['serializer'], $container, $loader); } $loader->load('debug_prod.xml'); $definition = $container->findDefinition('debug.debug_handlers_listener'); if ($container->hasParameter('templating.helper.code.file_link_format')) { $definition->replaceArgument(5, '%templating.helper.code.file_link_format%'); } if ($container->getParameter('kernel.debug')) { $definition->replaceArgument(2, -1 & ~(E_COMPILE_ERROR | E_PARSE | E_ERROR | E_CORE_ERROR | E_RECOVERABLE_ERROR)); $loader->load('debug.xml'); $definition = $container->findDefinition('http_kernel'); $definition->replaceArgument(2, new Reference('debug.controller_resolver')); // 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'); } else { $definition->replaceArgument(1, null); } $this->addClassesToCompile(array( 'Symfony\\Component\\Config\\FileLocator', 'Symfony\\Component\\Debug\\ErrorHandler', 'Symfony\\Component\\EventDispatcher\\Event', 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher', 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener', 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener', 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver', '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\\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', )); } /** * {@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); if (null !== $config['form']['csrf_protection']['field_name']) { $container->setParameter('form.type_extension.csrf.field_name', $config['form']['csrf_protection']['field_name']); } else { $container->setParameter('form.type_extension.csrf.field_name', $config['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 $supported = array( 'sqlite' => 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage', 'mysql' => 'Symfony\Component\HttpKernel\Profiler\MysqlProfilerStorage', 'file' => 'Symfony\Component\HttpKernel\Profiler\FileProfilerStorage', 'mongodb' => 'Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage', 'memcache' => 'Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage', 'memcached' => 'Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage', 'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage', ); list($class) = explode(':', $config['dsn'], 2); if (!isset($supported[$class])) { throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class)); } $container->setParameter('profiler.storage.dsn', $config['dsn']); $container->setParameter('profiler.storage.username', $config['username']); $container->setParameter('profiler.storage.password', $config['password']); $container->setParameter('profiler.storage.lifetime', $config['lifetime']); $container->getDefinition('profiler.storage')->setClass($supported[$class]); if (isset($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 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.name').ucfirst($container->getParameter('kernel.environment'))); $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', '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 string $ide * @param ContainerBuilder $container A ContainerBuilder instance * @param XmlFileLoader $loader An XmlFileLoader instance */ private function registerTemplatingConfiguration(array $config, $ide, ContainerBuilder $container, XmlFileLoader $loader) { $loader->load('templating.xml'); 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', ); $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('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->hasDefinition('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 = $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 (!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.'); } if (!$baseUrls) { $package = new DefinitionDecorator('assets.path_package'); return $package ->setPublic(false) ->replaceArgument(0, $basePath) ->replaceArgument(1, $version) ; } $package = new DefinitionDecorator('assets.url_package'); return $package ->setPublic(false) ->replaceArgument(0, $baseUrls) ->replaceArgument(1, $version) ; } 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; } $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($r->getFileName()).'/../Resources/translations'; } $rootDir = $container->getParameter('kernel.root_dir'); foreach ($container->getParameter('kernel.bundles') as $bundle => $class) { $reflection = new \ReflectionClass($class); if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) { $dirs[] = $dir; } if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) { $dirs[] = $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) ; $locales = array(); foreach ($finder as $file) { list($domain, $locale, $format) = 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; } $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']) { $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'])) { $container->setParameter( 'validator.mapping.cache.prefix', 'validator_'.$this->getKernelRootHash($container) ); $validatorBuilder->addMethodCall('setMetadataCache', array(new Reference($config['cache']))); } // You can use this parameter to check the API version in your own // bundle extension classes // This is set to 2.5-bc for compatibility with Symfony 2.5 and 2.6. // @deprecated since version 2.7, to be removed in 3.0 $container->setParameter('validator.api', '2.5-bc'); } 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])); } $bundles = $container->getParameter('kernel.bundles'); foreach ($bundles as $bundle) { $reflection = new \ReflectionClass($bundle); $dirname = dirname($reflection->getFileName()); if (is_file($file = $dirname.'/Resources/config/validation.xml')) { $files[0][] = realpath($file); $container->addResource(new FileResource($file)); } if (is_file($file = $dirname.'/Resources/config/validation.yml')) { $files[1][] = realpath($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->getRealpath(); } foreach (Finder::create()->files()->in($dir)->name('*.yml') as $file) { $files[1][] = $file->getRealpath(); } $container->addResource(new DirectoryResource($dir)); } } return $files; } private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, $loader) { $loader->load('annotations.xml'); if ('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.file_cache_reader') ->replaceArgument(1, $cacheDir) ->replaceArgument(2, $config['debug']) ; $container->setAlias('annotation_reader', 'annotations.file_cache_reader'); } elseif ('none' !== $config['cache']) { $container ->getDefinition('annotations.cached_reader') ->replaceArgument(1, new Reference($config['cache'])) ->replaceArgument(2, $config['debug']) ; $container->setAlias('annotation_reader', '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 (!$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 (!$config['enabled']) { return; } $loader->load('serializer.xml'); $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); $serializerLoaders = array(); if (isset($config['enable_annotations']) && $config['enable_annotations']) { $annotationLoader = new Definition( 'Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', array(new Reference('annotation_reader')) ); $annotationLoader->setPublic(false); $serializerLoaders[] = $annotationLoader; } $bundles = $container->getParameter('kernel.bundles'); foreach ($bundles as $bundle) { $reflection = new \ReflectionClass($bundle); $dirname = dirname($reflection->getFileName()); if (is_file($file = $dirname.'/Resources/config/serialization.xml')) { $definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', array(realpath($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(realpath($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->getRealpath())); $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->getRealpath())); $definition->setPublic(false); $serializerLoaders[] = $definition; } $container->addResource(new DirectoryResource($dir)); } } $chainLoader->replaceArgument(0, $serializerLoaders); if (isset($config['cache']) && $config['cache']) { $container->setParameter( 'serializer.mapping.cache.prefix', 'serializer_'.$this->getKernelRootHash($container) ); $container->getDefinition('serializer.mapping.class_metadata_factory')->replaceArgument( 1, new Reference($config['cache']) ); } } /** * 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 __DIR__.'/../Resources/config/schema'; } public function getNamespace() { return 'http://symfony.com/schema/dic/symfony'; } } src/Symfony/Bundle/FrameworkBundle/EventListener/000077500000000000000000000000001266465517700224235ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php000066400000000000000000000016771266465517700263000ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php000066400000000000000000000016261266465517700271320ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Fragment/000077500000000000000000000000001266465517700213775ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Fragment/ContainerAwareHIncludeFragmentRenderer.php000066400000000000000000000035261266465517700316070ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Fragment; @trigger_error('The '.__NAMESPACE__.'\ContainerAwareHIncludeFragmentRenderer class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.', E_USER_DEPRECATED); use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\UriSigner; use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; /** * Implements the Hinclude rendering strategy. * * @author Fabien Potencier * * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead. */ class ContainerAwareHIncludeFragmentRenderer extends HIncludeFragmentRenderer { private $container; /** * {@inheritdoc} */ public function __construct(ContainerInterface $container, UriSigner $signer = null, $globalDefaultTemplate = null) { $this->container = $container; parent::__construct(null, $signer, $globalDefaultTemplate, $container->getParameter('kernel.charset')); } /** * {@inheritdoc} */ public function render($uri, Request $request, array $options = array()) { // setting the templating cannot be done in the constructor // as it would lead to an infinite recursion in the service container if (!$this->hasTemplating()) { $this->setTemplating($this->container->get('templating')); } return parent::render($uri, $request, $options); } } src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php000066400000000000000000000113511266465517700234350ustar00rootroot00000000000000 * * 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\AddConstraintValidatorsPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddValidatorInitializersPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; 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\Component\Debug\ErrorHandler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\Component\DependencyInjection\Scope; 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); // we need to add the request scope as early as possible so that // the compilation can find scope widening issues $container->addScope(new Scope('request')); $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()); $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()); if ($container->getParameter('kernel.debug')) { $container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING); $container->addCompilerPass(new CompilerDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING); } } } src/Symfony/Bundle/FrameworkBundle/HttpCache/000077500000000000000000000000001266465517700214775ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php000066400000000000000000000055441266465517700240630ustar00rootroot00000000000000 * * 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(); } /** * Creates new ESI instance. * * @return Esi * * @deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead */ protected function createEsi() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED); return $this->createSurrogate(); } protected function createStore() { return new Store($this->cacheDir ?: $this->kernel->getCacheDir().'/http_cache'); } } src/Symfony/Bundle/FrameworkBundle/LICENSE000066400000000000000000000020511266465517700206370ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Bundle/FrameworkBundle/Resources/000077500000000000000000000000001266465517700216065ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/config/000077500000000000000000000000001266465517700230535ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml000066400000000000000000000026141266465517700261350ustar00rootroot00000000000000 Doctrine\Common\Annotations\AnnotationReader Doctrine\Common\Annotations\CachedReader Doctrine\Common\Annotations\FileCacheReader src/Symfony/Bundle/FrameworkBundle/Resources/config/assets.xml000066400000000000000000000035571266465517700251110ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml000066400000000000000000000100571266465517700257510ustar00rootroot00000000000000 Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector Symfony\Component\HttpKernel\DataCollector\RequestDataCollector Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector Symfony\Component\HttpKernel\DataCollector\EventDataCollector Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector Symfony\Component\HttpKernel\DataCollector\TimeDataCollector Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector src/Symfony/Bundle/FrameworkBundle/Resources/config/debug.xml000066400000000000000000000025511266465517700246660ustar00rootroot00000000000000 Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher %kernel.cache_dir%/%kernel.container_class%.xml Symfony\Component\HttpKernel\Controller\TraceableControllerResolver -1 src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml000066400000000000000000000024601266465517700257110ustar00rootroot00000000000000 Symfony\Component\HttpKernel\EventListener\DebugHandlersListener Symfony\Component\Stopwatch\Stopwatch 0 null null null true null src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml000066400000000000000000000014431266465517700243570ustar00rootroot00000000000000 Symfony\Component\HttpKernel\HttpCache\Esi Symfony\Component\HttpKernel\EventListener\SurrogateListener src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml000066400000000000000000000252551266465517700245510ustar00rootroot00000000000000 Symfony\Component\Form\ResolvedFormTypeFactory Symfony\Component\Form\FormRegistry Symfony\Component\Form\FormFactory Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler src/Symfony/Bundle/FrameworkBundle/Resources/config/form_csrf.xml000066400000000000000000000020501266465517700255520ustar00rootroot00000000000000 %form.type_extension.csrf.enabled% %form.type_extension.csrf.field_name% %validator.translation_domain% src/Symfony/Bundle/FrameworkBundle/Resources/config/form_debug.xml000066400000000000000000000037361266465517700257170ustar00rootroot00000000000000 Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeFactoryDataCollectorProxy Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension Symfony\Component\Form\Extension\DataCollector\FormDataCollector Symfony\Component\Form\Extension\DataCollector\FormDataExtractor src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_listener.xml000066400000000000000000000013111266465517700273010ustar00rootroot00000000000000 Symfony\Component\HttpKernel\EventListener\FragmentListener %fragment.path% src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_renderer.xml000066400000000000000000000056271266465517700273000ustar00rootroot00000000000000 Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer /_fragment %kernel.debug% %fragment.path% %fragment.renderer.hinclude.global_template% %fragment.path% %fragment.path% %fragment.path% src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml000066400000000000000000000031541266465517700255710ustar00rootroot00000000000000 Symfony\Component\HttpKernel\Profiler\Profiler Symfony\Component\HttpKernel\EventListener\ProfilerListener %profiler.storage.dsn% %profiler.storage.username% %profiler.storage.password% %profiler.storage.lifetime% %profiler_listener.only_exceptions% %profiler_listener.only_master_requests% src/Symfony/Bundle/FrameworkBundle/Resources/config/property_access.xml000066400000000000000000000012731266465517700270050ustar00rootroot00000000000000 Symfony\Component\PropertyAccess\PropertyAccessor src/Symfony/Bundle/FrameworkBundle/Resources/config/request.xml000066400000000000000000000012721266465517700252670ustar00rootroot00000000000000 Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php000066400000000000000000000026571266465517700257540ustar00rootroot00000000000000 * * 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); src/Symfony/Bundle/FrameworkBundle/Resources/config/router_prod.php000066400000000000000000000026331266465517700261340ustar00rootroot00000000000000 * * 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); src/Symfony/Bundle/FrameworkBundle/Resources/config/router_test.php000066400000000000000000000016151266465517700261460ustar00rootroot00000000000000 * * 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'; src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml000066400000000000000000000141661266465517700252740ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Routing\Router Symfony\Component\Routing\RequestContext Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader Symfony\Component\Config\Loader\LoaderResolver Symfony\Component\Routing\Loader\XmlFileLoader Symfony\Component\Routing\Loader\YamlFileLoader Symfony\Component\Routing\Loader\PhpFileLoader 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 Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer %router.cache_class_prefix%UrlMatcher %router.cache_class_prefix%UrlGenerator Symfony\Component\HttpKernel\EventListener\RouterListener 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% src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/000077500000000000000000000000001266465517700243135ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd000066400000000000000000000236101266465517700270350ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml000066400000000000000000000011431266465517700254430ustar00rootroot00000000000000 Symfony\Component\Security\Core\Util\SecureRandom src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml000066400000000000000000000025531266465517700264660ustar00rootroot00000000000000 Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage Symfony\Component\Security\Csrf\CsrfTokenManager src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml000066400000000000000000000051671266465517700257570ustar00rootroot00000000000000 Symfony\Component\Serializer\Serializer Symfony\Component\Serializer\Encoder\XmlEncoder Symfony\Component\Serializer\Encoder\JsonEncoder null null %serializer.mapping.cache.prefix% src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml000066400000000000000000000060461266465517700254260ustar00rootroot00000000000000 Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel Symfony\Component\Filesystem\Filesystem Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer Symfony\Component\HttpKernel\Config\FileLocator Symfony\Component\HttpKernel\UriSigner Symfony\Component\HttpFoundation\RequestStack false %kernel.root_dir%/Resources %kernel.secret% src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml000066400000000000000000000100271266465517700252600ustar00rootroot00000000000000 Symfony\Component\HttpFoundation\Session\Session Symfony\Component\HttpFoundation\Session\Flash\FlashBag Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag Symfony\Component\HttpFoundation\Session\Storage\MetadataBag _sf2_meta Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler Symfony\Bundle\FrameworkBundle\EventListener\SessionListener %session.storage.options% %kernel.cache_dir%/sessions MOCKSESSID %session.save_path% src/Symfony/Bundle/FrameworkBundle/Resources/config/ssi.xml000066400000000000000000000011671266465517700244000ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/config/templating.xml000066400000000000000000000105161266465517700257440ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator Symfony\Bundle\FrameworkBundle\Templating\Loader\FilesystemLoader Symfony\Component\Templating\Loader\CacheLoader Symfony\Component\Templating\Loader\ChainLoader Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinder Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\RouterHelper %kernel.cache_dir% %kernel.root_dir%/Resources %templating.loader.cache.path% src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_debug.xml000066400000000000000000000017511266465517700271130ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Templating\TimedPhpEngine %kernel.charset% src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml000066400000000000000000000115151266465517700266130ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Templating\PhpEngine Symfony\Component\Templating\Helper\SlotsHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\ActionsHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\CodeHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\FormHelper Symfony\Bundle\FrameworkBundle\Templating\Helper\StopwatchHelper Symfony\Component\Form\Extension\Templating\TemplatingRendererEngine Symfony\Component\Form\FormRenderer Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables %kernel.charset% %templating.helper.code.file_link_format% %kernel.root_dir% %kernel.charset% %templating.helper.form.resources% src/Symfony/Bundle/FrameworkBundle/Resources/config/test.xml000066400000000000000000000031131266465517700245520ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Client Symfony\Component\BrowserKit\History Symfony\Component\BrowserKit\CookieJar Symfony\Bundle\FrameworkBundle\EventListener\TestSessionListener %test.client.parameters% src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml000066400000000000000000000212611266465517700261350ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Translation\Translator Symfony\Component\Translation\IdentityTranslator Symfony\Component\Translation\MessageSelector Symfony\Component\Translation\Loader\PhpFileLoader Symfony\Component\Translation\Loader\YamlFileLoader Symfony\Component\Translation\Loader\XliffFileLoader Symfony\Component\Translation\Loader\PoFileLoader Symfony\Component\Translation\Loader\MoFileLoader Symfony\Component\Translation\Loader\QtFileLoader Symfony\Component\Translation\Loader\CsvFileLoader Symfony\Component\Translation\Loader\IcuResFileLoader Symfony\Component\Translation\Loader\IcuDatFileLoader Symfony\Component\Translation\Loader\IniFileLoader Symfony\Component\Translation\Loader\JsonFileLoader Symfony\Component\Translation\Dumper\PhpFileDumper Symfony\Component\Translation\Dumper\XliffFileDumper Symfony\Component\Translation\Dumper\PoFileDumper Symfony\Component\Translation\Dumper\MoFileDumper Symfony\Component\Translation\Dumper\YamlFileDumper Symfony\Component\Translation\Dumper\QtFileDumper Symfony\Component\Translation\Dumper\CsvFileDumper Symfony\Component\Translation\Dumper\IniFileDumper Symfony\Component\Translation\Dumper\JsonFileDumper Symfony\Component\Translation\Dumper\IcuResFileDumper Symfony\Bundle\FrameworkBundle\Translation\PhpExtractor Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader Symfony\Component\Translation\Extractor\ChainExtractor Symfony\Component\Translation\Writer\TranslationWriter %kernel.cache_dir%/translations %kernel.debug% src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_debug.xml000066400000000000000000000016641266465517700273100ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml000066400000000000000000000057151266465517700255720ustar00rootroot00000000000000 Symfony\Component\Validator\Validator\ValidatorInterface Symfony\Component\Validator\ValidatorBuilderInterface Symfony\Component\Validator\Validation Symfony\Component\Validator\Mapping\Cache\ApcCache Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory Symfony\Component\Validator\Constraints\ExpressionValidator Symfony\Component\Validator\Constraints\EmailValidator %validator.translation_domain% %validator.mapping.cache.prefix% src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml000066400000000000000000000050241266465517700243530ustar00rootroot00000000000000 Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser Symfony\Component\HttpKernel\EventListener\ResponseListener Symfony\Component\HttpKernel\EventListener\StreamedResponseListener Symfony\Component\HttpKernel\EventListener\LocaleListener %kernel.charset% %kernel.default_locale% src/Symfony/Bundle/FrameworkBundle/Resources/public/000077500000000000000000000000001266465517700230645ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/public/css/000077500000000000000000000000001266465517700236545ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css000066400000000000000000000150321266465517700253240ustar00rootroot00000000000000/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.1.2 build: 56 */ .sf-reset div,.sf-reset dl,.sf-reset dt,.sf-reset dd,.sf-reset ul,.sf-reset ol,.sf-reset li,.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6,.sf-reset pre,.sf-reset code,.sf-reset form,.sf-reset fieldset,.sf-reset legend,.sf-reset input,.sf-reset textarea,.sf-reset p,.sf-reset blockquote,.sf-reset th,.sf-reset td{margin:0;padding:0;}.sf-reset table{border-collapse:collapse;border-spacing:0;}.sf-reset fieldset,.sf-reset img{border:0;}.sf-reset address,.sf-reset caption,.sf-reset cite,.sf-reset code,.sf-reset dfn,.sf-reset em,.sf-reset strong,.sf-reset th,.sf-reset var{font-style:normal;font-weight:normal;}.sf-reset li{list-style:none;}.sf-reset caption,.sf-reset th{text-align:left;}.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6{font-size:100%;font-weight:normal;}.sf-reset q:before,.sf-reset q:after{content:'';}.sf-reset abbr,.sf-reset acronym{border:0;font-variant:normal;}.sf-reset sup{vertical-align:text-top;}.sf-reset sub{vertical-align:text-bottom;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-size:100%;}.sf-reset legend{color:#000;} .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } .sf-reset p { font-size: 14px; line-height: 20px; padding-bottom: 20px; } .sf-reset strong { color: #313131; font-weight: bold; } .sf-reset a { color: #6c6159; } .sf-reset a img { border: none; } .sf-reset a:hover { text-decoration: underline; } .sf-reset em { font-style: italic; } .sf-reset h2, .sf-reset h3 { font-weight: bold; } .sf-reset h1 { font-family: Georgia, "Times New Roman", Times, serif; font-size: 20px; color: #313131; word-break: break-all; } .sf-reset li { padding-bottom: 10px; } .sf-reset .block { -moz-border-radius: 16px; -webkit-border-radius: 16px; border-radius: 16px; margin-bottom: 20px; background-color: #FFFFFF; border: 1px solid #dfdfdf; padding: 40px 50px; word-break: break-all; } .sf-reset h2 { font-size: 16px; font-family: Arial, Helvetica, sans-serif; } .sf-reset li a { background: none; color: #868686; text-decoration: none; } .sf-reset li a:hover { background: none; color: #313131; text-decoration: underline; } .sf-reset ol { padding: 10px 0; } .sf-reset ol li { list-style: decimal; margin-left: 20px; padding: 2px; padding-bottom: 20px; } .sf-reset ol ol li { list-style-position: inside; margin-left: 0; white-space: nowrap; font-size: 12px; padding-bottom: 0; } .sf-reset li .selected { background-color: #ffd; } .sf-button { display: -moz-inline-box; display: inline-block; text-align: center; vertical-align: middle; border: 0; background: transparent none; text-transform: uppercase; cursor: pointer; font: bold 11px Arial, Helvetica, sans-serif; } .sf-button span { text-decoration: none; display: block; height: 28px; float: left; } .sf-button .border-l { text-decoration: none; display: block; height: 28px; float: left; padding: 0 0 0 7px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQtJREFUeNpiPHnyJAMakARiByDWYEGT8ADiYGVlZStubm5xlv///4MEQYoKZGRkQkRERLRYWVl5wYJQyXBZWdkwCQkJUxAHKgaWlAHSLqKiosb//v1DsYMFKGCvoqJiDmQzwXTAJYECulxcXNLoumCSoszMzDzoumDGghQwYZUECWIzkrAkSIIGOmlkLI10AiX//P379x8jIyMTNmPf/v79+ysLCwsvuiQoNi5//fr1Kch4dAyS3P/gwYMTQBP+wxwHw0xA4gkQ73v9+vUZdJ2w1Lf82bNn4iCHCQoKasHsZw4ODgbRIL8c+/Lly5M3b978Y2dn5wC6npkFLXnsAOKLjx49AmUHLYAAAwBoQubG016R5wAAAABJRU5ErkJggg==) no-repeat top left; } .sf-button .border-r { padding: 0 7px 0 0; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button .btn-bg { padding: 0 14px; color: #636363; line-height: 28px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left; } .sf-button:hover .border-l, .sf-button-selected .border-l { background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR9JREFUeNpi/P//PwMyOHfunDqQSgNiexZkibNnzxYBqZa3HOs5v7PcYQBLnjlzhg1IbfzIdsTjA/t+ht9Mr8GKwZL//v3r+sB+0OMN+zqIEf8gFMvJkyd1gXTOa9YNDP//otrPAtSV/Jp9HfPff78Z0AEL0LUeXxivMfxD0wXTqfjj/2ugkf+wSrL9/YtpJEyS4S8WI5Ek/+GR/POPFjr//cenE6/kP9q4Fo/kr39/mdj+M/zFkGQCSj5i+ccPjLJ/GBgkuYOHQR1sNDpmAkb2LBmWwL///zKCIxwZM0VHR18G6p4uxeLLAA4tJMwEshiou1iMxXaHLGswA+t/YbhORuQUv2DBAnCifvxzI+enP3dQJUFg/vz5sOzgBBBgAPxX9j0YnH4JAAAAAElFTkSuQmCC) no-repeat top left; } .sf-button:hover .border-r, .sf-button-selected .border-r { background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNpiPHv27BkGBoaDQDzLyMjoJgMSYHrM3WX8hn1d0f///88DFRYhSzIuv2X5H8Rg/SfKIPDTkYH/l80OINffxMTkF9O/f/8ZQPgnwyuGl+wrGd6x7vf49+9fO9jYf3+Bkkj4NesmBqAV+SdPntQC6vzHgIz//gOawbqOGchOxtAJwp8Zr4F0e7D8/fuPAR38/P8eZIo0yz8skv8YvoIk+YE6/zNgAyD7sRqLkPzzjxY6/+HS+R+fTkZ8djLh08lCUCcuSWawJGbwMTGwg7zyBatX2Bj5QZKPsBrLzaICktzN8g/NWEYGZgYZjoC/wMiei5FMpFh8QPSU6Ojoy3Cd7EwiDBJsDgxiLNY7gLrKQGIsHAxSDHxAO2TZ/b8D+TVxcXF9MCtYtLiKLgDpfUDVsxITE1GyA0CAAQA2E/N8VuHyAAAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button:hover .btn-bg, .sf-button-selected .btn-bg { color: #FFFFFF; text-shadow:0 1px 1px #6b9311; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAIAAAAvP0KbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpiPnv2LNMdvlymf///M/37B8R/QfQ/MP33L4j+B6Qh7L9//sHpf2h8MA1V+w/KRjYLaDaLCU8vQIABAFO3TxZriO4yAAAAAElFTkSuQmCC) repeat-x top left; } src/Symfony/Bundle/FrameworkBundle/Resources/public/css/exception.css000066400000000000000000000045341266465517700263720ustar00rootroot00000000000000.sf-reset .traces { padding-bottom: 14px; } .sf-reset .traces li { font-size: 12px; color: #868686; padding: 5px 4px; list-style-type: decimal; margin-left: 20px; } .sf-reset #logs .traces li.error { font-style: normal; color: #AA3333; background: #f9ecec; } .sf-reset #logs .traces li.warning { font-style: normal; background: #ffcc00; } /* fix for Opera not liking empty
  • */ .sf-reset .traces li:after { content: "\00A0"; } .sf-reset .trace { border: 1px solid #D3D3D3; padding: 10px; overflow: auto; margin: 10px 0 20px; } .sf-reset .block-exception { -moz-border-radius: 16px; -webkit-border-radius: 16px; border-radius: 16px; margin-bottom: 20px; background-color: #f6f6f6; border: 1px solid #dfdfdf; padding: 30px 28px; word-wrap: break-word; overflow: hidden; } .sf-reset .block-exception div { color: #313131; font-size: 10px; } .sf-reset .block-exception-detected .illustration-exception, .sf-reset .block-exception-detected .text-exception { float: left; } .sf-reset .block-exception-detected .illustration-exception { width: 152px; } .sf-reset .block-exception-detected .text-exception { width: 670px; padding: 30px 44px 24px 46px; position: relative; } .sf-reset .text-exception .open-quote, .sf-reset .text-exception .close-quote { position: absolute; } .sf-reset .open-quote { top: 0; left: 0; } .sf-reset .close-quote { bottom: 0; right: 50px; } .sf-reset .block-exception p { font-family: Arial, Helvetica, sans-serif; } .sf-reset .block-exception p a, .sf-reset .block-exception p a:hover { color: #565656; } .sf-reset .logs h2 { float: left; width: 654px; } .sf-reset .error-count { float: right; width: 170px; text-align: right; } .sf-reset .error-count span { display: inline-block; background-color: #aacd4e; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; padding: 4px; color: white; margin-right: 2px; font-size: 11px; font-weight: bold; } .sf-reset .toggle { vertical-align: middle; } .sf-reset .linked ul, .sf-reset .linked li { display: inline; } .sf-reset #output-content { color: #000; font-size: 12px; } .sf-reset #traces-text pre { white-space: pre; font-size: 12px; font-family: monospace; } src/Symfony/Bundle/FrameworkBundle/Resources/public/css/structure.css000066400000000000000000000022601266465517700264260ustar00rootroot00000000000000html { background: #eee; } body { font: 11px Verdana, Arial, sans-serif; color: #333; } .sf-reset, .sf-reset .block, .sf-reset #message { margin: auto; } img { border: 0; } .clear { clear: both; height: 0; font-size: 0; line-height: 0; } .clear-fix:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; } .clear-fix { display: inline-block; } * html .clear-fix { height: 1%; } .clear-fix { display: block; } .header { padding: 30px 30px 20px 30px; } .header-logo { float: left; } .search { float: right; padding-top: 20px; } .search label { line-height: 28px; vertical-align: middle; } .search input { width: 195px; font-size: 12px; border: 1px solid #dadada; background: #fff url(data:image/gif;base64,R0lGODlhAQAFAKIAAPX19e/v7/39/fr6+urq6gAAAAAAAAAAACH5BAAAAAAALAAAAAABAAUAAAMESAEjCQA7) repeat-x left top; padding: 5px 6px; color: #565656; } .search input[type="search"] { -webkit-appearance: textfield; } #content { width: 970px; margin: 0 auto; } #content pre { white-space: normal; font-family: Arial, Helvetica, sans-serif; } src/Symfony/Bundle/FrameworkBundle/Resources/public/images/000077500000000000000000000000001266465517700243315ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/public/images/blue_picto_less.gif000066400000000000000000000003051266465517700301710ustar00rootroot00000000000000GIF89ad`fogm^!,@B$L8F$+ o Ҡd2DnMRLVþM,FoaxB;src/Symfony/Bundle/FrameworkBundle/Resources/public/images/blue_picto_more.gif000066400000000000000000000003251266465517700301670ustar00rootroot00000000000000GIF89afd`omg^!,@R4N#0Q,H: iSK@ ?o)Q#Hf#HuųnQ^+3a3YjNsaNPQB$"!;src/Symfony/Bundle/FrameworkBundle/Resources/public/images/grey_magnifier.png000066400000000000000000000006111266465517700300240ustar00rootroot00000000000000PNG  IHDR7PIDAT(c`v ]G{_goXL ?c/XeCR0$\m{7j $L<@^P@Js/A7?+T#P|g/tQNN38? PA@Њ\0?rj U0 (i :!_W{_G߳9 ~)kbxSNJ@`9BWlxxvVbq ?H@_ろ/آ@ &@,sn ;:*@(ig`䬵QPLTE̤dbeWUY0.2屰JHLqprؾ=;?WUX~|qor~}dtRNS@fIDATx՚ۖ E-ED;c"^dV3!Ih7 .bbf*$JwbaX3Q\I*7j]$u^ԝ/d&O4wskF=:dd, PdK.'+' R_!x3N*iW˥M),~/;E,tEYfg0u<ܺ%BmlE7$?S8 eWje{4&S~$Auzaԙ>|X 7SԄxӢmvR({5lD}ǭv?[h@'/B?OMuJ-S+2ڤ z^;N^3ށu\ dUtʩ1X ԀRfLK\R?M%j 黡0R{OJxܨ܎e!rNK5G@7F9{D;{3?)̦@-G6ŗ$Vx$n::h|yD[lKlNf $W3{DmO=m'-̭+[]aM߬%} ܏t6T}Lj6)WdP@GM5Egn>%I|9`nAJخU^;6vpĦ}qaFnIyuXs7{݄\uP:;,%Mm%UكSjJU- ʞ:19@ZNC׺O6p[d)5բUD tj#yۨ"m2 [ :FIENDB`src/Symfony/Bundle/FrameworkBundle/Resources/views/000077500000000000000000000000001266465517700227435ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/000077500000000000000000000000001266465517700236465ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php000066400000000000000000000000771266465517700275140ustar00rootroot00000000000000block($form, 'widget_attributes') ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_attributes.html.php000066400000000000000000000011311266465517700310770ustar00rootroot00000000000000id="escape($id) ?>" name="escape($full_name) ?>" disabled="disabled" $v): ?> escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?> escape($k), $view->escape($k)) ?> escape($k), $view->escape($v)) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_label.html.php000066400000000000000000000000001266465517700277620ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_row.html.php000066400000000000000000000000741266465517700275250ustar00rootroot00000000000000
    widget($form) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/button_widget.html.php000066400000000000000000000006241266465517700302020ustar00rootroot00000000000000 $name, '%id%' => $id)) : $view['form']->humanize($name); } ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php000066400000000000000000000003711266465517700304540ustar00rootroot00000000000000block($form, 'widget_attributes') ?> 0): ?> value="escape($value) ?>" checked="checked" /> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php000066400000000000000000000001031266465517700303210ustar00rootroot00000000000000block($form, 'choice_widget_options') ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php000066400000000000000000000003001266465517700301100ustar00rootroot00000000000000 block($form, 'choice_widget_expanded') ?> block($form, 'choice_widget_collapsed') ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php000066400000000000000000000021701266465517700321450ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php000066400000000000000000000004561266465517700317740ustar00rootroot00000000000000
    block($form, 'widget_container_attributes') ?>> widget($child) ?> label($child, null, array('translation_domain' => $choice_translation_domain)) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php000066400000000000000000000021261266465517700316730ustar00rootroot00000000000000 $choice): ?> block($form, 'choice_widget_options', array('choices' => $choice)) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/collection_widget.html.php000066400000000000000000000003101266465517700310120ustar00rootroot00000000000000 escape($view['form']->row($prototype)) ?> widget($form, array('attr' => $attr)) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php000066400000000000000000000001111266465517700315430ustar00rootroot00000000000000block($form, 'widget_container_attributes') ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php000066400000000000000000000007631266465517700276100ustar00rootroot00000000000000 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) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php000066400000000000000000000005151266465517700304620ustar00rootroot00000000000000 block($form, 'form_widget_simple'); ?>
    block($form, 'widget_container_attributes') ?>> widget($form['date']).' '.$view['form']->widget($form['time']) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php000066400000000000000000000001611266465517700277520ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'email')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form.html.php000066400000000000000000000002011266465517700262560ustar00rootroot00000000000000start($form) ?> widget($form) ?> end($form) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_enctype.html.php000066400000000000000000000001231266465517700300100ustar00rootroot00000000000000vars['multipart']): ?>enctype="multipart/form-data" src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_end.html.php000066400000000000000000000001641266465517700271140ustar00rootroot00000000000000 rest($form) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_errors.html.php000066400000000000000000000003071266465517700276610ustar00rootroot00000000000000 0): ?>
    • getMessage() ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_label.html.php000066400000000000000000000012071266465517700274240ustar00rootroot00000000000000 $name, '%id%' => $id)) : $view['form']->humanize($name); } ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rest.html.php000066400000000000000000000002471266465517700273250ustar00rootroot00000000000000 isRendered()): ?> row($child) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_row.html.php000066400000000000000000000002311266465517700271500ustar00rootroot00000000000000
    label($form) ?> errors($form) ?> widget($form) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_rows.html.php000066400000000000000000000001471266465517700273410ustar00rootroot00000000000000 row($child) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_start.html.php000066400000000000000000000010221266465517700274750ustar00rootroot00000000000000
    $v) { printf(' %s="%s"', $view->escape($k), $view->escape($v)); } ?> enctype="multipart/form-data"> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php000066400000000000000000000002671266465517700276350ustar00rootroot00000000000000 block($form, 'form_widget_compound')?> block($form, 'form_widget_simple')?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php000066400000000000000000000004551266465517700315400ustar00rootroot00000000000000
    block($form, 'widget_container_attributes') ?>> parent && $errors): ?> errors($form) ?> block($form, 'form_rows') ?> rest($form) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php000066400000000000000000000003701266465517700312010ustar00rootroot00000000000000block($form, 'widget_attributes') ?> value="escape($value) ?>" /> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_row.html.php000066400000000000000000000000531266465517700274420ustar00rootroot00000000000000widget($form) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php000066400000000000000000000001621266465517700301170ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'hidden')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php000066400000000000000000000001621266465517700303210ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'number')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php000066400000000000000000000001551266465517700300150ustar00rootroot00000000000000block($form, 'form_widget_simple'), $money_pattern) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php000066400000000000000000000001611266465517700301530ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php000066400000000000000000000001651266465517700305310ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php000066400000000000000000000001631266465517700303250ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?> % src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php000066400000000000000000000003061266465517700277620ustar00rootroot00000000000000block($form, 'widget_attributes') ?> value="escape($value) ?>" checked="checked" /> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php000066400000000000000000000000671266465517700300050ustar00rootroot00000000000000block($form, 'form_rows') ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/reset_widget.html.php000066400000000000000000000001551266465517700300100ustar00rootroot00000000000000block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php000066400000000000000000000001631266465517700301320ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/submit_widget.html.php000066400000000000000000000001561266465517700301720ustar00rootroot00000000000000block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php000066400000000000000000000001701266465517700305000ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php000066400000000000000000000015041266465517700276230ustar00rootroot00000000000000 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); } ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/url_widget.html.php000066400000000000000000000001601266465517700274640ustar00rootroot00000000000000block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url')) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php000066400000000000000000000013551266465517700310570ustar00rootroot00000000000000id="escape($id) ?>" name="escape($full_name) ?>" readonly="readonly" disabled="disabled" required="required" $v): ?> escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?> escape($k), $view->escape($k)) ?> escape($k), $view->escape($v)) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_container_attributes.html.php000066400000000000000000000010301266465517700331070ustar00rootroot00000000000000id="escape($id) ?>" $v): ?> escape($k), $view->escape($view['translator']->trans($v, array(), $translation_domain))) ?> escape($k), $view->escape($k)) ?> escape($k), $view->escape($v)) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/000077500000000000000000000000001266465517700246165ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/button_row.html.php000066400000000000000000000001371266465517700304750ustar00rootroot00000000000000 widget($form) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_row.html.php000066400000000000000000000003111266465517700301170ustar00rootroot00000000000000 label($form) ?> errors($form) ?> widget($form) ?> src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php000066400000000000000000000005631266465517700325100ustar00rootroot00000000000000block($form, 'widget_container_attributes') ?>> parent && $errors): ?> block($form, 'form_rows') ?> rest($form) ?>
    errors($form) ?>
    src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/hidden_row.html.php000066400000000000000000000001631266465517700304140ustar00rootroot00000000000000 widget($form) ?> src/Symfony/Bundle/FrameworkBundle/Routing/000077500000000000000000000000001266465517700212635ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php000066400000000000000000000067361266465517700252020ustar00rootroot00000000000000 * * 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; use Psr\Log\LoggerInterface; /** * 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; protected $logger; private $loading = false; /** * Constructor. * * @param ControllerNameParser $parser A ControllerNameParser instance * @param LoggerInterface $logger A LoggerInterface instance * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance */ public function __construct(ControllerNameParser $parser, LoggerInterface $logger = null, LoaderResolverInterface $resolver) { $this->parser = $parser; $this->logger = $logger; 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 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); } catch (\Exception $e) { $this->loading = false; throw $e; } $this->loading = false; foreach ($collection->all() as $route) { if ($controller = $route->getDefault('_controller')) { try { $controller = $this->parser->parse($controller); } catch (\Exception $e) { // unable to optimize unknown notation } $route->setDefault('_controller', $controller); } } return $collection; } } src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableUrlMatcher.php000066400000000000000000000023331266465517700263510ustar00rootroot00000000000000 * * 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, ); } } src/Symfony/Bundle/FrameworkBundle/Routing/Router.php000066400000000000000000000126461266465517700232650ustar00rootroot00000000000000 * * 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) { if ('_scheme' === $name || '_method' === $name) { continue; // ignore deprecated requirements to not trigger deprecation warnings } $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 '%%'; } $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); } } src/Symfony/Bundle/FrameworkBundle/Templating/000077500000000000000000000000001266465517700217405ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Templating/Asset/000077500000000000000000000000001266465517700230175ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php000066400000000000000000000030461266465517700264160ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset; @trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PackageFactory is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Templating\Asset\PackageInterface; /** * Creates packages based on whether the current request is secure. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class PackageFactory { private $container; public function __construct(ContainerInterface $container) { $this->container = $container; } /** * Returns either the HTTP or SSL version of an asset package. * * @param Request $request The current request * @param string $httpId The id for the package to use when the current request is HTTP * @param string $sslId The id for the package to use when the current request is SSL * * @return PackageInterface The package */ public function getPackage(Request $request, $httpId, $sslId) { return $this->container->get($request->isSecure() ? $sslId : $httpId); } } src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PathPackage.php000066400000000000000000000023061266465517700257010ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Templating\Asset\PathPackage as BasePathPackage; @trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The path packages adds a version and a base path to asset URLs. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class PathPackage extends BasePathPackage { /** * Constructor. * * @param Request $request The current request * @param string $version The version * @param string $format The version format */ public function __construct(Request $request, $version = null, $format = null) { parent::__construct($request->getBasePath(), $version, $format); } } src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php000066400000000000000000000024541266465517700242020ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Templating; @trigger_error('The '.__NAMESPACE__.'\Debugger class is deprecated since version 2.4 and will be removed in 3.0. Use the Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED); use Symfony\Component\Templating\DebuggerInterface; use Psr\Log\LoggerInterface; /** * Binds the Symfony templating loader debugger to the Symfony logger. * * @author Fabien Potencier * * @deprecated since version 2.4, to be removed in 3.0. * Use Psr\Log\LoggerInterface instead. */ class Debugger implements DebuggerInterface { protected $logger; /** * Constructor. * * @param LoggerInterface $logger A LoggerInterface instance */ public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; } /** * Logs a message. * * @param string $message A message to log */ public function log($message) { if (null !== $this->logger) { $this->logger->debug($message); } } } src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php000066400000000000000000000037751266465517700256560ustar00rootroot00000000000000 * * 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); } } } } src/Symfony/Bundle/FrameworkBundle/Templating/EngineInterface.php000066400000000000000000000020571266465517700255030ustar00rootroot00000000000000 * * 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); } src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php000066400000000000000000000056121266465517700255060ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\SecurityContext; /** * 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 security context service. * * @deprecated since version 2.6, to be removed in 3.0. * * @return SecurityContext|null The security context */ public function getSecurity() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); if ($this->container->has('security.context')) { return $this->container->get('security.context'); } } /** * 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'); } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/000077500000000000000000000000001266465517700231575ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php000066400000000000000000000031561266465517700264350ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php000066400000000000000000000075251266465517700263030ustar00rootroot00000000000000 * * 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\Asset\VersionStrategy\StaticVersionStrategy; 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, $version = null) { // BC layer to be removed in 3.0 if (3 === $count = func_num_args()) { @trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); $args = func_get_args(); return $this->getLegacyAssetUrl($path, $packageName, $args[2]); } 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 = null, $packageName = null) { // no arguments means old getVersion() for default package if (null === $path) { @trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED); return $this->packages->getVersion('/', $packageName); } // path and packageName can only be for the new version if (null !== $packageName) { return $this->packages->getVersion($path, $packageName); } // packageName is null and path not, so path is a path or a packageName try { $package = $this->packages->getPackage($path); } catch (\InvalidArgumentException $e) { // path is not a package, so it should be a path return $this->packages->getVersion($path); } // path is a packageName, old version @trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED); return $this->packages->getVersion('/', $path); } private function getLegacyAssetUrl($path, $packageName = null, $version = null) { if ($version) { $package = $this->packages->getPackage($packageName); $v = new \ReflectionProperty('Symfony\Component\Asset\Package', 'versionStrategy'); $v->setAccessible(true); $currentVersionStrategy = $v->getValue($package); $f = new \ReflectionProperty($currentVersionStrategy, 'format'); $f->setAccessible(true); $format = $f->getValue($currentVersionStrategy); $v->setValue($package, new StaticVersionStrategy($version, $format)); } $url = $this->packages->getUrl($path, $packageName); if ($version) { $v->setValue($package, $currentVersionStrategy); } return $url; } /** * {@inheritdoc} */ public function getName() { return 'assets'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php000066400000000000000000000170611266465517700257070ustar00rootroot00000000000000 * * 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; /** * CodeHelper. * * @author Fabien Potencier */ class CodeHelper extends Helper { protected $fileLinkFormat; protected $rootDir; protected $charset; /** * Constructor. * * @param string $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 = preg_split('#
    #', $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) { if (PHP_VERSION_ID >= 50400) { $flags = ENT_QUOTES | ENT_SUBSTITUTE; } else { $flags = ENT_QUOTES; } 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 ($this->fileLinkFormat && is_file($file)) { return strtr($this->fileLinkFormat, array('%f' => $file, '%l' => $line)); } return false; } public function formatFileFromText($text) { $that = $this; return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) use ($that) { return 'in '.$that->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; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php000066400000000000000000000200041266465517700257270ustar00rootroot00000000000000 * * 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 enctype in the form tag, if necessary. * * Example usage templates: * * enctype($form) ?>> * * @param FormView $view The view for which to render the encoding type * * @return string The HTML markup * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link start} instead. */ public function enctype(FormView $view) { @trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED); return $this->renderer->searchAndRenderBlock($view, 'enctype'); } /** * 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 intention. * * * $csrfProvider = $this->get('security.csrf.token_generator'); * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { * throw new \RuntimeException('CSRF attack detected.'); * } * * * @param string $intention The intention of the protected action * * @return string A CSRF token * * @throws \BadMethodCallException When no CSRF provider was injected in the constructor. */ public function csrfToken($intention) { return $this->renderer->renderCsrfToken($intention); } public function humanize($text) { return $this->renderer->humanize($text); } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php000066400000000000000000000050071266465517700264620ustar00rootroot00000000000000 * * 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\Request; use Symfony\Component\HttpFoundation\RequestStack; /** * RequestHelper provides access to the current request parameters. * * @author Fabien Potencier */ class RequestHelper extends Helper { protected $request; protected $requestStack; /** * Constructor. * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * * @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0. */ public function __construct($requestStack) { if ($requestStack instanceof Request) { @trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED); $this->request = $requestStack; } elseif ($requestStack instanceof RequestStack) { $this->requestStack = $requestStack; } else { throw new \InvalidArgumentException('RequestHelper only accepts a Request or a RequestStack instance.'); } } /** * 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) { if (!$this->requestStack->getCurrentRequest()) { throw new \LogicException('A Request must be available.'); } return $this->requestStack->getCurrentRequest(); } return $this->request; } /** * {@inheritdoc} */ public function getName() { return 'request'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.php000066400000000000000000000027711266465517700263170ustar00rootroot00000000000000 * * 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 from the given parameters. * * @param string $name The name of the route * @param mixed $parameters An array of parameters * @param bool|string $referenceType The type of reference (one of the constants in UrlGeneratorInterface) * * @return string The generated URL * * @see UrlGeneratorInterface */ public function generate($name, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) { return $this->generator->generate($name, $parameters, $referenceType); } /** * {@inheritdoc} */ public function getName() { return 'router'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php000066400000000000000000000052521266465517700264570ustar00rootroot00000000000000 * * 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\Request; 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; /** * Constructor. * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * * @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0. */ public function __construct($requestStack) { if ($requestStack instanceof Request) { @trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED); $this->session = $requestStack->getSession(); } elseif ($requestStack instanceof RequestStack) { $this->requestStack = $requestStack; } else { throw new \InvalidArgumentException('RequestHelper only accepts a Request or a RequestStack instance.'); } } /** * 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'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/StopwatchHelper.php000066400000000000000000000021741266465517700270100ustar00rootroot00000000000000 * * 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)); } } } src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php000066400000000000000000000026231266465517700271640ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Templating/Loader/000077500000000000000000000000001266465517700231465ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php000066400000000000000000000031331266465517700271320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php000066400000000000000000000050351266465517700267610ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param string $cacheDir The cache path */ public function __construct(FileLocatorInterface $locator, $cacheDir = null) { if (null !== $cacheDir && is_file($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->cache[$key])) { return $this->cache[$key]; } try { return $this->cache[$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); } } } src/Symfony/Bundle/FrameworkBundle/Templating/PhpEngine.php000066400000000000000000000046111266465517700243300ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Templating/TemplateFilenameParser.php000066400000000000000000000022601266465517700270420ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php000066400000000000000000000042251266465517700262050ustar00rootroot00000000000000 * * 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 (!preg_match('/^(?:([^:]*):)?(?:([^:]*):)?(.+)\.([^\.]+)\.([^\.]+)$/', $name, $matches)) { 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; } } src/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.php000066400000000000000000000033371266465517700260510ustar00rootroot00000000000000 * * 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']); } } src/Symfony/Bundle/FrameworkBundle/Templating/TimedPhpEngine.php000066400000000000000000000033151266465517700253130ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Test/000077500000000000000000000000001266465517700205535ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php000066400000000000000000000124421266465517700241430ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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) { static::$kernel->shutdown(); } } /** * Clean up Kernel usage in this test. */ protected function tearDown() { static::ensureKernelShutdown(); } } src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php000066400000000000000000000020001266465517700234250ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Tests/000077500000000000000000000000001266465517700207365ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/000077500000000000000000000000001266465517700231175ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php000066400000000000000000000037421266465517700274010ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php000066400000000000000000000034131266465517700235260ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/000077500000000000000000000000001266465517700223145ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/000077500000000000000000000000001266465517700255655ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php000066400000000000000000000062461266465517700324170ustar00rootroot00000000000000 * * 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\ConfigCache; 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)); foreach ($metaFiles as $file) { $configCache = new ConfigCache(substr($file, 0, -5), true); $this->assertTrue( $configCache->isFresh(), 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.name\'\s*=>\s*\'%s\'/', $this->kernel->getName()), file_get_contents($containerFile), 'kernel.name is properly set on the dumped container'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/000077500000000000000000000000001266465517700272135ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php000066400000000000000000000015441266465517700324510ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/Fixture/config.yml000066400000000000000000000000341266465517700312000ustar00rootroot00000000000000framework: secret: test src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php000066400000000000000000000055431266465517700274220ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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('[router] Current routes', $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('[router] Route "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->getMock('Symfony\Component\Routing\RouterInterface'); $router ->expects($this->any()) ->method('getRouteCollection') ->will($this->returnValue($routeCollection)) ; $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader') ->disableOriginalConstructor() ->getMock(); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php000066400000000000000000000061651266465517700274310ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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('[router] Route "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->getMock('Symfony\Component\Routing\RouterInterface'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php000066400000000000000000000151721266465517700304370ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Application; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; use Symfony\Component\Filesystem\Filesystem; class TranslationDebugCommandTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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->getMock('Symfony\Component\Translation\Extractor\ExtractorInterface'); $extractor ->expects($this->any()) ->method('extract') ->will( $this->returnCallback(function ($path, $catalogue) use ($extractedMessages) { $catalogue->add($extractedMessages); }) ); $loader = $this->getMock('Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader'); $loader ->expects($this->any()) ->method('loadMessages') ->will( $this->returnCallback(function ($path, $catalogue) use ($loadedMessages) { $catalogue->add($loadedMessages); }) ); if (null === $kernel) { $kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface'); $bundle ->expects($this->any()) ->method('getPath') ->will($this->returnValue($path)) ; return $bundle; } } src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php000066400000000000000000000113401266465517700306240ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { private $fs; private $translationDir; public function testDumpMessagesAndClean() { $tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo'))); $tester->execute(array('command' => 'translation:update', 'locale' => 'en', 'bundle' => 'foo', '--dump-messages' => true, '--clean' => true)); $this->assertRegExp('/foo/', $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->getMock('Symfony\Component\Translation\Extractor\ExtractorInterface'); $extractor ->expects($this->any()) ->method('extract') ->will( $this->returnCallback(function ($path, $catalogue) use ($extractedMessages) { $catalogue->add($extractedMessages); }) ); $loader = $this->getMock('Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader'); $loader ->expects($this->any()) ->method('loadMessages') ->will( $this->returnCallback(function ($path, $catalogue) use ($loadedMessages) { $catalogue->add($loadedMessages); }) ); $writer = $this->getMock('Symfony\Component\Translation\Writer\TranslationWriter'); $writer ->expects($this->any()) ->method('getFormats') ->will( $this->returnValue(array('xlf', 'yml')) ); if (null === $kernel) { $kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface'); $bundle ->expects($this->any()) ->method('getPath') ->will($this->returnValue($path)) ; return $bundle; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/000077500000000000000000000000001266465517700223405ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php000066400000000000000000000132161266465517700261570ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface'); $kernel = $this->getKernel(array($bundle), true); $application = new Application($kernel); $application->doRun(new ArrayInput(array('list')), new NullOutput()); } public function testBundleCommandsAreRegistered() { $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once())->method('registerCommands'); $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->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once())->method('registerCommands'); $kernel = $this->getKernel(array($bundle)); $application = new Application($kernel); $application->all(); // Calling twice: registration should only be done once. $application->all(); } public function testBundleSingleCommandIsRetrievable() { $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once())->method('registerCommands'); $kernel = $this->getKernel(array($bundle)); $application = new Application($kernel); $command = new Command('example'); $application->add($command); $this->assertSame($command, $application->get('example')); } public function testBundleCommandCanBeFound() { $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once())->method('registerCommands'); $kernel = $this->getKernel(array($bundle)); $application = new Application($kernel); $command = new Command('example'); $application->add($command); $this->assertSame($command, $application->find('example')); } public function testBundleCommandCanBeFoundByAlias() { $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once())->method('registerCommands'); $kernel = $this->getKernel(array($bundle)); $application = new Application($kernel); $command = new Command('example'); $command->setAliases(array('alias')); $application->add($command); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); if ($useDispatcher) { $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $kernel ->expects($this->any()) ->method('getBundles') ->will($this->returnValue($bundles)) ; $kernel ->expects($this->any()) ->method('getContainer') ->will($this->returnValue($container)) ; return $kernel; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/000077500000000000000000000000001266465517700244565ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php000066400000000000000000000164351266465517700316420ustar00rootroot00000000000000 * * 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\Console\Output\BufferedOutput; 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 \PHPUnit_Framework_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 provideLegacySynchronizedServiceDefinitionTestData * @group legacy */ public function testLegacyDescribeSynchronizedServiceDefinition(Definition $definition, $expectedDescription) { $this->assertDescription($expectedDescription, $definition); } public function provideLegacySynchronizedServiceDefinitionTestData() { return $this->getDescriptionTestData(ObjectsProvider::getLegacyContainerDefinitions()); } /** @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); $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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php000066400000000000000000000011611266465517700307760ustar00rootroot00000000000000 * * 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; /** * @requires PHP 5.4 */ class JsonDescriptorTest extends AbstractDescriptorTest { protected function getDescriptor() { return new JsonDescriptor(); } protected function getFormat() { return 'json'; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/MarkdownDescriptorTest.php000066400000000000000000000011361266465517700316510ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php000066400000000000000000000151251266465517700302770ustar00rootroot00000000000000 * * 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') ->setFactory(array(new Reference('factory.service'), 'get')), ); } /** * @deprecated since version 2.7, to be removed in 3.0 * * @internal */ public static function getLegacyContainerDefinitions() { $definition1 = new Definition('Full\\Qualified\\Class1'); $definition2 = new Definition('Full\\Qualified\\Class2'); return array( 'legacy_synchronized_service_definition_1' => $definition1 ->setPublic(true) ->setSynthetic(false) ->setLazy(true) ->setSynchronized(true) ->setAbstract(true) ->setFactoryClass('Full\\Qualified\\FactoryClass', 'get') ->setFactoryMethod('get'), 'legacy_synchronized_service_definition_2' => $definition2 ->setPublic(false) ->setSynthetic(true) ->setFile('/path/to/file') ->setLazy(false) ->setSynchronized(false) ->setAbstract(false) ->addTag('tag1', array('attr1' => 'val1', 'attr2' => 'val2')) ->addTag('tag1', array('attr3' => 'val3')) ->addTag('tag2') ->setFactoryService('factory.service') ->setFactoryMethod('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'); $eventDispatcher->addListener('event1', function () { return 'Closure'; }); $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() { } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php000066400000000000000000000011231266465517700310070ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/XmlDescriptorTest.php000066400000000000000000000011201266465517700306200ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Tests/Controller/000077500000000000000000000000001266465517700230615ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php000066400000000000000000000206441266465517700305410ustar00rootroot00000000000000 * * 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('FooBundle: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('FooBundle: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 string is in the valid format, but not matching class can be found'); } 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 ); } /** * @expectedException * @dataProvider getInvalidBundleNameTests */ public function testInvalidBundleName($bundleName, $suggestedBundleName) { $parser = $this->createParser(); try { $parser->parse($bundleName); } 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( array('FoodBundle:Default:index', 'FooBundle:Default:index'), 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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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'), '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->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface'); $bundle->expects($this->any())->method('getName')->will($this->returnValue($name)); $bundle->expects($this->any())->method('getNamespace')->will($this->returnValue($namespace)); return $bundle; } } src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php000066400000000000000000000144311266465517700303020ustar00rootroot00000000000000 * * 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() { $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($this)) ; $resolver = $this->createControllerResolver(null, null, $container); $request = Request::create('/'); $request->attributes->set('_controller', 'foo'); $controller = $resolver->getController($request); $this->assertInstanceOf(get_class($this), $controller); } /** * @dataProvider getUndefinedControllers */ public function testGetControllerOnNonUndefinedFunction($controller, $exceptionName = null, $exceptionMessage = null) { $this->setExpectedException($exceptionName, $exceptionMessage); parent::testGetControllerOnNonUndefinedFunction($controller); } public function getUndefinedControllers() { return array( array('foo', '\LogicException', 'Unable to parse the controller name "foo".'), array('foo::bar', '\InvalidArgumentException', 'Class "foo" does not exist.'), array('stdClass', '\LogicException', 'Unable to parse the controller name "stdClass".'), array( 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar', '\InvalidArgumentException', 'Controller "Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar" for URI "/" is not callable.', ), ); } 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->getMock('Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser', array(), array(), '', false); } protected function createMockContainer() { return $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); } } 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() { } } src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php000066400000000000000000000110201266465517700265470ustar00rootroot00000000000000 * * 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\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\User\User; class ControllerTest extends TestCase { public function testForward() { $request = Request::create('/'); $request->setLocale('fr'); $request->setRequestFormat('xml'); $requestStack = new RequestStack(); $requestStack->push($request); $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) { return new Response($request->getRequestFormat().'--'.$request->getLocale()); })); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage'); $tokenStorage ->expects($this->once()) ->method('getToken') ->will($this->returnValue($token)); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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; } } class TestController extends Controller { public function forward($controller, array $path = array(), array $query = array()) { return parent::forward($controller, $path, $query); } public function getUser() { return parent::getUser(); } } src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php000066400000000000000000000256021266465517700302440ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\Routing\RouterInterface'); $router ->expects($this->once()) ->method('generate') ->with($this->equalTo($route), $this->equalTo($expectedAttributes)) ->will($this->returnValue($url)); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); 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')); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/000077500000000000000000000000001266465517700246575ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/000077500000000000000000000000001266465517700264315ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php000066400000000000000000000074061266465517700334320ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPass; class AddCacheWarmerPassTest extends \PHPUnit_Framework_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(), ); $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('findTaggedServiceIds', 'getDefinition', 'hasDefinition') ); $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->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php000066400000000000000000000106751266465517700341540ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testProcess() { $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->addTag('console.command'); $container->setDefinition('my-command', $definition); $container->compile(); $alias = 'console.command.symfony_bundle_frameworkbundle_tests_dependencyinjection_compiler_mycommand'; $this->assertTrue($container->hasAlias($alias)); $this->assertSame('my-command', (string) $container->getAlias($alias)); $this->assertTrue($container->hasParameter('console.command.ids')); $this->assertSame(array('my-command'), $container->getParameter('console.command.ids')); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The service "my-command" tagged "console.command" must be public. */ public function testProcessThrowAnExceptionIfTheServiceIsNotPublic() { $container = new ContainerBuilder(); $container->addCompilerPass(new AddConsoleCommandPass()); $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand'); $definition->addTag('console.command'); $definition->setPublic(false); $container->setDefinition('my-command', $definition); $container->compile(); } /** * @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(); } public function testHttpKernelRegisterCommandsIngoreCommandAsAService() { $container = new ContainerBuilder(); $container->addCompilerPass(new AddConsoleCommandPass()); $definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand'); $definition->addTag('console.command'); $container->setDefinition('my-command', $definition); $container->compile(); $application = $this->getMock('Symfony\Component\Console\Application'); // Never called, because it's the // Symfony\Bundle\FrameworkBundle\Console\Application that register // commands as a service $application->expects($this->never())->method('add'); $bundle = new ExtensionPresentBundle(); $bundle->setContainer($container); $bundle->registerCommands($application); } } class MyCommand extends Command { } class ExtensionPresentBundle extends Bundle { } AddConstraintValidatorsPassTest.php000066400000000000000000000073761266465517700353550ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass; class AddConstraintValidatorsPassTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('findTaggedServiceIds', 'getDefinition', 'hasDefinition') ); $validatorDefinition1 = $this->getMock('Symfony\Component\DependencyInjection\Definition', array('getClass')); $validatorDefinition2 = $this->getMock('Symfony\Component\DependencyInjection\Definition', array('getClass')); $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->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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); } } AddExpressionLanguageProvidersPassTest.php000066400000000000000000000103161266465517700366650ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; class AddExpressionLanguageProvidersPassTest extends \PHPUnit_Framework_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 { } LegacyFragmentRendererPassTest.php000066400000000000000000000071551266465517700351410ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass; /** * @group legacy */ class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_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(), ); $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $definition->expects($this->atLeastOnce()) ->method('getClass') ->will($this->returnValue('stdClass')); $builder = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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(), ); $renderer = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $renderer ->expects($this->once()) ->method('addMethodCall') ->with('addRenderer', array(new Reference('my_content_renderer'))) ; $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $definition->expects($this->atLeastOnce()) ->method('getClass') ->will($this->returnValue('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\RendererService')); $builder = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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 \Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface { public function render($uri, Request $request = null, array $options = array()) { } public function getName() { return 'test'; } } LegacyTemplatingAssetHelperPassTest.php000066400000000000000000000077001266465517700361470ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler * * 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 Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingAssetHelperPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; /** * @group legacy */ class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase { public function getScopesTests() { return array( array('container'), array('request'), ); } /** @dataProvider getScopesTests */ public function testFindLowestScopeInDefaultPackageWithReference($scope) { $container = new ContainerBuilder(); $defaultPackage = new Definition('stdClass'); $defaultPackage->setScope($scope); $container->setDefinition('default_package', $defaultPackage); $definition = new Definition('stdClass', array(new Reference('default_package'))); $container->setDefinition('templating.helper.assets', $definition); $profilerPass = new TemplatingAssetHelperPass(); $profilerPass->process($container); $this->assertSame($scope, $definition->getScope()); } /** @dataProvider getScopesTests */ public function testFindLowestScopeInDefaultPackageWithDefinition($scope) { $container = new ContainerBuilder(); $defaultPackage = new Definition('stdClass'); $defaultPackage->setScope($scope); $definition = new Definition('stdClass', array($defaultPackage)); $container->setDefinition('templating.helper.assets', $definition); $profilerPass = new TemplatingAssetHelperPass(); $profilerPass->process($container); $this->assertSame($scope, $definition->getScope()); } /** @dataProvider getScopesTests */ public function testFindLowestScopeInNamedPackageWithReference($scope) { $container = new ContainerBuilder(); $defaultPackage = new Definition('stdClass'); $container->setDefinition('default_package', $defaultPackage); $aPackage = new Definition('stdClass'); $container->setDefinition('a_package', $aPackage); $bPackage = new Definition('stdClass'); $bPackage->setScope($scope); $container->setDefinition('b_package', $bPackage); $cPackage = new Definition('stdClass'); $container->setDefinition('c_package', $cPackage); $definition = new Definition('stdClass', array(new Reference('default_package'), array( new Reference('a_package'), new Reference('b_package'), new Reference('c_package'), ))); $container->setDefinition('templating.helper.assets', $definition); $profilerPass = new TemplatingAssetHelperPass(); $profilerPass->process($container); $this->assertSame($scope, $definition->getScope()); } /** @dataProvider getScopesTests */ public function testFindLowestScopeInNamedPackageWithDefinition($scope) { $container = new ContainerBuilder(); $defaultPackage = new Definition('stdClass'); $aPackage = new Definition('stdClass'); $bPackage = new Definition('stdClass'); $bPackage->setScope($scope); $cPackage = new Definition('stdClass'); $definition = new Definition('stdClass', array($defaultPackage, array( $aPackage, $bPackage, $cPackage, ))); $container->setDefinition('templating.helper.assets', $definition); $profilerPass = new TemplatingAssetHelperPass(); $profilerPass->process($container); $this->assertSame($scope, $definition->getScope()); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php000066400000000000000000000056411266465517700342770ustar00rootroot00000000000000 * * 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 Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase { public function testProcess() { $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $parameterBag = $this->getMock('Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface'); $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('%translator.class%')); $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->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $container->expects($this->once()) ->method('hasAlias') ->will($this->returnValue(false)); $pass = new LoggingTranslatorPass(); $pass->process($container); } public function testThatCompilerPassIsIgnoredIfThereIsNotTranslatorDefinition() { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $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); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php000066400000000000000000000063731266465517700324240ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Definition; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; class ProfilerPassTest extends \PHPUnit_Framework_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->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->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'getDefinition', 'findTaggedServiceIds', 'setParameter') ); $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; } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php000066400000000000000000000065661266465517700327570ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass; /** * Tests for the SerializerPass class. * * @author Javier Lopez */ class SerializerPassTest extends \PHPUnit_Framework_TestCase { public function testThrowExceptionWhenNoNormalizers() { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds')); $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->setExpectedException('RuntimeException'); $serializerPass = new SerializerPass(); $serializerPass->process($container); } public function testThrowExceptionWhenNoEncoders() { $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $container = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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->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->getMock('Symfony\Component\DependencyInjection\ContainerBuilder', array('findTaggedServiceIds')); $container->expects($this->atLeastOnce()) ->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); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/TranslatorPassTest.php000066400000000000000000000035621266465517700327700ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass; class TranslatorPassTest extends \PHPUnit_Framework_TestCase { public function testValidCollector() { $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $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->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'getDefinition', 'findTaggedServiceIds', 'findDefinition') ); $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->getMock('Symfony\Component\DependencyInjection\Definition'))); $pass = new TranslatorPass(); $pass->process($container); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php000066400000000000000000000146421266465517700310460ustar00rootroot00000000000000 * * 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\DependencyInjection\Configuration; use Symfony\Component\Config\Definition\Processor; class ConfigurationTest extends \PHPUnit_Framework_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'), ), )); } /** * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException * @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project. * @group legacy */ public function testLegacyInvalidValueAssets() { $processor = new Processor(); $configuration = new Configuration(true); $processor->processConfiguration($configuration, array( array( 'templating' => array( 'engines' => null, 'assets_base_urls' => '//example.com', ), 'assets' => null, ), )); } protected static function getBundleDefaultConfig() { return array( 'http_method_override' => true, 'trusted_proxies' => array(), 'ide' => null, 'default_locale' => 'en', 'form' => array( 'enabled' => false, 'csrf_protection' => array( 'enabled' => null, // defaults to csrf_protection.enabled 'field_name' => null, ), ), 'csrf_protection' => array( 'enabled' => false, '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', 'username' => '', 'password' => '', 'lifetime' => 86400, 'collect' => true, ), 'translator' => array( 'enabled' => false, 'fallbacks' => array('en'), 'logging' => true, ), 'validation' => array( 'enabled' => false, 'enable_annotations' => false, 'static_method' => array('loadValidatorMetadata'), 'translation_domain' => 'validators', 'strict_email' => false, ), 'annotations' => array( 'cache' => 'file', 'file_cache_dir' => '%kernel.cache_dir%/annotations', 'debug' => '%kernel.debug%', ), 'serializer' => array( 'enabled' => false, 'enable_annotations' => false, ), 'property_access' => array( 'magic_call' => false, 'throw_exception_on_invalid_index' => false, ), 'assets' => array( 'version' => null, 'version_format' => '%%s?%%s', 'base_path' => '', 'base_urls' => array(), 'packages' => array(), ), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/000077500000000000000000000000001266465517700264705ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/000077500000000000000000000000001266465517700305415ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/000077500000000000000000000000001266465517700325135ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/000077500000000000000000000000001266465517700337605ustar00rootroot00000000000000validation.xml000066400000000000000000000000001266465517700365430ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/configvalidation.yml000066400000000000000000000000001266465517700365440ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/configsrc/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php000066400000000000000000000005501266465517700333230ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests; class TestBundle extends \Symfony\Component\HttpKernel\Bundle\Bundle { } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/000077500000000000000000000000001266465517700272575ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php000066400000000000000000000016471266465517700313020ustar00rootroot00000000000000loadFromExtension('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_null_version' => array( 'version' => null, 'base_urls' => array('https://bar3.example.com'), ), ), ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php000066400000000000000000000002121266465517700331140ustar00rootroot00000000000000loadFromExtension('framework', array( 'templating' => array( 'engines' => array('php', 'twig'), ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf.php000066400000000000000000000003631266465517700307270ustar00rootroot00000000000000loadFromExtension('framework', array( 'csrf_protection' => true, 'form' => array( 'enabled' => true, 'csrf_protection' => true, ), 'session' => array( 'handler_id' => null, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_disabled.php000066400000000000000000000002001266465517700325440ustar00rootroot00000000000000loadFromExtension('framework', array( 'csrf_protection' => array( 'enabled' => false, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php000066400000000000000000000001771266465517700336530ustar00rootroot00000000000000loadFromExtension('framework', array( 'csrf_protection' => array( 'enabled' => true, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/default_config.php000066400000000000000000000000741266465517700327420ustar00rootroot00000000000000loadFromExtension('framework', array()); form_csrf_sets_field_name.php000066400000000000000000000004261266465517700350740ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'csrf_protection' => array( 'enabled' => true, 'field_name' => '_custom', ), 'form' => array( 'enabled' => true, ), 'session' => array( 'handler_id' => null, ), )); form_csrf_under_form_sets_field_name.php000066400000000000000000000005611266465517700373140ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'csrf_protection' => array( 'enabled' => true, 'field_name' => '_custom', ), 'form' => array( 'enabled' => true, 'csrf_protection' => array( 'field_name' => '_custom_form', ), ), 'session' => array( 'handler_id' => null, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php000066400000000000000000000002301266465517700324370ustar00rootroot00000000000000loadFromExtension('framework', array( 'form' => array( 'enabled' => true, 'csrf_protection' => false, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php000066400000000000000000000040371266465517700307360ustar00rootroot00000000000000loadFromExtension('framework', array( 'secret' => 's3cr3t', 'default_locale' => 'fr', 'form' => array( 'csrf_protection' => array( 'field_name' => '_csrf', ), ), 'http_method_override' => false, 'trusted_proxies' => array('127.0.0.1', '10.0.0.1'), 'csrf_protection' => array( 'enabled' => true, ), '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' => 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', ), 'translator' => array( 'enabled' => true, 'fallback' => 'fr', ), 'validation' => array( 'enabled' => true, 'cache' => 'apc', ), 'annotations' => array( 'cache' => 'file', 'debug' => true, 'file_cache_dir' => '%kernel.cache_dir%/annotations', ), 'serializer' => array('enabled' => true), 'ide' => 'file%%link%%format', 'request' => array( 'formats' => array( 'csv' => array( 'text/csv', 'text/plain', ), 'pdf' => 'application/pdf', ), ), )); legacy_templating_assets.php000066400000000000000000000016111266465517700347620ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'templating' => array( 'engines' => array('php'), 'assets_version' => 'SomeVersionScheme', 'assets_base_urls' => 'http://cdn.example.com', 'assets_version_format' => '%%s?version=%%s', 'packages' => array( '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_null_version' => array( 'version' => null, 'base_urls' => array('https://bar3.example.com'), ), ), ), )); legacy_templating_url_package.php000066400000000000000000000005601266465517700357370ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'secret' => 's3cr3t', 'templating' => array( 'assets_base_urls' => 'https://cdn.example.com', 'engines' => array('php', 'twig'), 'packages' => array( 'images' => array( 'base_urls' => 'https://images.example.com', ), ), ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/profiler.php000066400000000000000000000001701266465517700316100ustar00rootroot00000000000000loadFromExtension('framework', array( 'profiler' => array( 'enabled' => true, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_accessor.php000066400000000000000000000002661266465517700335420ustar00rootroot00000000000000loadFromExtension('framework', array( 'property_access' => array( 'magic_call' => true, 'throw_exception_on_invalid_index' => true, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/request.php000066400000000000000000000001721266465517700314600ustar00rootroot00000000000000loadFromExtension('framework', array( 'request' => array( 'formats' => array(), ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/session.php000066400000000000000000000001721266465517700314530ustar00rootroot00000000000000loadFromExtension('framework', array( 'session' => array( 'handler_id' => null, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php000066400000000000000000000002111266465517700341550ustar00rootroot00000000000000loadFromExtension('framework', array( 'translator' => array( 'fallbacks' => array('en', 'fr'), ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php000066400000000000000000000002721266465517700345400ustar00rootroot00000000000000loadFromExtension('framework', array( 'secret' => 's3cr3t', 'validation' => array( 'enabled' => true, 'enable_annotations' => true, ), )); validation_multiple_static_methods.php000066400000000000000000000003141266465517700370460ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'secret' => 's3cr3t', 'validation' => array( 'enabled' => true, 'static_method' => array('loadFoo', 'loadBar'), ), )); validation_no_static_method.php000066400000000000000000000002661266465517700354520ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('framework', array( 'secret' => 's3cr3t', 'validation' => array( 'enabled' => true, 'static_method' => false, ), )); src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/000077500000000000000000000000001266465517700272705ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets.xml000066400000000000000000000027021266465517700313150ustar00rootroot00000000000000 http://cdn.example.com http://images1.example.com http://images2.example.com https://bar2.example.com https://bar3.example.com src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml000066400000000000000000000012131266465517700331400ustar00rootroot00000000000000 php twig src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml000066400000000000000000000012451266465517700307510ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml000066400000000000000000000010501266465517700325720ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml000066400000000000000000000010301266465517700336620ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/default_config.xml000066400000000000000000000007341266465517700327670ustar00rootroot00000000000000 form_csrf_sets_field_name.xml000066400000000000000000000011461266465517700351160ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml form_csrf_under_form_sets_field_name.xml000066400000000000000000000013021266465517700373300ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml000066400000000000000000000011561266465517700324710ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml000066400000000000000000000050231266465517700307540ustar00rootroot00000000000000 text/csv text/plain application/pdf loader.foo loader.bar php twig theme1 theme2 legacy_templating_assets.xml000066400000000000000000000026741266465517700350160ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml php http://cdn.example.com http://images1.example.com http://images2.example.com https://bar2.example.com https://bar3.example.com legacy_templating_url_package.xml000066400000000000000000000016521266465517700357640ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml php twig https://cdn.example.com https://images.example.com src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/profiler.xml000066400000000000000000000010401266465517700316270ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml000066400000000000000000000011221266465517700335540ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/request.xml000066400000000000000000000010171266465517700315010ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/session.xml000066400000000000000000000010411266465517700314710ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml000066400000000000000000000013001266465517700341770ustar00rootroot00000000000000 en fr src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_annotations.xml000066400000000000000000000011141266465517700345560ustar00rootroot00000000000000 validation_multiple_static_methods.xml000066400000000000000000000013361266465517700370750ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml loadFoo loadBar validation_no_static_method.xml000066400000000000000000000011101266465517700354610ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/000077500000000000000000000000001266465517700272715ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets.yml000066400000000000000000000011731266465517700313200ustar00rootroot00000000000000framework: 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_null_version: version: null base_urls: "https://bar3.example.com" src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml000066400000000000000000000001011266465517700331350ustar00rootroot00000000000000framework: templating: engines: [php, twig] src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf.yml000066400000000000000000000002531266465517700307510ustar00rootroot00000000000000framework: csrf_protection: false secret: s3cr3t form: csrf_protection: true session: ~ # CSRF is disabled by default # csrf_protection: ~ src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf_disabled.yml000066400000000000000000000000461266465517700326000ustar00rootroot00000000000000framework: csrf_protection: false src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml000066400000000000000000000000421266465517700336660ustar00rootroot00000000000000framework: csrf_protection: ~ src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/default_config.yml000066400000000000000000000000151266465517700327610ustar00rootroot00000000000000framework: ~ form_csrf_sets_field_name.yml000066400000000000000000000001271266465517700351160ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: csrf_protection: field_name: _custom form: ~ session: ~ form_csrf_under_form_sets_field_name.yml000066400000000000000000000002231266465517700373330ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: csrf_protection: field_name: _custom form: csrf_protection: field_name: _custom_form session: ~ src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml000066400000000000000000000001111266465517700324610ustar00rootroot00000000000000framework: form: csrf_protection: enabled: false src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml000066400000000000000000000030151266465517700307550ustar00rootroot00000000000000framework: secret: s3cr3t default_locale: fr form: csrf_protection: field_name: _csrf http_method_override: false trusted_proxies: ['127.0.0.1', '10.0.0.1'] csrf_protection: enabled: true 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: 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 translator: enabled: true fallback: fr validation: enabled: true cache: apc annotations: cache: file debug: true file_cache_dir: '%kernel.cache_dir%/annotations' serializer: { enabled: true } ide: file%%link%%format request: formats: csv: ['text/csv', 'text/plain'] pdf: 'application/pdf' legacy_templating_assets.yml000066400000000000000000000011521266465517700350060ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: templating: engines: [php] assets_version: SomeVersionScheme assets_version_format: %%s?version=%%s assets_base_urls: http://cdn.example.com packages: 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_null_version: version: null base_urls: "https://bar3.example.com" legacy_templating_url_package.yml000066400000000000000000000003421266465517700357610ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: secret: s3cr3t templating: assets_base_urls: https://cdn.example.com engines: [php, twig] packages: images: base_urls: https://images.example.com src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/profiler.yml000066400000000000000000000000571266465517700316400ustar00rootroot00000000000000framework: profiler: enabled: true src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml000066400000000000000000000001501266465517700335560ustar00rootroot00000000000000framework: property_access: magic_call: true throw_exception_on_invalid_index: true src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/request.yml000066400000000000000000000000531266465517700315020ustar00rootroot00000000000000framework: request: formats: ~ src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/session.yml000066400000000000000000000000611266465517700314740ustar00rootroot00000000000000framework: session: handler_id: null src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml000066400000000000000000000000671266465517700342120ustar00rootroot00000000000000framework: translator: fallbacks: [en, fr] src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_annotations.yml000066400000000000000000000001511266465517700345600ustar00rootroot00000000000000framework: secret: s3cr3t validation: enabled: true enable_annotations: true validation_multiple_static_methods.yml000066400000000000000000000001641266465517700370750ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: secret: s3cr3t validation: enabled: true static_method: [loadFoo, loadBar] validation_no_static_method.yml000066400000000000000000000001471266465517700354740ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/ymlframework: secret: s3cr3t validation: enabled: true static_method: false src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php000066400000000000000000000605161266465517700320720ustar00rootroot00000000000000 * * 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\FrameworkExtension; 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\Validator\Validation; abstract class FrameworkExtensionTest extends TestCase { private static $containerCache = array(); abstract protected function loadFromFile(ContainerBuilder $container, $file); public function testCsrfProtection() { $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)); } /** * @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 testSecureRandomIsAvailableIfCsrfIsDisabled() { $container = $this->createContainerFromFile('csrf_disabled'); $this->assertTrue($container->hasDefinition('security.secure_random')); } 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 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->assertTrue($options['cookie_httponly']); $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'); } /** * @group legacy */ public function testLegacyTemplatingAssets() { $this->checkAssetsPackages($this->createContainerFromFile('legacy_templating_assets'), true); } public function testAssets() { $this->checkAssetsPackages($this->createContainerFromFile('assets')); } 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' ); $calls = $container->getDefinition('translator.default')->getMethodCalls(); $this->assertEquals(array('fr'), $calls[0][1][0]); } public function testTranslatorMultipleFallbacks() { $container = $this->createContainerFromFile('translator_fallbacks'); $calls = $container->getDefinition('translator.default')->getMethodCalls(); $this->assertEquals(array('en', 'fr'), $calls[0][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.apc')), $calls[5][1]); } /** * @group legacy * @requires extension apc */ public function testLegacyFullyConfiguredValidationService() { $container = $this->createContainerFromFile('full'); $this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $container->get('validator')); } public function testValidationService() { $container = $this->createContainerFromFile('validation_annotations'); $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.file_cache_reader')->getArgument(1)); $this->assertInstanceOf('Doctrine\Common\Annotations\FileCacheReader', $container->get('annotation_reader')); } public function testFileLinkFormat() { $container = $this->createContainerFromFile('full'); $this->assertEquals('file%link%format', $container->getParameter('templating.helper.code.file_link_format')); } public function testValidationAnnotations() { $container = $this->createContainerFromFile('validation_annotations'); $calls = $container->getDefinition('validator.builder')->getMethodCalls(); $this->assertCount(6, $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]); // 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'), )); $calls = $container->getDefinition('validator.builder')->getMethodCalls(); $this->assertCount(7, $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]); $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'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'validation.xml', $xmlMappings[1]); $yamlMappings = $calls[4][1][0]; $this->assertCount(1, $yamlMappings); $this->assertStringEndsWith('TestBundle'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'validation.yml', $yamlMappings[0]); } public function testValidationNoStaticMethod() { $container = $this->createContainerFromFile('validation_no_static_method'); $calls = $container->getDefinition('validator.builder')->getMethodCalls(); $this->assertCount(4, $calls); $this->assertSame('addXmlMappings', $calls[3][0]); // 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')); } /** * @group legacy */ public function testLegacyFormCsrfFieldNameCanBeSetUnderCsrfSettings() { $container = $this->createContainerFromFile('form_csrf_sets_field_name'); $this->assertTrue($container->getParameter('form.type_extension.csrf.enabled')); $this->assertEquals('_custom', $container->getParameter('form.type_extension.csrf.field_name')); } /** * @group legacy */ public function testLegacyFormCsrfFieldNameUnderFormSettingsTakesPrecedence() { $container = $this->createContainerFromFile('form_csrf_under_form_sets_field_name'); $this->assertTrue($container->getParameter('form.type_extension.csrf.enabled')); $this->assertEquals('_custom_form', $container->getParameter('form.type_extension.csrf.field_name')); } 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')); } public function testAssetHelperWhenAssetsAreEnabled() { $container = $this->createContainerFromFile('full'); $packages = $container->getDefinition('templating.helper.assets')->getArgument(0); $this->assertSame('assets.packages', (string) $packages); } public function testAssetHelperWhenTemplatesAreEnabledAndAssetsAreDisabled() { $container = $this->createContainerFromFile('assets_disabled'); $packages = $container->getDefinition('templating.helper.assets')->getArgument(0); $this->assertSame('assets.packages', (string) $packages); } 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))); } protected function createContainerFromFile($file, $data = array()) { $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); $container->getCompilerPassConfig()->setOptimizationPasses(array()); $container->getCompilerPassConfig()->setRemovingPasses(array()); $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 checkAssetsPackages(ContainerBuilder $container, $legacy = false) { $packages = $container->getDefinition('assets.packages'); // default package $defaultPackage = $container->getDefinition($packages->getArgument(0)); $this->assertUrlPackage($container, $defaultPackage, array('http://cdn.example.com'), 'SomeVersionScheme', '%%s?version=%%s'); // packages $packages = $packages->getArgument(1); $this->assertCount($legacy ? 4 : 5, $packages); if (!$legacy) { $package = $container->getDefinition($packages['images_path']); $this->assertPathPackage($container, $package, '/foo', 'SomeVersionScheme', '%%s?version=%%s'); } $package = $container->getDefinition($packages['images']); $this->assertUrlPackage($container, $package, array('http://images1.example.com', 'http://images2.example.com'), '1.0.0', $legacy ? '%%s?%%s' : '%%s?version=%%s'); $package = $container->getDefinition($packages['foo']); $this->assertPathPackage($container, $package, '', '1.0.0', '%%s-%%s'); $package = $container->getDefinition($packages['bar']); $this->assertUrlPackage($container, $package, array('https://bar2.example.com'), $legacy ? null : 'SomeVersionScheme', $legacy ? '%%s?%%s' : '%%s?version=%%s'); $this->assertEquals($legacy ? 'assets.empty_version_strategy' : 'assets._version__default', (string) $container->getDefinition('assets._package_bar')->getArgument(1)); $this->assertEquals('assets.empty_version_strategy', (string) $container->getDefinition('assets._package_bar_null_version')->getArgument(1)); } 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($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)); } } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php000066400000000000000000000033751266465517700325420ustar00rootroot00000000000000 * * 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', ), ), ), )); }); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php000066400000000000000000000013611266465517700325440ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php000066400000000000000000000013641266465517700327110ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/000077500000000000000000000000001266465517700225475ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/000077500000000000000000000000001266465517700245535ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php000066400000000000000000000006101266465517700272650ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/000077500000000000000000000000001266465517700265255ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/000077500000000000000000000000001266465517700276625ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine000066400000000000000000000000001266465517700332400ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controller/000077500000000000000000000000001266465517700320455ustar00rootroot00000000000000base.format.engine000066400000000000000000000000001266465517700353440ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controllerthis.is.a.template.format.engine000066400000000000000000000000001266465517700356610ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/viewssrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/000077500000000000000000000000001266465517700246655ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.json000066400000000000000000000000631266465517700270700ustar00rootroot00000000000000{ "service": "service_1", "public": true } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.md000066400000000000000000000000441266465517700265160ustar00rootroot00000000000000- Service: `service_1` - Public: yessrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt000066400000000000000000000001001266465517700267260ustar00rootroot00000000000000This service is an alias for the service service_1 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.xml000066400000000000000000000001221266465517700267130ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.json000066400000000000000000000000641266465517700270720ustar00rootroot00000000000000{ "service": "service_2", "public": false } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md000066400000000000000000000000431266465517700265160ustar00rootroot00000000000000- Service: `service_2` - Public: nosrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt000066400000000000000000000001001266465517700267270ustar00rootroot00000000000000This service is an alias for the service service_2 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.xml000066400000000000000000000001231266465517700267150ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json000066400000000000000000000002451266465517700307370ustar00rootroot00000000000000{ "twig.form.resources": ["bootstrap_3_horizontal_layout.html.twig", "bootstrap_3_layout.html.twig", "form_div_layout.html.twig", "form_table_layout.html.twig"] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md000066400000000000000000000001511266465517700303620ustar00rootroot00000000000000twig.form.resources =================== ["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt000066400000000000000000000001001266465517700305730ustar00rootroot00000000000000["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml000066400000000000000000000002301266465517700305600ustar00rootroot00000000000000 ["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json000066400000000000000000000014261266465517700307670ustar00rootroot00000000000000{ "definitions": { "definition_1": { "class": "Full\\Qualified\\Class1", "scope": "container", "public": true, "synthetic": false, "lazy": true, "synchronized": false, "abstract": true, "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" } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md000066400000000000000000000010031266465517700304050ustar00rootroot00000000000000Public services =============== Definitions ----------- definition_1 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class1` - Scope: `container` - Public: yes - Synthetic: no - Lazy: yes - Synchronized: no - Abstract: yes - 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` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt000066400000000000000000000007071266465517700306360ustar00rootroot00000000000000[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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml000066400000000000000000000010221266465517700306060ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json000066400000000000000000000033131266465517700313310ustar00rootroot00000000000000{ "definitions": { "definition_1": { "class": "Full\\Qualified\\Class1", "scope": "container", "public": true, "synthetic": false, "lazy": true, "synchronized": false, "abstract": true, "file": null, "factory_class": "Full\\Qualified\\FactoryClass", "factory_method": "get", "tags": [ ] }, "definition_2": { "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", "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" } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md000066400000000000000000000015551266465517700307660ustar00rootroot00000000000000Public and private services =========================== Definitions ----------- definition_1 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class1` - Scope: `container` - Public: yes - Synthetic: no - Lazy: yes - Synchronized: no - Abstract: yes - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` definition_2 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` - 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` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt000066400000000000000000000010611266465517700311750ustar00rootroot00000000000000[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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml000066400000000000000000000020361266465517700311610ustar00rootroot00000000000000 val1 val2 val3 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json000066400000000000000000000020061266465517700303400ustar00rootroot00000000000000{ "definitions": { "definition_2": { "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", "tags": [ { "name": "tag1", "parameters": { "attr1": "val1", "attr2": "val2" } }, { "name": "tag1", "parameters": { "attr3": "val3" } }, { "name": "tag2", "parameters": [ ] } ] } }, "aliases": [ ], "services": [ ] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md000066400000000000000000000007031266465517700277710ustar00rootroot00000000000000Public and private services with tag `tag1` =========================================== Definitions ----------- definition_2 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` - Tag: `tag1` - Attr1: val1 - Attr2: val2 - Tag: `tag1` - Attr3: val3 - Tag: `tag2` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt000066400000000000000000000005151266465517700302110ustar00rootroot00000000000000[container] Public and private services with tag tag1 Service ID  attr1 attr2 attr3 Class name  definition_2 val1 val2 Full\Qualified\Class2 " val3 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml000066400000000000000000000011141266465517700301660ustar00rootroot00000000000000 val1 val2 val3 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.json000066400000000000000000000014471266465517700304520ustar00rootroot00000000000000{ "tag1": [ { "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get" } ], "tag2": [ { "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get" } ] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md000066400000000000000000000010311266465517700300660ustar00rootroot00000000000000Container tags ============== tag1 ---- definition_2 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` tag2 ---- definition_2 ~~~~~~~~~~~~ - Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt000066400000000000000000000001641266465517700303130ustar00rootroot00000000000000[container] Tagged services [tag] tag1 definition_2 [tag] tag2 definition_2 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml000066400000000000000000000012041266465517700302700ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.json000066400000000000000000000000731266465517700275370ustar00rootroot00000000000000{ "type": "function", "name": "array_key_exists" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md000066400000000000000000000000571266465517700271700ustar00rootroot00000000000000 - Type: `function` - Name: `array_key_exists` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt000066400000000000000000000000221266465517700273770ustar00rootroot00000000000000array_key_exists()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.xml000066400000000000000000000001331266465517700273630ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.json000066400000000000000000000002471266465517700275430ustar00rootroot00000000000000{ "type": "function", "name": "staticMethod", "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", "static": true } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md000066400000000000000000000002121266465517700271620ustar00rootroot00000000000000 - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Static: yes src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt000066400000000000000000000001251266465517700274040ustar00rootroot00000000000000Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.xml000066400000000000000000000002631266465517700273700ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.json000066400000000000000000000002151266465517700275370ustar00rootroot00000000000000{ "type": "function", "name": "method", "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md000066400000000000000000000001661266465517700271730ustar00rootroot00000000000000 - Type: `function` - Name: `method` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt000066400000000000000000000001171266465517700274060ustar00rootroot00000000000000Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.xml000066400000000000000000000002371266465517700273720ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.json000066400000000000000000000002471266465517700275450ustar00rootroot00000000000000{ "type": "function", "name": "staticMethod", "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", "static": true } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md000066400000000000000000000002121266465517700271640ustar00rootroot00000000000000 - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Static: yes src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt000066400000000000000000000001251266465517700274060ustar00rootroot00000000000000Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.xml000066400000000000000000000002631266465517700273720ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.json000066400000000000000000000003031266465517700275370ustar00rootroot00000000000000{ "type": "function", "name": "staticMethod", "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\ExtendedCallableClass", "static": true, "parent": true } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md000066400000000000000000000002401266465517700271660ustar00rootroot00000000000000 - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass` - Static: yes - Parent: yes src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt000066400000000000000000000001451266465517700274110ustar00rootroot00000000000000Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.xml000066400000000000000000000003111266465517700273650ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.json000066400000000000000000000000321266465517700275370ustar00rootroot00000000000000{ "type": "closure" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md000066400000000000000000000000231266465517700271660ustar00rootroot00000000000000 - Type: `closure` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt000066400000000000000000000000121266465517700274030ustar00rootroot00000000000000\Closure()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.xml000066400000000000000000000001021266465517700273640ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.json000066400000000000000000000001641266465517700275460ustar00rootroot00000000000000{ "type": "object", "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md000066400000000000000000000001421266465517700271710ustar00rootroot00000000000000 - Type: `object` - Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt000066400000000000000000000001211266465517700274050ustar00rootroot00000000000000Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke()src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.xml000066400000000000000000000002161266465517700273730ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json000066400000000000000000000004571266465517700301360ustar00rootroot00000000000000{ "class": "Full\\Qualified\\Class1", "scope": "container", "public": true, "synthetic": false, "lazy": true, "synchronized": false, "abstract": true, "file": null, "factory_class": "Full\\Qualified\\FactoryClass", "factory_method": "get", "tags": [ ] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md000066400000000000000000000003121266465517700275530ustar00rootroot00000000000000- Class: `Full\Qualified\Class1` - Scope: `container` - Public: yes - Synthetic: no - Lazy: yes - Synchronized: no - Abstract: yes - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt000066400000000000000000000007421266465517700300010ustar00rootroot00000000000000Service Id - Class Full\Qualified\Class1 Tags - Scope container Public yes Synthetic no Lazy yes Synchronized no Abstract yes Factory Class Full\Qualified\FactoryClass Factory Method get src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml000066400000000000000000000004111266465517700277530ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json000066400000000000000000000012441266465517700301320ustar00rootroot00000000000000{ "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", "tags": [ { "name": "tag1", "parameters": { "attr1": "val1", "attr2": "val2" } }, { "name": "tag1", "parameters": { "attr3": "val3" } }, { "name": "tag2", "parameters": [ ] } ] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md000066400000000000000000000004651266465517700275650ustar00rootroot00000000000000- Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` - Tag: `tag1` - Attr1: val1 - Attr2: val2 - Tag: `tag1` - Attr3: val3 - Tag: `tag2`src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt000066400000000000000000000012721266465517700300010ustar00rootroot00000000000000Service Id - Class Full\Qualified\Class2 Tags - tag1 (attr1: val1, attr2: val2) - tag1 (attr3: val3) - tag2 () Scope container Public no Synthetic yes Lazy no Synchronized no Abstract no Required File /path/to/file Factory Service factory.service Factory Method get src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml000066400000000000000000000010071266465517700277560ustar00rootroot00000000000000 val1 val2 val3 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json000066400000000000000000000001651266465517700326130ustar00rootroot00000000000000[ { "type": "function", "name": "global_function" }, { "type": "closure" } ] src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md000066400000000000000000000002501266465517700322350ustar00rootroot00000000000000# Registered listeners for event `event1` ordered by descending priority ## Listener 1 - Type: `function` - Name: `global_function` ## Listener 2 - Type: `closure` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt000066400000000000000000000004101266465517700324520ustar00rootroot00000000000000[event_dispatcher] Registered listeners for event event1 +-------+-------------------+ | Order | Callable | +-------+-------------------+ | #1 | global_function() | | #2 | \Closure() | +-------+-------------------+ src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml000066400000000000000000000002401266465517700324340ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json000066400000000000000000000005221266465517700327120ustar00rootroot00000000000000{ "event1": [ { "type": "function", "name": "global_function" }, { "type": "closure" } ], "event2": [ { "type": "object", "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" } ] } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md000066400000000000000000000004001266465517700323340ustar00rootroot00000000000000# Registered listeners ## event1 ### Listener 1 - Type: `function` - Name: `global_function` ### Listener 2 - Type: `closure` ## event2 ### Listener 1 - Type: `object` - Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt000066400000000000000000000014021266465517700325560ustar00rootroot00000000000000[event_dispatcher] Registered listeners by event [Event] event1 +-------+-------------------+ | Order | Callable | +-------+-------------------+ | #1 | global_function() | | #2 | \Closure() | +-------+-------------------+ [Event] event2 +-------+-----------------------------------------------------------------------------------+ | Order | Callable | +-------+-----------------------------------------------------------------------------------+ | #1 | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() | +-------+-----------------------------------------------------------------------------------+ src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml000066400000000000000000000005251266465517700325440ustar00rootroot00000000000000 legacy_synchronized_service_definition_1.json000066400000000000000000000004261266465517700357160ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor{ "class": "Full\\Qualified\\Class1", "scope": "container", "public": true, "synthetic": false, "lazy": true, "synchronized": true, "abstract": true, "file": null, "factory_class": "Full\\Qualified\\FactoryClass", "factory_method": "get", "tags": [ ] } legacy_synchronized_service_definition_1.md000066400000000000000000000003131266465517700353400ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor- Class: `Full\Qualified\Class1` - Scope: `container` - Public: yes - Synthetic: no - Lazy: yes - Synchronized: yes - Abstract: yes - Factory Class: `Full\Qualified\FactoryClass` - Factory Method: `get` legacy_synchronized_service_definition_1.txt000066400000000000000000000007431266465517700355660ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DescriptorService Id - Class Full\Qualified\Class1 Tags - Scope container Public yes Synthetic no Lazy yes Synchronized yes Abstract yes Factory Class Full\Qualified\FactoryClass Factory Method get legacy_synchronized_service_definition_1.xml000066400000000000000000000003761266465517700355510ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor legacy_synchronized_service_definition_2.json000066400000000000000000000010461266465517700357160ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor{ "class": "Full\\Qualified\\Class2", "scope": "container", "public": false, "synthetic": true, "lazy": false, "synchronized": false, "abstract": false, "file": "\/path\/to\/file", "factory_service": "factory.service", "factory_method": "get", "tags": [ { "name": "tag1", "parameters": { "attr1": "val1", "attr2": "val2" } }, { "name": "tag1", "parameters": { "attr3": "val3" } }, { "name": "tag2", "parameters": [ ] } ] } legacy_synchronized_service_definition_2.md000066400000000000000000000004661266465517700353520ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor- Class: `Full\Qualified\Class2` - Scope: `container` - Public: no - Synthetic: yes - Lazy: no - Synchronized: no - Abstract: no - File: `/path/to/file` - Factory Service: `factory.service` - Factory Method: `get` - Tag: `tag1` - Attr1: val1 - Attr2: val2 - Tag: `tag1` - Attr3: val3 - Tag: `tag2` legacy_synchronized_service_definition_2.txt000066400000000000000000000012721266465517700355650ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/DescriptorService Id - Class Full\Qualified\Class2 Tags - tag1 (attr1: val1, attr2: val2) - tag1 (attr3: val3) - tag2 () Scope container Public no Synthetic yes Lazy no Synchronized no Abstract no Required File /path/to/file Factory Service factory.service Factory Method get legacy_synchronized_service_definition_2.xml000066400000000000000000000010121266465517700355360ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor val1 val2 val3 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.json000066400000000000000000000000431266465517700275350ustar00rootroot00000000000000{ "database_name": "symfony" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md000066400000000000000000000000441266465517700271650ustar00rootroot00000000000000database_name ============= symfonysrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt000066400000000000000000000000071266465517700274030ustar00rootroot00000000000000symfonysrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.xml000066400000000000000000000001321266465517700273630ustar00rootroot00000000000000 symfony src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.json000066400000000000000000000002201266465517700301350ustar00rootroot00000000000000{ "array": [ 12, "Hello world!", true ], "boolean": true, "integer": 12, "string": "Hello world!" } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md000066400000000000000000000002211266465517700275650ustar00rootroot00000000000000Container parameters ==================== - `array`: `[12,"Hello world!",true]` - `boolean`: `true` - `integer`: `12` - `string`: `Hello world!`src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt000066400000000000000000000003711266465517700300120ustar00rootroot00000000000000[container] List of parameters Parameter Value  array [12,"Hello world!",true] boolean true integer 12 string Hello world! src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.xml000066400000000000000000000004111266465517700277660ustar00rootroot00000000000000 [12,"Hello world!",true] true 12 Hello world! src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.json000066400000000000000000000007671266465517700271500ustar00rootroot00000000000000{ "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" } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md000066400000000000000000000006011266465517700265620ustar00rootroot00000000000000- 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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt000066400000000000000000000011001266465517700267740ustar00rootroot00000000000000Path /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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml000066400000000000000000000012131266465517700267620ustar00rootroot00000000000000 /hello/{name} localhost http https GET HEAD Joseph [a-z]+ src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json000066400000000000000000000006631266465517700271440ustar00rootroot00000000000000{ "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" } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md000066400000000000000000000005151266465517700265670ustar00rootroot00000000000000- 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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt000066400000000000000000000010361266465517700270050ustar00rootroot00000000000000Path /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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml000066400000000000000000000007261266465517700267730ustar00rootroot00000000000000 /name/add localhost http https PUT POST src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json000066400000000000000000000021311266465517700313460ustar00rootroot00000000000000{ "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" } } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md000066400000000000000000000013621266465517700310020ustar00rootroot00000000000000route_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 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt000066400000000000000000000003711266465517700312200ustar00rootroot00000000000000[router] Current routes Name  Method  Scheme  Host  Path  route_1 GET|HEAD http|https localhost /hello/{name} route_2 PUT|POST http|https localhost /name/add src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml000066400000000000000000000022531266465517700312020ustar00rootroot00000000000000 /hello/{name} localhost http https GET HEAD Joseph [a-z]+ /name/add localhost http https PUT POST src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/000077500000000000000000000000001266465517700245215ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/000077500000000000000000000000001266465517700265255ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/000077500000000000000000000000001266465517700276625ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine000066400000000000000000000000001266465517700332400ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controller/000077500000000000000000000000001266465517700320455ustar00rootroot00000000000000custom.format.engine000066400000000000000000000000001266465517700357440ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controllersrc/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/000077500000000000000000000000001266465517700272425ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/messages.fr.yml000066400000000000000000000000241266465517700321760ustar00rootroot00000000000000folder: répertoire src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/000077500000000000000000000000001266465517700256565ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/resource.format.engine000066400000000000000000000000001266465517700321510ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/this.is.a.template.format.engine000066400000000000000000000000001266465517700337340ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php000066400000000000000000000020131266465517700316640ustar00rootroot00000000000000This template is used for translation message extraction tests trans('single-quoted key') ?> trans('double-quoted key') ?> trans(<< 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) ) ?> src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/000077500000000000000000000000001266465517700246205ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/000077500000000000000000000000001266465517700260335ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/000077500000000000000000000000001266465517700277105ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/000077500000000000000000000000001266465517700320335ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006171266465517700361210ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php000066400000000000000000000010521266465517700334300ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/000077500000000000000000000000001266465517700264755ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/000077500000000000000000000000001266465517700306205ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006101266465517700346770ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub/000077500000000000000000000000001266465517700313515ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006141266465517700354340ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test/000077500000000000000000000000001266465517700315375ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006151266465517700356230ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php000066400000000000000000000006521266465517700310660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/000077500000000000000000000000001266465517700260605ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/000077500000000000000000000000001266465517700266025ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/000077500000000000000000000000001266465517700304575ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller/000077500000000000000000000000001266465517700326025ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006231266465517700366650ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller * * 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 { } SensioCmsFooBundle.php000066400000000000000000000006761266465517700346230ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/000077500000000000000000000000001266465517700277355ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller/000077500000000000000000000000001266465517700320605ustar00rootroot00000000000000DefaultController.php000066400000000000000000000006171266465517700361460ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php000066400000000000000000000006671266465517700335150ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/FrameworkBundle/Tests/Fragment/000077500000000000000000000000001266465517700225015ustar00rootroot00000000000000LegacyContainerAwareHIncludeFragmentRendererTest.php000066400000000000000000000020401266465517700346050ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Fragment * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests\Fragment; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Fragment\ContainerAwareHIncludeFragmentRenderer; use Symfony\Component\HttpFoundation\Request; /** * @group legacy */ class LegacyContainerAwareHIncludeFragmentRendererTest extends TestCase { public function testRender() { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $container->expects($this->once()) ->method('get') ->will($this->returnValue($this->getMockBuilder('\Twig_Environment')->disableOriginalConstructor()->getMock())) ; $renderer = new ContainerAwareHIncludeFragmentRenderer($container); $renderer->render('/', Request::create('/')); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/000077500000000000000000000000001266465517700230405ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/000077500000000000000000000000001266465517700242515ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/000077500000000000000000000000001266465517700263225ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/000077500000000000000000000000001266465517700304455ustar00rootroot00000000000000FragmentController.php000066400000000000000000000024251266465517700347110ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller * * 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\DependencyInjection\ContainerAware; class FragmentController extends ContainerAware { 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; } } ProfilerController.php000066400000000000000000000010711266465517700347240ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller * * 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\Response; use Symfony\Component\DependencyInjection\ContainerAware; class ProfilerController extends ContainerAware { public function indexAction() { return new Response('Hello'); } } SessionController.php000066400000000000000000000037111266465517700345700ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller * * 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\HttpFoundation\RedirectResponse; use Symfony\Component\DependencyInjection\ContainerAware; class SessionController extends ContainerAware { 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('session')->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); } } SubRequestController.php000066400000000000000000000045251266465517700352530ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller * * 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\DependencyInjection\ContainerAware; use Symfony\Component\HttpKernel\Controller\ControllerReference; class SubRequestController extends ContainerAware { 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); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/000077500000000000000000000000001266465517700322435ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config/000077500000000000000000000000001266465517700334505ustar00rootroot00000000000000CustomConfig.php000066400000000000000000000010411266465517700364760ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config * * 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() ; } } Configuration.php000066400000000000000000000016571266465517700355150ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection * * 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; } } TestExtension.php000066400000000000000000000025561266465517700355210ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection * * 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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/000077500000000000000000000000001266465517700302745ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/000077500000000000000000000000001266465517700315415ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml000066400000000000000000000025631266465517700337610ustar00rootroot00000000000000session_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 } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php000066400000000000000000000015251266465517700311070ustar00rootroot00000000000000 * * 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\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()); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php000066400000000000000000000025771266465517700300770ustar00rootroot00000000000000 * * 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()); } /** * @return CommandTester */ private function createCommandTester() { $command = $this->application->find('debug:config'); return new CommandTester($command); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php000066400000000000000000000027171266465517700315710ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php000066400000000000000000000015741266465517700261630ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php000066400000000000000000000022441266465517700261750ustar00rootroot00000000000000 * * 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->assertTrue(is_object($profile)); $client->request('GET', '/profiler'); $this->assertFalse($client->getProfile()); } public function getConfigs() { return array( array(false), array(true), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php000066400000000000000000000115751266465517700260450ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php000066400000000000000000000013121266465517700266730ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php000066400000000000000000000034721266465517700257300ustar00rootroot00000000000000 * * 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 ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/000077500000000000000000000000001266465517700236205ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php000066400000000000000000000057471266465517700262270ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/000077500000000000000000000000001266465517700256535ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/bundles.php000066400000000000000000000006671266465517700300310ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ConfigDump/config.yml000066400000000000000000000000631266465517700276420ustar00rootroot00000000000000imports: - { resource: ../config/default.yml } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/000077500000000000000000000000001266465517700253635ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php000066400000000000000000000006671266465517700275410ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/config.yml000066400000000000000000000001711266465517700273520ustar00rootroot00000000000000imports: - { resource: ../config/default.yml } framework: fragments: ~ templating: engines: ['php'] src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/routing.yml000066400000000000000000000001171266465517700275740ustar00rootroot00000000000000_fragmenttest_bundle: resource: '@TestBundle/Resources/config/routing.yml' src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/000077500000000000000000000000001266465517700254025ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php000066400000000000000000000006671266465517700275600ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/config.yml000066400000000000000000000001721266465517700273720ustar00rootroot00000000000000imports: - { resource: ../config/default.yml } framework: profiler: enabled: true collect: false src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/routing.yml000066400000000000000000000001161266465517700276120ustar00rootroot00000000000000_sessiontest_bundle: resource: '@TestBundle/Resources/config/routing.yml' src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/000077500000000000000000000000001266465517700255725ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views/000077500000000000000000000000001266465517700267275ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views/fragment.html.php000066400000000000000000000013121266465517700322030ustar00rootroot00000000000000get('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')); ?> src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/000077500000000000000000000000001266465517700252435ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php000066400000000000000000000006671266465517700274210ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/config.yml000066400000000000000000000000651266465517700272340ustar00rootroot00000000000000imports: - { resource: ./../config/default.yml } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/routing.yml000066400000000000000000000001161266465517700274530ustar00rootroot00000000000000_sessiontest_bundle: resource: '@TestBundle/Resources/config/routing.yml' src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/000077500000000000000000000000001266465517700250655ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/default.yml000066400000000000000000000000531266465517700272320ustar00rootroot00000000000000imports: - { resource: framework.yml } src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/framework.yml000066400000000000000000000006041266465517700276050ustar00rootroot00000000000000framework: secret: test csrf_protection: enabled: true router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } validation: { enabled: true, enable_annotations: true } form: ~ test: ~ default_locale: en session: storage_id: session.storage.mock_file services: logger: { class: Psr\Log\NullLogger } src/Symfony/Bundle/FrameworkBundle/Tests/Routing/000077500000000000000000000000001266465517700223655ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableUrlMatcherTest.php000066400000000000000000000037271266465517700303230ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher; use Symfony\Component\Routing\RequestContext; class RedirectableUrlMatcherTest extends \PHPUnit_Framework_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') ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php000066400000000000000000000155571266465517700252330ustar00rootroot00000000000000 * * 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 Symfony\Bundle\FrameworkBundle\Routing\Router; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class RouterTest extends \PHPUnit_Framework_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() ); } 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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $loader ->expects($this->any()) ->method('load') ->will($this->returnValue($routes)) ; $sc = $this->getMock('Symfony\\Component\\DependencyInjection\\Container', array('get')); $sc ->expects($this->once()) ->method('get') ->will($this->returnValue($loader)) ; return $sc; } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/000077500000000000000000000000001266465517700230425ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/DelegatingEngineTest.php000066400000000000000000000104251266465517700276060ustar00rootroot00000000000000 * * 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\DelegatingEngine; class DelegatingEngineTest extends \PHPUnit_Framework_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', array('foo' => 'bar'))); } /** * @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', array('foo' => 'bar')); } public function testRenderResponseWithFrameworkEngine() { $response = $this->getMock('Symfony\Component\HttpFoundation\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->getMock('Symfony\Component\Templating\EngineInterface'); $engine->expects($this->once()) ->method('supports') ->with($template) ->will($this->returnValue($supports)); return $engine; } private function getFrameworkEngineMock($template, $supports) { $engine = $this->getMock('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface'); $engine->expects($this->once()) ->method('supports') ->with($template) ->will($this->returnValue($supports)); return $engine; } private function getContainerMock($services) { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $i = 0; foreach ($services as $id => $service) { $container->expects($this->at($i++)) ->method('get') ->with($id) ->will($this->returnValue($service)); } return $container; } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php000066400000000000000000000054161266465517700274520ustar00rootroot00000000000000 * * 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); } /** * @group legacy */ public function testLegacyGetSecurity() { $securityContext = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); $this->assertNull($this->globals->getSecurity()); $this->container->set('security.context', $securityContext); $this->assertSame($securityContext, $this->globals->getSecurity()); } public function testGetUserNoTokenStorage() { $this->assertNull($this->globals->getUser()); } public function testGetUserNoToken() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $this->container->set('security.token_storage', $tokenStorage); $this->assertNull($this->globals->getUser()); } /** * @dataProvider getUserProvider */ public function testGetUser($user, $expectedUser) { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $std = new \stdClass(); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); return array( array($user, $user), array($std, $std), array($token, $token), array('Anon.', null), array(null, null), array(10, null), array(true, null), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/000077500000000000000000000000001266465517700242615ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php000066400000000000000000000034531266465517700302410ustar00rootroot00000000000000 * * 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\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper; use Symfony\Component\Asset\Package; use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; class AssetsHelperTest extends \PHPUnit_Framework_TestCase { /** * @group legacy */ public function testLegacyGetUrl() { $versionStrategy = new StaticVersionStrategy('22', '%s?version=%s'); $package = new Package($versionStrategy); $imagePackage = new PathPackage('images', $versionStrategy); $packages = new Packages($package, array('images' => $imagePackage)); $helper = new AssetsHelper($packages); $this->assertEquals('me.png?version=42', $helper->getUrl('me.png', null, '42')); $this->assertEquals('/images/me.png?version=42', $helper->getUrl('me.png', 'images', '42')); } /** * @group legacy */ public function testLegacyGetVersion() { $package = new Package(new StaticVersionStrategy('22')); $imagePackage = new Package(new StaticVersionStrategy('42')); $packages = new Packages($package, array('images' => $imagePackage)); $helper = new AssetsHelper($packages); $this->assertEquals('22', $helper->getVersion()); $this->assertEquals('22', $helper->getVersion('/foo')); $this->assertEquals('42', $helper->getVersion('images')); $this->assertEquals('42', $helper->getVersion('/foo', 'images')); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/000077500000000000000000000000001266465517700260725ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTemplateNameParser.php000066400000000000000000000021731266465517700331750ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Fixtures/StubTranslator.php000066400000000000000000000014751266465517700316010ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php000066400000000000000000000120711266465517700315370ustar00rootroot00000000000000 * * 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 $testableFeatures = array( 'choice_attr', ); 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(); } protected function renderForm(FormView $view, array $vars = array()) { return (string) $this->engine->get('form')->form($view, $vars); } protected function renderEnctype(FormView $view) { if (!method_exists($form = $this->engine->get('form'), 'enctype')) { $this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form))); } return (string) $form->enctype($view); } 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')), ); } public function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php000066400000000000000000000114461266465517700320510ustar00rootroot00000000000000 * * 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; protected $testableFeatures = array( 'choice_attr', ); 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 renderEnctype(FormView $view) { if (!method_exists($form = $this->engine->get('form'), 'enctype')) { $this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form))); } return (string) $form->enctype($view); } 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 function testRange() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testRangeWithMinMaxValues() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testLabelWithoutTranslationOnButton() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testButtonlabelWithoutTranslation() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } public function testAttributesNotTranslatedWhenTranslationDomainIsFalse() { // No-op for forward compatibility with AbstractLayoutTest 2.8 } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php000066400000000000000000000026331266465517700304260ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper; class RequestHelperTest extends \PHPUnit_Framework_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()); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/000077500000000000000000000000001266465517700262335ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Child/000077500000000000000000000000001266465517700272565ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Child/form_label.html.php000066400000000000000000000000521266465517700330310ustar00rootroot00000000000000 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/000077500000000000000000000000001266465517700275055ustar00rootroot00000000000000_name_c_entry_label.html.php000066400000000000000000000003031266465517700350370ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Customhumanize($name); } ?> _names_entry_label.html.php000066400000000000000000000003021266465517700347170ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Customhumanize($name); } ?> src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_text_id_widget.html.php000066400000000000000000000001131266465517700343160ustar00rootroot00000000000000
    widget($form) ?>
    src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/000077500000000000000000000000001266465517700274645ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent/form_label.html.php000066400000000000000000000000261266465517700332400ustar00rootroot00000000000000 form_widget_simple.html.php000066400000000000000000000002671266465517700347450ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Parent block($form, 'widget_attributes') ?> value="" rel="theme" /> src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php000066400000000000000000000037441266465517700304250ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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()); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/StopwatchHelperTest.php000066400000000000000000000020211266465517700307410ustar00rootroot00000000000000 * * 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\Bundle\FrameworkBundle\Templating\Helper\StopwatchHelper; class StopwatchHelperTest extends \PHPUnit_Framework_TestCase { public function testDevEnvironment() { $stopwatch = $this->getMock('Symfony\Component\Stopwatch\Stopwatch'); $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'); } } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Loader/000077500000000000000000000000001266465517700242505ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Loader/TemplateLocatorTest.php000066400000000000000000000050031266465517700307160ustar00rootroot00000000000000 * * 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)); } 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() ; } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php000066400000000000000000000050611266465517700262720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php000066400000000000000000000031631266465517700310070ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php000066400000000000000000000101571266465517700301500ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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('/path/to/section/name.php', '/path/to/section/name.php', '/path/to/section/name.php', new BaseTemplateReference('/path/to/section/name.php', 'php')), 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'); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateReferenceTest.php000066400000000000000000000014241266465517700300060ustar00rootroot00000000000000 * * 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() ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php000066400000000000000000000030061266465517700261650ustar00rootroot00000000000000 * * 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'), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php000066400000000000000000000067441266465517700272660ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\DependencyInjection\Container'); } /** * @return \Symfony\Component\Templating\TemplateNameParserInterface */ private function getTemplateNameParser() { $templateReference = $this->getMock('Symfony\Component\Templating\TemplateReferenceInterface'); $templateNameParser = $this->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); $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->getMock('Symfony\Component\Stopwatch\Stopwatch'); } } src/Symfony/Bundle/FrameworkBundle/Tests/TestCase.php000066400000000000000000000005261266465517700231650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests; class TestCase extends \PHPUnit_Framework_TestCase { } src/Symfony/Bundle/FrameworkBundle/Tests/Translation/000077500000000000000000000000001266465517700232345ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php000066400000000000000000000056551266465517700272430ustar00rootroot00000000000000 * * 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', )); $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)), ); } } src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php000066400000000000000000000251371266465517700267460ustar00rootroot00000000000000 * * 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\Translation\Translator; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Translation\MessageSelector; class TranslatorTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $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')); } public function testTransWithCachingWithInvalidLocale() { $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir), 'loader', '\Symfony\Bundle\FrameworkBundle\Tests\Translation\TranslatorWithInvalidLocale'); $translator->setLocale('invalid locale'); $this->setExpectedException('\InvalidArgumentException'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $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->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $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->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $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 setLocale($locale) { $this->locale = $locale; } } src/Symfony/Bundle/FrameworkBundle/Tests/Validator/000077500000000000000000000000001266465517700226635ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Tests/Validator/ConstraintValidatorFactoryTest.php000066400000000000000000000046611266465517700315650ustar00rootroot00000000000000 * * 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 Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\Validator\Constraints\Blank as BlankConstraint; class ConstraintValidatorFactoryTest extends \PHPUnit_Framework_TestCase { public function testGetInstanceCreatesValidator() { $class = get_class($this->getMockForAbstractClass('Symfony\\Component\\Validator\\ConstraintValidator')); $constraint = $this->getMock('Symfony\\Component\\Validator\\Constraint'); $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->getMock('Symfony\\Component\\DependencyInjection\\ContainerBuilder', array('get')); $container ->expects($this->once()) ->method('get') ->with($service) ->will($this->returnValue($validator)); $constraint = $this->getMock('Symfony\\Component\\Validator\\Constraint'); $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)); } } src/Symfony/Bundle/FrameworkBundle/Translation/000077500000000000000000000000001266465517700221325ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php000066400000000000000000000121431266465517700252670ustar00rootroot00000000000000 * * 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; /** * 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, ), 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; } } } /** * Extracts the message from the iterator while the tokens * match allowed message tokens. */ private function getMessage(\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 = ''; $tokenIterator->seek($key); foreach ($sequence as $item) { $this->seekToNextRelevantToken($tokenIterator); if ($this->normalizeToken($tokenIterator->current()) == $item) { $tokenIterator->next(); continue; } elseif (self::MESSAGE_TOKEN == $item) { $message = $this->getMessage($tokenIterator); break; } else { break; } } if ($message) { $catalog->set($message, $this->prefix.$message); break; } } } } /** * @param string $file * * @throws \InvalidArgumentException * * @return bool */ 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); } } src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php000066400000000000000000000104701266465517700267410ustar00rootroot00000000000000 * * 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 ); } public 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)); } } } } src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php000066400000000000000000000077731266465517700250120ustar00rootroot00000000000000 * * 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; /** * 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]); } } } } src/Symfony/Bundle/FrameworkBundle/Validator/000077500000000000000000000000001266465517700215615ustar00rootroot00000000000000src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php000066400000000000000000000052341266465517700276200ustar00rootroot00000000000000 * * 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\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 UnexpectedTypeException When the validator is not an instance of ConstraintValidatorInterface */ public function getInstance(Constraint $constraint) { $name = $constraint->validatedBy(); if (!isset($this->validators[$name])) { $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]; } } src/Symfony/Bundle/FrameworkBundle/composer.json000066400000000000000000000045671266465517700223720ustar00rootroot00000000000000{ "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.3.9", "symfony/asset": "~2.7", "symfony/dependency-injection": "~2.6,>=2.6.2", "symfony/config": "~2.4", "symfony/event-dispatcher": "~2.5", "symfony/finder": "~2.0,>=2.0.5", "symfony/http-foundation": "~2.4.9|~2.5,>=2.5.4", "symfony/http-kernel": "~2.7", "symfony/filesystem": "~2.3", "symfony/routing": "~2.6,>2.6.4", "symfony/security-core": "~2.6.13|~2.7.9|~2.8", "symfony/security-csrf": "~2.6", "symfony/stopwatch": "~2.3", "symfony/templating": "~2.1", "symfony/translation": "~2.7", "doctrine/annotations": "~1.0" }, "require-dev": { "symfony/browser-kit": "~2.4", "symfony/console": "~2.7", "symfony/css-selector": "~2.0,>=2.0.5", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/intl": "~2.3", "symfony/security": "~2.6", "symfony/form": "~2.7,>=2.7.2", "symfony/class-loader": "~2.1", "symfony/expression-language": "~2.6", "symfony/process": "~2.0,>=2.0.5", "symfony/validator": "~2.5", "symfony/yaml": "~2.0,>=2.0.5" }, "suggest": { "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/process": "For using the server:run, server:start, server:stop, and server:status commands", "doctrine/cache": "For using alternative cache drivers" }, "autoload": { "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist000066400000000000000000000014711266465517700230120ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Bundle/SecurityBundle/000077500000000000000000000000001266465517700175065ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/.gitignore000066400000000000000000000000421266465517700214720ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Bundle/SecurityBundle/CHANGELOG.md000066400000000000000000000072221266465517700213220ustar00rootroot00000000000000CHANGELOG ========= 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. src/Symfony/Bundle/SecurityBundle/Command/000077500000000000000000000000001266465517700210645ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php000066400000000000000000000043201266465517700244160ustar00rootroot00000000000000 * * 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.'); } } src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php000066400000000000000000000135441266465517700242560ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php000066400000000000000000000136151266465517700270430ustar00rootroot00000000000000 * * 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) { $output = new SymfonyStyle($input, $output); $input->isInteractive() ? $output->title('Symfony Password Encoder Utility') : $output->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()) { $output->error('The password must not be empty.'); return 1; } $passwordQuestion = $this->createPasswordQuestion($input, $output); $password = $output->askQuestion($passwordQuestion); } $salt = null; if ($input->isInteractive() && !$emptySalt) { $emptySalt = true; $output->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 ($output->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); } $output->table(array('Key', 'Value'), $rows); if (!$emptySalt) { $output->note(sprintf('Make sure that your salt storage field fits the salt length: %s chars', strlen($salt))); } elseif ($bcryptWithoutEmptySalt) { $output->note('Bcrypt encoder used: the encoder generated its own built-in salt.'); } $output->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($this->getContainer()->get('security.secure_random')->nextBytes(30)); } } src/Symfony/Bundle/SecurityBundle/DataCollector/000077500000000000000000000000001266465517700222265ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php000066400000000000000000000113761266465517700272170ustar00rootroot00000000000000 * * 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; /** * SecurityDataCollector. * * @author Fabien Potencier */ class SecurityDataCollector extends DataCollector { private $tokenStorage; private $roleHierarchy; /** * Constructor. * * @param TokenStorageInterface|null $tokenStorage * @param RoleHierarchyInterface|null $roleHierarchy */ public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null) { $this->tokenStorage = $tokenStorage; $this->roleHierarchy = $roleHierarchy; } /** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { if (null === $this->tokenStorage) { $this->data = array( 'enabled' => false, 'authenticated' => false, 'token_class' => 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_class' => 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; } } } $this->data = array( 'enabled' => true, 'authenticated' => $token->isAuthenticated(), 'token_class' => get_class($token), 'user' => $token->getUsername(), 'roles' => array_map(function (RoleInterface $role) { return $role->getRole();}, $assignedRoles), 'inherited_roles' => array_map(function (RoleInterface $role) { return $role->getRole(); }, $inheritedRoles), 'supports_role_hierarchy' => null !== $this->roleHierarchy, ); } } /** * 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']; } /** * {@inheritdoc} */ public function getName() { return 'security'; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/000077500000000000000000000000001266465517700234275ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/000077500000000000000000000000001266465517700252015ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php000066400000000000000000000025651266465517700321740ustar00rootroot00000000000000 * * 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\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds all configured security voters to the access decision manager. * * @author Johannes M. Schmitt */ class AddSecurityVotersPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('security.access.decision_manager')) { return; } $voters = new \SplPriorityQueue(); foreach ($container->findTaggedServiceIds('security.voter') as $id => $attributes) { $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; $voters->insert(new Reference($id), $priority); } $voters = iterator_to_array($voters); ksort($voters); $container->getDefinition('security.access.decision_manager')->replaceArgument(0, array_values($voters)); } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php000066400000000000000000000461001266465517700275550ustar00rootroot00000000000000 * * 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('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() ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['csrf_provider']) && isset($v['csrf_token_generator']); }) ->thenInvalid("You should define a value for only one of 'csrf_provider' and 'csrf_token_generator' on a security firewall. Use 'csrf_token_generator' as this replaces 'csrf_provider'.") ->end() ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['intention']) && isset($v['csrf_token_id']); }) ->thenInvalid("You should define a value for only one of 'intention' and 'csrf_token_id' on a security firewall. Use 'csrf_token_id' as this replaces 'intention'.") ->end() ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['csrf_provider']); }) ->then(function ($v) { $v['csrf_token_generator'] = $v['csrf_provider']; unset($v['csrf_provider']); return $v; }) ->end() ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['intention']); }) ->then(function ($v) { $v['csrf_token_id'] = $v['intention']; unset($v['intention']); return $v; }) ->end() ->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('key')->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( 'Acme\DemoBundle\Entity\User1' => 'sha512', 'Acme\DemoBundle\Entity\User2' => array( 'algorithm' => 'sha512', 'encode_as_base64' => 'true', 'iterations' => 5000, ), )) ->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() ; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/000077500000000000000000000000001266465517700252365ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/000077500000000000000000000000001266465517700266455ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php000066400000000000000000000177541266465517700324670ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php000066400000000000000000000056151266465517700326110ustar00rootroot00000000000000 * * 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('intention', '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_provider')->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(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_provider']) ? new Reference($config['csrf_provider']) : 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; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php000066400000000000000000000050041266465517700325660ustar00rootroot00000000000000 * * 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(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; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php000066400000000000000000000053051266465517700327700ustar00rootroot00000000000000 * * 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(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('key')->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['key']) ; return $entryPointId; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php000066400000000000000000000126261266465517700327350ustar00rootroot00000000000000 * * 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')) ->addArgument($config['key']) ->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['key']); $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, $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) { $node->fixXmlConfig('user_provider'); $builder = $node->children(); $builder ->scalarNode('key')->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); } } } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RemoteUserFactory.php000066400000000000000000000037701266465517700330070ustar00rootroot00000000000000 * * 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)) ->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() ; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php000066400000000000000000000020121266465517700343310ustar00rootroot00000000000000 * * 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 { 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(); public function getKey(); public function addConfiguration(NodeDefinition $builder); } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimpleFormFactory.php000066400000000000000000000063051266465517700327670ustar00rootroot00000000000000 * * 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; } 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; } } SimplePreAuthenticationFactory.php000066400000000000000000000037361266465517700354400ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory * * 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); } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php000066400000000000000000000041201266465517700313500ustar00rootroot00000000000000 * * 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)) ->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() ; } } src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/000077500000000000000000000000001266465517700276675ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php000066400000000000000000000043641266465517700334760ustar00rootroot00000000000000 * * 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() ; } } UserProviderFactoryInterface.php000066400000000000000000000015141266465517700361240ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider * * 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); } src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php000066400000000000000000000647751266465517700276670ustar00rootroot00000000000000 * * 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\DependencyInjection\Parameter; 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'); 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\\FirewallMap', 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext', 'Symfony\\Component\\HttpFoundation\\RequestMatcher', )); } private function aclLoad($config, ContainerBuilder $container) { $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'])) { $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) { list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $name, $firewall, $authenticationProviders, $providerIds); $contextId = 'security.firewall.map.context.'.$name; $context = $container->setDefinition($contextId, new DefinitionDecorator('security.firewall.context')); $context ->replaceArgument(0, $listeners) ->replaceArgument(1, $exceptionListener) ; $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) { // 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); } // Security disabled? if (false === $firewall['security']) { return array($matcher, array(), null); } // Provider id (take the first registered provider if none defined) if (isset($firewall['provider'])) { $defaultProvider = $this->getUserProviderId($firewall['provider']); } else { $defaultProvider = reset($providerIds); } // Register listeners $listeners = array(); // Channel listener $listeners[] = new Reference('security.channel_listener'); // Context serializer listener if (false === $firewall['stateless']) { $contextKey = $id; if (isset($firewall['context'])) { $contextKey = $firewall['context']; } $listeners[] = new Reference($this->createContextListener($container, $contextKey)); } // Logout listener if (isset($firewall['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'], 'intention' => $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); $listeners = array_merge($listeners, $authListeners); // Switch user listener if (isset($firewall['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'])); 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']['key']) ; $listeners[] = new Reference($listenerId); $providerId = 'security.authentication.provider.anonymous.'.$id; $container ->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.anonymous')) ->replaceArgument(0, $firewall['anonymous']['key']) ; $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' => new Parameter('security.encoder.plain.class'), 'arguments' => $arguments, ); } // pbkdf2 encoder if ('pbkdf2' === $config['algorithm']) { return array( 'class' => new Parameter('security.encoder.pbkdf2.class'), 'arguments' => array( $config['hash_algorithm'], $config['encode_as_base64'], $config['iterations'], $config['key_length'], ), ); } // bcrypt encoder if ('bcrypt' === $config['algorithm']) { return array( 'class' => new Parameter('security.encoder.bcrypt.class'), 'arguments' => array($config['cost']), ); } // message digest encoder return array( 'class' => new Parameter('security.encoder.digest.class'), 'arguments' => array( $config['algorithm'], $config['encode_as_base64'], $config['iterations'], ), ); } // 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(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, '%security.matcher.class%') ->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; } } src/Symfony/Bundle/SecurityBundle/EventListener/000077500000000000000000000000001266465517700222755ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php000066400000000000000000000014571266465517700263430ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/SecurityBundle/LICENSE000066400000000000000000000020511266465517700205110ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Bundle/SecurityBundle/Resources/000077500000000000000000000000001266465517700214605ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Resources/config/000077500000000000000000000000001266465517700227255ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.xml000066400000000000000000000015331266465517700256220ustar00rootroot00000000000000 Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml000066400000000000000000000254341266465517700253260ustar00rootroot00000000000000 Symfony\Component\Security\Core\SecurityContext Symfony\Component\Security\Core\User\UserChecker Symfony\Component\Security\Core\Encoder\EncoderFactory Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder Symfony\Component\Security\Core\User\InMemoryUserProvider Symfony\Component\Security\Core\User\User Symfony\Component\Security\Core\User\ChainUserProvider Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver Symfony\Component\Security\Core\Authentication\Token\AnonymousToken Symfony\Component\Security\Core\Authentication\Token\RememberMeToken Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy Symfony\Component\Security\Core\Authorization\AccessDecisionManager Symfony\Component\Security\Core\Authorization\Voter\RoleVoter Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter Symfony\Component\Security\Http\Firewall Symfony\Bundle\SecurityBundle\Security\FirewallMap Symfony\Bundle\SecurityBundle\Security\FirewallContext Symfony\Component\HttpFoundation\RequestMatcher Symfony\Component\HttpFoundation\ExpressionRequestMatcher Symfony\Component\Security\Core\Role\RoleHierarchy Symfony\Component\Security\Http\HttpUtils Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator Symfony\Component\Security\Core\Authorization\ExpressionLanguage %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% src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml000066400000000000000000000055441266465517700261450ustar00rootroot00000000000000 Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy Symfony\Component\Security\Acl\Voter\AclVoter Symfony\Component\Security\Acl\Permission\BasicPermissionMap Symfony\Component\Security\Acl\Domain\ObjectIdentityRetrievalStrategy Symfony\Component\Security\Acl\Domain\SecurityIdentityRetrievalStrategy Symfony\Component\Security\Acl\Domain\AclCollectionCache Symfony\Component\Security\Acl\Domain\DoctrineAclCache src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml000066400000000000000000000062021266465517700271170ustar00rootroot00000000000000 Symfony\Component\Security\Acl\Dbal\MutableAclProvider Symfony\Component\Security\Acl\Dbal\Schema Symfony\Bundle\SecurityBundle\EventListener\AclSchemaListener %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% src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml000066400000000000000000000424211266465517700274110ustar00rootroot00000000000000 Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint Symfony\Component\Security\Http\Firewall\ChannelListener Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener Symfony\Component\Security\Http\Firewall\SimpleFormAuthenticationListener Symfony\Component\Security\Http\Firewall\SimplePreAuthenticationListener Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint Symfony\Component\Security\Http\Firewall\X509AuthenticationListener Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener Symfony\Component\Security\Http\Firewall\SwitchUserListener Symfony\Component\Security\Http\Firewall\LogoutListener Symfony\Component\Security\Http\Logout\SessionLogoutHandler Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler Symfony\Component\Security\Http\Firewall\AccessListener Symfony\Component\Security\Http\AccessMap Symfony\Component\Security\Http\Firewall\ExceptionListener Symfony\Component\Security\Http\Firewall\ContextListener Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthenticationProvider Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler Symfony\Component\Security\Http\Authentication\SimpleAuthenticationHandler %request_listener.http_port% %request_listener.https_port% / %security.authentication.hide_user_not_found% %security.access.denied_url% false _switch_user ROLE_ALLOWED_TO_SWITCH src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml000066400000000000000000000073561266465517700275310ustar00rootroot00000000000000 Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider Symfony\Component\Security\Http\Firewall\RememberMeListener Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices Symfony\Component\Security\Http\RememberMe\ResponseListener src/Symfony/Bundle/SecurityBundle/Resources/config/templating_php.xml000066400000000000000000000021611266465517700264620ustar00rootroot00000000000000 Symfony\Bundle\SecurityBundle\Templating\Helper\LogoutUrlHelper Symfony\Bundle\SecurityBundle\Templating\Helper\SecurityHelper src/Symfony/Bundle/SecurityBundle/Resources/config/templating_twig.xml000066400000000000000000000020651266465517700266500ustar00rootroot00000000000000 Symfony\Bridge\Twig\Extension\LogoutUrlExtension Symfony\Bridge\Twig\Extension\SecurityExtension src/Symfony/Bundle/SecurityBundle/Resources/views/000077500000000000000000000000001266465517700226155ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/000077500000000000000000000000001266465517700245435ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig000066400000000000000000000173761266465517700302670ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% if collector.tokenClass %} {% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %} {% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %} {% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %} {% else %} {% set color_code = collector.enabled ? 'red' : 'black' %} {% endif %} {% set text %} {% if collector.tokenClass %}
    Logged in as {{ collector.user }}
    Authenticated {{ authentication_color_text }}
    {% if collector.tokenClass != null %}
    Token class {{ collector.tokenClass|abbr_class }}
    {% endif %} {% elseif collector.enabled %} You are not authenticated. {% else %} The security is disabled. {% endif %} {% endset %} {% set icon %} {% if collector.user %}
    {{ collector.user }}
    {% endif %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Security {% endblock %} {% block panel %}

    Security

    {% if collector.tokenClass %} {% if collector.supportsRoleHierarchy %} {% endif %} {% if collector.tokenClass != null %} {% endif %}
    Username {{ collector.user }}
    Authenticated? {% if collector.authenticated %} yes {% else %} no {% if not collector.roles|length %}(probably because the user has no roles){% endif %} {% endif %}
    Roles {{ collector.roles|yaml_encode }}
    Inherited Roles {{ collector.inheritedRoles|yaml_encode }}
    Token class {{ collector.tokenClass }}
    {% elseif collector.enabled %}

    No token

    {% else %}

    The security component is disabled

    {% endif %} {% endblock %} src/Symfony/Bundle/SecurityBundle/Security/000077500000000000000000000000001266465517700213155ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php000066400000000000000000000017111266465517700251400ustar00rootroot00000000000000 * * 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; public function __construct(array $listeners, ExceptionListener $exceptionListener = null) { $this->listeners = $listeners; $this->exceptionListener = $exceptionListener; } public function getContext() { return array($this->listeners, $this->exceptionListener); } } src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php000066400000000000000000000023271266465517700242350ustar00rootroot00000000000000 * * 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; public function __construct(ContainerInterface $container, array $map) { $this->container = $container; $this->map = $map; } public function getListeners(Request $request) { foreach ($this->map as $contextId => $requestMatcher) { if (null === $requestMatcher || $requestMatcher->matches($request)) { return $this->container->get($contextId)->getContext(); } } return array(array(), null); } } src/Symfony/Bundle/SecurityBundle/SecurityBundle.php000066400000000000000000000043611266465517700231640ustar00rootroot00000000000000 * * 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\HttpBasicFactory; 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; /** * 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 HttpBasicFactory()); $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->addUserProviderFactory(new InMemoryFactory()); $container->addCompilerPass(new AddSecurityVotersPass()); } } src/Symfony/Bundle/SecurityBundle/Templating/000077500000000000000000000000001266465517700216125ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Templating/Helper/000077500000000000000000000000001266465517700230315ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php000066400000000000000000000056001266465517700266370ustar00rootroot00000000000000 * * 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\DependencyInjection\ContainerInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; 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 ContainerInterface|LogoutUrlGenerator $generator A ContainerInterface or LogoutUrlGenerator instance * @param UrlGeneratorInterface|null $router The router service * @param TokenStorageInterface|null $tokenStorage The token storage service * * @deprecated Passing a ContainerInterface as a first argument is deprecated since 2.7 and will be removed in 3.0. * @deprecated Passing a second and third argument is deprecated since 2.7 and will be removed in 3.0. */ public function __construct($generator, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) { if ($generator instanceof ContainerInterface) { @trigger_error('The '.__CLASS__.' constructor will require a LogoutUrlGenerator instead of a ContainerInterface instance in 3.0.', E_USER_DEPRECATED); if ($generator->has('security.logout_url_generator')) { $this->generator = $generator->get('security.logout_url_generator'); } else { $this->generator = new LogoutUrlGenerator($generator->get('request_stack'), $router, $tokenStorage); } } else { $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'; } } src/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.php000066400000000000000000000023601266465517700265120ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Bundle/SecurityBundle/Tests/000077500000000000000000000000001266465517700206105ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/000077500000000000000000000000001266465517700233305ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php000066400000000000000000000121001266465517700311430ustar00rootroot00000000000000 * * 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 Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector; 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; class SecurityDataCollectorTest extends \PHPUnit_Framework_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()); } 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()); } /** * @group legacy */ public function testLegacyCollectWhenAuthenticationTokenIsNull() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); $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()); } /** @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()); $this->assertSame($inheritedRoles, $collector->getInheritedRoles()); $this->assertSame('hhamon', $collector->getUser()); } 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(); } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/000077500000000000000000000000001266465517700245315ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php000066400000000000000000000235371266465517700324140ustar00rootroot00000000000000 * * 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\Reference; use Symfony\Component\DependencyInjection\Parameter; use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; abstract class CompleteConfigurationTest extends \PHPUnit_Framework_TestCase { private static $containerCache = array(); abstract protected function loadFromFile(ContainerBuilder $container, $file); 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(); 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']); } $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', ), ), $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 $rule) { list($matcherId, $attributes, $channel) = $rule; $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($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' => new Parameter('security.encoder.plain.class'), 'arguments' => array(false), ), 'JMS\FooBundle\Entity\User2' => array( 'class' => new Parameter('security.encoder.digest.class'), 'arguments' => array('sha1', false, 5), ), 'JMS\FooBundle\Entity\User3' => array( 'class' => new Parameter('security.encoder.digest.class'), 'arguments' => array('md5', true, 5000), ), 'JMS\FooBundle\Entity\User4' => new Reference('security.encoder.foo'), 'JMS\FooBundle\Entity\User5' => array( 'class' => new Parameter('security.encoder.pbkdf2.class'), 'arguments' => array('sha1', false, 5, 30), ), 'JMS\FooBundle\Entity\User6' => array( 'class' => new Parameter('security.encoder.bcrypt.class'), '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)); } protected function getContainer($file) { 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->loadFromFile($container, $file); $container->getCompilerPassConfig()->setOptimizationPasses(array()); $container->getCompilerPassConfig()->setRemovingPasses(array()); $container->compile(); return self::$containerCache[$file] = $container; } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/000077500000000000000000000000001266465517700263425ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/000077500000000000000000000000001266465517700307735ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/UserProvider/DummyProvider.php000066400000000000000000000011421266465517700343100ustar00rootroot00000000000000loadFromExtension('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('key' => 'TheKey'), 'form_login' => true, 'anonymous' => true, 'switch_user' => true, 'x509' => true, 'remote_user' => true, 'logout' => true, 'remember_me' => array('key' => 'TheKey'), ), 'host' => array( 'pattern' => '/test', 'host' => 'foo\\.example\\.org', 'methods' => array('GET', 'POST'), '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', ), )); src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php000066400000000000000000000002401266465517700337010ustar00rootroot00000000000000load('container1.php', $container); $container->loadFromExtension('security', array( 'acl' => array( 'provider' => 'foo', ), )); src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php000066400000000000000000000006071266465517700307440ustar00rootroot00000000000000load('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'), ), )); src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php000066400000000000000000000004661266465517700323410ustar00rootroot00000000000000loadFromExtension('security', array( 'firewalls' => array( 'main' => array( 'form_login' => array( 'login_path' => '/login', ), ), ), 'role_hierarchy' => array( 'FOO' => 'BAR', 'ADMIN' => 'USER', ), )); src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php000066400000000000000000000006551266465517700337020ustar00rootroot00000000000000loadFromExtension('security', array( 'providers' => array( 'default' => array('id' => 'foo'), ), 'firewalls' => array( 'main' => array( 'form_login' => true, 'remember_me' => array( 'key' => 'TheyKey', 'catch_exceptions' => false, 'token_provider' => 'token_provider_id', ), ), ), )); src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/000077500000000000000000000000001266465517700271425ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml000066400000000000000000000054501266465517700317330ustar00rootroot00000000000000 ROLE_USER ROLE_USER,ROLE_ADMIN,ROLE_ALLOWED_TO_SWITCH ROLE_USER,ROLE_ADMIN src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml000066400000000000000000000007531266465517700337340ustar00rootroot00000000000000 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml000066400000000000000000000012241266465517700307620ustar00rootroot00000000000000 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml000066400000000000000000000010601266465517700323520ustar00rootroot00000000000000 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml000066400000000000000000000012521266465517700337160ustar00rootroot00000000000000 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/000077500000000000000000000000001266465517700271435ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml000066400000000000000000000044721266465517700317400ustar00rootroot00000000000000security: 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: key: TheKey form_login: true anonymous: true switch_user: true x509: true remote_user: true logout: true remember_me: key: TheKey host: pattern: /test host: foo\.example\.org methods: [GET,POST] anonymous: true http_basic: true 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/'" } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml000066400000000000000000000001261266465517700337300ustar00rootroot00000000000000imports: - { resource: container1.yml } security: acl: provider: foo src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml000066400000000000000000000003431266465517700307650ustar00rootroot00000000000000imports: - { resource: merge_import.yml } security: providers: default: { id: foo } firewalls: main: form_login: false http_basic: ~ role_hierarchy: FOO: [MOO] src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml000066400000000000000000000002341266465517700323560ustar00rootroot00000000000000security: firewalls: main: form_login: login_path: /login role_hierarchy: FOO: BAR ADMIN: USER src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml000066400000000000000000000004101266465517700337130ustar00rootroot00000000000000security: providers: default: id: foo firewalls: main: form_login: true remember_me: key: TheKey catch_exceptions: false token_provider: token_provider_id src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php000066400000000000000000000072171266465517700315250ustar00rootroot00000000000000 * * 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\Bundle\SecurityBundle\DependencyInjection\MainConfiguration; use Symfony\Component\Config\Definition\Processor; class MainConfigurationTest extends \PHPUnit_Framework_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()); $config = $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()); $config = $processor->processConfiguration($configuration, array($config)); } public function testCsrfAliases() { $config = array( 'firewalls' => array( 'stub' => array( 'logout' => array( 'csrf_provider' => 'a_token_generator', 'intention' => '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']); } /** * @expectedException \InvalidArgumentException */ public function testCsrfOriginalAndAliasValueCausesException() { $config = array( 'firewalls' => array( 'stub' => array( 'logout' => array( 'csrf_token_id' => 'a_token_id', 'intention' => 'old_name', ), ), ), ); $config = array_merge(static::$minimalConfig, $config); $processor = new Processor(); $configuration = new MainConfiguration(array(), array()); $processedConfig = $processor->processConfiguration($configuration, array($config)); } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/PhpCompleteConfigurationTest.php000066400000000000000000000013701266465517700330530ustar00rootroot00000000000000 * * 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 loadFromFile(ContainerBuilder $container, $file) { $loadXml = new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php')); $loadXml->load($file.'.php'); } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/000077500000000000000000000000001266465517700263405ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/000077500000000000000000000000001266465517700277475ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php000066400000000000000000000132251266465517700344160ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class AbstractFactoryTest extends \PHPUnit_Framework_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); } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php000066400000000000000000000072111266465517700316070ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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(); } 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; } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php000066400000000000000000000013701266465517700330640ustar00rootroot00000000000000 * * 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 loadFromFile(ContainerBuilder $container, $file) { $loadXml = new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/xml')); $loadXml->load($file.'.xml'); } } src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/YamlCompleteConfigurationTest.php000066400000000000000000000013731266465517700332310ustar00rootroot00000000000000 * * 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 loadFromFile(ContainerBuilder $container, $file) { $loadXml = new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/yml')); $loadXml->load($file.'.yml'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/000077500000000000000000000000001266465517700227125ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php000066400000000000000000000013061266465517700312420ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/000077500000000000000000000000001266465517700241235ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/000077500000000000000000000000001266465517700257545ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php000066400000000000000000000007121266465517700303160ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/000077500000000000000000000000001266465517700272305ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php000066400000000000000000000006461266465517700304540ustar00rootroot00000000000000 * * 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; } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/000077500000000000000000000000001266465517700277675ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/000077500000000000000000000000001266465517700321125ustar00rootroot00000000000000LoginController.php000066400000000000000000000023751266465517700356670ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller * * 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\ContainerAware; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AccessDeniedException; class LoginController extends ContainerAware { public function loginAction() { $form = $this->container->get('form.factory')->create('user_login'); 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())); } } CsrfFormLoginBundle.php000066400000000000000000000006421266465517700342670ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle * * 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 { } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/000077500000000000000000000000001266465517700306725ustar00rootroot00000000000000UserLoginFormType.php000066400000000000000000000055521266465517700347300ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form * * 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\Request; 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 UserLoginFormType extends AbstractType { private $request; /** * @param Request $request A request instance */ public function __construct(Request $request) { $this->request = $request; } /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('username', 'text') ->add('password', 'password') ->add('_target_path', 'hidden') ; $request = $this->request; /* 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 intention must correspond to that for the form login * listener in order for the CSRF token to validate successfully. */ $resolver->setDefaults(array( 'intention' => 'authenticate', )); } /** * {@inheritdoc} */ public function getName() { return 'user_login'; } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/000077500000000000000000000000001266465517700317415ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/config/000077500000000000000000000000001266465517700332065ustar00rootroot00000000000000routing.yml000066400000000000000000000016031266465517700353410ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/configform_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 } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/000077500000000000000000000000001266465517700330765ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login/000077500000000000000000000000001266465517700341465ustar00rootroot00000000000000after_login.html.twig000066400000000000000000000004461266465517700402230ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login{% extends "::base.html.twig" %} {% block body %} Hello {{ app.user.username }}!

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

    Log out. Log out. {% endblock %} login.html.twig000066400000000000000000000005161266465517700370400ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Resources/views/Login{% 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 %} src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/000077500000000000000000000000001266465517700310565ustar00rootroot00000000000000DependencyInjection/000077500000000000000000000000001266465517700347205ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundleFirewallEntryPointExtension.php000066400000000000000000000015261266465517700431330ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection * * 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'); } } FirewallEntryPointBundle.php000066400000000000000000000006541266465517700364500ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle * * 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 { } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/000077500000000000000000000000001266465517700330305ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/config/000077500000000000000000000000001266465517700342755ustar00rootroot00000000000000services.xml000066400000000000000000000010051266465517700365570ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Resources/config src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/000077500000000000000000000000001266465517700326655ustar00rootroot00000000000000EntryPointStub.php000066400000000000000000000015571266465517700363000ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security * * 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); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/000077500000000000000000000000001266465517700271515ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/000077500000000000000000000000001266465517700312745ustar00rootroot00000000000000LocalizedController.php000066400000000000000000000034331266465517700357030ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller * * 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\Security\Core\Security; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\DependencyInjection\ContainerAware; class LocalizedController extends ContainerAware { 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'); } } LoginController.php000066400000000000000000000032771266465517700350530ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller * * 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\Security\Core\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Security; use Symfony\Component\DependencyInjection\ContainerAware; class LoginController extends ContainerAware { 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:Login:login.html.twig', array( // last username entered by the user 'last_username' => $request->getSession()->get(Security::LAST_USERNAME), 'error' => $error, )); } public function afterLoginAction() { return $this->container->get('templating')->renderResponse('FormLoginBundle: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())); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/000077500000000000000000000000001266465517700330725ustar00rootroot00000000000000FormLoginExtension.php000066400000000000000000000015751266465517700373250ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection * * 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')) ; } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php000066400000000000000000000006321266465517700327110ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/000077500000000000000000000000001266465517700311235ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/config/000077500000000000000000000000001266465517700323705ustar00rootroot00000000000000localized_routing.yml000066400000000000000000000017521266465517700365560ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/configlocalized_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}$" } routing.yml000066400000000000000000000021331266465517700345220ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/configform_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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/000077500000000000000000000000001266465517700322605ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Localized/000077500000000000000000000000001266465517700341665ustar00rootroot00000000000000login.html.twig000066400000000000000000000011071266465517700370550ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Localized{% extends "::base.html.twig" %} {% block body %} {% if error %}
    {{ error.message }}
    {% endif %}
    {% endblock %} src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login/000077500000000000000000000000001266465517700333305ustar00rootroot00000000000000after_login.html.twig000066400000000000000000000007621266465517700374060ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login{% extends "::base.html.twig" %} {% block body %} Hello {{ app.user.username }}!

    You're browsing to path "{{ app.request.pathInfo }}". Log out. Log out. Log out. Log out. Log out. Log out. {% endblock %} login.html.twig000066400000000000000000000011031266465517700362130ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Resources/views/Login{% extends "::base.html.twig" %} {% block body %} {% if error %}
    {{ error.message }}
    {% endif %}
    {% endblock %} src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Security/000077500000000000000000000000001266465517700307605ustar00rootroot00000000000000LocalizedFormFailureHandler.php000066400000000000000000000022041266465517700367500ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Security * * 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)); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php000066400000000000000000000076001266465517700270000ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php000066400000000000000000000032461266465517700300710ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php000066400000000000000000000103111266465517700261530ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php000066400000000000000000000055131266465517700305000ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php000066400000000000000000000115311266465517700316470ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php000066400000000000000000000171501266465517700267410ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php000066400000000000000000000057531266465517700263750ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php000066400000000000000000000135271266465517700315330ustar00rootroot00000000000000 * * 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() { $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() { $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; } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php000066400000000000000000000034761266465517700256060ustar00rootroot00000000000000 * * 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 (!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 ); } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/000077500000000000000000000000001266465517700234725ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/000077500000000000000000000000001266465517700241715ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php000066400000000000000000000007771266465517700263510ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml000066400000000000000000000010651266465517700261630ustar00rootroot00000000000000imports: - { 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]} src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php000066400000000000000000000062651266465517700260750ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/000077500000000000000000000000001266465517700262045ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php000066400000000000000000000010121266465517700303430ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/config.yml000066400000000000000000000031121266465517700301710ustar00rootroot00000000000000imports: - { resource: ./../config/default.yml } services: csrf_form_login.form.type: class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginFormType scope: request arguments: - '@request' tags: - { name: form.type, alias: user_login } 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_provider: security.csrf.token_manager anonymous: ~ logout: path: /logout_path target: / csrf_provider: security.csrf.token_manager access_control: - { path: .*, roles: IS_AUTHENTICATED_FULLY } src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routes_as_path.yml000066400000000000000000000005471266465517700317550ustar00rootroot00000000000000imports: - { 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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/routing.yml000066400000000000000000000001331266465517700304130ustar00rootroot00000000000000_csrf_form_login_bundle: resource: '@CsrfFormLoginBundle/Resources/config/routing.yml' src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/000077500000000000000000000000001266465517700272735ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php000066400000000000000000000007441266465517700314450ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config.yml000066400000000000000000000016671266465517700312750ustar00rootroot00000000000000framework: secret: test csrf_protection: enabled: true router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } validation: { enabled: true, enable_annotations: true } form: ~ 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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/config_form_login.yml000066400000000000000000000002551266465517700335000ustar00rootroot00000000000000imports: - { resource: ./config.yml } security: firewalls: secure: pattern: ^/ form_login: check_path: /login_check src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/routing.yml000066400000000000000000000000541266465517700315040ustar00rootroot00000000000000secure_resource: path: /secure/resource src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/000077500000000000000000000000001266465517700264125ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/bundles.php000066400000000000000000000005611266465517700305610ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/config.yml000066400000000000000000000013721266465517700304050ustar00rootroot00000000000000imports: - { 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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/PasswordEncode/emptysalt.txt000066400000000000000000000013171266465517700311770ustar00rootroot00000000000000 Symfony Password Encoder Utility ================================ ------------------ ------------------------------------------------------------------ Key Value ------------------ ------------------------------------------------------------------ Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder Encoded password password ------------------ ------------------------------------------------------------------ [OK] Password encoding succeeded src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/000077500000000000000000000000001266465517700254445ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/000077500000000000000000000000001266465517700266015ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig000066400000000000000000000004711266465517700313540ustar00rootroot00000000000000 {% block title %}Welcome!{% endblock %} {% block stylesheets %}{% endblock %} {% block body %}{% endblock %} {% block javascripts %}{% endblock %} src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/000077500000000000000000000000001266465517700270475ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php000066400000000000000000000011211266465517700312070ustar00rootroot00000000000000 * * 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(), ); src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/config.yml000066400000000000000000000032351266465517700310420ustar00rootroot00000000000000imports: - { 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 } localized_form_failure_handler.yml000066400000000000000000000010221266465517700357030ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLoginimports: - { 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: ~ src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/localized_routes.yml000066400000000000000000000013401266465517700331370ustar00rootroot00000000000000imports: - { 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 } localized_routes_with_forward.yml000066400000000000000000000002771266465517700356470ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLoginimports: - { resource: ./localized_routes.yml } security: firewalls: default: form_login: use_forward: true failure_forward: true src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routes_as_path.yml000066400000000000000000000005471266465517700326200ustar00rootroot00000000000000imports: - { 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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/routing.yml000066400000000000000000000002621266465517700312610ustar00rootroot00000000000000_form_login_bundle: resource: '@FormLoginBundle/Resources/config/routing.yml' _form_login_localized: resource: '@FormLoginBundle/Resources/config/localized_routing.yml' src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/switchuser.yml000066400000000000000000000007131266465517700317730ustar00rootroot00000000000000imports: - { 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 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/000077500000000000000000000000001266465517700247375ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/default.yml000066400000000000000000000001101266465517700270760ustar00rootroot00000000000000imports: - { resource: framework.yml } - { resource: twig.yml } src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml000066400000000000000000000006551266465517700274650ustar00rootroot00000000000000framework: secret: test csrf_protection: enabled: true router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } validation: { enabled: true, enable_annotations: true } form: ~ test: ~ default_locale: en session: storage_id: session.storage.mock_file profiler: { only_exceptions: false } services: logger: { class: Psr\Log\NullLogger } src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/twig.yml000066400000000000000000000002361266465517700264350ustar00rootroot00000000000000framework: templating: { engines: ['twig'] } # Twig Configuration twig: debug: '%kernel.debug%' strict_variables: '%kernel.debug%' src/Symfony/Bundle/SecurityBundle/Twig/000077500000000000000000000000001266465517700204205ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Twig/Extension/000077500000000000000000000000001266465517700223745ustar00rootroot00000000000000src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php000066400000000000000000000040161266465517700267370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\SecurityBundle\Twig\Extension; @trigger_error('The '.__NAMESPACE__.'\LogoutUrlExtension class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead.', E_USER_DEPRECATED); use Symfony\Bundle\SecurityBundle\Templating\Helper\LogoutUrlHelper; /** * LogoutUrlHelper provides generator functions for the logout URL to Twig. * * @author Jeremy Mikola * * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead. */ class LogoutUrlExtension extends \Twig_Extension { private $helper; public function __construct(LogoutUrlHelper $helper) { $this->helper = $helper; } /** * {@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->helper->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->helper->getLogoutUrl($key); } /** * {@inheritdoc} */ public function getName() { return 'logout_url'; } } src/Symfony/Bundle/SecurityBundle/composer.json000066400000000000000000000031351266465517700222320ustar00rootroot00000000000000{ "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.3.9", "symfony/security": "~2.7", "symfony/security-acl": "~2.7", "symfony/http-kernel": "~2.2" }, "require-dev": { "symfony/browser-kit": "~2.4", "symfony/console": "~2.7", "symfony/css-selector": "~2.0,>=2.0.5", "symfony/dependency-injection": "~2.6,>=2.6.6", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/form": "~2.7", "symfony/framework-bundle": "~2.7", "symfony/http-foundation": "~2.3", "symfony/twig-bundle": "~2.7", "symfony/twig-bridge": "~2.7", "symfony/process": "~2.0,>=2.0.5", "symfony/validator": "~2.5", "symfony/yaml": "~2.0,>=2.0.5", "symfony/expression-language": "~2.6", "doctrine/doctrine-bundle": "~1.2", "twig/twig": "~1.23|~2.0", "ircmaxell/password-compat": "~1.0" }, "autoload": { "psr-4": { "Symfony\\Bundle\\SecurityBundle\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist000066400000000000000000000014701266465517700226630ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Bundle/TwigBundle/000077500000000000000000000000001266465517700166115ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/.gitignore000066400000000000000000000000421266465517700205750ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Bundle/TwigBundle/CHANGELOG.md000066400000000000000000000025211266465517700204220ustar00rootroot00000000000000CHANGELOG ========= 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. src/Symfony/Bundle/TwigBundle/CacheWarmer/000077500000000000000000000000001266465517700207725ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php000066400000000000000000000045101266465517700263040ustar00rootroot00000000000000 * * 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; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface; /** * 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; /** * Constructor. * * @param ContainerInterface $container The dependency injection container * @param TemplateFinderInterface|null $finder The template paths cache warmer */ public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null) { // 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; } /** * Warms up the cache. * * @param string $cacheDir The cache directory */ public function warmUp($cacheDir) { if (null === $this->finder) { return; } $twig = $this->container->get('twig'); foreach ($this->finder->findAllTemplates() 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; } } src/Symfony/Bundle/TwigBundle/Command/000077500000000000000000000000001266465517700201675ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php000066400000000000000000000033071266465517700232300ustar00rootroot00000000000000 * * 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\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; /** * Lists twig functions, filters, globals and tests present in the current project. * * @author Jordi Boggiano */ class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface { /** * @var ContainerInterface|null */ private $container; /** * {@inheritdoc} */ public function setContainer(ContainerInterface $container = null) { $this->container = $container; } /** * {@inheritdoc} */ protected function getTwigEnvironment() { return $this->container->get('twig'); } /** * {@inheritdoc} */ protected function configure() { parent::configure(); $this->setAliases(array('twig:debug')); } protected function execute(InputInterface $input, OutputInterface $output) { if (false !== strpos($input->getFirstArgument(), ':d')) { $output->writeln('The use of "twig:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:twig" instead.'); } parent::execute($input, $output); } } src/Symfony/Bundle/TwigBundle/Command/LintCommand.php000066400000000000000000000034151266465517700231100ustar00rootroot00000000000000 * * 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\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; 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 BaseLintCommand implements ContainerAwareInterface { /** * @var ContainerInterface|null */ private $container; /** * {@inheritdoc} */ public function setContainer(ContainerInterface $container = null) { $this->container = $container; } /** * {@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); } } src/Symfony/Bundle/TwigBundle/Controller/000077500000000000000000000000001266465517700207345ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php000066400000000000000000000112611266465517700254500ustar00rootroot00000000000000 * * 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\Bundle\FrameworkBundle\Templating\TemplateReference; use Symfony\Component\HttpKernel\Exception\FlattenException; use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Templating\TemplateReferenceInterface; /** * 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 TemplateReferenceInterface */ 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 = new TemplateReference('TwigBundle', 'Exception', $name.$code, $format, 'twig'); if ($this->templateExists($template)) { return $template; } } // try to find a template for the given format $template = new TemplateReference('TwigBundle', 'Exception', $name, $format, 'twig'); if ($this->templateExists($template)) { return $template; } // default to a generic HTML exception $request->setRequestFormat('html'); return new TemplateReference('TwigBundle', 'Exception', $showException ? 'exception_full' : $name, 'html', 'twig'); } // 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) { return $loader->exists($template); } try { $loader->getSource($template); return true; } catch (\Twig_Error_Loader $e) { } return false; } } src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php000066400000000000000000000032021266465517700261410ustar00rootroot00000000000000 * * 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); } } src/Symfony/Bundle/TwigBundle/Debug/000077500000000000000000000000001266465517700176375ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php000066400000000000000000000035351266465517700234010ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Debug; @trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED); use Symfony\Bundle\TwigBundle\TwigEngine; use Symfony\Component\Templating\TemplateNameParserInterface; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\Config\FileLocatorInterface; /** * Times the time spent to render a template. * * @author Fabien Potencier * * @deprecated since version 2.7, to be removed in 3.0. Use the Twig native profiler instead. */ class TimedTwigEngine extends TwigEngine { protected $stopwatch; /** * Constructor. * * @param \Twig_Environment $environment A \Twig_Environment instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param Stopwatch $stopwatch A Stopwatch instance */ public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator, Stopwatch $stopwatch) { parent::__construct($environment, $parser, $locator); $this->stopwatch = $stopwatch; } /** * {@inheritdoc} */ public function render($name, array $parameters = array()) { $e = $this->stopwatch->start(sprintf('template.twig (%s)', $name), 'template'); $ret = parent::render($name, $parameters); $e->stop(); return $ret; } } src/Symfony/Bundle/TwigBundle/DependencyInjection/000077500000000000000000000000001266465517700225325ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/000077500000000000000000000000001266465517700243045ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php000066400000000000000000000022051266465517700313070ustar00rootroot00000000000000 * * 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 if ($container->hasParameter('templating.engines')) { $engines = $container->getParameter('templating.engines'); if (!in_array('twig', $engines)) { $container->removeDefinition('twig.exception_listener'); } } } } src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php000066400000000000000000000071701266465517700276250ustar00rootroot00000000000000 * * 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\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; /** * @author Jean-François Simon */ class ExtensionPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { 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.filesystem')->addMethodCall('addPath', array(dirname(dirname($reflClass->getFileName())).'/Resources/views/Form')); } if ($container->has('fragment.handler')) { $container->getDefinition('twig.extension.actions')->addTag('twig.extension'); } 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->hasParameter('templating.helper.code.file_link_format')) { $container->getDefinition('twig.extension.code')->replaceArgument(0, $container->getParameter('templating.helper.code.file_link_format')); } if ($container->getParameter('kernel.debug')) { $container->getDefinition('twig.extension.profiler')->addTag('twig.extension'); $container->getDefinition('twig.extension.debug')->addTag('twig.extension'); } if (!$container->has('templating')) { $loader = $container->getDefinition('twig.loader.native_filesystem'); $loader->addTag('twig.loader'); $loader->setMethodCalls($container->getDefinition('twig.loader.filesystem')->getMethodCalls()); $container->setDefinition('twig.loader.filesystem', $loader); } if ($container->has('assets.packages')) { $container->getDefinition('twig.extension.assets')->addTag('twig.extension'); } if (method_exists('Symfony\Bridge\Twig\AppVariable', 'setContainer')) { // we are on Symfony <3.0, where the setContainer method exists $container->getDefinition('twig.app_variable')->addMethodCall('setContainer', array(new Reference('service_container'))); } } } src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigEnvironmentPass.php000066400000000000000000000027351266465517700310120ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/TwigLoaderPass.php000066400000000000000000000037651266465517700277200ustar00rootroot00000000000000 * * 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'); } } } src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php000066400000000000000000000232441266465517700260570ustar00rootroot00000000000000 * * 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->addFormSection($rootNode); $this->addFormThemesSection($rootNode); $this->addGlobalsSection($rootNode); $this->addTwigOptions($rootNode); $this->addTwigFormatOptions($rootNode); return $treeBuilder; } private function addFormSection(ArrayNodeDefinition $rootNode) { $rootNode // Check deprecation before the config is processed to ensure // the setting has been explicitly defined in a configuration file. ->beforeNormalization() ->ifTrue(function ($v) { return isset($v['form']['resources']); }) ->then(function ($v) { @trigger_error('The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead.', E_USER_DEPRECATED); return $v; }) ->end() ->validate() ->ifTrue(function ($v) { return count($v['form']['resources']) > 0; }) ->then(function ($v) { $v['form_themes'] = array_values(array_unique(array_merge($v['form']['resources'], $v['form_themes']))); return $v; }) ->end() ->children() ->arrayNode('form') ->info('Deprecated since version 2.6, to be removed in 3.0. Use twig.form_themes instead') ->addDefaultsIfNotSet() ->fixXmlConfig('resource') ->children() ->arrayNode('resources') ->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() ->end() ->end() ; } 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('filename')->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() ; } } src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/000077500000000000000000000000001266465517700251745ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/DependencyInjection/Configurator/EnvironmentConfigurator.php000066400000000000000000000026421266465517700326000ustar00rootroot00000000000000 * * 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('core')->setDateFormat($this->dateFormat, $this->intervalFormat); if (null !== $this->timezone) { $environment->getExtension('core')->setTimezone($this->timezone); } $environment->getExtension('core')->setNumberFormat($this->decimals, $this->decimalPoint, $this->thousandsSeparator); } } src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php000066400000000000000000000132321266465517700260530ustar00rootroot00000000000000 * * 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\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'); 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.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)); } } // register bundles as Twig namespaces foreach ($container->getParameter('kernel.bundles') as $bundle => $class) { if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/'.$bundle.'/views')) { $this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle); } $reflection = new \ReflectionClass($class); if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/views')) { $this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle); } } if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/views')) { $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($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 addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle) { $name = $bundle; if ('Bundle' === substr($name, -6)) { $name = substr($name, 0, -6); } $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($dir, $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'; } } src/Symfony/Bundle/TwigBundle/Extension/000077500000000000000000000000001266465517700205655ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php000066400000000000000000000053071266465517700246000ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Extension; use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Fragment\FragmentHandler; /** * Twig extension for Symfony actions helper. * * @author Fabien Potencier * * @deprecated since version 2.2, to be removed in 3.0. */ class ActionsExtension extends \Twig_Extension { private $handler; /** * @param FragmentHandler|ContainerInterface $handler * * @deprecated Passing a ContainerInterface as a first argument is deprecated since 2.7 and will be removed in 3.0. */ public function __construct($handler) { if ($handler instanceof FragmentHandler) { $this->handler = $handler; } elseif ($handler instanceof ContainerInterface) { @trigger_error('The ability to pass a ContainerInterface instance as a first argument to '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Pass a FragmentHandler instance instead.', E_USER_DEPRECATED); $this->handler = $handler->get('fragment.handler'); } else { throw new \BadFunctionCallException(sprintf('%s takes a FragmentHandler or a ContainerInterface object as its first argument.', __METHOD__)); } $this->handler = $handler; } /** * Returns the Response content for a given URI. * * @param string $uri A URI * @param array $options An array of options * * @see FragmentHandler::render() */ public function renderUri($uri, array $options = array()) { @trigger_error('The Twig render tag was deprecated in version 2.2 and will be removed in version 3.0. Use the Twig render function instead.', E_USER_DEPRECATED); $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline'; unset($options['strategy']); return $this->handler->render($uri, $strategy, $options); } /** * Returns the token parser instance to add to the existing list. * * @return array An array of \Twig_TokenParser instances */ public function getTokenParsers() { return array( // {% render url('post_list', { 'limit': 2 }), { 'alt': 'BlogBundle:Post:error' } %} new RenderTokenParser(), ); } /** * {@inheritdoc} */ public function getName() { return 'actions'; } } src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php000066400000000000000000000073201266465517700244370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Extension; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Routing\RequestContext; @trigger_error('The '.__NAMESPACE__.'\AssetsExtension class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bridge\Twig\Extension\AssetExtension class instead.', E_USER_DEPRECATED); /** * Twig extension for Symfony assets helper. * * @author Fabien Potencier * * @deprecated since 2.7, to be removed in 3.0. Use Symfony\Bridge\Twig\Extension\AssetExtension instead. */ class AssetsExtension extends \Twig_Extension { private $container; private $context; public function __construct(ContainerInterface $container, RequestContext $requestContext = null) { $this->container = $container; $this->context = $requestContext; } /** * 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('asset', array($this, 'getAssetUrl')), new \Twig_SimpleFunction('assets_version', array($this, 'getAssetsVersion')), ); } /** * Returns the public path of an asset. * * 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 * @param bool $absolute Whether to return an absolute URL or a relative one * @param string|bool|null $version A specific version * * @return string A public path which takes into account the base path and URL path */ public function getAssetUrl($path, $packageName = null, $absolute = false, $version = null) { $url = $this->container->get('templating.helper.assets')->getUrl($path, $packageName, $version); if (!$absolute) { return $url; } return $this->ensureUrlIsAbsolute($url); } /** * Returns the version of the assets in a package. * * @param string $packageName * * @return int */ public function getAssetsVersion($packageName = null) { return $this->container->get('templating.helper.assets')->getVersion($packageName); } /** * {@inheritdoc} */ public function getName() { return 'assets'; } /** * Ensures an URL is absolute, if possible. * * @param string $url The URL that has to be absolute * * @throws \RuntimeException * * @return string The absolute URL */ private function ensureUrlIsAbsolute($url) { if (false !== strpos($url, '://') || 0 === strpos($url, '//')) { return $url; } if (!$this->context) { throw new \RuntimeException('To generate an absolute URL for an asset, the Symfony Routing component is required.'); } if ('' === $host = $this->context->getHost()) { return $url; } $scheme = $this->context->getScheme(); $port = ''; if ('http' === $scheme && 80 != $this->context->getHttpPort()) { $port = ':'.$this->context->getHttpPort(); } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) { $port = ':'.$this->context->getHttpsPort(); } return $scheme.'://'.$host.$port.$url; } } src/Symfony/Bundle/TwigBundle/LICENSE000066400000000000000000000020511266465517700176140ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Bundle/TwigBundle/Loader/000077500000000000000000000000001266465517700200175ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php000066400000000000000000000053511266465517700240070ustar00rootroot00000000000000 * * 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 */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) { parent::__construct(array()); $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 * * @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) { $previous = $e; // for BC try { $template = $this->parser->parse($template); $file = $this->locator->locate($template); } catch (\Exception $e) { $previous = $e; } } if (false === $file || null === $file) { throw new \Twig_Error_Loader(sprintf('Unable to find template "%s".', $logicalName), -1, null, $previous); } return $this->cache[$logicalName] = $file; } } src/Symfony/Bundle/TwigBundle/Node/000077500000000000000000000000001266465517700174765ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Node/RenderNode.php000066400000000000000000000022251266465517700222350ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Node; /** * Represents a render node. * * @author Fabien Potencier * * @deprecated since version 2.2, to be removed in 3.0. */ class RenderNode extends \Twig_Node { public function __construct(\Twig_Node_Expression $expr, \Twig_Node_Expression $options, $lineno, $tag = null) { parent::__construct(array('expr' => $expr, 'options' => $options), 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("echo \$this->env->getExtension('actions')->renderUri(") ->subcompile($this->getNode('expr')) ->raw(', ') ->subcompile($this->getNode('options')) ->raw(");\n") ; } } src/Symfony/Bundle/TwigBundle/Resources/000077500000000000000000000000001266465517700205635ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/config/000077500000000000000000000000001266465517700220305ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/config/routing/000077500000000000000000000000001266465517700235175ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/config/routing/errors.xml000066400000000000000000000010301266465517700255470ustar00rootroot00000000000000 twig.controller.preview_error:previewErrorPageAction html \d+ src/Symfony/Bundle/TwigBundle/Resources/config/schema/000077500000000000000000000000001266465517700232705ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd000066400000000000000000000043311266465517700252570ustar00rootroot00000000000000 src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml000066400000000000000000000233601266465517700235300ustar00rootroot00000000000000 Twig_Environment Symfony\Bundle\TwigBundle\Loader\FilesystemLoader Twig_Loader_Chain Symfony\Bundle\TwigBundle\TwigEngine Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer Symfony\Bridge\Twig\Extension\TranslationExtension Symfony\Bundle\TwigBundle\Extension\ActionsExtension Symfony\Bridge\Twig\Extension\CodeExtension Symfony\Bridge\Twig\Extension\RoutingExtension Symfony\Bridge\Twig\Extension\YamlExtension Symfony\Bridge\Twig\Extension\FormExtension Symfony\Bridge\Twig\Extension\HttpKernelExtension Symfony\Bridge\Twig\Extension\StopwatchExtension Symfony\Bridge\Twig\Extension\ExpressionExtension Symfony\Bridge\Twig\Form\TwigRendererEngine Symfony\Bridge\Twig\Form\TwigRenderer Symfony\Bridge\Twig\Translation\TwigExtractor Symfony\Component\HttpKernel\EventListener\ExceptionListener Symfony\Bundle\TwigBundle\Controller\ExceptionController Symfony\Bundle\TwigBundle\Controller\PreviewErrorController app %kernel.environment% %kernel.debug% %kernel.root_dir% %kernel.charset% %kernel.debug% %twig.form.resources% %twig.exception_listener.controller% %kernel.debug% %twig.exception_listener.controller% src/Symfony/Bundle/TwigBundle/Resources/views/000077500000000000000000000000001266465517700217205ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/views/Exception/000077500000000000000000000000001266465517700236565ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.atom.twig000066400000000000000000000000641266465517700266420ustar00rootroot00000000000000{% include 'TwigBundle:Exception:error.xml.twig' %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.css.twig000066400000000000000000000000531266465517700264700ustar00rootroot00000000000000/* {{ status_code }} {{ status_text }} */ src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.html.twig000066400000000000000000000007761266465517700266600ustar00rootroot00000000000000 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.
    src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.js.twig000066400000000000000000000000531266465517700263140ustar00rootroot00000000000000/* {{ status_code }} {{ status_text }} */ src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.json.twig000066400000000000000000000001231266465517700266470ustar00rootroot00000000000000{{ { 'error': { 'code': status_code, 'message': status_text } }|json_encode|raw }} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.rdf.twig000066400000000000000000000000641266465517700264550ustar00rootroot00000000000000{% include 'TwigBundle:Exception:error.xml.twig' %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.txt.twig000066400000000000000000000004151266465517700265210ustar00rootroot00000000000000Oops! 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. src/Symfony/Bundle/TwigBundle/Resources/views/Exception/error.xml.twig000066400000000000000000000001611266465517700265000ustar00rootroot00000000000000 src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.atom.twig000066400000000000000000000001301266465517700275010ustar00rootroot00000000000000{% include 'TwigBundle:Exception:exception.xml.twig' with { 'exception': exception } %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.css.twig000066400000000000000000000001361266465517700273370ustar00rootroot00000000000000/* {% include 'TwigBundle:Exception:exception.txt.twig' with { 'exception': exception } %} */ src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig000066400000000000000000000256471266465517700275310ustar00rootroot00000000000000
    Exception detected!

    {{ 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 'TwigBundle: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 'TwigBundle:Exception:logs.html.twig' with { 'logs': logger.logs } only %}
    {% endif %} {% if currentContent %}
    {% spaceless %}

    Content of the Output  +

    {% endspaceless %}
    {% endif %} {% include 'TwigBundle:Exception:traces_text.html.twig' with { 'exception': exception } only %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.js.twig000066400000000000000000000001361266465517700271630ustar00rootroot00000000000000/* {% include 'TwigBundle:Exception:exception.txt.twig' with { 'exception': exception } %} */ src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.json.twig000066400000000000000000000001631266465517700275200ustar00rootroot00000000000000{{ { 'error': { 'code': status_code, 'message': status_text, 'exception': exception.toarray } }|json_encode|raw }} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.rdf.twig000066400000000000000000000001301266465517700273140ustar00rootroot00000000000000{% include 'TwigBundle:Exception:exception.xml.twig' with { 'exception': exception } %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.txt.twig000066400000000000000000000004411266465517700273650ustar00rootroot00000000000000[exception] {{ status_code ~ ' | ' ~ status_text ~ ' | ' ~ exception.class }} [message] {{ exception.message }} {% for i, e in exception.toarray %} [{{ i + 1 }}] {{ e.class }}: {{ e.message }} {% include 'TwigBundle:Exception:traces.txt.twig' with { 'exception': e } only %} {% endfor %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.xml.twig000066400000000000000000000005111266465517700273440ustar00rootroot00000000000000 {% for e in exception.toarray %} {% include 'TwigBundle:Exception:traces.xml.twig' with { 'exception': e } only %} {% endfor %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig000066400000000000000000000006221266465517700305350ustar00rootroot00000000000000{% extends 'TwigBundle::layout.html.twig' %} {% block head %} {% endblock %} {% block title %} {{ exception.message }} ({{ status_code }} {{ status_text }}) {% endblock %} {% block body %} {% include 'TwigBundle:Exception:exception.html.twig' %} {% endblock %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig000066400000000000000000000004011266465517700264540ustar00rootroot00000000000000
      {% for log in logs %} = 400 %} class="error"{% elseif log.priority >= 300 %} class="warning"{% endif %}> {{ log.priorityName }} - {{ log.message }} {% endfor %}
    src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig000066400000000000000000000031751266465517700266210ustar00rootroot00000000000000{% 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 %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.txt.twig000066400000000000000000000004161266465517700264670ustar00rootroot00000000000000{% 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 %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig000066400000000000000000000035071266465517700270030ustar00rootroot00000000000000
    {% 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 'TwigBundle:Exception:trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %}
    2. {% endfor %}
    src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.txt.twig000066400000000000000000000002561266465517700266540ustar00rootroot00000000000000{% if exception.trace|length %} {% for trace in exception.trace %} {% include 'TwigBundle:Exception:trace.txt.twig' with { 'trace': trace } only %} {% endfor %} {% endif %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.xml.twig000066400000000000000000000003161266465517700266320ustar00rootroot00000000000000 {% for trace in exception.trace %} {% include 'TwigBundle:Exception:trace.txt.twig' with { 'trace': trace } only %} {% endfor %} src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces_text.html.twig000066400000000000000000000024711266465517700300460ustar00rootroot00000000000000

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

    src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig000066400000000000000000000102141266465517700250720ustar00rootroot00000000000000 {% block title %}{% endblock %} {% block head %}{% endblock %}
    {% block body %}{% endblock %}
    src/Symfony/Bundle/TwigBundle/Tests/000077500000000000000000000000001266465517700177135ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Controller/000077500000000000000000000000001266465517700220365ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php000066400000000000000000000040211266465517700274060ustar00rootroot00000000000000 * * 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( 'TwigBundle: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( 'TwigBundle: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()); } } src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php000066400000000000000000000036651266465517700301200ustar00rootroot00000000000000 * * 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\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; class PreviewErrorControllerTest extends TestCase { public function testForwardRequestToConfiguredController() { $self = $this; $request = Request::create('whatever'); $response = new Response(''); $code = 123; $logicalControllerName = 'foo:bar:baz'; $kernel = $this->getMock('\Symfony\Component\HttpKernel\HttpKernelInterface'); $kernel ->expects($this->once()) ->method('handle') ->with( $this->callback(function (Request $request) use ($self, $logicalControllerName, $code) { $self->assertEquals($logicalControllerName, $request->attributes->get('_controller')); $exception = $request->attributes->get('exception'); $self->assertInstanceOf('Symfony\Component\Debug\Exception\FlattenException', $exception); $self->assertEquals($code, $exception->getStatusCode()); $self->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)); } } src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/000077500000000000000000000000001266465517700236345ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/000077500000000000000000000000001266465517700254065ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php000066400000000000000000000116451266465517700316560ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Definition; use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; class TwigLoaderPassTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $builder; /** * @var Definition */ private $chainLoader; /** * @var TwigLoaderPass */ private $pass; protected function setUp() { $this->builder = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'setAlias', 'getDefinition') ); $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); } } src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/ConfigurationTest.php000066400000000000000000000015501266465517700300150ustar00rootroot00000000000000 * * 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\Configuration; use Symfony\Component\Config\Definition\Processor; class ConfigurationTest extends \PHPUnit_Framework_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']); } } src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/000077500000000000000000000000001266465517700254455ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/000077500000000000000000000000001266465517700274175ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/000077500000000000000000000000001266465517700314635ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/views/000077500000000000000000000000001266465517700326205ustar00rootroot00000000000000layout.html.twig000066400000000000000000000000211266465517700357060ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/viewsThis is a layout src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/views/000077500000000000000000000000001266465517700305545ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/Resources/views/layout.html.twig000066400000000000000000000000211266465517700337210ustar00rootroot00000000000000This is a layout src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/000077500000000000000000000000001266465517700262345ustar00rootroot00000000000000customTemplateEscapingGuesser.php000066400000000000000000000002641266465517700347060ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('twig', array( 'autoescape_service' => 'my_project.some_bundle.template_escaping_guesser', 'autoescape_service_method' => 'guess', )); src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/empty.php000066400000000000000000000000671266465517700301060ustar00rootroot00000000000000loadFromExtension('twig', array()); src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/extra.php000066400000000000000000000002051266465517700300650ustar00rootroot00000000000000loadFromExtension('twig', array( 'paths' => array( 'namespaced_path3' => 'namespace3', ), )); src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php000066400000000000000000000011571266465517700277130ustar00rootroot00000000000000loadFromExtension('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', ), )); src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/legacy-form-resources-only.php000066400000000000000000000003301266465517700341350ustar00rootroot00000000000000loadFromExtension('twig', array( 'form' => array( 'resources' => array( 'form_table_layout.html.twig', 'MyBundle:Form:my_theme.html.twig', ), ), )); legacy-merge-form-resources-with-form-themes.php000066400000000000000000000004431266465517700373760ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/phploadFromExtension('twig', array( 'form' => array( 'resources' => array( 'form_table_layout.html.twig', 'MyBundle:Form:my_theme.html.twig', ), ), 'form_themes' => array( 'FooBundle:Form:bar.html.twig', ), )); src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/000077500000000000000000000000001266465517700262455ustar00rootroot00000000000000customTemplateEscapingGuesser.xml000066400000000000000000000011031266465517700347210ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/empty.xml000066400000000000000000000007331266465517700301300ustar00rootroot00000000000000 src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/extra.xml000066400000000000000000000012511266465517700301110ustar00rootroot00000000000000 namespaced_path3 src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/full.xml000066400000000000000000000020341266465517700277300ustar00rootroot00000000000000 MyBundle::form.html.twig @@qux 3.14 path1 path2 namespaced_path1 namespaced_path2 src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml/legacy-form-resources-only.xml000066400000000000000000000014631266465517700341670ustar00rootroot00000000000000 form_table_layout.html.twig MyBundle:Form:my_theme.html.twig legacy-merge-form-resources-with-form-themes.xml000066400000000000000000000015731266465517700374250ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/xml form_table_layout.html.twig MyBundle:Form:my_theme.html.twig FooBundle:Form:bar.html.twig src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/000077500000000000000000000000001266465517700262465ustar00rootroot00000000000000customTemplateEscapingGuesser.yml000066400000000000000000000001641266465517700347310ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/ymltwig: autoescape_service: my_project.some_bundle.template_escaping_guesser autoescape_service_method: guess src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/empty.yml000066400000000000000000000000061266465517700301230ustar00rootroot00000000000000twig: src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/extra.yml000066400000000000000000000000661266465517700301160ustar00rootroot00000000000000twig: paths: namespaced_path3: namespace3 src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml000066400000000000000000000007571266465517700277440ustar00rootroot00000000000000twig: 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 src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/legacy-form-resources-only.yml000066400000000000000000000002001266465517700341550ustar00rootroot00000000000000twig: form: resources: - "form_table_layout.html.twig" - "MyBundle:Form:my_theme.html.twig" legacy-merge-form-resources-with-form-themes.yml000066400000000000000000000002721266465517700374220ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/ymltwig: form_themes: - "FooBundle:Form:bar.html.twig" form: resources: - "form_table_layout.html.twig" - "MyBundle:Form:my_theme.html.twig" src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php000066400000000000000000000302101266465517700300100ustar00rootroot00000000000000 * * 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\TwigExtension; use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Component\Config\FileLocator; 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 { /** * @dataProvider getFormats * @group legacy */ public function testLegacyFormResourcesConfigurationKey($format) { $container = $this->createContainer(); $container->registerExtension(new TwigExtension()); $this->loadFromFile($container, 'legacy-form-resources-only', $format); $this->compileContainer($container); // Form resources $this->assertCount(3, $container->getParameter('twig.form.resources')); $this->assertContains('form_div_layout.html.twig', $container->getParameter('twig.form.resources')); $this->assertContains('form_table_layout.html.twig', $container->getParameter('twig.form.resources')); $this->assertContains('MyBundle:Form:my_theme.html.twig', $container->getParameter('twig.form.resources')); } /** * @dataProvider getFormats * @group legacy */ public function testLegacyMergeFormResourcesConfigurationKeyWithFormThemesConfigurationKey($format) { $container = $this->createContainer(); $container->registerExtension(new TwigExtension()); $this->loadFromFile($container, 'legacy-merge-form-resources-with-form-themes', $format); $this->compileContainer($container); $this->assertCount(4, $container->getParameter('twig.form.resources')); $this->assertContains('form_div_layout.html.twig', $container->getParameter('twig.form.resources')); $this->assertContains('form_table_layout.html.twig', $container->getParameter('twig.form.resources')); $this->assertContains('MyBundle:Form:my_theme.html.twig', $container->getParameter('twig.form.resources')); $this->assertContains('FooBundle:Form:bar.html.twig', $container->getParameter('twig.form.resources')); } public function testLoadEmptyConfiguration() { $container = $this->createContainer(); $container->registerExtension(new TwigExtension()); $container->loadFromExtension('twig', array()); $this->compileContainer($container); $this->assertEquals('Twig_Environment', $container->getParameter('twig.class'), '->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->getParameter('twig.class'), '->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[1][1][0], '->load() registers services as Twig globals'); $this->assertEquals(new Reference('bar'), $calls[1][1][1], '->load() registers services as Twig globals'); $this->assertEquals('baz', $calls[2][1][0], '->load() registers variables as Twig globals'); $this->assertEquals('@qux', $calls[2][1][1], '->load() allows escaping of service identifiers'); $this->assertEquals('pi', $calls[3][1][0], '->load() registers variables as Twig globals'); $this->assertEquals(3.14, $calls[3][1][1], '->load() registers variables as Twig globals'); // Yaml and Php specific configs if (in_array($format, array('yml', 'php'))) { $this->assertEquals('bad', $calls[4][1][0], '->load() registers variables as Twig globals'); $this->assertEquals(array('key' => 'foo'), $calls[4][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('filename', $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, 1) 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.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/Resources/TwigBundle/views', 'Twig'), array(realpath(__DIR__.'/../..').'/Resources/views', 'Twig'), 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), ); } 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'), ))); 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); } } src/Symfony/Bundle/TwigBundle/Tests/Extension/000077500000000000000000000000001266465517700216675ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php000066400000000000000000000106261266465517700275310ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Tests\Extension; use Symfony\Bundle\TwigBundle\Extension\AssetsExtension; use Symfony\Bundle\TwigBundle\Tests\TestCase; /** * @group legacy */ class LegacyAssetsExtensionTest extends TestCase { /** * @dataProvider provideGetAssetUrlArguments */ public function testGetAssetUrl($path, $packageName, $absolute, $relativeUrl, $expectedUrl, $scheme, $host, $httpPort, $httpsPort) { $helper = $this->createHelperMock($path, $packageName, $relativeUrl); $container = $this->createContainerMock($helper); $context = $this->createRequestContextMock($scheme, $host, $httpPort, $httpsPort); $extension = new AssetsExtension($container, $context); $this->assertEquals($expectedUrl, $extension->getAssetUrl($path, $packageName, $absolute)); } public function testGetAssetWithoutHost() { $path = '/path/to/asset'; $packageName = null; $relativeUrl = '/bundle-name/path/to/asset'; $helper = $this->createHelperMock($path, $packageName, $relativeUrl); $container = $this->createContainerMock($helper); $context = $this->createRequestContextMock('http', '', 80, 443); $extension = new AssetsExtension($container, $context); $this->assertEquals($relativeUrl, $extension->getAssetUrl($path, $packageName, true)); } public function provideGetAssetUrlArguments() { return array( array('/path/to/asset', 'package-name', false, '/bundle-name/path/to/asset', '/bundle-name/path/to/asset', 'http', 'symfony.com', 80, null), array('/path/to/asset', 'package-name', false, 'http://subdomain.symfony.com/bundle-name/path/to/asset', 'http://subdomain.symfony.com/bundle-name/path/to/asset', 'http', 'symfony.com', 80, null), array('/path/to/asset', null, false, '/bundle-name/path/to/asset', '/bundle-name/path/to/asset', 'http', 'symfony.com', 80, null), array('/path/to/asset', 'package-name', true, '/bundle-name/path/to/asset', 'http://symfony.com/bundle-name/path/to/asset', 'http', 'symfony.com', 80, null), array('/path/to/asset', 'package-name', true, 'http://subdomain.symfony.com/bundle-name/path/to/asset', 'http://subdomain.symfony.com/bundle-name/path/to/asset', 'http', 'symfony.com', 80, null), array('/path/to/asset', null, true, '/bundle-name/path/to/asset', 'https://symfony.com:92/bundle-name/path/to/asset', 'https', 'symfony.com', null, 92), array('/path/to/asset', null, true, '/bundle-name/path/to/asset', 'http://symfony.com:660/bundle-name/path/to/asset', 'http', 'symfony.com', 660, null), ); } private function createRequestContextMock($scheme, $host, $httpPort, $httpsPort) { $context = $this->getMockBuilder('Symfony\Component\Routing\RequestContext') ->disableOriginalConstructor() ->getMock(); $context->expects($this->any()) ->method('getScheme') ->will($this->returnValue($scheme)); $context->expects($this->any()) ->method('getHost') ->will($this->returnValue($host)); $context->expects($this->any()) ->method('getHttpPort') ->will($this->returnValue($httpPort)); $context->expects($this->any()) ->method('getHttpsPort') ->will($this->returnValue($httpsPort)); return $context; } private function createContainerMock($helper) { $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $container->expects($this->any()) ->method('get') ->with('templating.helper.assets') ->will($this->returnValue($helper)); return $container; } private function createHelperMock($path, $packageName, $returnValue) { $helper = $this->getMockBuilder('Symfony\Component\Templating\Helper\CoreAssetsHelper') ->disableOriginalConstructor() ->getMock(); $helper->expects($this->any()) ->method('getUrl') ->with($path, $packageName) ->will($this->returnValue($returnValue)); return $helper; } } src/Symfony/Bundle/TwigBundle/Tests/Functional/000077500000000000000000000000001266465517700220155ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php000066400000000000000000000060361266465517700257230ustar00rootroot00000000000000 * * 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 NewCacheWamingTest extends \PHPUnit_Framework_TestCase { public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable() { $kernel = new CacheWarmingKernel(true); $kernel->boot(); $warmer = $kernel->getContainer()->get('cache_warmer'); $warmer->enableOptionalWarmers(); $warmer->warmUp($kernel->getCacheDir()); $this->assertTrue(file_exists($kernel->getCacheDir().'/twig')); } public function testCacheIsNotWarmedWhenTemplatingIsDisabled() { $kernel = new CacheWarmingKernel(false); $kernel->boot(); $warmer = $kernel->getContainer()->get('cache_warmer'); $warmer->enableOptionalWarmers(); $warmer->warmUp($kernel->getCacheDir()); $this->assertFalse(file_exists($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('dev', 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', )); }); 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'), )); }); } } public function getCacheDir() { return sys_get_temp_dir().'/'.Kernel::VERSION.'/CacheWarmingKernel/cache'; } public function getLogDir() { return sys_get_temp_dir().'/'.Kernel::VERSION.'/CacheWarmingKernel/logs'; } } src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php000066400000000000000000000037071266465517700270200ustar00rootroot00000000000000 * * 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 \PHPUnit_Framework_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', )); }); } 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'; } } src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/000077500000000000000000000000001266465517700237675ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/config/000077500000000000000000000000001266465517700252345ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/config/empty_routing.yml000066400000000000000000000000001266465517700306520ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/views/000077500000000000000000000000001266465517700251245ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Functional/Resources/views/index.html.twig000066400000000000000000000000331266465517700300660ustar00rootroot00000000000000{{ {a: 'b'}|yaml_encode }} src/Symfony/Bundle/TwigBundle/Tests/Loader/000077500000000000000000000000001266465517700211215ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php000066400000000000000000000071241266465517700257510ustar00rootroot00000000000000 * * 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 testGetSource() { $parser = $this->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); $locator = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $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->getSource('@namespace/layout.html.twig')); // Symfony-style $this->assertEquals("This is a layout\n", $loader->getSource('TwigBundle::layout.html.twig')); } public function testExists() { // should return true for templates that Twig does not find, but Symfony does $parser = $this->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); $locator = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $locator ->expects($this->once()) ->method('locate') ->will($this->returnValue($template = __DIR__.'/../DependencyInjection/Fixtures/Resources/views/layout.html.twig')) ; $loader = new FilesystemLoader($locator, $parser); return $this->assertTrue($loader->exists($template)); } /** * @expectedException \Twig_Error_Loader */ public function testTwigErrorIfLocatorThrowsInvalid() { $parser = $this->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); $parser ->expects($this->once()) ->method('parse') ->with('name.format.engine') ->will($this->returnValue(new TemplateReference('', '', 'name', 'format', 'engine'))) ; $locator = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $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->getMock('Symfony\Component\Templating\TemplateNameParserInterface'); $parser ->expects($this->once()) ->method('parse') ->with('name.format.engine') ->will($this->returnValue(new TemplateReference('', '', 'name', 'format', 'engine'))) ; $locator = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $locator ->expects($this->once()) ->method('locate') ->will($this->returnValue(false)) ; $loader = new FilesystemLoader($locator, $parser); $loader->getCacheKey('name.format.engine'); } } src/Symfony/Bundle/TwigBundle/Tests/TestCase.php000066400000000000000000000005211266465517700221350ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Tests; class TestCase extends \PHPUnit_Framework_TestCase { } src/Symfony/Bundle/TwigBundle/Tests/TokenParser/000077500000000000000000000000001266465517700221505ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php000066400000000000000000000035521266465517700302500ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\Tests\TokenParser; use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; use Symfony\Bundle\TwigBundle\Node\RenderNode; /** * @group legacy */ class LegacyRenderTokenParserTest extends TestCase { /** * @dataProvider getTestsForRender */ public function testCompile($source, $expected) { $env = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); $env->addTokenParser(new RenderTokenParser()); $stream = $env->tokenize($source); $parser = new \Twig_Parser($env); $this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0)); } public function getTestsForRender() { return array( array( '{% render "foo" %}', new RenderNode( new \Twig_Node_Expression_Constant('foo', 1), new \Twig_Node_Expression_Array(array(), 1), 1, 'render' ), ), array( '{% render "foo", {foo: 1} %}', new RenderNode( new \Twig_Node_Expression_Constant('foo', 1), new \Twig_Node_Expression_Array(array( new \Twig_Node_Expression_Constant('foo', 1), new \Twig_Node_Expression_Constant('1', 1), ), 1), 1, 'render' ), ), ); } } src/Symfony/Bundle/TwigBundle/TokenParser/000077500000000000000000000000001266465517700210465ustar00rootroot00000000000000src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php000066400000000000000000000030041266465517700251510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\TokenParser; use Symfony\Bundle\TwigBundle\Node\RenderNode; /** * Token Parser for the render tag. * * @author Fabien Potencier * * @deprecated since version 2.2, to be removed in 3.0. */ class RenderTokenParser 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(); // options if ($this->parser->getStream()->test(\Twig_Token::PUNCTUATION_TYPE, ',')) { $this->parser->getStream()->next(); $options = $this->parser->getExpressionParser()->parseExpression(); } else { $options = new \Twig_Node_Expression_Array(array(), $token->getLine()); } $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE); return new RenderNode($expr, $options, $token->getLine(), $this->getTag()); } /** * Gets the tag name associated with this token parser. * * @return string The tag name */ public function getTag() { return 'render'; } } src/Symfony/Bundle/TwigBundle/TwigBundle.php000066400000000000000000000022011266465517700213610ustar00rootroot00000000000000 * * 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\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; /** * 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()); } } src/Symfony/Bundle/TwigBundle/TwigDefaultEscapingStrategy.php000066400000000000000000000020631266465517700247370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle; @trigger_error('The '.__NAMESPACE__.'\TwigDefaultEscapingStrategy class is deprecated in version 2.7 and will be removed in version 3.0. Use the "filename" auto-escaping strategy instead.', E_USER_DEPRECATED); /** * @author Fabien Potencier * * @deprecated since version 2.7, will be removed in 3.0. Use the "filename" auto-escaping strategy instead. */ class TwigDefaultEscapingStrategy { public static function guess($filename) { // remove .twig $filename = substr($filename, 0, -5); // get the format $format = substr($filename, strrpos($filename, '.') + 1); if ('js' === $format) { return 'js'; } if ('txt' === $format) { return false; } return 'html'; } } src/Symfony/Bundle/TwigBundle/TwigEngine.php000066400000000000000000000064741266465517700213750ustar00rootroot00000000000000 * * 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; } /** * @deprecated since version 2.7, to be removed in 3.0. * Inject the escaping strategy on \Twig_Environment instead. */ public function setDefaultEscapingStrategy($strategy) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED); $this->environment->getExtension('escaper')->setDefaultStrategy($strategy); } /** * @deprecated since version 2.7, to be removed in 3.0. * Use the 'filename' strategy instead. */ public function guessDefaultEscapingStrategy($filename) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Twig_FileExtensionEscapingStrategy::guess method instead.', E_USER_DEPRECATED); return \Twig_FileExtensionEscapingStrategy::guess($filename); } /** * {@inheritdoc} */ public function render($name, array $parameters = array()) { try { return parent::render($name, $parameters); } catch (\Twig_Error $e) { if ($name instanceof TemplateReference) { try { // try to get the real file name of the template where the error occurred $e->setTemplateFile(sprintf('%s', $this->locator->locate($this->parser->parse($e->getTemplateFile())))); } 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; } } src/Symfony/Bundle/TwigBundle/composer.json000066400000000000000000000024341266465517700213360ustar00rootroot00000000000000{ "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.3.9", "symfony/asset": "~2.7", "symfony/twig-bridge": "~2.7", "symfony/http-foundation": "~2.5", "symfony/http-kernel": "~2.7" }, "require-dev": { "symfony/stopwatch": "~2.2", "symfony/dependency-injection": "~2.6,>=2.6.6", "symfony/expression-language": "~2.4", "symfony/config": "~2.2", "symfony/finder": "~2.0,>=2.0.5", "symfony/routing": "~2.1", "symfony/templating": "~2.1", "symfony/yaml": "~2.3", "symfony/framework-bundle": "~2.7" }, "autoload": { "psr-4": { "Symfony\\Bundle\\TwigBundle\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Bundle/TwigBundle/phpunit.xml.dist000066400000000000000000000014641266465517700217710ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Bundle/WebProfilerBundle/000077500000000000000000000000001266465517700201175ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/.gitignore000066400000000000000000000000421266465517700221030ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md000066400000000000000000000011531266465517700217300ustar00rootroot00000000000000CHANGELOG ========= 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`) src/Symfony/Bundle/WebProfilerBundle/Command/000077500000000000000000000000001266465517700214755ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php000066400000000000000000000036011266465517700247660ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\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\HttpKernel\Profiler\Profiler; /** * Exports a profile. * * @author Fabien Potencier */ class ExportCommand extends Command { private $profiler; public function __construct(Profiler $profiler = null) { $this->profiler = $profiler; parent::__construct(); } /** * {@inheritdoc} */ public function isEnabled() { if (null === $this->profiler) { return false; } return parent::isEnabled(); } protected function configure() { $this ->setName('profiler:export') ->setDescription('Exports a profile') ->setDefinition(array( new InputArgument('token', InputArgument::REQUIRED, 'The profile token'), )) ->setHelp(<<<'EOF' The %command.name% command exports a profile to the standard output: php %command.full_name% profile_token EOF ) ; } protected function execute(InputInterface $input, OutputInterface $output) { $token = $input->getArgument('token'); if (!$profile = $this->profiler->loadProfile($token)) { throw new \LogicException(sprintf('Profile with token "%s" does not exist.', $token)); } $output->writeln($this->profiler->export($profile), OutputInterface::OUTPUT_RAW); } } src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php000066400000000000000000000045021266465517700247600ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\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\HttpKernel\Profiler\Profiler; /** * Imports a profile. * * @author Fabien Potencier */ class ImportCommand extends Command { private $profiler; public function __construct(Profiler $profiler = null) { $this->profiler = $profiler; parent::__construct(); } /** * {@inheritdoc} */ public function isEnabled() { if (null === $this->profiler) { return false; } return parent::isEnabled(); } protected function configure() { $this ->setName('profiler:import') ->setDescription('Imports a profile') ->setDefinition(array( new InputArgument('filename', InputArgument::OPTIONAL, 'The profile path'), )) ->setHelp(<<<'EOF' The %command.name% command imports a profile: php %command.full_name% profile_filepath You can also pipe the profile via STDIN: cat profile_file | php %command.full_name% EOF ) ; } protected function execute(InputInterface $input, OutputInterface $output) { $data = ''; if ($input->getArgument('filename')) { $data = file_get_contents($input->getArgument('filename')); } else { if (0 !== ftell(STDIN)) { throw new \RuntimeException('Please provide a filename or pipe the profile to STDIN.'); } while (!feof(STDIN)) { $data .= fread(STDIN, 1024); } } if (!$profile = $this->profiler->import($data)) { throw new \LogicException('The profile already exists in the database.'); } $output->writeln(sprintf('Profile "%s" has been successfully imported.', $profile->getToken())); } } src/Symfony/Bundle/WebProfilerBundle/Controller/000077500000000000000000000000001266465517700222425ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php000066400000000000000000000072511266465517700267620ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php000066400000000000000000000310301266465517700265760ustar00rootroot00000000000000 * * 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\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Profiler\Profiler; use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * ProfilerController. * * @author Fabien Potencier */ class ProfilerController { private $templateManager; private $generator; private $profiler; private $twig; private $templates; private $toolbarPosition; /** * 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) */ public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'normal') { $this->generator = $generator; $this->profiler = $profiler; $this->twig = $twig; $this->templates = $templates; $this->toolbarPosition = $toolbarPosition; } /** * 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(); $panel = $request->query->get('panel', 'request'); $page = $request->query->get('page', 'home'); if (!$profile = $this->profiler->loadProfile($token)) { return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)), 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()->getTemplates($profile), 'is_ajax' => $request->isXmlHttpRequest(), )), 200, array('Content-Type' => 'text/html')); } /** * Purges all tokens. * * @return Response A Response instance * * @throws NotFoundHttpException */ public function purgeAction() { if (null === $this->profiler) { throw new NotFoundHttpException('The profiler must be enabled.'); } $this->profiler->disable(); $this->profiler->purge(); return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'purge')), 302, array('Content-Type' => 'text/html')); } /** * Displays information page. * * @param string $about The about message * * @return Response A Response instance * * @throws NotFoundHttpException */ public function infoAction($about) { if (null === $this->profiler) { throw new NotFoundHttpException('The profiler must be enabled.'); } $this->profiler->disable(); return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array( 'about' => $about, )), 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 new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array( 'position' => $position, 'profile' => $profile, 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, 'token' => $token, )), 200, array('Content-Type' => 'text/html')); } /** * 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 === $session = $request->getSession()) { $ip = $method = $url = $start = $end = $limit = $token = null; } else { $ip = $session->get('_profiler_search_ip'); $method = $session->get('_profiler_search_method'); $url = $session->get('_profiler_search_url'); $start = $session->get('_profiler_search_start'); $end = $session->get('_profiler_search_end'); $limit = $session->get('_profiler_search_limit'); $token = $session->get('_profiler_search_token'); } return new Response( $this->twig->render('@WebProfiler/Profiler/search.html.twig', array( 'token' => $token, 'ip' => $ip, 'method' => $method, '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(); $profile = $this->profiler->loadProfile($token); $ip = $request->query->get('ip'); $method = $request->query->get('method'); $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( 'token' => $token, 'profile' => $profile, 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end), 'ip' => $ip, 'method' => $method, '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'); $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_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); return new RedirectResponse($this->generator->generate('_profiler_search_results', array( 'token' => $tokens ? $tokens[0]['token'] : 'empty', 'ip' => $ip, 'method' => $method, '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(); ob_start(); phpinfo(); $phpinfo = ob_get_clean(); return new Response($phpinfo, 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; } } src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php000066400000000000000000000046541266465517700263100ustar00rootroot00000000000000 * * 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\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; /** * 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); $context = $this->matcher->getContext(); $context->setMethod($profile->getMethod()); $matcher = new TraceableUrlMatcher($this->routes, $context); $request = $profile->getCollector('request'); return new Response($this->twig->render('@WebProfiler/Router/panel.html.twig', array( 'request' => $request, 'router' => $profile->getCollector('router'), 'traces' => $matcher->getTraces($request->getPathInfo()), )), 200, array('Content-Type' => 'text/html')); } } src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/000077500000000000000000000000001266465517700240405ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php000066400000000000000000000032041266465517700273570ustar00rootroot00000000000000 * * 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; } } src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php000066400000000000000000000045271266465517700306760ustar00rootroot00000000000000 * * 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); } } /** * 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'; } } src/Symfony/Bundle/WebProfilerBundle/EventListener/000077500000000000000000000000001266465517700227065ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php000066400000000000000000000116421266465517700301400ustar00rootroot00000000000000 * * 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\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; public function __construct(\Twig_Environment $twig, $interceptRedirects = false, $mode = self::ENABLED, $position = 'bottom', UrlGeneratorInterface $urlGenerator = null, $excludedAjaxPaths = '^/bundles|^/_wdt') { $this->twig = $twig; $this->urlGenerator = $urlGenerator; $this->interceptRedirects = (bool) $interceptRedirects; $this->mode = (int) $mode; $this->position = $position; $this->excludedAjaxPaths = $excludedAjaxPaths; } 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'))) ); } catch (\Exception $e) { $response->headers->set('X-Debug-Error', get_class($e).': '.$e->getMessage()); } } if (!$event->isMasterRequest()) { return; } // 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() ) { return; } $this->injectToolbar($response, $request); } /** * Injects the web debug toolbar into the given Response. * * @param Response $response A Response instance */ protected function injectToolbar(Response $response, Request $request) { $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, ) ))."\n"; $content = substr($content, 0, $pos).$toolbar.substr($content, $pos); $response->setContent($content); } } public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => array('onKernelResponse', -128), ); } } src/Symfony/Bundle/WebProfilerBundle/LICENSE000066400000000000000000000020511266465517700211220ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Bundle/WebProfilerBundle/Profiler/000077500000000000000000000000001266465517700217015ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php000066400000000000000000000067501266465517700254700ustar00rootroot00000000000000 * * 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 array */ 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 */ protected 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 { $loader->getSource($template); return true; } catch (\Twig_Error_Loader $e) { } return false; } } src/Symfony/Bundle/WebProfilerBundle/Resources/000077500000000000000000000000001266465517700220715ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/ICONS_LICENSE.txt000066400000000000000000000002671266465517700246540ustar00rootroot00000000000000Icons 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/).src/Symfony/Bundle/WebProfilerBundle/Resources/bin/000077500000000000000000000000001266465517700226415ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/bin/sync_assets.sh000077500000000000000000000004141266465517700255350ustar00rootroot00000000000000#!/bin/sh DIR=`php -r "echo realpath(dirname('$0'));"` cp $DIR/../../../FrameworkBundle/Resources/public/css/body.css $DIR/../views/Profiler/body.css.twig cp $DIR/../../../FrameworkBundle/Resources/public/css/exception.css $DIR/../views/Collector/exception.css.twig src/Symfony/Bundle/WebProfilerBundle/Resources/config/000077500000000000000000000000001266465517700233365ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/config/commands.xml000066400000000000000000000020351266465517700256610ustar00rootroot00000000000000 Symfony\Bundle\WebProfilerBundle\Command\ImportCommand Symfony\Bundle\WebProfilerBundle\Command\ExportCommand src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml000066400000000000000000000041011266465517700256760ustar00rootroot00000000000000 Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController Symfony\Bundle\WebProfilerBundle\Controller\RouterController Symfony\Bundle\WebProfilerBundle\Controller\ExceptionController Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension %data_collector.templates% %web_profiler.debug_toolbar.position% %kernel.debug% src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/000077500000000000000000000000001266465517700250255ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml000066400000000000000000000037551266465517700274030ustar00rootroot00000000000000 web_profiler.controller.profiler:homeAction web_profiler.controller.profiler:searchAction web_profiler.controller.profiler:searchBarAction web_profiler.controller.profiler:purgeAction web_profiler.controller.profiler:infoAction web_profiler.controller.profiler:phpinfoAction web_profiler.controller.profiler:searchResultsAction web_profiler.controller.profiler:panelAction web_profiler.controller.router:panelAction web_profiler.controller.exception:showAction web_profiler.controller.exception:cssAction src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.xml000066400000000000000000000006351266465517700263510ustar00rootroot00000000000000 web_profiler.controller.profiler:toolbarAction src/Symfony/Bundle/WebProfilerBundle/Resources/config/schema/000077500000000000000000000000001266465517700245765ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/config/schema/webprofiler-1.0.xsd000066400000000000000000000014231266465517700301320ustar00rootroot00000000000000 src/Symfony/Bundle/WebProfilerBundle/Resources/config/toolbar.xml000066400000000000000000000021101266465517700255140ustar00rootroot00000000000000 Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener %web_profiler.debug_toolbar.intercept_redirects% %web_profiler.debug_toolbar.mode% %web_profiler.debug_toolbar.position% src/Symfony/Bundle/WebProfilerBundle/Resources/views/000077500000000000000000000000001266465517700232265ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/000077500000000000000000000000001266465517700251545ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig000066400000000000000000000025631266465517700277440ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set icon %} 0 {% endset %} {% set text %}
    AJAX requests
    Method URL Time Profile
    {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig000066400000000000000000000314541266465517700302670ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {# Symfony Logo #} {% set icon %} {% if collector.applicationname %} {{ collector.applicationname }} {{ collector.applicationversion }} {% elseif collector.symfonyState is defined %} {% if 'unknown' == collector.symfonyState -%} {%- elseif 'eol' == collector.symfonyState -%} {%- elseif 'eom' == collector.symfonyState -%} {%- elseif 'dev' == collector.symfonyState -%} {%- else -%} {%- endif -%} {{ collector.symfonyversion }} {% endif %} {% endset %} {% set text %} {% if collector.applicationname %}
    {{ collector.applicationname }} {{ collector.applicationversion }}
    {% endif %}
    Symfony {{ collector.symfonyversion }}
    {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} {# PHP Information #} {% set icon %} {% endset %} {% set text %} {% spaceless %}
    PHP {{ collector.phpversion }}
    PHP Extensions xdebug accel
    PHP SAPI {{ collector.sapiName }}
    {% endspaceless %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} {# Environment #} {% set debug_status_class %}sf-toolbar-status sf-toolbar-status-{{ collector.debug ? 'green' : 'red' }}{% endset %} {% set icon %} {{ token }} {% if 'n/a' != collector.appname or 'n/a' != collector.env %} {{ collector.appname }} {{ collector.env }} {% endif %} {% endset %} {% set text %} {% spaceless %} {% if 'n/a' != collector.appname %}
    Name {{ collector.appname }}
    {% endif %} {% if 'n/a' != collector.env %}
    Environment {{ collector.env }}
    {% endif %} {% if 'n/a' != collector.debug %}
    Debug {{ collector.debug ? 'en' : 'dis' }}abled
    {% endif %}
    Token {% if profiler_url %} {{ collector.token }} {% else %} {{ collector.token }} {% endif %}
    {% endspaceless %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Config {% endblock %} {% block panel %}

    Project Configuration

    {% if collector.applicationname %} {% else %} {% endif %} {% if 'n/a' != collector.appname %} {% endif %} {% if 'n/a' != collector.env %} {% endif %} {% if 'n/a' != collector.debug %} {% endif %}
    Key Value
    Application {{ collector.applicationname }} {{ collector.applicationversion }} (on Symfony {{ collector.symfonyversion }})Symfony version {{ collector.symfonyversion }}
    Application name {{ collector.appname }}
    Environment {{ collector.env }}
    Debug {{ collector.debug ? 'enabled' : 'disabled' }}

    PHP configuration

    Key Value
    PHP version {{ collector.phpversion }}
    Xdebug {{ collector.hasxdebug ? 'enabled' : 'disabled' }}
    PHP acceleration {{ collector.hasaccelerator ? 'enabled' : 'disabled' }}
    XCache {{ collector.hasxcache ? 'enabled' : 'disabled' }}
    APC {{ collector.hasapc ? 'enabled' : 'disabled' }}
    Zend OPcache {{ collector.haszendopcache ? 'enabled' : 'disabled' }}
    EAccelerator {{ collector.haseaccelerator ? 'enabled' : 'disabled' }}
    Full PHP configuration phpinfo
    {% if collector.bundles %}

    Active bundles

    {% set bundles = collector.bundles %} {% for name in bundles|keys|sort %} {% endfor %}
    Name Path
    {{ name }} {{ bundles[name] }}
    {% endif %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig000066400000000000000000000076361266465517700303330ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% from _self import display_listener %} {% block menu %} Events {% endblock %} {% block panel %} {% if collector.calledlisteners|length %} {{ block('panelContent') }} {% else %}

    Events

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

    {% endif %} {% endblock %} {% block panelContent %}

    Called Listeners

    {% for listener in collector.calledlisteners %} {% endfor %}
    Event name Listener
    {{ listener.event }} {{ display_listener(listener) }}

    Not Called Listeners

    {% if collector.notcalledlisteners %} {% set listeners = collector.notcalledlisteners %} {% for listener in listeners|keys|sort %} {% endfor %}
    Event name Listener
    {{ listeners[listener].event }} {{ display_listener(listeners[listener]) }}
    {% else %}

    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).

    {% endif %} {% endblock %} {% macro display_listener(listener) %} {% if listener.type == "Closure" %} Closure {% elseif listener.type == "Function" %} {% set link = listener.file|file_link(listener.line) %} {% if link %}{{ listener.function }}{% else %}{{ listener.function }}{% endif %} {% elseif listener.type == "Method" %} {% set link = listener.file|file_link(listener.line) %} {{ listener.class|abbr_class }}::{% if link %}{{ listener.method }}{% else %}{{ listener.method }}{% endif %} {% endif %} {% endmacro %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig000066400000000000000000000041721266465517700306410ustar00rootroot00000000000000.sf-reset .traces { padding-bottom: 14px; } .sf-reset .traces li { font-size: 12px; color: #868686; padding: 5px 4px; list-style-type: decimal; margin-left: 20px; } .sf-reset #logs .traces li.error { font-style: normal; color: #AA3333; background: #f9ecec; } .sf-reset #logs .traces li.warning { font-style: normal; background: #ffcc00; } /* fix for Opera not liking empty
  • */ .sf-reset .traces li:after { content: "\00A0"; } .sf-reset .trace { border: 1px solid #D3D3D3; padding: 10px; overflow: auto; margin: 10px 0 20px; } .sf-reset .block-exception { border-radius: 16px; margin-bottom: 20px; background-color: #f6f6f6; border: 1px solid #dfdfdf; padding: 30px 28px; word-wrap: break-word; overflow: hidden; } .sf-reset .block-exception div { color: #313131; font-size: 10px; } .sf-reset .block-exception-detected .illustration-exception, .sf-reset .block-exception-detected .text-exception { float: left; } .sf-reset .block-exception-detected .illustration-exception { width: 152px; } .sf-reset .block-exception-detected .text-exception { width: 670px; padding: 30px 44px 24px 46px; position: relative; } .sf-reset .text-exception .open-quote, .sf-reset .text-exception .close-quote { position: absolute; } .sf-reset .open-quote { top: 0; left: 0; } .sf-reset .close-quote { bottom: 0; right: 50px; } .sf-reset .block-exception p { font-family: Arial, Helvetica, sans-serif; } .sf-reset .block-exception p a, .sf-reset .block-exception p a:hover { color: #565656; } .sf-reset .logs h2 { float: left; width: 654px; } .sf-reset .error-count { float: right; width: 170px; text-align: right; } .sf-reset .error-count span { display: inline-block; background-color: #aacd4e; border-radius: 6px; padding: 4px; color: white; margin-right: 2px; font-size: 11px; font-weight: bold; } .sf-reset .toggle { vertical-align: middle; } .sf-reset .linked ul, .sf-reset .linked li { display: inline; } .sf-reset #output-content { color: #000; font-size: 12px; } src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig000066400000000000000000000057111266465517700310150ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block head %} {% if collector.hasexception %} {% endif %} {{ parent() }} {% endblock %} {% block menu %} Exception {% if collector.hasexception %} 1 {% endif %} {% endblock %} {% block panel %}

    Exception

    {% if not collector.hasexception %}

    No exception was thrown and uncaught during the request.

    {% else %}
    {{ render(path('_profiler_exception', { 'token': token })) }}
    {% endif %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig000066400000000000000000000565471266465517700277770ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% from _self import form_tree_entry, form_tree_details %} {% block toolbar %} {% if collector.data|length %} {% set icon %} {% if collector.data.nb_errors %}{{ collector.data.nb_errors }}{% else %}{{ collector.data.forms|length }}{% endif %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endif %} {% endblock %} {% block menu %} Forms {% if collector.data.forms|length %} {{ collector.data.forms|length }} {% endif %} {% endblock %} {% block panel %} {% if collector.data.forms|length %}

    Forms

      {% 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) }} {% endfor %}
    {% else %}

    No forms were submitted for this request.

    {% endif %} {% endblock %} {% macro form_tree_entry(name, data, expanded) %} {% import _self as tree %}
  • {% if data.children is not empty %} {% else %}
    {% endif %} {{ name|default('(no name)') }} {% if data.type_class is defined and data.type is defined %}[{{ data.type }}]{% endif %} {% if data.errors is defined and data.errors|length > 0 %}
    {{ data.errors|length }}
    {% endif %}
    {% if data.children is not empty %} {% endif %}
  • {% endmacro %} {% macro form_tree_details(name, data, forms_by_hash) %} {% import _self as tree %}

    {{ name|default('(no name)') }} {% if data.type_class is defined and data.type is defined %} [{{ data.type }}] {% endif %}

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

    Errors

    {% for error in data.errors %} {% endfor %}
    Message Origin Cause
    {{ 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 %} {% for trace in error.trace %} {% if not loop.first %}
    Caused by:

    {% endif %} {% if trace.root is defined %} {{ trace.class }}
                                        {{- trace.root -}}
                                        {%- if trace.path is not empty -%}
                                            {%- if trace.path|first != '[' %}.{% endif -%}
                                            {{- trace.path -}}
                                        {%- endif %} = {{ trace.value -}}
                                    
    {% elseif trace.message is defined %} {{ trace.class }}
    {{ trace.message }}
    {% else %}
    {{ trace }}
    {% endif %} {% else %} Unknown. {% endfor %}
    {% endif %} {% if data.default_data is defined %}

    Default Data

    Model Format {% if data.default_data.model is defined %}
    {{ data.default_data.model }}
    {% else %} same as normalized format {% endif %}
    Normalized Format
    {{ data.default_data.norm }}
    View Format {% if data.default_data.view is defined %}
    {{ 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 %}
    View Format {% if data.submitted_data.view is defined %}
    {{ data.submitted_data.view }}
    {% else %} same as normalized format {% endif %}
    Normalized Format
    {{ data.submitted_data.norm }}
    Model Format {% if data.submitted_data.model is defined %}
    {{ 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 %}
    Option Passed Value Resolved Value
    {{ option }}
    {{ value }}
    {% if data.resolved_options[option] is same as(value) %} same as passed value {% else %}
    {{ 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 %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig000066400000000000000000000203551266465517700302770ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% import _self as logger %} {% block toolbar %} {% if collector.counterrors or collector.countdeprecations or collector.countscreams %} {% set icon %} {% if collector.counterrors %} {% set status_color = "red" %} {% elseif collector.countdeprecations %} {% set status_color = "yellow" %} {% endif %} {% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %} {{ error_count }} {% endset %} {% set text %} {% if collector.counterrors %}
    Errors {{ collector.counterrors }}
    {% endif %} {% if collector.countdeprecations %}
    Deprecated Calls {{ collector.countdeprecations }}
    {% endif %} {% if collector.countscreams %}
    Silenced Errors {{ collector.countscreams }}
    {% endif %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endif %} {% endblock %} {% block menu %} Logs {% if collector.counterrors or collector.countdeprecations or collector.countscreams %} {% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %} {{ error_count }} {% endif %} {% endblock %} {% block panel %}

    Logs

    {% set priority = request.query.get('priority', 0) %}
    Filter
    {% if collector.logs %}
      {% set log_loop_index = 0 %} {% for log in collector.logs %} {% set is_deprecation = log.context.level is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %} {% if priority == '-100' ? is_deprecation : log.priority >= priority %} {% set log_loop_index = log_loop_index + 1 %}
    • {{ logger.display_message(loop.index, log, is_deprecation) }}
    • {% endif %} {% else %}
    • No logs available for this priority.
    • {% endfor %}
    {% else %}

    No logs available.

    {% endif %} {% endblock %} {% macro display_message(log_index, log, is_deprecation) %} {{ is_deprecation ? 'DEPRECATED' : log.priorityName }} - {{ log.message }} {% if is_deprecation %} {% set stack = log.context.stack|default([]) %} {% set id = 'sf-call-stack-' ~ log_index %} {% if log.context.errorCount is defined %} ({{ log.context.errorCount }}x) {% endif %} {% if stack %} + {% endif %} {% for index, call in stack if index > 1 %} {% if index == 2 %} {% endif %} {% endfor %} {% else %} {% if log.context is defined and log.context is not empty %}
    Context: {{ log.context|json_encode(64 b-or 256) }} {% endif %} {% endif %} {% endmacro %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig000066400000000000000000000017271266465517700303320ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set icon %} {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB {% endset %} {% set text %}
    Memory usage {{ '%.1f'|format(collector.memory / 1024 / 1024) }} / {{ collector.memoryLimit == -1 ? '∞' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB
    {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig000066400000000000000000000263041266465517700305100ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set request_handler %} {% if collector.controller.class is defined %} {% set link = collector.controller.file|file_link(collector.controller.line) %} {% if collector.controller.method %} {{ collector.controller.class|abbr_class }} {{ collector.controller.method }} {% else %} {{ collector.controller.class|abbr_class }} {% endif %} {% else %} {{ collector.controller }} {% endif %} {% endset %} {% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red'%} {% set request_route = collector.route ? collector.route : 'NONE' %} {% set icon %} {{ collector.statuscode }} {{ request_handler }} on {{ request_route }} {% endset %} {% set text %} {% spaceless %}
    Status {{ collector.statuscode }} {{ collector.statustext }}
    Controller {{ request_handler }}
    Route name {{ request_route }}
    Has session {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %}
    {% endspaceless %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Request {% endblock %} {% block panel %}

    Request GET Parameters

    {% if collector.requestquery.all|length %} {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestquery } only %} {% else %}

    No GET parameters

    {% endif %}

    Request POST Parameters

    {% if collector.requestrequest.all|length %} {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestrequest } only %} {% else %}

    No POST parameters

    {% endif %}

    Request Attributes

    {% if collector.requestattributes.all|length %} {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestattributes } only %} {% else %}

    No attributes

    {% endif %}

    Request Cookies

    {% if collector.requestcookies.all|length %} {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestcookies } only %} {% else %}

    No cookies

    {% endif %}

    Request Headers

    {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestheaders } only %}

    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 %}

    Request Server Parameters

    {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.requestserver } only %}

    Response Headers

    {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': collector.responseheaders } only %}

    Session Metadata

    {% if collector.sessionmetadata|length %} {% include '@WebProfiler/Profiler/table.html.twig' with { 'data': collector.sessionmetadata } only %} {% else %}

    No session metadata

    {% endif %}

    Session Attributes

    {% if collector.sessionattributes|length %} {% include '@WebProfiler/Profiler/table.html.twig' with { 'data': collector.sessionattributes } only %} {% else %}

    No session attributes

    {% endif %}

    Flashes

    {% if collector.flashes|length %} {% include '@WebProfiler/Profiler/table.html.twig' with { 'data': collector.flashes } only %} {% else %}

    No flashes

    {% endif %} {% if profile.parent %}

    Parent request: {{ profile.parent.token }}

    {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': profile.parent.getcollector('request').requestattributes } only %} {% endif %} {% if profile.children|length %}

    Sub requests

    {% for child in profile.children %}

    {{ child.token }}

    {% include '@WebProfiler/Profiler/bag.html.twig' with { 'bag': child.getcollector('request').requestattributes } only %} {% endfor %} {% endif %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/router.html.twig000066400000000000000000000017371266465517700303430ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% endblock %} {% block menu %} Routing {% endblock %} {% block panel %} {{ render(path('_profiler_router', {'token': token})) }} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig000066400000000000000000000443611266465517700277610ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% from _self import display_timeline, dump_request_data %} {% if colors is not defined %} {% set colors = { 'default': '#aacd4e', 'section': '#666', 'event_listener': '#3dd', 'event_listener_loading': '#add', 'template': '#dd3', 'doctrine': '#d3d', 'propel': '#f4d', 'child_sections': '#eed', } %} {% endif %} {% block toolbar %} {% set duration = collector.events|length ? '%.0f ms'|format(collector.duration) : 'n/a' %} {% set icon %} {{ duration }} {% endset %} {% set text %}
    Total time {{ duration }}
    {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Timeline {% endblock %} {% block panel %}

    Timeline

    {% if collector.events|length %} {{ block('panelContent') }} {% else %}

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

    {% endif %} {% endblock %} {% block panelContent %}
    Total time {{ '%.0f'|format(collector.duration) }} ms
    Initialization time {{ '%.0f'|format(collector.inittime) }} ms
    Threshold ms

    {{ profile.parent ? "Request" : "Main Request" }} - {{ collector.events.__section__.duration }} ms {% if profile.parent %} - parent {% endif %}

    {{ display_timeline('timeline_' ~ token, collector.events, colors) }} {% if profile.children|length %} {% for child in profile.children %} {% set events = child.getcollector('time').events %}

    Sub-request "{{ child.getcollector('request').requestattributes.get('_controller') }}" - {{ events.__section__.duration }} ms

    {{ 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 %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig000066400000000000000000000203171266465517700313540ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% import _self as translator %} {% block toolbar %} {% if collector.messages|length %} {% set icon %} {% if collector.countMissings %} {% set status_color = "red" %} {% elseif collector.countFallbacks %} {% set status_color = "yellow" %} {% endif %} {% set error_count = collector.countMissings + collector.countFallbacks %} {{ error_count ?: collector.countdefines }} {% endset %} {% set text %} {% if collector.countMissings %}
    Missing messages {{ collector.countMissings }}
    {% endif %} {% if collector.countFallbacks %}
    Fallback messages {{ collector.countFallbacks }}
    {% endif %} {% if collector.countdefines %}
    Defined messages {{ collector.countdefines }}
    {% endif %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endif %} {% endblock %} {% block menu %} Translation {% endblock %} {% block panel %} {% if collector.messages is empty %}

    Translations

    No translations have been called.

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

    Translation Stats

    Defined messages
    {{ collector.countdefines }}
    Fallback messages
    {{ collector.countFallbacks }}
    Missing messages
    {{ collector.countMissings }}
    {% for message in collector.messages %} {% endfor %}
    State Locale Domain Id Message Preview
    {{ translator.state(message) }} {{ message.locale }} {{ message.domain }} {{ message.id }} {% if message.count > 1 %}
    (used {{ message.count }} times){% endif %}
    {{ message.translation }}
    {% endblock %} {% macro state(translation) %} {% if translation.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %} same as fallback {% elseif translation.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING') %} missing {% endif %} {% endmacro %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig000066400000000000000000000114461266465517700277730ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %} {% set icon %} {{ time }} {% endset %} {% set text %}
    Render Time {{ time }}
    Template Calls {{ collector.templatecount }}
    Block Calls {{ collector.blockcount }}
    Macro Calls {{ collector.macrocount }}
    {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Twig {{ collector.templatecount }} {{ '%0.0f ms'|format(collector.time) }} {% endblock %} {% block panel %} {% if collector.templatecount %}

    Twig Stats

    Total Render Time
    including sub-requests rendering time
    {{ '%0.0f ms'|format(collector.time) }}
    Template Calls
    {{ collector.templatecount }}
    Block Calls
    {{ collector.blockcount }}
    Macro Calls
    {{ collector.macrocount }}

    Rendered Templates

    {% for template, count in collector.templates %} {% endfor %}
    Template Name Render Count
    {{ template }}
    {{ count }}

    Rendering Call Graph

    {{ collector.htmlcallgraph }} {% else %}

    No Twig templates were rendered for this request.

    {% endif %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/000077500000000000000000000000001266465517700250105ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig000066400000000000000000000033241266465517700277410ustar00rootroot00000000000000{% if token is not empty %} {% endif %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/ajax_layout.html.twig000066400000000000000000000000251266465517700311640ustar00rootroot00000000000000{% block panel '' %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig000066400000000000000000000007211266465517700274000ustar00rootroot00000000000000 {% for key in bag.keys|sort %} {% endfor %}
    Key Value
    {{ key }}
    {{ profiler_dump(bag.get(key)) }}
    src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig000066400000000000000000000043721266465517700275670ustar00rootroot00000000000000 {% block title 'Profiler' %} {% block head %} {% endblock %} {% block body '' %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig000066400000000000000000000301641266465517700302610ustar00rootroot00000000000000 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig000066400000000000000000000147771266465517700274500ustar00rootroot00000000000000/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.1.2 build: 56 */ .sf-reset div,.sf-reset dl,.sf-reset dt,.sf-reset dd,.sf-reset ul,.sf-reset ol,.sf-reset li,.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6,.sf-reset pre,.sf-reset code,.sf-reset form,.sf-reset fieldset,.sf-reset legend,.sf-reset input,.sf-reset textarea,.sf-reset p,.sf-reset blockquote,.sf-reset th,.sf-reset td{margin:0;padding:0;}.sf-reset table{border-collapse:collapse;border-spacing:0;}.sf-reset fieldset,.sf-reset img{border:0;}.sf-reset address,.sf-reset caption,.sf-reset cite,.sf-reset code,.sf-reset dfn,.sf-reset em,.sf-reset strong,.sf-reset th,.sf-reset var{font-style:normal;font-weight:normal;}.sf-reset li{list-style:none;}.sf-reset caption,.sf-reset th{text-align:left;}.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6{font-size:100%;font-weight:normal;}.sf-reset q:before,.sf-reset q:after{content:'';}.sf-reset abbr,.sf-reset acronym{border:0;font-variant:normal;}.sf-reset sup{vertical-align:text-top;}.sf-reset sub{vertical-align:text-bottom;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-size:100%;}.sf-reset legend{color:#000;} .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } .sf-reset p { font-size: 14px; line-height: 20px; padding-bottom: 20px; } .sf-reset strong { color: #313131; font-weight: bold; } .sf-reset a { color: #6c6159; } .sf-reset a img { border: none; } .sf-reset a:hover { text-decoration: underline; } .sf-reset em { font-style: italic; } .sf-reset h2, .sf-reset h3 { font-weight: bold; } .sf-reset h1 { font-family: Georgia, "Times New Roman", Times, serif; font-size: 20px; color: #313131; word-break: break-all; } .sf-reset li { padding-bottom: 10px; } .sf-reset .block { -moz-border-radius: 16px; -webkit-border-radius: 16px; border-radius: 16px; margin-bottom: 20px; background-color: #FFFFFF; border: 1px solid #dfdfdf; padding: 40px 50px; } .sf-reset h2 { font-size: 16px; font-family: Arial, Helvetica, sans-serif; } .sf-reset li a { background: none; color: #868686; text-decoration: none; } .sf-reset li a:hover { background: none; color: #313131; text-decoration: underline; } .sf-reset ol { padding: 10px 0; } .sf-reset ol li { list-style: decimal; margin-left: 20px; padding: 2px; padding-bottom: 20px; } .sf-reset ol ol li { list-style-position: inside; margin-left: 0; white-space: nowrap; font-size: 12px; padding-bottom: 0; } .sf-reset li .selected { background-color: #ffd; } .sf-button { display: -moz-inline-box; display: inline-block; text-align: center; vertical-align: middle; border: 0; background: transparent none; text-transform: uppercase; cursor: pointer; font: bold 11px Arial, Helvetica, sans-serif; } .sf-button span { text-decoration: none; display: block; height: 28px; float: left; } .sf-button .border-l { text-decoration: none; display: block; height: 28px; float: left; padding: 0 0 0 7px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQtJREFUeNpiPHnyJAMakARiByDWYEGT8ADiYGVlZStubm5xlv///4MEQYoKZGRkQkRERLRYWVl5wYJQyXBZWdkwCQkJUxAHKgaWlAHSLqKiosb//v1DsYMFKGCvoqJiDmQzwXTAJYECulxcXNLoumCSoszMzDzoumDGghQwYZUECWIzkrAkSIIGOmlkLI10AiX//P379x8jIyMTNmPf/v79+ysLCwsvuiQoNi5//fr1Kch4dAyS3P/gwYMTQBP+wxwHw0xA4gkQ73v9+vUZdJ2w1Lf82bNn4iCHCQoKasHsZw4ODgbRIL8c+/Lly5M3b978Y2dn5wC6npkFLXnsAOKLjx49AmUHLYAAAwBoQubG016R5wAAAABJRU5ErkJggg==) no-repeat top left; } .sf-button .border-r { padding: 0 7px 0 0; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button .btn-bg { padding: 0 14px; color: #636363; line-height: 28px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left; } .sf-button:hover .border-l, .sf-button-selected .border-l { background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR9JREFUeNpi/P//PwMyOHfunDqQSgNiexZkibNnzxYBqZa3HOs5v7PcYQBLnjlzhg1IbfzIdsTjA/t+ht9Mr8GKwZL//v3r+sB+0OMN+zqIEf8gFMvJkyd1gXTOa9YNDP//otrPAtSV/Jp9HfPff78Z0AEL0LUeXxivMfxD0wXTqfjj/2ugkf+wSrL9/YtpJEyS4S8WI5Ek/+GR/POPFjr//cenE6/kP9q4Fo/kr39/mdj+M/zFkGQCSj5i+ccPjLJ/GBgkuYOHQR1sNDpmAkb2LBmWwL///zKCIxwZM0VHR18G6p4uxeLLAA4tJMwEshiou1iMxXaHLGswA+t/YbhORuQUv2DBAnCifvxzI+enP3dQJUFg/vz5sOzgBBBgAPxX9j0YnH4JAAAAAElFTkSuQmCC) no-repeat top left; } .sf-button:hover .border-r, .sf-button-selected .border-r { background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNpiPHv27BkGBoaDQDzLyMjoJgMSYHrM3WX8hn1d0f///88DFRYhSzIuv2X5H8Rg/SfKIPDTkYH/l80OINffxMTkF9O/f/8ZQPgnwyuGl+wrGd6x7vf49+9fO9jYf3+Bkkj4NesmBqAV+SdPntQC6vzHgIz//gOawbqOGchOxtAJwp8Zr4F0e7D8/fuPAR38/P8eZIo0yz8skv8YvoIk+YE6/zNgAyD7sRqLkPzzjxY6/+HS+R+fTkZ8djLh08lCUCcuSWawJGbwMTGwg7zyBatX2Bj5QZKPsBrLzaICktzN8g/NWEYGZgYZjoC/wMiei5FMpFh8QPSU6Ojoy3Cd7EwiDBJsDgxiLNY7gLrKQGIsHAxSDHxAO2TZ/b8D+TVxcXF9MCtYtLiKLgDpfUDVsxITE1GyA0CAAQA2E/N8VuHyAAAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button:hover .btn-bg, .sf-button-selected .btn-bg { color: #FFFFFF; text-shadow:0 1px 1px #6b9311; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAIAAAAvP0KbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpiPnv2LNMdvlymf///M/37B8R/QfQ/MP33L4j+B6Qh7L9//sHpf2h8MA1V+w/KRjYLaDaLCU8vQIABAFO3TxZriO4yAAAAAElFTkSuQmCC) repeat-x top left; } src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig000066400000000000000000000163331266465517700301050ustar00rootroot00000000000000 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig000066400000000000000000000037661266465517700276160ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/base.html.twig' %} {% block body %}
    {% include '@WebProfiler/Profiler/header.html.twig' only %}
    {% block panel %} {% if about == 'purge' %}

    The profiler database was purged successfully

    Now you need to browse some pages with the Symfony Profiler enabled to collect data.

    {% elseif about == 'upload_error' %}

    A problem occurred when uploading the data

    No file given or the file was not uploaded successfully.

    {% elseif about == 'already_exists' %}

    A problem occurred when uploading the data

    The token already exists in the database.

    {% elseif about == 'no_token' %}

    Token not found

    Token "{{ token }}" was not found in the database.

    {% endif %} {% endblock %}
    {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig000066400000000000000000000130621266465517700301660ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/base.html.twig' %} {% block body %} {{ render(path('_wdt', { 'token': token, 'position': 'normal' })) }}
    {% include '@WebProfiler/Profiler/header.html.twig' only %}
    {% if profile %}
    View last 10 Profile for: {{ profile.method|upper }} {% if profile.method|upper in ['GET', 'HEAD'] %} {{ profile.url }} {% else %} {{ profile.url }} {% endif %} by {{ profile.ip }} at {{ profile.time|date('r') }}
    {% endif %}
    {% include '@WebProfiler/Profiler/base_js.html.twig' %} {% block panel '' %}
    {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig000066400000000000000000000245501266465517700303230ustar00rootroot00000000000000/* Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.6.0 */ html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;} html, body { background-color: #efefef; } body { font: 1em "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; text-align: left; } p { font-size: 14px; line-height: 20px; color: #313131; padding-bottom: 20px } strong { color: #313131; font-weight: bold; } em { font-style: italic; } a { color: #6c6159; } a img { border: none; } a:hover { text-decoration: underline; } button::-moz-focus-inner { padding: 0; border: none; } button { overflow: visible; width: auto; background-color: transparent; font-weight: bold; } caption { margin-bottom: 7px; } table, tr, th, td { border-collapse: collapse; border: 1px solid #d0dbb3; } table { width: 100%; margin: 10px 0 30px; } table th { font-weight: bold; background-color: #f1f7e2; } table th, table td { font-size: 12px; padding: 8px 10px; } table td em { color: #aaa; } fieldset { border: none; } abbr { border-bottom: 1px dotted #000; cursor: help; } pre, code { font-size: 0.9em; } .clear { clear: both; height: 0; font-size: 0; line-height: 0; } .clear-fix:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; } * html .clear-fix { height: 1%; } .clear-fix { display: block; } #content { padding: 0 50px; margin: 0 auto 20px; font-family: Arial, Helvetica, sans-serif; min-width: 970px; } #header { padding: 20px 30px 20px; } #header h1 { float: left; } .search { float: right; } #menu-profiler { border-right: 1px solid #dfdfdf; } #menu-profiler li { border-bottom: 1px solid #dfdfdf; position: relative; padding-bottom: 0; display: block; background-color: #f6f6f6; z-index: 10000; } #menu-profiler li a { color: #404040; display: block; font-size: 13px; text-transform: uppercase; text-decoration: none; cursor: pointer; } #menu-profiler li a span.label { display: block; padding: 20px 0 16px 65px; min-height: 16px; overflow: hidden; } #menu-profiler li a span.icon { display: block; position: absolute; left: 0; top: 12px; width: 60px; text-align: center; } #menu-profiler li.selected a, #menu-profiler li a:hover { background: #d1d1d1 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA7CAAAAACfn7+eAAAACXZwQWcAAAABAAAAOwDiPIGUAAAAJElEQVQIW2N4y8TA9B+KGZDYEP5/FD4Eo7IgNLJqZDUIMRRTAcmVHUZf/1g/AAAAAElFTkSuQmCC) repeat-x 0 0; } #navigation div:first-child, #menu-profiler li:first-child, #menu-profiler li:first-child a, #menu-profiler li:first-child a span.label { border-radius: 16px 0 0 0; } #menu-profiler li a span.count { padding: 0; position: absolute; right: 10px; top: 20px; } #collector-wrapper { float: left; width: 100%; } #collector-content { margin-left: 250px; padding: 30px 40px 40px; } #collector-content pre { white-space: pre-wrap; word-break: break-all; } #navigation { float: left; width: 250px; margin-left: -100%; } #collector-content table td { background-color: white; } h1 { font-family: Georgia, "Times New Roman", Times, serif; color: #404040; } h2, h3 { font-weight: bold; margin-bottom: 20px; } li { padding-bottom: 10px; } #main { border-radius: 16px; margin-bottom: 20px; } #menu-profiler span.count span { display: inline-block; background-color: #aacd4e; border-radius: 6px; padding: 4px; color: #fff; margin-right: 2px; font-size: 11px; } #resume { background-color: #f6f6f6; border-bottom: 1px solid #dfdfdf; padding: 18px 10px 14px; margin-left: 250px; min-height: 20px; color: #313131; font-size: 12px; border-top-right-radius: 16px; line-height: 18px; } a#resume-view-all { display: inline-block; padding: 0.2em 0.7em; margin-right: 0.5em; background-color: #666; border-radius: 16px; color: white; font-weight: bold; text-decoration: none; line-height: 14px; } #resume-url { word-wrap: break-word; word-break: break-all; } table th.value { width: 450px; background-color: #dfeeb8; } #content h2 { font-size: 24px; color: #313131; font-weight: bold; } #content #main { padding: 0; background-color: #FFF; border: 1px solid #dfdfdf; } #content #main p { color: #313131; font-size: 14px; padding-bottom: 20px; } .sf-toolbarreset { border-top: 0; padding: 0; } .sf-reset .block-exception-detected .text-exception { left: 10px; right: 10px; width: 95%; } .sf-reset .block-exception-detected .illustration-exception { display: none; } ul.alt { margin: 10px 0 30px; } ul.alt li { padding: 5px 7px; font-size: 13px; } ul.alt li.even { background: #f1f7e2; } ul.alt li.error { background-color: #f66; margin-bottom: 1px; } ul.alt li.warning { background-color: #ffcc00; margin-bottom: 1px; } ul.alt li.scream, ul.alt li.scream strong { color: gray; } ul.sf-call-stack li { padding: 0 0 0 20px; } td.main, td.menu { text-align: left; margin: 0; padding: 0; border: 0; vertical-align: top; } .search { float: right; padding-top: 20px; } .search label { line-height: 28px; vertical-align: middle; } .search input { width: 195px; font-size: 12px; border: 1px solid #dadada; background: #FFF url(data:image/gif;base64,R0lGODlhAQAFAKIAAPX19e/v7/39/fr6+urq6gAAAAAAAAAAACH5BAAAAAAALAAAAAABAAUAAAMESAEjCQA7) repeat-x left top; padding: 5px 6px; color: #565656; } .search input[type="search"] { -webkit-appearance: textfield; } #navigation div:first-child { margin: 0 0 20px; border-top: 0; } #navigation .search { padding-top: 15px; float: none; background: none repeat scroll 0 0 #f6f6f6; color: #333; margin: 20px 0; border: 1px solid #dfdfdf; border-left: none; } #navigation .search h3 { font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; margin-left: 10px; font-size: 13px; } #navigation .search form { padding: 15px 0; } #navigation .search button { float: right; margin-right: 20px; } #navigation .search label { display: block; float: left; width: 50px; } #navigation .search input, #navigation .search select, #navigation .search label, #navigation .search a { font-size: 12px; } #navigation .search form { padding-left: 10px; } #navigation .search input { width: 160px; } #navigation .import label { float: none; display: inline; } #navigation .import input { width: 100px; } .timeline { background-color: #fbfbfb; margin-bottom: 15px; margin-top: 5px; } #collector-content .routing tr.matches td { background-color: #0e0; } #collector-content .routing tr.almost td { background-color: #fa0; } .loading { background: transparent url(data:image/gif;base64,R0lGODlhGAAYAPUmAAQCBFxeXBwaHOzq7JSWlAwODCQmJPT29JyenJSSlCQiJPTy9BQWFCwuLAQGBKyqrBweHOzu7Ly+vHx+fGxubLy6vMTCxMzKzBQSFKSmpLSytJyanAwKDHRydPz+/HR2dCwqLMTGxPz6/Hx6fISGhGxqbGRmZOTi5DQyNDw6PKSipFxaXExOTLS2tISChIyKjERCRMzOzOTm5Nze3FRSVNza3FRWVKyurExKTNTS1ERGRNTW1GRiZIyOjDQ2NDw+PCH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBgAmACwAAAAAGAAYAAAGykCTcGhaRIiL0uNIbAoXEwaCeOAAMJ+Fc3hRAAAkogfzBUAsW43jC6k0BwQvwPFohqwAymFrOoy+DmhPcgl8RAhsTBNfFIZNiwAdRQxme45DByAABREPX4WXRBIkGwMlDgUDoXwDESKrsLGys7EeB1q0RQIcAZ0JgrCIAAgLBQAGlqEiDXOqH18jsCSMQhEQX1OXGV8MqkIWawATr1sH019uRBnhBsR2zNhbEgJlBeRCCdzpWxEUxg5MhDxwQMGbowgIAhg0MWDhkCAAIfkECQYAHQAsAAAAABgAGAAABsDAjnBI7AQMKdNjUWx2RMUXYArAjCJO4aUBHc5SBioAYnFqOICbc0BQTB2P4sUx3WQ7h9G7LFyEAQl3QwhTBl0TUxSCRAg3B30MY4+LTg9TgZROJlMnmU4pAAqeTmEpo0MnCTY0EzWnQiwAAq9EKAANtH10K7kdKlMIuQcNAA4DQiIVGZ5SAIpPtgDBixlTDMdCFnQAE12VVBVFGdsGCExNLcBOEgJUDg00rkMiBhJ3ERQFYi5Fk4IRCFY0gMBiURAAIfkECQYAGQAsAAAAABgAGAAABr/AjHAovJhSBkPK9FgQn9CdA0CtYkYRqDYzUqRgkCoAYtGenh7igKCgFmrPC2a3HR5Gqdxz0dal60J/RBNUHYB1CwxjB4dbD1QJjVEWJlRnkkMkDgEpAAqYRA0AKAYAKaBDLAACpTCoQqoCnQavGaINlRSCkgtTKxYxtSpUCLUZB6IOA8YkVBRQu1seOAAMy0QzNBMihzsFFU8nGFQGCE51cFASAlUODTQsKCOYERQFYlQOevQIKw0CAhqskLAlCAAh+QQJBgAVACwAAAAAGAAYAAAGvcCKcFhZPEwpgyFleiyI0OFiwgBYr1bGLArlYSGwpJXEhYoCit6AKNN4ylDPAU6vR0WliFBmj1MAHUUCCW99FSIgAAURD1YahkIIVggmVnyQC1YrKQAKkEMNAA0GACmfQiwAEKQwpxWpApwGrqENXgB6mA4AKxlWBJ8SkwsFAAYikB49BWsfADaFkFsVEStzrkPRdCLadBJPUiq2yHUbAA4NLCwou5rdUCdVWFcOFGt1EQgrDQICDTYI7kEJAgAh+QQJBgAiACwAAAAAGAAYAAAGvUCRcChaPEwpgyG1ITqdiwkDQK1KntiLogqAwFIBD1H81DiokIQMK3w9nJ5JAUA5sIURjMPylLXuQxJoEYCAE1QdhXcHIAAFhIpYCFQIKhdkkXhUKykAJplEDQANBgApoEMsAAKlMKhCqgKdBq8iJqO3AAOvHiEJGVQEtUILcwZ2wx9UE8NFEFR/hRa7ThIOHCeABy+OLphCDx93CyqilFjfIh0sLChnVAwVkTHvVQ4U1IobDQICDSsI8hEJAgAh+QQFBgAYACwAAAAAGAAYAAAGv0CMcIhZPEy/n4fIbBYnDIDUxqwsnMKLQipVZJgoiMWpcUghiVMzYnY8mBczgHLAHkZSx1i4gEgTWEQIZxFCLSBzgUwTUh1DHid1ikMHiAWFk1iDAAiZWBFSAZ5YDQANo04PNj44PDeoTB4pAAawTDxSmLYYGVIEu3wFtJKZIgNLQh9SI6MkDg0tQhF+nJm9AAwDQxZyEyJ2JFwVTBlyakwLCChcnU0SAgbIhihy2OOfr0S4eRTasDANbCDwxyQIADs=) scroll no-repeat 50% 50%; height: 30px; display: none; } .sf-profiler-timeline .legends { font-size: 12px; line-height: 1.5em; } .sf-profiler-timeline .legends span { border-left: 10px solid; padding: 0 10px 0 5px; } .sf-profiler-timeline canvas { border: 1px #999; border-style: solid none; } .collapsed-menu-parents #resume, .collapsed-menu-parents #collector-content { margin-left: 60px !important; } .collapsed-menu { width: 60px !important; } .collapsed-menu span.label > :not(.icon) { display: none !important; } .collapsed-menu #minimizePanelIcon { transform: rotate(180deg); } src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/results.html.twig000066400000000000000000000026641266465517700303600ustar00rootroot00000000000000{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block panel %}

    Search Results

    {% if tokens %} {% for elements in tokens %} {% endfor %}
    Token IP Method URL Time Status
    {{ elements.token }} {{ elements.ip }} {{ elements.method }} {{ elements.url }} {{ elements.time|date('r') }} {% if elements.status_code is defined and elements.status_code %} {{ elements.status_code }} {% else %} unknown {% endif %}
    {% else %}

    The query returned no result.

    {% endif %} {% endblock %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig000066400000000000000000000057141266465517700301230ustar00rootroot00000000000000 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig000066400000000000000000000007171266465517700277430ustar00rootroot00000000000000 {% for key in data|keys|sort %} {% endfor %}
    Key Value
    {{ key }}
    {{ profiler_dump(data[key]) }}
    src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig000066400000000000000000000254741266465517700301510ustar00rootroot00000000000000.sf-minitoolbar { display: none; position: fixed; bottom: 0; right: 0; padding: 5px 5px 0; background-color: #f7f7f7; background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff)); background-image: -o-linear-gradient(top, #e4e4e4, #ffffff); background: linear-gradient(top, #e4e4e4, #ffffff); border-radius: 16px 0 0 0; z-index: 6000000; } .sf-toolbarreset * { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; vertical-align: baseline; } .sf-toolbarreset { position: fixed; background-color: #f7f7f7; left: 0; right: 0; margin: 0; padding: 0 40px 0 0; z-index: 6000000; font: 11px Verdana, Arial, sans-serif; text-align: left; color: #2f2f2f; background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff)); background-image: -o-linear-gradient(top, #e4e4e4, #ffffff); background: linear-gradient(top, #e4e4e4, #ffffff); bottom: 0; border-top: 1px solid #bbb; } .sf-toolbarreset abbr { border-bottom: 1px dotted #000000; cursor: help; } .sf-toolbarreset span, .sf-toolbarreset div, .sf-toolbarreset td, .sf-toolbarreset th { font-size: 11px; } .sf-toolbarreset img { width: auto; display: inline; } .sf-toolbarreset table { border-collapse: collapse; border-spacing: 0; background-color: #000; margin: 0; padding: 0; border: 0; width: 100%; table-layout: auto; } .sf-toolbarreset .hide-button { display: block; position: absolute; top: 0; right: 0; width: 40px; height: 40px; cursor: pointer; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAAllBMVEXDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PExMTPz8/Q0NDR0dHT09Pb29vc3Nzf39/h4eHi4uLj4+P6+vr7+/v8/Pz9/f3///+Nh2QuAAAAIXRSTlMABgwPGBswMzk8QktRV4SKjZOWmaKlq7TAxszb3urt+fy1vNEpAAAAiklEQVQIHUXBBxKCQBREwRFzDqjoGh+C2YV//8u5Sll2S0E/dof1tKdKM6GyqCto7PjZRJIS/mbSELgXOSd/BzpKIH1ZefVWpDDTHsi8mZVnwImPi5ndCLbaAZk3M58Bay0h9VbeSvMpjDUAHj4jL55AW1rxN5fU2PLjIgVRzNdxVFOlGzvnJi0Fb1XNGBHA9uQOAAAAAElFTkSuQmCC'); background-repeat: no-repeat; background-position: 13px 11px; } .sf-toolbar-block { white-space: nowrap; color: #2f2f2f; display: block; min-height: 28px; border-bottom: 1px solid #e4e4e4; border-right: 1px solid #e4e4e4; padding: 0; float: left; cursor: default; } .sf-toolbar-block span { display: inline-block; } .sf-toolbar-block .sf-toolbar-info-piece { line-height: 19px; margin-bottom: 5px; } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { padding: 0 5px; border-radius: 5px; margin-bottom: 0; vertical-align: top; } .sf-toolbar-block .sf-toolbar-info-piece:last-child { margin-bottom: 0; } .sf-toolbar-block .sf-toolbar-info-piece a, .sf-toolbar-block .sf-toolbar-info-piece abbr { color: #2f2f2f; } .sf-toolbar-block .sf-toolbar-info-piece b { display: inline-block; min-width: 110px; vertical-align: top; } .sf-toolbar-block .sf-toolbar-info-with-next-pointer:after { content: ' :: '; color: #999; } .sf-toolbar-block .sf-toolbar-info-with-delimiter { border-right: 1px solid #999; padding-right: 5px; margin-right: 5px; } .sf-toolbar-block .sf-toolbar-info { display: none; position: absolute; background-color: #fff; padding: 9px 0; margin-left: -1px; bottom: 38px; border: 1px solid #bbb; border-radius: 4px 4px 0 0; } .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; border-radius: 3px; margin-bottom: 2px; vertical-align: middle; min-width: 6px; min-height: 13px; } .sf-toolbar-block .sf-toolbar-status abbr { color: #fff; border-bottom: 1px dotted black; } .sf-toolbar-block .sf-toolbar-status-green { background-color: #5e8014; } .sf-toolbar-block .sf-toolbar-status-red { background-color: #a33; } .sf-toolbar-block .sf-toolbar-status-yellow { background-color: #ffcc00; color: #000; } .sf-toolbar-block .sf-toolbar-status-black { background-color: #000; } .sf-toolbar-block .sf-toolbar-icon { display: block; } .sf-toolbar-block .sf-toolbar-icon > a, .sf-toolbar-block .sf-toolbar-icon > span { display: block; font-weight: normal; text-decoration: none; margin: 0; padding: 5px 8px; min-width: 20px; text-align: center; vertical-align: middle; } .sf-toolbar-block .sf-toolbar-icon > a, .sf-toolbar-block .sf-toolbar-icon > a:link, .sf-toolbar-block .sf-toolbar-icon > a:hover { color: black !important; } .sf-toolbar-block .sf-toolbar-icon > a[href]:after { content: ""; } .sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { border-width: 0; vertical-align: middle; } .sf-toolbar-block .sf-toolbar-icon img + span, .sf-toolbar-block .sf-toolbar-icon svg + span { margin-left: 5px; margin-top: 2px; } .sf-toolbar-block .sf-toolbar-icon .sf-toolbar-status { border-radius: 12px; border-bottom-left-radius: 0; margin-top: 0; } .sf-toolbar-block .sf-toolbar-info-method { border-bottom: 1px dashed #ccc; cursor: help; } .sf-toolbar-block .sf-toolbar-info-method[onclick=""] { border-bottom: none; cursor: inherit; } .sf-toolbar-info-php {} .sf-toolbar-info-php-ext {} .sf-toolbar-info-php-ext .sf-toolbar-status { margin-left: 2px; } .sf-toolbar-info-php-ext .sf-toolbar-status:first-child { margin-left: 0; } .sf-toolbar-block a .sf-toolbar-info-piece-additional, .sf-toolbar-block a .sf-toolbar-info-piece-additional-detail { display: inline-block; } .sf-toolbar-block a .sf-toolbar-info-piece-additional:empty, .sf-toolbar-block a .sf-toolbar-info-piece-additional-detail:empty { display: none; } .sf-toolbarreset:hover { box-shadow: rgba(0, 0, 0, 0.3) 0 0 50px; } .sf-toolbar-block:hover { box-shadow: rgba(0, 0, 0, 0.35) 0 0 5px; border-right: none; margin-right: 1px; position: relative; } .sf-toolbar-block:hover .sf-toolbar-icon { background-color: #fff; border-top: 1px dotted #DDD; position: relative; margin-top: -1px; z-index: 10002; } .sf-toolbar-block:hover .sf-toolbar-info { display: block; min-width: -webkit-calc(100% + 2px); min-width: calc(100% + 2px); z-index: 10001; box-sizing: border-box; padding: 9px; line-height: 19px; max-width: 480px; max-height: 480px; word-wrap: break-word; overflow: hidden; overflow-y: auto; } .sf-toolbar-ajax-requests th, .sf-toolbar-ajax-requests td { border-bottom: 1px solid #ddd; padding: 0 4px; color: #2f2f2f; background-color: #fff; } .sf-toolbar-ajax-requests th { background-color: #eee; } .sf-ajax-request-url { max-width: 300px; line-height: 9px; overflow: hidden; text-overflow: ellipsis; } .sf-ajax-request-duration { text-align: right; } .sf-ajax-request-error { color: #a33 !important; } .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% { color: black; } 50% { color: #bbb; } 100% { color: black; } } @-moz-keyframes sf-blink { 0% { color: black; } 50% { color: #bbb; } 100% { color: black; } } @-o-keyframes sf-blink { 0% { color: black; } 50% { color: #bbb; } 100% { color: black; } } @keyframes sf-blink { 0% { color: black; } 50% { color: #bbb; } 100% { color: black; } } /***** Override the setting when the toolbar is on the top *****/ {% if position == 'top' %} .sf-minitoolbar { top: 0; bottom: auto; right: 0; background-color: #f7f7f7; background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff); background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff)); background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff); background: linear-gradient(225deg, #e4e4e4, #ffffff); border-radius: 0 0 0 16px; } .sf-toolbarreset { background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff); background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff)); background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff); background: linear-gradient(225deg, #e4e4e4, #ffffff); top: 0; bottom: auto; border-bottom: 1px solid #bbb; } .sf-toolbar-block .sf-toolbar-info { top: 39px; bottom: auto; border-top-width: 0; border-radius: 0 0 4px 4px; } .sf-toolbar-block:hover .sf-toolbar-icon { border-top: none; border-bottom: 1px dotted #DDD; margin-top: 0; margin-bottom: -1px; } {% endif %} {% if not floatable %} .sf-toolbarreset { position: static; background: #cbcbcb; background-image: -moz-linear-gradient(90deg, #cbcbcb, #e8e8e8) !important; background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#cbcbcb), to(#e8e8e8)) !important; background-image: -o-linear-gradient(180deg, #cbcbcb, #e8e8e8) !important; background: linear-gradient(90deg, #cbcbcb, #e8e8e8) !important; } {% endif %} /***** Media query *****/ @media screen and (max-width: 779px) { .sf-toolbar-block .sf-toolbar-icon > * > :first-child ~ * { display: none; } .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional, .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail { display: none !important; } } @media screen and (min-width: 880px) { .sf-toolbar-block .sf-toolbar-icon a[href$="config"] .sf-toolbar-info-piece-additional { display: inline-block; } } @media screen and (min-width: 980px) { .sf-toolbar-block .sf-toolbar-icon a[href$="security"] .sf-toolbar-info-piece-additional { display: inline-block; } } @media screen and (max-width: 1179px) { .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional { display: none; } } @media screen and (max-width: 1439px) { .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail { display: none; } } /***** Media query print: Do not print the Toolbar. *****/ @media print { .sf-toolbar { display: none; visibility: hidden; } } src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig000066400000000000000000000065471266465517700303250ustar00rootroot00000000000000 {% if 'normal' != position %}
    {% endif %}
    {% for name, template in templates %} {{ template.renderblock('toolbar', { 'collector': profile.getcollector(name), 'profiler_url': profiler_url, 'token': profile.token, 'name': name }) }} {% endfor %} {% if 'normal' != position %} {% endif %}
    src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig000066400000000000000000000005141266465517700313270ustar00rootroot00000000000000{% if link|default(true) %} {% set icon %} {{ icon }} {% endset %} {% endif %}
    {{ icon|default('') }}
    {{ text|default('') }}
    src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig000066400000000000000000000062671266465517700310200ustar00rootroot00000000000000 {% include '@WebProfiler/Profiler/base_js.html.twig' %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_redirect.html.twig000066400000000000000000000011021266465517700321640ustar00rootroot00000000000000{% extends 'TwigBundle::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 %} src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/000077500000000000000000000000001266465517700245065ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig000066400000000000000000000030111266465517700274370ustar00rootroot00000000000000

    Routing for "{{ request.pathinfo }}"

    • Route:  {% if request.route %} {{ request.route }} {% else %} No matching route {% endif %}
    • Route parameters:  {% if request.routeParams|length %} {% include '@WebProfiler/Profiler/table.html.twig' with { 'data': request.routeParams, 'class': 'inline' } only %} {% else %} No parameters {% endif %}
    • {% if router.redirect %}
    • Redirecting to:  "{{ router.targetUrl }}" {% if router.targetRoute %}(route: "{{ router.targetRoute }}"){% endif %}
    • {% endif %}
    • Route matching logs {% for trace in traces %} {% endfor %}
      Route name Pattern Log
      {{ trace.name }} {{ trace.path }} {{ trace.log }}
      Note: The above matching is based on the configuration for the current router which might differ from the configuration used while routing this request.
    src/Symfony/Bundle/WebProfilerBundle/Tests/000077500000000000000000000000001266465517700212215ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/Command/000077500000000000000000000000001266465517700225775ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/Command/ExportCommandTest.php000066400000000000000000000031501266465517700267270ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\Tests\Command; use Symfony\Bundle\WebProfilerBundle\Command\ExportCommand; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\HttpKernel\Profiler\Profile; class ExportCommandTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \LogicException */ public function testExecuteWithUnknownToken() { $profiler = $this ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock() ; $command = new ExportCommand($profiler); $commandTester = new CommandTester($command); $commandTester->execute(array('token' => 'TOKEN')); } public function testExecuteWithToken() { $profiler = $this ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock() ; $profile = new Profile('TOKEN'); $profiler->expects($this->once())->method('loadProfile')->with('TOKEN')->will($this->returnValue($profile)); $command = new ExportCommand($profiler); $commandTester = new CommandTester($command); $commandTester->execute(array('token' => 'TOKEN')); $this->assertEquals($profiler->export($profile), $commandTester->getDisplay()); } } src/Symfony/Bundle/WebProfilerBundle/Tests/Command/ImportCommandTest.php000066400000000000000000000022231266465517700267200ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\Tests\Command; use Symfony\Bundle\WebProfilerBundle\Command\ImportCommand; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\HttpKernel\Profiler\Profile; class ImportCommandTest extends \PHPUnit_Framework_TestCase { public function testExecute() { $profiler = $this ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock() ; $profiler->expects($this->once())->method('import')->will($this->returnValue(new Profile('TOKEN'))); $command = new ImportCommand($profiler); $commandTester = new CommandTester($command); $commandTester->execute(array('filename' => __DIR__.'/../Fixtures/profile.data')); $this->assertRegExp('/Profile "TOKEN" has been successfully imported\./', $commandTester->getDisplay()); } } src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/000077500000000000000000000000001266465517700233445ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php000066400000000000000000000113201266465517700305400ustar00rootroot00000000000000 * * 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 Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController; use Symfony\Component\HttpKernel\Profiler\Profile; use Symfony\Component\HttpFoundation\Request; class ProfilerControllerTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getEmptyTokenCases */ public function testEmptyToken($token) { $urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); $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'), ); } public function testReturns404onTokenNotFound() { $urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); $profiler = $this ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock(); $controller = new ProfilerController($urlGenerator, $profiler, $twig, array()); $profiler ->expects($this->exactly(2)) ->method('loadProfile') ->will($this->returnCallback(function ($token) { if ('found' == $token) { return new Profile($token); } })) ; $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()); } public function testSearchResult() { $urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); $profiler = $this ->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock(); $controller = new ProfilerController($urlGenerator, $profiler, $twig, array()); $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)); $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', 'url' => 'http://example.com/', 'start' => null, 'end' => null, 'limit' => 2, 'panel' => null, ))); $response = $controller->searchResultsAction( Request::create( '/_profiler/empty/search/results', 'GET', array('limit' => 2, 'ip' => '127.0.0.1', 'method' => 'GET', 'url' => 'http://example.com/') ), 'empty' ); $this->assertEquals(200, $response->getStatusCode()); } } src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/000077500000000000000000000000001266465517700251425ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php000066400000000000000000000037511266465517700313300ustar00rootroot00000000000000 * * 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\DependencyInjection\Configuration; use Symfony\Component\Config\Definition\Processor; class ConfigurationTest extends \PHPUnit_Framework_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')), ); } } src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php000066400000000000000000000113711266465517700326330ustar00rootroot00000000000000 * * 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; use Symfony\Component\DependencyInjection\Scope; 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->getMock('Symfony\\Component\\HttpKernel\\KernelInterface'); $this->container = new ContainerBuilder(); $this->container->addScope(new Scope('request')); $this->container->register('request', 'Symfony\\Component\\HttpFoundation\\Request')->setScope('request'); $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('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')); if ($listenerInjected) { $this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled()); } $this->assertSaneContainer($this->getDumpedContainer()); } 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->enterScope('request'); $container->set('kernel', $this->kernel); return $container; } } src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/000077500000000000000000000000001266465517700240105ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php000066400000000000000000000237331266465517700321060ustar00rootroot00000000000000 * * 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 Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; class WebDebugToolbarListenerTest extends \PHPUnit_Framework_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('/')); $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 * @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')) ->will($this->returnValue('/_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('/_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->getMock( 'Symfony\Component\HttpFoundation\Request', array('getSession', 'isXmlHttpRequest', 'getRequestFormat'), array(), '', false ); $request->expects($this->any()) ->method('isXmlHttpRequest') ->will($this->returnValue($isXmlHttpRequest)); $request->expects($this->any()) ->method('getRequestFormat') ->will($this->returnValue($requestFormat)); if ($hasSession) { $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', false); $request->expects($this->any()) ->method('getSession') ->will($this->returnValue($session)); } return $request; } protected function getTwigMock($render = 'WDT') { $templating = $this->getMock('Twig_Environment', array(), array(), '', false); $templating->expects($this->any()) ->method('render') ->will($this->returnValue($render)); return $templating; } protected function getUrlGeneratorMock() { return $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); } protected function getKernelMock() { return $this->getMock('Symfony\Component\HttpKernel\Kernel', array(), array(), '', false); } } src/Symfony/Bundle/WebProfilerBundle/Tests/Fixtures/000077500000000000000000000000001266465517700230325ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/Fixtures/profile.data000066400000000000000000000014001266465517700253200ustar00rootroot00000000000000Tzo0NToiU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlIjo4OntzOjUyOiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAHRva2VuIjtzOjU6IlRPS0VOIjtzOjUzOiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAHBhcmVudCI7TjtzOjU1OiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAGNoaWxkcmVuIjthOjA6e31zOjU3OiIAU3ltZm9ueVxDb21wb25lbnRcSHR0cEtlcm5lbFxQcm9maWxlclxQcm9maWxlAGNvbGxlY3RvcnMiO2E6MDp7fXM6NDk6IgBTeW1mb255XENvbXBvbmVudFxIdHRwS2VybmVsXFByb2ZpbGVyXFByb2ZpbGUAaXAiO047czo1MzoiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQBtZXRob2QiO047czo1MDoiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQB1cmwiO047czo1MToiAFN5bWZvbnlcQ29tcG9uZW50XEh0dHBLZXJuZWxcUHJvZmlsZXJcUHJvZmlsZQB0aW1lIjtOO30=src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/000077500000000000000000000000001266465517700230035ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php000066400000000000000000000112031266465517700274170ustar00rootroot00000000000000 * * 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 \PHPUnit_Framework_MockObject_MockObject */ protected $profile; /** * @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() { $this->profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile') ->disableOriginalConstructor() ->getMock(); return $this->profile; } protected function mockTwigEnvironment() { $this->twigEnvironment = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock(); $this->twigEnvironment->expects($this->any()) ->method('loadTemplate') ->will($this->returnValue('loadedTemplate')); $this->twigEnvironment->expects($this->any()) ->method('getLoader') ->will($this->returnValue($this->getMock('\Twig_LoaderInterface'))); return $this->twigEnvironment; } protected function mockProfiler() { $this->profiler = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profiler') ->disableOriginalConstructor() ->getMock(); return $this->profiler; } } src/Symfony/Bundle/WebProfilerBundle/Tests/TestCase.php000066400000000000000000000005301266465517700234430ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\Tests; class TestCase extends \PHPUnit_Framework_TestCase { } src/Symfony/Bundle/WebProfilerBundle/Twig/000077500000000000000000000000001266465517700210315ustar00rootroot00000000000000src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php000066400000000000000000000021211266465517700256530ustar00rootroot00000000000000 * * 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; /** * Twig extension for the profiler. * * @author Fabien Potencier */ class WebProfilerExtension extends \Twig_Extension { /** * @var ValueExporter */ private $valueExporter; /** * {@inheritdoc} */ public function getFunctions() { return array( new \Twig_SimpleFunction('profiler_dump', array($this, 'dumpValue')), ); } public function dumpValue($value) { if (null === $this->valueExporter) { $this->valueExporter = new ValueExporter(); } return $this->valueExporter->exportValue($value); } /** * {@inheritdoc} */ public function getName() { return 'profiler'; } } src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php000066400000000000000000000006761266465517700242130ustar00rootroot00000000000000 * * 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 { } src/Symfony/Bundle/WebProfilerBundle/composer.json000066400000000000000000000020661266465517700226450ustar00rootroot00000000000000{ "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.3.9", "symfony/http-kernel": "~2.4", "symfony/routing": "~2.2", "symfony/twig-bridge": "~2.7" }, "require-dev": { "symfony/config": "~2.2", "symfony/console": "~2.3", "symfony/dependency-injection": "~2.2", "symfony/stopwatch": "~2.2" }, "autoload": { "psr-4": { "Symfony\\Bundle\\WebProfilerBundle\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist000066400000000000000000000014731266465517700232770ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/000077500000000000000000000000001266465517700152765ustar00rootroot00000000000000src/Symfony/Component/Asset/000077500000000000000000000000001266465517700163555ustar00rootroot00000000000000src/Symfony/Component/Asset/.gitignore000066400000000000000000000000421266465517700203410ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Asset/CHANGELOG.md000066400000000000000000000000711266465517700201640ustar00rootroot00000000000000CHANGELOG ========= 2.7.0 ----- * added the component src/Symfony/Component/Asset/Context/000077500000000000000000000000001266465517700200015ustar00rootroot00000000000000src/Symfony/Component/Asset/Context/ContextInterface.php000066400000000000000000000013151266465517700237570ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Asset/Context/NullContext.php000066400000000000000000000011651266465517700227740ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Asset/Context/RequestStackContext.php000066400000000000000000000021041266465517700244720ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Asset/Exception/000077500000000000000000000000001266465517700203135ustar00rootroot00000000000000src/Symfony/Component/Asset/Exception/ExceptionInterface.php000066400000000000000000000006551266465517700246110ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Asset/Exception/InvalidArgumentException.php000066400000000000000000000007651266465517700260040ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Asset/Exception/LogicException.php000066400000000000000000000007271266465517700237460ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Asset/LICENSE000066400000000000000000000020511266465517700173600ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Asset/Package.php000066400000000000000000000032631266465517700204250ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Asset/PackageInterface.php000066400000000000000000000014071266465517700222440ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Asset/Packages.php000066400000000000000000000062761266465517700206170ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Asset/PathPackage.php000066400000000000000000000036201266465517700212370ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Asset/README.md000066400000000000000000000106631266465517700176420ustar00rootroot00000000000000Asset Component =============== The Asset component manages asset URLs. Versioned Asset URLs -------------------- The basic `Package` adds a version to generated asset URLs: ```php use Symfony\Component\Asset\Package; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; $package = new Package(new StaticVersionStrategy('v1')); echo $package->getUrl('/me.png'); // /me.png?v1 ``` The default format can be configured: ```php $package = new Package(new StaticVersionStrategy('v1', '%s?version=%s')); echo $package->getUrl('/me.png'); // /me.png?version=v1 // put the version before the path $package = new Package(new StaticVersionStrategy('v1', 'version-%2$s/%1$s')); echo $package->getUrl('/me.png'); // /version-v1/me.png ``` Asset URLs Base Path -------------------- When all assets are stored in a common path, use the `PathPackage` to avoid repeating yourself: ```php use Symfony\Component\Asset\PathPackage; $package = new PathPackage('/images', new StaticVersionStrategy('v1')); echo $package->getUrl('/me.png'); // /images/me.png?v1 ``` Asset URLs Base URLs -------------------- If your assets are hosted on different domain name than the main website, use the `UrlPackage` class: ```php use Symfony\Component\Asset\UrlPackage; $package = new UrlPackage('http://assets.example.com/images/', new StaticVersionStrategy('v1')); echo $package->getUrl('/me.png'); // http://assets.example.com/images/me.png?v1 ``` One technique used to speed up page rendering in browsers is to use several domains for assets; this is possible by passing more than one base URLs: ```php use Symfony\Component\Asset\UrlPackage; $urls = array( 'http://a1.example.com/images/', 'http://a2.example.com/images/', ); $package = new UrlPackage($urls, new StaticVersionStrategy('v1')); echo $package->getUrl('/me.png'); // http://a1.example.com/images/me.png?v1 ``` Note that it's also guaranteed that any given path will always use the same base URL to be nice with HTTP caching mechanisms. HttpFoundation Integration -------------------------- If you are using HttpFoundation for your project, set the Context to get additional features for free: ```php use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\Context\RequestStackContext; $package = new PathPackage('images', new StaticVersionStrategy('v1')); $package->setContext(new RequestStackContext($requestStack)); echo $package->getUrl('/me.png'); // /somewhere/images/me.png?v1 ``` In addition to the configured base path, `PathPackage` now also automatically prepends the current request base URL to assets to allow your website to be hosted anywhere under the web server root directory. ```php use Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\Context\RequestStackContext; $package = new UrlPackage(array('http://example.com/', 'https://example.com/'), new StaticVersionStrategy('v1')); $package->setContext(new RequestStackContext($requestStack)); echo $package->getUrl('/me.png'); // https://example.com/images/me.png?v1 ``` `UrlPackage` now uses the current request scheme (HTTP or HTTPs) to select an appropriate base URL (HTTPs or protocol-relative URLs for HTTPs requests, any base URL for HTTP requests). Named Packages -------------- The `Packages` class allows to easily manages several packages in a single project by naming packages: ```php use Symfony\Component\Asset\Package; use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\Packages; // by default, just add a version to all assets $versionStrategy = new StaticVersionStrategy('v1'); $defaultPackage = new Asset\Package($versionStrategy); $namedPackages = array( // images are hosted on another web server 'img' => new Asset\UrlPackage('http://img.example.com/', $versionStrategy), // documents are stored deeply under the web root directory // let's create a shortcut 'doc' => new Asset\PathPackage('/somewhere/deep/for/documents', $versionStrategy), ); // bundle all packages to make it easy to use them $packages = new Asset\Packages($defaultPackage, $namedPackages); echo $packages->getUrl('/some.css'); // /some.css?v1 echo $packages->getUrl('/me.png', 'img'); // http://img.example.com/me.png?v1 echo $packages->getUrl('/me.pdf', 'doc'); // /somewhere/deep/for/documents/me.pdf?v1 ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Asset/ $ composer update $ phpunit src/Symfony/Component/Asset/Tests/000077500000000000000000000000001266465517700174575ustar00rootroot00000000000000src/Symfony/Component/Asset/Tests/Context/000077500000000000000000000000001266465517700211035ustar00rootroot00000000000000src/Symfony/Component/Asset/Tests/Context/NullContextTest.php000066400000000000000000000012671266465517700247410ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\Context\NullContext; class NullContextTest extends \PHPUnit_Framework_TestCase { public function testGetBasePath() { $nullContext = new NullContext(); $this->assertEmpty($nullContext->getBasePath()); } public function testIsSecure() { $nullContext = new NullContext(); $this->assertFalse($nullContext->isSecure()); } } src/Symfony/Component/Asset/Tests/Context/RequestStackContextTest.php000066400000000000000000000040171266465517700264410ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\Context\RequestStackContext; class RequestStackContextTest extends \PHPUnit_Framework_TestCase { public function testGetBasePathEmpty() { $requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStackContext = new RequestStackContext($requestStack); $this->assertEmpty($requestStackContext->getBasePath()); } public function testGetBasePathSet() { $testBasePath = 'test-path'; $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $request->method('getBasePath') ->willReturn($testBasePath); $requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStack->method('getMasterRequest') ->willReturn($request); $requestStackContext = new RequestStackContext($requestStack); $this->assertEquals($testBasePath, $requestStackContext->getBasePath()); } public function testIsSecureFalse() { $requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStackContext = new RequestStackContext($requestStack); $this->assertFalse($requestStackContext->isSecure()); } public function testIsSecureTrue() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $request->method('isSecure') ->willReturn(true); $requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStack->method('getMasterRequest') ->willReturn($request); $requestStackContext = new RequestStackContext($requestStack); $this->assertTrue($requestStackContext->isSecure()); } } src/Symfony/Component/Asset/Tests/PackageTest.php000066400000000000000000000033771266465517700223750ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\Package; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; class PackageTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Asset/Tests/PackagesTest.php000066400000000000000000000044301266465517700225470ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\Package; use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\Exception\InvalidArgumentException; use Symfony\Component\Asset\Exception\LogicException; class PackagesTest extends \PHPUnit_Framework_TestCase { public function testGetterSetters() { $packages = new Packages(); $packages->setDefaultPackage($default = $this->getMock('Symfony\Component\Asset\PackageInterface')); $packages->addPackage('a', $a = $this->getMock('Symfony\Component\Asset\PackageInterface')); $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 LogicException */ public function testNoDefaultPackage() { $packages = new Packages(); $packages->getPackage(); } /** * @expectedException InvalidArgumentException */ public function testUndefinedPackage() { $packages = new Packages(); $packages->getPackage('a'); } } src/Symfony/Component/Asset/Tests/PathPackageTest.php000066400000000000000000000057061266465517700232100ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; class PathPackageTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Asset\Context\ContextInterface'); $context->expects($this->any())->method('getBasePath')->will($this->returnValue($basePath)); return $context; } } src/Symfony/Component/Asset/Tests/UrlPackageTest.php000066400000000000000000000105161266465517700230510ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; use Symfony\Component\Asset\Exception\InvalidArgumentException; use Symfony\Component\Asset\Exception\LogicException; class UrlPackageTest extends \PHPUnit_Framework_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 LogicException */ public function testNoBaseUrls() { new UrlPackage(array(), new EmptyVersionStrategy()); } /** * @expectedException InvalidArgumentException */ public function testWrongBaseUrl() { new UrlPackage(array('not-a-url'), new EmptyVersionStrategy()); } private function getContext($secure) { $context = $this->getMock('Symfony\Component\Asset\Context\ContextInterface'); $context->expects($this->any())->method('isSecure')->will($this->returnValue($secure)); return $context; } } src/Symfony/Component/Asset/Tests/VersionStrategy/000077500000000000000000000000001266465517700226275ustar00rootroot00000000000000src/Symfony/Component/Asset/Tests/VersionStrategy/EmptyVersionStrategyTest.php000066400000000000000000000015411266465517700303700ustar00rootroot00000000000000 * * 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 Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; class EmptyVersionStrategyTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Asset/UrlPackage.php000066400000000000000000000076421266465517700211150ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Asset/VersionStrategy/000077500000000000000000000000001266465517700215255ustar00rootroot00000000000000src/Symfony/Component/Asset/VersionStrategy/EmptyVersionStrategy.php000066400000000000000000000012361266465517700264270ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php000066400000000000000000000022301266465517700265530ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Asset/VersionStrategy/VersionStrategyInterface.php000066400000000000000000000014531266465517700272320ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Asset/composer.json000066400000000000000000000015641266465517700211050ustar00rootroot00000000000000{ "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.3.9" }, "suggest": { "symfony/http-foundation": "" }, "require-dev": { "symfony/http-foundation": "~2.4" }, "autoload": { "psr-4": { "Symfony\\Component\\Asset\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Asset/phpunit.xml.dist000066400000000000000000000014061266465517700215310ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/BrowserKit/000077500000000000000000000000001266465517700173715ustar00rootroot00000000000000src/Symfony/Component/BrowserKit/.gitignore000066400000000000000000000000421266465517700213550ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/BrowserKit/CHANGELOG.md000066400000000000000000000007771266465517700212150ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/BrowserKit/Client.php000066400000000000000000000400321266465517700213170ustar00rootroot00000000000000 * * 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; } /** * 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; } /** * 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' => 'Symfony2 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' === strtolower($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? if (!$uri || '#' == $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; } } src/Symfony/Component/BrowserKit/Cookie.php000066400000000000000000000205511266465517700213160ustar00rootroot00000000000000 * * 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->getTimestamp(); } } /** * 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 Cookie A Cookie instance * * @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->getTimestamp(); } } // attempt a fallback for unusual formatting if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) { return $date->getTimestamp(); } throw new \InvalidArgumentException(sprintf('Could not parse date "%s".', $dateValue)); } /** * 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(); } } src/Symfony/Component/BrowserKit/CookieJar.php000066400000000000000000000164511266465517700217570ustar00rootroot00000000000000 * * 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]); } } } } } } src/Symfony/Component/BrowserKit/History.php000066400000000000000000000044331266465517700215470ustar00rootroot00000000000000 * * 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]; } } src/Symfony/Component/BrowserKit/LICENSE000066400000000000000000000020511266465517700203740ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/BrowserKit/README.md000066400000000000000000000013061266465517700206500ustar00rootroot00000000000000BrowserKit Component ==================== BrowserKit simulates the behavior of a web browser. The component only provides an abstract client and does not provide any "default" backend for the HTTP layer. Resources --------- For a simple implementation of a browser based on an HTTP layer, have a look at [Goutte](https://github.com/FriendsOfPHP/Goutte). For an implementation based on HttpKernelInterface, have a look at the [Client](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php) provided by the HttpKernel component. You can run the unit tests with the following command: $ cd path/to/Symfony/Component/BrowserKit/ $ composer install $ phpunit src/Symfony/Component/BrowserKit/Request.php000066400000000000000000000051201266465517700215300ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/BrowserKit/Response.php000066400000000000000000000063741266465517700217120ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/BrowserKit/Tests/000077500000000000000000000000001266465517700204735ustar00rootroot00000000000000src/Symfony/Component/BrowserKit/Tests/ClientTest.php000066400000000000000000000663101266465517700232700ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } 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' => 'Symfony2 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' => 'Symfony2 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 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('Symfony2 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('Symfony2 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('Symfony2 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('Symfony2 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()); } } src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php000066400000000000000000000253321266465517700237170ustar00rootroot00000000000000 * * 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 Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\Cookie; use Symfony\Component\BrowserKit\Response; class CookieJarTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/BrowserKit/Tests/CookieTest.php000066400000000000000000000171671266465517700232710ustar00rootroot00000000000000 * * 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 Symfony\Component\BrowserKit\Cookie; class CookieTest extends \PHPUnit_Framework_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->setExpectedException('InvalidArgumentException'); Cookie::fromString('foo'); } public function testFromStringThrowsAnExceptionIfCookieDateIsNotValid() { $this->setExpectedException('InvalidArgumentException'); Cookie::fromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT'); } public function testFromStringThrowsAnExceptionIfUrlIsNotValid() { $this->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'); } } src/Symfony/Component/BrowserKit/Tests/HistoryTest.php000066400000000000000000000073571266465517700235210ustar00rootroot00000000000000 * * 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 Symfony\Component\BrowserKit\History; use Symfony\Component\BrowserKit\Request; class HistoryTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/BrowserKit/Tests/RequestTest.php000066400000000000000000000037051266465517700235010ustar00rootroot00000000000000 * * 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 Symfony\Component\BrowserKit\Request; class RequestTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/BrowserKit/Tests/ResponseTest.php000066400000000000000000000060341266465517700236450ustar00rootroot00000000000000 * * 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 Symfony\Component\BrowserKit\Response; class ResponseTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/BrowserKit/composer.json000066400000000000000000000017431266465517700221200ustar00rootroot00000000000000{ "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.3.9", "symfony/dom-crawler": "~2.0,>=2.0.5" }, "require-dev": { "symfony/process": "~2.3.34|~2.7,>=2.7.6", "symfony/css-selector": "~2.0,>=2.0.5" }, "suggest": { "symfony/process": "" }, "autoload": { "psr-4": { "Symfony\\Component\\BrowserKit\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/BrowserKit/phpunit.xml.dist000066400000000000000000000014761266465517700225540ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/ClassLoader/000077500000000000000000000000001266465517700174725ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/.gitignore000066400000000000000000000000421266465517700214560ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/ClassLoader/ApcClassLoader.php000066400000000000000000000075601266465517700230330ustar00rootroot00000000000000 * * 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 and the UniversalClassLoader 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) { if (false === $file = apcu_fetch($this->prefix.$class)) { apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class)); } 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); } } src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php000066400000000000000000000064301266465517700247170ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ClassLoader; @trigger_error('The '.__NAMESPACE__.'\ApcUniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ApcClassLoader class instead.', E_USER_DEPRECATED); /** * ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3. * * It is able to load classes that use either: * * * The technical interoperability standards for PHP 5.3 namespaces and * class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md); * * * The PEAR naming convention for classes (http://pear.php.net/). * * Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be * looked for in a list of locations to ease the vendoring of a sub-set of * classes for large projects. * * Example usage: * * require 'vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; * require 'vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; * * use Symfony\Component\ClassLoader\ApcUniversalClassLoader; * * $loader = new ApcUniversalClassLoader('apc.prefix.'); * * // register classes with namespaces * $loader->registerNamespaces(array( * 'Symfony\Component' => __DIR__.'/component', * 'Symfony' => __DIR__.'/framework', * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), * )); * * // register a library using the PEAR naming convention * $loader->registerPrefixes(array( * 'Swift_' => __DIR__.'/Swift', * )); * * // activate the autoloader * $loader->register(); * * 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 Kris Wallsmith * * @deprecated since version 2.4, to be removed in 3.0. * Use the {@link ClassLoader} class instead. */ class ApcUniversalClassLoader extends UniversalClassLoader { private $prefix; /** * Constructor. * * @param string $prefix A prefix to create a namespace in APC * * @throws \RuntimeException */ public function __construct($prefix) { if (!function_exists('apcu_fetch')) { throw new \RuntimeException('Unable to use ApcUniversalClassLoader as APC is not enabled.'); } $this->prefix = $prefix; } /** * Finds a file by class name while caching lookups to APC. * * @param string $class A class name to resolve to file * * @return string|null The path, if found */ public function findFile($class) { if (false === $file = apcu_fetch($this->prefix.$class)) { apcu_store($this->prefix.$class, $file = parent::findFile($class)); } return $file; } } src/Symfony/Component/ClassLoader/CHANGELOG.md000066400000000000000000000016501266465517700213050ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/ClassLoader/ClassCollectionLoader.php000066400000000000000000000300031266465517700244070ustar00rootroot00000000000000 * * 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; $declared = array_merge(get_declared_classes(), get_declared_interfaces()); if (function_exists('get_declared_traits')) { $declared = array_merge($declared, get_declared_traits()); } if ($adaptive) { // 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 = $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 && is_file($cache)) { require_once $cache; return; } $files = array(); $content = ''; foreach (self::getOrderedClasses($classes) as $class) { if (in_array($class->getName(), $declared)) { continue; } $files[] = $class->getFileName(); $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName())); // 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) { $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)); } /** * 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(); if (method_exists('ReflectionClass', 'getTraits')) { 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; } } src/Symfony/Component/ClassLoader/ClassLoader.php000066400000000000000000000125171266465517700224050ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/ClassLoader/ClassMapGenerator.php000066400000000000000000000107351266465517700235630ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ClassLoader; if (!defined('SYMFONY_TRAIT')) { if (PHP_VERSION_ID >= 50400) { define('SYMFONY_TRAIT', T_TRAIT); } else { define('SYMFONY_TRAIT', 0); } } /** * 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(); 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 SYMFONY_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; } } src/Symfony/Component/ClassLoader/DebugClassLoader.php000066400000000000000000000067141266465517700233560ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ClassLoader; @trigger_error('The '.__NAMESPACE__.'\DebugClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED); /** * Autoloader checking if the class is really defined in the file found. * * The DebugClassLoader will wrap all registered autoloaders providing a * findFile method and will throw an exception if a file is found but does * not declare the class. * * @author Fabien Potencier * @author Christophe Coevoet * * @deprecated since version 2.4, to be removed in 3.0. * Use {@link \Symfony\Component\Debug\DebugClassLoader} instead. */ class DebugClassLoader { private $classFinder; /** * Constructor. * * @param object $classFinder */ public function __construct($classFinder) { $this->classFinder = $classFinder; } /** * Gets the wrapped class loader. * * @return object a class loader instance */ public function getClassLoader() { return $this->classFinder; } /** * Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. */ public static function enable() { 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 && method_exists($function[0], 'findFile')) { $function = array(new static($function[0]), 'loadClass'); } spl_autoload_register($function); } } /** * Unregisters this instance as an autoloader. */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); } /** * Finds a file by class name. * * @param string $class A class name to resolve to file * * @return string|null */ public function findFile($class) { return $this->classFinder->findFile($class); } /** * 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) { if ($file = $this->classFinder->findFile($class)) { require $file; if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { 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)); } return true; } } } src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php000066400000000000000000000046251266465517700252460ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ClassLoader; @trigger_error('The '.__NAMESPACE__.'\DebugUniversalClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED); /** * Checks that the class is actually declared in the included file. * * @author Fabien Potencier * * @deprecated since version 2.4, to be removed in 3.0. * Use the {@link \Symfony\Component\Debug\DebugClassLoader} class instead. */ class DebugUniversalClassLoader extends UniversalClassLoader { /** * Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones. */ public static function enable() { 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 UniversalClassLoader) { $loader = new static(); $loader->registerNamespaceFallbacks($function[0]->getNamespaceFallbacks()); $loader->registerPrefixFallbacks($function[0]->getPrefixFallbacks()); $loader->registerNamespaces($function[0]->getNamespaces()); $loader->registerPrefixes($function[0]->getPrefixes()); $loader->useIncludePath($function[0]->getUseIncludePath()); $function[0] = $loader; } spl_autoload_register($function); } } /** * {@inheritdoc} */ public function loadClass($class) { if ($file = $this->findFile($class)) { require $file; if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { 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)); } } } } src/Symfony/Component/ClassLoader/LICENSE000066400000000000000000000020511266465517700204750ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/ClassLoader/MapClassLoader.php000066400000000000000000000027721266465517700230450ustar00rootroot00000000000000 * * 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]; } } } src/Symfony/Component/ClassLoader/Psr4ClassLoader.php000066400000000000000000000041551266465517700231550ustar00rootroot00000000000000 * * 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 $current) { list($currentPrefix, $currentBaseDir) = $current; 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')); } } src/Symfony/Component/ClassLoader/README.md000066400000000000000000000044751266465517700207630ustar00rootroot00000000000000ClassLoader Component ===================== ClassLoader loads your project classes automatically if they follow some standard PHP conventions. The ClassLoader object is able to autoload classes that implement the PSR-0 standard or the PEAR naming convention. First, register the autoloader: ```php require_once __DIR__.'/src/Symfony/Component/ClassLoader/ClassLoader.php'; use Symfony\Component\ClassLoader\ClassLoader; $loader = new ClassLoader(); $loader->register(); ``` Then, register some namespaces with the `addPrefix()` method: ```php $loader->addPrefix('Symfony', __DIR__.'/src'); $loader->addPrefix('Monolog', __DIR__.'/vendor/monolog/src'); ``` The `addPrefix()` method takes a namespace prefix and a path where to look for the classes as arguments. You can also register a sub-namespaces: ```php $loader->addPrefix('Doctrine\\Common', __DIR__.'/vendor/doctrine-common/lib'); ``` The order of registration is significant and the first registered namespace takes precedence over later registered one. You can also register more than one path for a given namespace: ```php $loader->addPrefix('Symfony', array(__DIR__.'/src', __DIR__.'/symfony/src')); ``` Alternatively, you can use the `addPrefixes()` method to register more than one namespace at once: ```php $loader->addPrefixes(array( 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', 'Doctrine' => __DIR__.'/vendor/doctrine/lib', 'Monolog' => __DIR__.'/vendor/monolog/src', )); ``` For better performance, you can use the APC class loader: ```php require_once __DIR__.'/src/Symfony/Component/ClassLoader/ClassLoader.php'; require_once __DIR__.'/src/Symfony/Component/ClassLoader/ApcClassLoader.php'; use Symfony\Component\ClassLoader\ClassLoader; use Symfony\Component\ClassLoader\ApcClassLoader; $loader = new ClassLoader(); $loader->addPrefix('Symfony', __DIR__.'/src'); $loader = new ApcClassLoader('apc.prefix.', $loader); $loader->register(); ``` Furthermore, the component provides tools to aggregate classes into a single file, which is especially useful to improve performance on servers that do not provide byte caches. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/ClassLoader/ $ composer install $ phpunit src/Symfony/Component/ClassLoader/Tests/000077500000000000000000000000001266465517700205745ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php000066400000000000000000000166341266465517700247770ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\ApcClassLoader; use Symfony\Component\ClassLoader\ClassLoader; class ApcClassLoaderTest extends \PHPUnit_Framework_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.', ), ); } } src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php000066400000000000000000000216371266465517700263660ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\ClassCollectionLoader; 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 \PHPUnit_Framework_TestCase { /** * @requires PHP 5.4 */ 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('Symfony\Component\ClassLoader\ClassCollectionLoader', array('CTFoo')); $this->assertEquals( array('TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'), array_map(function ($class) { return $class->getName(); }, $ordered) ); $ordered = $m->invoke('Symfony\Component\ClassLoader\ClassCollectionLoader', 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('Symfony\Component\ClassLoader\ClassCollectionLoader', $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 * @requires PHP 5.4 */ 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('Symfony\Component\ClassLoader\ClassCollectionLoader', $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', )), ); } /** * @requires PHP 5.4 */ 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('Symfony\Component\ClassLoader\ClassCollectionLoader', $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 = (<< * * 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 Symfony\Component\ClassLoader\ClassLoader; class ClassLoaderTest extends \PHPUnit_Framework_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.', ), ); } } src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php000066400000000000000000000137411266465517700255250ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\ClassMapGenerator; class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase { /** * @var string|null */ private $workspace = null; public function prepare_workspace() { $this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().mt_rand(0, 1000); 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', ), ), 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', )), ); if (PHP_VERSION_ID >= 50400) { $data[] = 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', )); } if (PHP_VERSION_ID >= 50500) { $data[] = 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); } } src/Symfony/Component/ClassLoader/Tests/Fixtures/000077500000000000000000000000001266465517700224055ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/000077500000000000000000000000001266465517700231105ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/000077500000000000000000000000001266465517700251505ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Bar.php000066400000000000000000000004711266465517700263670ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Baz.php000066400000000000000000000004711266465517700263770ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/Foo.php000066400000000000000000000004711266465517700264060ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Namespaced/FooBar.php000066400000000000000000000004741266465517700270360ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Pearlike/000077500000000000000000000000001266465517700246445ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/Pearlike/Bar.php000066400000000000000000000001041266465517700260540ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php000066400000000000000000000005031266465517700320620ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/000077500000000000000000000000001266465517700240235ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/000077500000000000000000000000001266465517700245265ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/000077500000000000000000000000001266465517700302635ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/000077500000000000000000000000001266465517700304435ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/000077500000000000000000000000001266465517700306245ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php000066400000000000000000000001161266465517700320370ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php000066400000000000000000000005051266465517700320730ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/000077500000000000000000000000001266465517700246475ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/000077500000000000000000000000001266465517700253525ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/000077500000000000000000000000001266465517700271065ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php000066400000000000000000000001071266465517700307650ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/000077500000000000000000000000001266465517700261735ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/A.php000066400000000000000000000000741266465517700270650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\Namespaced; class Bar { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/Namespaced/Baz.php000066400000000000000000000004771266465517700275320ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\Namespaced; class Baz { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/Namespaced/Foo.php000066400000000000000000000004771266465517700275410ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\Namespaced; class Foo { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/Namespaced/FooBar.php000066400000000000000000000005021266465517700301530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\Namespaced; class FooBar { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/Pearlike/000077500000000000000000000000001266465517700257715ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/Pearlike/Bar.php000066400000000000000000000001121266465517700272000ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\NamespaceCollision\A; class Bar { public static $loaded = true; } Foo.php000066400000000000000000000005111266465517700342540ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/alpha/LegacyApc/NamespaceCollision/A * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\NamespaceCollision\A; class Foo { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/000077500000000000000000000000001266465517700251505ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/000077500000000000000000000000001266465517700270005ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/LegacyApcPrefixCollision/000077500000000000000000000000001266465517700336625ustar00rootroot00000000000000A/000077500000000000000000000000001266465517700337635ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/LegacyApcPrefixCollisionB/000077500000000000000000000000001266465517700341445ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/LegacyApcPrefixCollision/ABar.php000066400000000000000000000001241266465517700353560ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/LegacyApcPrefixCollision/A/B * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\NamespaceCollision\A\B; class Bar { public static $loaded = true; } Foo.php000066400000000000000000000005131266465517700342650ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/beta/LegacyApc/NamespaceCollision/A/B * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\NamespaceCollision\A\B; class Foo { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/fallback/000077500000000000000000000000001266465517700257745ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/fallback/LegacyApc/000077500000000000000000000000001266465517700276245ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/fallback/LegacyApc/Pearlike/000077500000000000000000000000001266465517700313605ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/LegacyApc/fallback/LegacyApc/Pearlike/FooBar.php000066400000000000000000000001151266465517700332360ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LegacyApc\Namespaced; class FooBar { public static $loaded = true; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/000077500000000000000000000000001266465517700244455ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Bar.php000066400000000000000000000004651266465517700256670ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Baz.php000066400000000000000000000004651266465517700256770ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/Foo.php000066400000000000000000000004651266465517700257060ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php000066400000000000000000000010271266465517700275770ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike2/000077500000000000000000000000001266465517700242235ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike2/Bar.php000066400000000000000000000001011266465517700254300ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php000066400000000000000000000004771266465517700306660ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/C/000077500000000000000000000000001266465517700274245ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php000066400000000000000000000001301266465517700306330ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php000066400000000000000000000005011266465517700306610ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/000077500000000000000000000000001266465517700272525ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/B/000077500000000000000000000000001266465517700274335ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php000066400000000000000000000001321266465517700306440ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeInterface.php000066400000000000000000000004371266465517700274510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace ClassMap; interface SomeInterface { } src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/SomeParent.php000066400000000000000000000004411266465517700267750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace ClassMap; abstract class SomeParent { } src/Symfony/Component/ClassLoader/Tests/Fixtures/classmap/multipleNs.php000066400000000000000000000002661266465517700270610ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/ClassLoader/Tests/Fixtures/deps/000077500000000000000000000000001266465517700233405ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php000066400000000000000000000003161266465517700253570ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/ClassLoader/Tests/Fixtures/fallback/Namespaced2/000077500000000000000000000000001266465517700262665ustar00rootroot00000000000000src/Symfony/Component/ClassLoader/Tests/Fixtures/fallback/Namespaced2/FooBar.php000066400000000000000000000001221266465517700301420ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\ApcUniversalClassLoader; /** * @group legacy */ class LegacyApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase { protected function setUp() { if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) { apcu_clear_cache(); } else { $this->markTestSkipped('APC is not enabled.'); } } protected function tearDown() { if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) { apcu_clear_cache(); } } public function testConstructor() { $loader = new ApcUniversalClassLoader('test.prefix.'); $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $this->assertEquals($loader->findFile('\LegacyApc\Namespaced\FooBar'), apcu_fetch('test.prefix.\LegacyApc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument'); } /** * @dataProvider getLoadClassTests */ public function testLoadClass($className, $testClassName, $message) { $loader = new ApcUniversalClassLoader('test.prefix.'); $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->loadClass($testClassName); $this->assertTrue(class_exists($className), $message); } public function getLoadClassTests() { return array( array('\\LegacyApc\\Namespaced\\Foo', 'LegacyApc\\Namespaced\\Foo', '->loadClass() loads LegacyApc\Namespaced\Foo class'), array('LegacyApc_Pearlike_Foo', 'LegacyApc_Pearlike_Foo', '->loadClass() loads LegacyApc_Pearlike_Foo class'), ); } /** * @dataProvider getLoadClassFromFallbackTests */ public function testLoadClassFromFallback($className, $testClassName, $message) { $loader = new ApcUniversalClassLoader('test.prefix.fallback'); $loader->registerNamespace('LegacyApc\Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('LegacyApc_Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback')); $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/fallback')); $loader->loadClass($testClassName); $this->assertTrue(class_exists($className), $message); } public function getLoadClassFromFallbackTests() { return array( array('\\LegacyApc\\Namespaced\\Baz', 'LegacyApc\\Namespaced\\Baz', '->loadClass() loads LegacyApc\Namespaced\Baz class'), array('LegacyApc_Pearlike_Baz', 'LegacyApc_Pearlike_Baz', '->loadClass() loads LegacyApc_Pearlike_Baz class'), array('\\LegacyApc\\Namespaced\\FooBar', 'LegacyApc\\Namespaced\\FooBar', '->loadClass() loads LegacyApc\Namespaced\Baz class from fallback dir'), array('LegacyApc_Pearlike_FooBar', 'LegacyApc_Pearlike_FooBar', '->loadClass() loads LegacyApc_Pearlike_Baz class from fallback dir'), ); } /** * @dataProvider getLoadClassNamespaceCollisionTests */ public function testLoadClassNamespaceCollision($namespaces, $className, $message) { $loader = new ApcUniversalClassLoader('test.prefix.collision.'); $loader->registerNamespaces($namespaces); $loader->loadClass($className); $this->assertTrue(class_exists($className), $message); } public function getLoadClassNamespaceCollisionTests() { return array( array( array( 'LegacyApc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha', 'LegacyApc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta', ), 'LegacyApc\NamespaceCollision\A\Foo', '->loadClass() loads NamespaceCollision\A\Foo from alpha.', ), array( array( 'LegacyApc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta', 'LegacyApc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha', ), 'LegacyApc\NamespaceCollision\A\Bar', '->loadClass() loads NamespaceCollision\A\Bar from alpha.', ), array( array( 'LegacyApc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha', 'LegacyApc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta', ), 'LegacyApc\NamespaceCollision\A\B\Foo', '->loadClass() loads NamespaceCollision\A\B\Foo from beta.', ), array( array( 'LegacyApc\\NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta', 'LegacyApc\\NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha', ), 'LegacyApc\NamespaceCollision\A\B\Bar', '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', ), ); } /** * @dataProvider getLoadClassPrefixCollisionTests */ public function testLoadClassPrefixCollision($prefixes, $className, $message) { $loader = new ApcUniversalClassLoader('test.prefix.collision.'); $loader->registerPrefixes($prefixes); $loader->loadClass($className); $this->assertTrue(class_exists($className), $message); } public function getLoadClassPrefixCollisionTests() { return array( array( array( 'LegacyApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha/LegacyApc', 'LegacyApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta/LegacyApc', ), 'LegacyApcPrefixCollision_A_Foo', '->loadClass() loads LegacyApcPrefixCollision_A_Foo from alpha.', ), array( array( 'LegacyApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta/LegacyApc', 'LegacyApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha/LegacyApc', ), 'LegacyApcPrefixCollision_A_Bar', '->loadClass() loads LegacyApcPrefixCollision_A_Bar from alpha.', ), array( array( 'LegacyApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha/LegacyApc', 'LegacyApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta/LegacyApc', ), 'LegacyApcPrefixCollision_A_B_Foo', '->loadClass() loads LegacyApcPrefixCollision_A_B_Foo from beta.', ), array( array( 'LegacyApcPrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/beta/LegacyApc', 'LegacyApcPrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/LegacyApc/alpha/LegacyApc', ), 'LegacyApcPrefixCollision_A_B_Bar', '->loadClass() loads LegacyApcPrefixCollision_A_B_Bar from beta.', ), ); } } src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php000066400000000000000000000214761266465517700273710ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\UniversalClassLoader; /** * @group legacy */ class LegacyUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getLoadClassTests */ public function testLoadClass($className, $testClassName, $message) { $loader = new UniversalClassLoader(); $loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $this->assertTrue($loader->loadClass($testClassName)); $this->assertTrue(class_exists($className), $message); } public function getLoadClassTests() { return array( array('\\Namespaced\\Foo', 'Namespaced\\Foo', '->loadClass() loads Namespaced\Foo class'), array('\\Pearlike_Foo', 'Pearlike_Foo', '->loadClass() loads Pearlike_Foo class'), ); } public function testUseIncludePath() { $loader = new UniversalClassLoader(); $this->assertFalse($loader->getUseIncludePath()); $this->assertNull($loader->findFile('Foo')); $includePath = get_include_path(); $loader->useIncludePath(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); } public function testGetNamespaces() { $loader = new UniversalClassLoader(); $loader->registerNamespace('Foo', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerNamespace('Bar', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerNamespace('Bas', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $namespaces = $loader->getNamespaces(); $this->assertArrayHasKey('Foo', $namespaces); $this->assertArrayNotHasKey('Foo1', $namespaces); $this->assertArrayHasKey('Bar', $namespaces); $this->assertArrayHasKey('Bas', $namespaces); } public function testGetPrefixes() { $loader = new UniversalClassLoader(); $loader->registerPrefix('Foo', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('Bar', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('Bas', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $prefixes = $loader->getPrefixes(); $this->assertArrayHasKey('Foo', $prefixes); $this->assertArrayNotHasKey('Foo1', $prefixes); $this->assertArrayHasKey('Bar', $prefixes); $this->assertArrayHasKey('Bas', $prefixes); } /** * @dataProvider getLoadClassFromFallbackTests */ public function testLoadClassFromFallback($className, $testClassName, $message) { $loader = new UniversalClassLoader(); $loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback')); $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback')); $this->assertTrue($loader->loadClass($testClassName)); $this->assertTrue(class_exists($className), $message); } public function getLoadClassFromFallbackTests() { return array( array('\\Namespaced\\Baz', 'Namespaced\\Baz', '->loadClass() loads Namespaced\Baz class'), array('\\Pearlike_Baz', 'Pearlike_Baz', '->loadClass() loads Pearlike_Baz class'), array('\\Namespaced\\FooBar', 'Namespaced\\FooBar', '->loadClass() loads Namespaced\Baz class from fallback dir'), array('\\Pearlike_FooBar', 'Pearlike_FooBar', '->loadClass() loads Pearlike_Baz class from fallback dir'), ); } public function testRegisterPrefixFallback() { $loader = new UniversalClassLoader(); $loader->registerPrefixFallback(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback'); $this->assertEquals(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback'), $loader->getPrefixFallbacks()); } public function testRegisterNamespaceFallback() { $loader = new UniversalClassLoader(); $loader->registerNamespaceFallback(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/Namespaced/fallback'); $this->assertEquals(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/Namespaced/fallback'), $loader->getNamespaceFallbacks()); } /** * @dataProvider getLoadClassNamespaceCollisionTests */ public function testLoadClassNamespaceCollision($namespaces, $className, $message) { $loader = new UniversalClassLoader(); $loader->registerNamespaces($namespaces); $this->assertTrue($loader->loadClass($className)); $this->assertTrue(class_exists($className), $message); } public function getLoadClassNamespaceCollisionTests() { return array( array( array( 'NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', 'NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', ), 'NamespaceCollision\A\Foo', '->loadClass() loads NamespaceCollision\A\Foo from alpha.', ), array( array( 'NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', 'NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', ), 'NamespaceCollision\A\Bar', '->loadClass() loads NamespaceCollision\A\Bar from alpha.', ), array( array( 'NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', 'NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', ), 'NamespaceCollision\A\B\Foo', '->loadClass() loads NamespaceCollision\A\B\Foo from beta.', ), array( array( 'NamespaceCollision\\A\\B' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', 'NamespaceCollision\\A' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', ), 'NamespaceCollision\A\B\Bar', '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', ), ); } /** * @dataProvider getLoadClassPrefixCollisionTests */ public function testLoadClassPrefixCollision($prefixes, $className, $message) { $loader = new UniversalClassLoader(); $loader->registerPrefixes($prefixes); $this->assertTrue($loader->loadClass($className)); $this->assertTrue(class_exists($className), $message); } public function getLoadClassPrefixCollisionTests() { return array( array( array( 'PrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', 'PrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', ), 'PrefixCollision_A_Foo', '->loadClass() loads PrefixCollision_A_Foo from alpha.', ), array( array( 'PrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', 'PrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', ), 'PrefixCollision_A_Bar', '->loadClass() loads PrefixCollision_A_Bar from alpha.', ), array( array( 'PrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', 'PrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', ), 'PrefixCollision_A_B_Foo', '->loadClass() loads PrefixCollision_A_B_Foo from beta.', ), array( array( 'PrefixCollision_A_B_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/beta', 'PrefixCollision_A_' => __DIR__.DIRECTORY_SEPARATOR.'Fixtures/alpha', ), 'PrefixCollision_A_B_Bar', '->loadClass() loads PrefixCollision_A_B_Bar from beta.', ), ); } } src/Symfony/Component/ClassLoader/Tests/Psr4ClassLoaderTest.php000066400000000000000000000037121266465517700251150ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\Psr4ClassLoader; class Psr4ClassLoaderTest extends \PHPUnit_Framework_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'), ); } } src/Symfony/Component/ClassLoader/UniversalClassLoader.php000066400000000000000000000214061266465517700242730ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ClassLoader; @trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ClassLoader class instead.', E_USER_DEPRECATED); /** * UniversalClassLoader implements a "universal" autoloader for PHP 5.3. * * It is able to load classes that use either: * * * The technical interoperability standards for PHP 5.3 namespaces and * class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md); * * * The PEAR naming convention for classes (http://pear.php.net/). * * Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be * looked for in a list of locations to ease the vendoring of a sub-set of * classes for large projects. * * Example usage: * * $loader = new UniversalClassLoader(); * * // register classes with namespaces * $loader->registerNamespaces(array( * 'Symfony\Component' => __DIR__.'/component', * 'Symfony' => __DIR__.'/framework', * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), * )); * * // register a library using the PEAR naming convention * $loader->registerPrefixes(array( * 'Swift_' => __DIR__.'/Swift', * )); * * * // to enable searching the include path (e.g. for PEAR packages) * $loader->useIncludePath(true); * * // activate the autoloader * $loader->register(); * * 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 * * @deprecated since version 2.4, to be removed in 3.0. * Use the {@link ClassLoader} class instead. */ class UniversalClassLoader { private $namespaces = array(); private $prefixes = array(); private $namespaceFallbacks = array(); private $prefixFallbacks = array(); private $useIncludePath = false; /** * Turns on searching the include for class files. Allows easy loading * of installed PEAR packages. * * @param bool $useIncludePath */ public function useIncludePath($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; } /** * Gets the configured namespaces. * * @return array A hash with namespaces as keys and directories as values */ public function getNamespaces() { return $this->namespaces; } /** * Gets the configured class prefixes. * * @return array A hash with class prefixes as keys and directories as values */ public function getPrefixes() { return $this->prefixes; } /** * Gets the directory(ies) to use as a fallback for namespaces. * * @return array An array of directories */ public function getNamespaceFallbacks() { return $this->namespaceFallbacks; } /** * Gets the directory(ies) to use as a fallback for class prefixes. * * @return array An array of directories */ public function getPrefixFallbacks() { return $this->prefixFallbacks; } /** * Registers the directory to use as a fallback for namespaces. * * @param array $dirs An array of directories */ public function registerNamespaceFallbacks(array $dirs) { $this->namespaceFallbacks = $dirs; } /** * Registers a directory to use as a fallback for namespaces. * * @param string $dir A directory */ public function registerNamespaceFallback($dir) { $this->namespaceFallbacks[] = $dir; } /** * Registers directories to use as a fallback for class prefixes. * * @param array $dirs An array of directories */ public function registerPrefixFallbacks(array $dirs) { $this->prefixFallbacks = $dirs; } /** * Registers a directory to use as a fallback for class prefixes. * * @param string $dir A directory */ public function registerPrefixFallback($dir) { $this->prefixFallbacks[] = $dir; } /** * Registers an array of namespaces. * * @param array $namespaces An array of namespaces (namespaces as keys and locations as values) */ public function registerNamespaces(array $namespaces) { foreach ($namespaces as $namespace => $locations) { $this->namespaces[$namespace] = (array) $locations; } } /** * Registers a namespace. * * @param string $namespace The namespace * @param array|string $paths The location(s) of the namespace */ public function registerNamespace($namespace, $paths) { $this->namespaces[$namespace] = (array) $paths; } /** * Registers an array of classes using the PEAR naming convention. * * @param array $classes An array of classes (prefixes as keys and locations as values) */ public function registerPrefixes(array $classes) { foreach ($classes as $prefix => $locations) { $this->prefixes[$prefix] = (array) $locations; } } /** * Registers a set of classes using the PEAR naming convention. * * @param string $prefix The classes prefix * @param array|string $paths The location(s) of the classes */ public function registerPrefix($prefix, $paths) { $this->prefixes[$prefix] = (array) $paths; } /** * 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 * * @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 $namespace = substr($class, 0, $pos); $className = substr($class, $pos + 1); $normalizedClass = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $className).'.php'; foreach ($this->namespaces as $ns => $dirs) { if (0 !== strpos($namespace, $ns)) { continue; } foreach ($dirs as $dir) { $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass; if (is_file($file)) { return $file; } } } foreach ($this->namespaceFallbacks as $dir) { $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass; if (is_file($file)) { return $file; } } } else { // PEAR-like class name $normalizedClass = str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; foreach ($this->prefixes as $prefix => $dirs) { if (0 !== strpos($class, $prefix)) { continue; } foreach ($dirs as $dir) { $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass; if (is_file($file)) { return $file; } } } foreach ($this->prefixFallbacks as $dir) { $file = $dir.DIRECTORY_SEPARATOR.$normalizedClass; if (is_file($file)) { return $file; } } } if ($this->useIncludePath && $file = stream_resolve_include_path($normalizedClass)) { return $file; } } } src/Symfony/Component/ClassLoader/WinCacheClassLoader.php000066400000000000000000000077151266465517700240130ustar00rootroot00000000000000 * * 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 and the UniversalClassLoader 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 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) { if (false === $file = wincache_ucache_get($this->prefix.$class)) { wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class), 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); } } src/Symfony/Component/ClassLoader/XcacheClassLoader.php000066400000000000000000000100011266465517700235030ustar00rootroot00000000000000 * * 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 and the UniversalClassLoader 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 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); 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); } } src/Symfony/Component/ClassLoader/composer.json000066400000000000000000000015611266465517700222170ustar00rootroot00000000000000{ "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.3.9", "symfony/polyfill-apcu": "~1.1" }, "require-dev": { "symfony/finder": "~2.0,>=2.0.5" }, "autoload": { "psr-4": { "Symfony\\Component\\ClassLoader\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/ClassLoader/phpunit.xml.dist000066400000000000000000000014771266465517700226560ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Config/000077500000000000000000000000001266465517700165035ustar00rootroot00000000000000src/Symfony/Component/Config/.gitignore000066400000000000000000000000421266465517700204670ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Config/CHANGELOG.md000066400000000000000000000015311266465517700203140ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Config/ConfigCache.php000066400000000000000000000070521266465517700213510ustar00rootroot00000000000000 * * 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; /** * ConfigCache manages PHP cache files. * * When debug is enabled, it knows when to flush the cache * thanks to an array of ResourceInterface instances. * * @author Fabien Potencier */ class ConfigCache implements ConfigCacheInterface { private $debug; private $file; /** * @param string $file The absolute cache path * @param bool $debug Whether debugging is enabled or not */ public function __construct($file, $debug) { $this->file = $file; $this->debug = (bool) $debug; } /** * Gets the cache file path. * * @return string The cache file path * * @deprecated since 2.7, to be removed in 3.0. Use getPath() instead. */ public function __toString() { @trigger_error('ConfigCache::__toString() is deprecated since version 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); return $this->file; } /** * Gets the cache file path. * * @return string The cache file path */ public function getPath() { return $this->file; } /** * Checks if the cache is still fresh. * * This method 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 (!is_file($this->file)) { return false; } if (!$this->debug) { return true; } $metadata = $this->getMetaFile(); if (!is_file($metadata)) { return false; } $time = filemtime($this->file); $meta = unserialize(file_get_contents($metadata)); foreach ($meta as $resource) { if (!$resource->isFresh($time)) { return false; } } return true; } /** * Writes cache. * * @param string $content The content to write in the cache * @param ResourceInterface[] $metadata An array of ResourceInterface instances * * @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 && true === $this->debug) { $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'; } } src/Symfony/Component/Config/ConfigCacheFactory.php000066400000000000000000000023161266465517700226770ustar00rootroot00000000000000 * * 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 for ConfigCacheFactoryInterface * that will simply create an instance of ConfigCache. * * @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; } } src/Symfony/Component/Config/ConfigCacheFactoryInterface.php000066400000000000000000000017161266465517700245230ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/ConfigCacheInterface.php000066400000000000000000000024611266465517700231710ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Definition/000077500000000000000000000000001266465517700205735ustar00rootroot00000000000000src/Symfony/Component/Config/Definition/ArrayNode.php000066400000000000000000000256011266465517700231740ustar00rootroot00000000000000 * * 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 $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 */ public function setIgnoreExtraKeys($boolean) { $this->ignoreExtraKeys = (bool) $boolean; } /** * 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]); } } // 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 $transformation) { list($singular, $plural) = $transformation; 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; } } src/Symfony/Component/Config/Definition/BaseNode.php000066400000000000000000000207441266465517700227730ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Definition/BooleanNode.php000066400000000000000000000022511266465517700234710ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/Definition/Builder/000077500000000000000000000000001266465517700221615ustar00rootroot00000000000000src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php000066400000000000000000000344221266465517700265740ustar00rootroot00000000000000 * * 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 $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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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 ArrayNodeDefinition */ 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. * * @return ArrayNodeDefinition */ public function ignoreExtraKeys() { $this->ignoreExtraKeys = true; return $this; } /** * Sets key normalization. * * @param bool $bool Whether to enable key normalization * * @return ArrayNodeDefinition */ 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 ArrayNodeDefinition This node */ 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); $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) ); } } } } src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php000066400000000000000000000016611266465517700270740ustar00rootroot00000000000000 * * 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; /** * 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); } } src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php000066400000000000000000000024231266465517700264160ustar00rootroot00000000000000 * * 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 EnumNodeDefinition|$this */ public function values(array $values) { $values = array_unique($values); if (count($values) <= 1) { throw new \InvalidArgumentException('->values() must be called with at least two distinct values.'); } $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); } } src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php000066400000000000000000000120761266465517700251250ustar00rootroot00000000000000 * * 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 ExprBuilder */ 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 ExprBuilder */ 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 ExprBuilder */ public function ifString() { $this->ifPart = function ($v) { return is_string($v); }; return $this; } /** * Tests if the value is null. * * @return ExprBuilder */ public function ifNull() { $this->ifPart = function ($v) { return null === $v; }; return $this; } /** * Tests if the value is an array. * * @return ExprBuilder */ 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 ExprBuilder */ 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 ExprBuilder */ 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 ExprBuilder */ public function then(\Closure $closure) { $this->thenPart = $closure; return $this; } /** * Sets a closure returning an empty array. * * @return ExprBuilder */ 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 ExprBuilder * * @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 ExprBuilder * * @throws UnsetKeyException */ public function thenUnset() { $this->thenPart = function ($v) { throw new UnsetKeyException('Unsetting key'); }; return $this; } /** * Returns the related node. * * @return NodeDefinition * * @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; } } src/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php000066400000000000000000000013711266465517700265600ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php000066400000000000000000000014041266465517700271050ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php000066400000000000000000000025661266465517700252510ustar00rootroot00000000000000 * * 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 MergeBuilder */ 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 MergeBuilder */ public function denyOverwrite($deny = true) { $this->allowOverwrite = !$deny; return $this; } /** * Returns the related node. * * @return NodeDefinition */ public function end() { return $this->node; } } src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php000066400000000000000000000136101266465517700250670ustar00rootroot00000000000000 * * 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 NodeBuilder This node builder */ 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 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 NodeBuilder This node builder */ 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 NodeBuilder This node builder */ 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; } } src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php000066400000000000000000000165001266465517700255720ustar00rootroot00000000000000 * * 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 NodeDefinition|$this */ public function setParent(NodeParentInterface $parent) { $this->parent = $parent; return $this; } /** * Sets info message. * * @param string $info The info text * * @return NodeDefinition|$this */ public function info($info) { return $this->attribute('info', $info); } /** * Sets example configuration. * * @param string|array $example * * @return NodeDefinition|$this */ public function example($example) { return $this->attribute('example', $example); } /** * Sets an attribute on the node. * * @param string $key * @param mixed $value * * @return NodeDefinition|$this */ public function attribute($key, $value) { $this->attributes[$key] = $value; return $this; } /** * Returns the parent node. * * @return NodeParentInterface|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 NodeDefinition|$this */ public function defaultValue($value) { $this->default = true; $this->defaultValue = $value; return $this; } /** * Sets the node as required. * * @return NodeDefinition|$this */ public function isRequired() { $this->required = true; return $this; } /** * Sets the equivalent value used when the node contains null. * * @param mixed $value * * @return NodeDefinition|$this */ public function treatNullLike($value) { $this->nullEquivalent = $value; return $this; } /** * Sets the equivalent value used when the node contains true. * * @param mixed $value * * @return NodeDefinition|$this */ public function treatTrueLike($value) { $this->trueEquivalent = $value; return $this; } /** * Sets the equivalent value used when the node contains false. * * @param mixed $value * * @return NodeDefinition|$this */ public function treatFalseLike($value) { $this->falseEquivalent = $value; return $this; } /** * Sets null as the default value. * * @return NodeDefinition|$this */ public function defaultNull() { return $this->defaultValue(null); } /** * Sets true as the default value. * * @return NodeDefinition|$this */ public function defaultTrue() { return $this->defaultValue(true); } /** * Sets false as the default value. * * @return NodeDefinition|$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 NodeDefinition|$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 NodeDefinition|$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(); } src/Symfony/Component/Config/Definition/Builder/NodeParentInterface.php000066400000000000000000000006771266465517700265640ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php000066400000000000000000000030651266465517700270330ustar00rootroot00000000000000 * * 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 NormalizationBuilder */ 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|NormalizationBuilder */ public function before(\Closure $closure = null) { if (null !== $closure) { $this->before[] = $closure; return $this; } return $this->before[] = new ExprBuilder($this->node); } } src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php000066400000000000000000000031321266465517700271120ustar00rootroot00000000000000 * * 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; /** * 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 NumericNodeDefinition * * @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 NumericNodeDefinition * * @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; } } src/Symfony/Component/Config/Definition/Builder/ParentNodeDefinitionInterface.php000066400000000000000000000011401266465517700305570ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Definition/Builder/ScalarNodeDefinition.php000066400000000000000000000013361266465517700267210ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Definition/Builder/TreeBuilder.php000066400000000000000000000032151266465517700251010ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Definition/Builder/ValidationBuilder.php000066400000000000000000000021341266465517700262730ustar00rootroot00000000000000 * * 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|ValidationBuilder */ public function rule(\Closure $closure = null) { if (null !== $closure) { $this->rules[] = $closure; return $this; } return $this->rules[] = new ExprBuilder($this->node); } } src/Symfony/Component/Config/Definition/Builder/VariableNodeDefinition.php000066400000000000000000000032001266465517700272310ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/Definition/ConfigurationInterface.php000066400000000000000000000011451266465517700257350ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Config/Definition/Dumper/000077500000000000000000000000001266465517700220275ustar00rootroot00000000000000src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php000066400000000000000000000232001266465517700262710ustar00rootroot00000000000000 * * 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) { array_unshift($rootComments, 'prototype'); if ($key = $node->getKeyAttribute()) { $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key; } $prototype = $node->getPrototype(); if ($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); } } } src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php000066400000000000000000000135171266465517700264450ustar00rootroot00000000000000 * * 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\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 */ private function writeNode(NodeInterface $node, $depth = 0) { $comments = array(); $default = ''; $defaultArray = null; $children = null; $example = $node->getExample(); // defaults if ($node instanceof ArrayNode) { $children = $node->getChildren(); if ($node instanceof PrototypedArrayNode) { $prototype = $node->getPrototype(); if ($prototype instanceof ArrayNode) { $children = $prototype->getChildren(); } // check for attribute as key if ($key = $node->getKeyAttribute()) { $keyNodeClass = 'Symfony\Component\Config\Definition\\'.($prototype instanceof ArrayNode ? 'ArrayNode' : 'ScalarNode'); $keyNode = new $keyNodeClass($key, $node); $keyNode->setInfo('Prototype'); // add children foreach ($children as $childNode) { $keyNode->addChild($childNode); } $children = array($key => $keyNode); } } 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) : ''; $text = rtrim(sprintf('%-20s %s %s', $node->getName().':', $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); } } } /** * 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); } } } } src/Symfony/Component/Config/Definition/EnumNode.php000066400000000000000000000030141266465517700230140ustar00rootroot00000000000000 * * 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 (count($values) <= 1) { throw new \InvalidArgumentException('$values must contain at least two distinct elements.'); } 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; } } src/Symfony/Component/Config/Definition/Exception/000077500000000000000000000000001266465517700225315ustar00rootroot00000000000000src/Symfony/Component/Config/Definition/Exception/DuplicateKeyException.php000066400000000000000000000011051266465517700275010ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Exception/Exception.php000066400000000000000000000007131266465517700252010ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Exception/ForbiddenOverwriteException.php000066400000000000000000000011211266465517700307170ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Exception/InvalidConfigurationException.php000066400000000000000000000021221266465517700312340ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/Config/Definition/Exception/InvalidDefinitionException.php000066400000000000000000000007321266465517700305220ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Exception/InvalidTypeException.php000066400000000000000000000007551266465517700273600ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/Exception/UnsetKeyException.php000066400000000000000000000010341266465517700266660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Definition/FloatNode.php000066400000000000000000000021201266465517700231520ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/Config/Definition/IntegerNode.php000066400000000000000000000017121266465517700235100ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/Config/Definition/NodeInterface.php000066400000000000000000000036121266465517700240140ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Definition/NumericNode.php000066400000000000000000000033151266465517700235160ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/Definition/Processor.php000066400000000000000000000054471266465517700232750ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php000066400000000000000000000011671266465517700257450ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Definition/PrototypedArrayNode.php000066400000000000000000000234171266465517700252710ustar00rootroot00000000000000 * * 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; /** * 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) { $this->prototype->setName($k); try { $value[$k] = $this->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 (1 == count($v) && isset($v['value'])) { $v = $v['value']; } } 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; } } $this->prototype->setName($k); if (null !== $this->keyAttribute || $isAssoc) { $normalized[$k] = $this->prototype->normalize($v); } else { $normalized[] = $this->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; } $this->prototype->setName($k); $leftSide[$k] = $this->prototype->merge($leftSide[$k], $v); } return $leftSide; } } src/Symfony/Component/Config/Definition/ReferenceDumper.php000066400000000000000000000014421266465517700243600ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Definition; @trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper class instead.', E_USER_DEPRECATED); use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; /** * @deprecated since version 2.4, to be removed in 3.0. * Use {@link \Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper} instead. */ class ReferenceDumper extends YamlReferenceDumper { } src/Symfony/Component/Config/Definition/ScalarNode.php000066400000000000000000000024511266465517700233210ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/Definition/VariableNode.php000066400000000000000000000056371266465517700236520ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Exception/000077500000000000000000000000001266465517700204415ustar00rootroot00000000000000src/Symfony/Component/Config/Exception/FileLoaderImportCircularReferenceException.php000066400000000000000000000015031266465517700315350ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Exception/FileLoaderLoadException.php000066400000000000000000000067471266465517700256550ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/FileLocator.php000066400000000000000000000045511266465517700214240ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config; /** * 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 \InvalidArgumentException(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 \InvalidArgumentException(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; } } src/Symfony/Component/Config/FileLocatorInterface.php000066400000000000000000000015731266465517700232460ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config; /** * @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 When file is not found */ public function locate($name, $currentPath = null, $first = true); } src/Symfony/Component/Config/LICENSE000066400000000000000000000020511266465517700175060ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Config/Loader/000077500000000000000000000000001266465517700177115ustar00rootroot00000000000000src/Symfony/Component/Config/Loader/DelegatingLoader.php000066400000000000000000000025421266465517700236170ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Config/Loader/FileLoader.php000066400000000000000000000100751266465517700224330ustar00rootroot00000000000000 * * 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) { // we fallback to the current locator to keep BC // as some some loaders do not call the parent __construct() // @deprecated should be removed in 3.0 $locator = $loader->getLocator(); if (null === $locator) { @trigger_error('Not calling the parent constructor in '.get_class($loader).' which extends '.__CLASS__.' is deprecated since version 2.7 and will not be supported anymore in 3.0.', E_USER_DEPRECATED); $locator = $this->locator; } $resource = $locator->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); } catch (\Exception $e) { unset(self::$loading[$resource]); throw $e; } 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); } } } } src/Symfony/Component/Config/Loader/Loader.php000066400000000000000000000035061266465517700216340ustar00rootroot00000000000000 * * 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 LoaderInterface A LoaderInterface instance * * @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; } } src/Symfony/Component/Config/Loader/LoaderInterface.php000066400000000000000000000026501266465517700234540ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/Loader/LoaderResolver.php000066400000000000000000000033021266465517700233500ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/Loader/LoaderResolverInterface.php000066400000000000000000000014331266465517700251740ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Config/README.md000066400000000000000000000007571266465517700177730ustar00rootroot00000000000000Config Component ================ Config provides the infrastructure for loading configurations from different data sources and optionally monitoring these data sources for changes. There are additional tools for validating, normalizing and handling of defaults that can optionally be used to convert from different formats to arrays. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Config/ $ composer install $ phpunit src/Symfony/Component/Config/Resource/000077500000000000000000000000001266465517700202725ustar00rootroot00000000000000src/Symfony/Component/Config/Resource/DirectoryResource.php000066400000000000000000000047161266465517700244670ustar00rootroot00000000000000 * * 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 ResourceInterface, \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 */ public function __construct($resource, $pattern = null) { $this->resource = $resource; $this->pattern = $pattern; } /** * {@inheritdoc} */ public function __toString() { return md5(serialize(array($this->resource, $this->pattern))); } /** * {@inheritdoc} */ 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; } $newestMTime = filemtime($this->resource); 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; } $newestMTime = max($file->getMTime(), $newestMTime); } return $newestMTime < $timestamp; } public function serialize() { return serialize(array($this->resource, $this->pattern)); } public function unserialize($serialized) { list($this->resource, $this->pattern) = unserialize($serialized); } } src/Symfony/Component/Config/Resource/FileResource.php000066400000000000000000000027231266465517700233760ustar00rootroot00000000000000 * * 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 ResourceInterface, \Serializable { /** * @var string|false */ private $resource; /** * Constructor. * * @param string $resource The file path to the resource */ public function __construct($resource) { $this->resource = realpath($resource); } /** * {@inheritdoc} */ public function __toString() { return (string) $this->resource; } /** * {@inheritdoc} */ public function getResource() { return $this->resource; } /** * {@inheritdoc} */ public function isFresh($timestamp) { if (false === $this->resource || !file_exists($this->resource)) { return false; } return filemtime($this->resource) <= $timestamp; } public function serialize() { return serialize($this->resource); } public function unserialize($serialized) { $this->resource = unserialize($serialized); } } src/Symfony/Component/Config/Resource/ResourceInterface.php000066400000000000000000000020541266465517700244140ustar00rootroot00000000000000 * * 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. * * @return string A string representation of the Resource */ public function __toString(); /** * 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); /** * Returns the tied resource. * * @return mixed The resource */ public function getResource(); } src/Symfony/Component/Config/Tests/000077500000000000000000000000001266465517700176055ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/ConfigCacheFactoryTest.php000066400000000000000000000013521266465517700246400ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\ConfigCacheFactory; class ConfigCacheFactoryTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Config/Tests/ConfigCacheTest.php000066400000000000000000000071751266465517700233210ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\ConfigCache; use Symfony\Component\Config\Resource\FileResource; class ConfigCacheTest extends \PHPUnit_Framework_TestCase { private $resourceFile = null; private $cacheFile = null; private $metaFile = null; protected function setUp() { $this->resourceFile = tempnam(sys_get_temp_dir(), '_resource'); $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); $this->metaFile = $this->cacheFile.'.meta'; $this->makeCacheFresh(); $this->generateMetaFile(); } protected function tearDown() { $files = array($this->cacheFile, $this->metaFile, $this->resourceFile); foreach ($files as $file) { if (file_exists($file)) { unlink($file); } } } public function testGetPath() { $cache = new ConfigCache($this->cacheFile, true); $this->assertSame($this->cacheFile, $cache->getPath()); } public function testCacheIsNotFreshIfFileDoesNotExist() { unlink($this->cacheFile); $cache = new ConfigCache($this->cacheFile, false); $this->assertFalse($cache->isFresh()); } public function testCacheIsAlwaysFreshIfFileExistsWithDebugDisabled() { $this->makeCacheStale(); $cache = new ConfigCache($this->cacheFile, false); $this->assertTrue($cache->isFresh()); } public function testCacheIsNotFreshWithoutMetaFile() { unlink($this->metaFile); $cache = new ConfigCache($this->cacheFile, true); $this->assertFalse($cache->isFresh()); } public function testCacheIsFreshIfResourceIsFresh() { $cache = new ConfigCache($this->cacheFile, true); $this->assertTrue($cache->isFresh()); } public function testCacheIsNotFreshIfOneOfTheResourcesIsNotFresh() { $this->makeCacheStale(); $cache = new ConfigCache($this->cacheFile, true); $this->assertFalse($cache->isFresh()); } public function testWriteDumpsFile() { unlink($this->cacheFile); unlink($this->metaFile); $cache = new ConfigCache($this->cacheFile, false); $cache->write('FOOBAR'); $this->assertFileExists($this->cacheFile, 'Cache file is created'); $this->assertSame('FOOBAR', file_get_contents($this->cacheFile)); $this->assertFileNotExists($this->metaFile, 'Meta file is not created'); } public function testWriteDumpsMetaFileWithDebugEnabled() { unlink($this->cacheFile); unlink($this->metaFile); $metadata = array(new FileResource($this->resourceFile)); $cache = new ConfigCache($this->cacheFile, true); $cache->write('FOOBAR', $metadata); $this->assertFileExists($this->cacheFile, 'Cache file is created'); $this->assertFileExists($this->metaFile, 'Meta file is created'); $this->assertSame(serialize($metadata), file_get_contents($this->metaFile)); } private function makeCacheFresh() { touch($this->resourceFile, filemtime($this->cacheFile) - 3600); } private function makeCacheStale() { touch($this->cacheFile, filemtime($this->resourceFile) - 3600); } private function generateMetaFile() { file_put_contents($this->metaFile, serialize(array(new FileResource($this->resourceFile)))); } } src/Symfony/Component/Config/Tests/Definition/000077500000000000000000000000001266465517700216755ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php000066400000000000000000000120031266465517700251260ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\ArrayNode; use Symfony\Component\Config\Definition\ScalarNode; class ArrayNodeTest extends \PHPUnit_Framework_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')); } /** * Tests that no exception is thrown for an unrecognized child if the * ignoreExtraKeys option is set to true. * * Related to testExceptionThrownOnUnrecognizedChild */ public function testIgnoreExtraKeysNoException() { $node = new ArrayNode('roo'); $node->setIgnoreExtraKeys(true); $node->normalize(array('foo' => 'bar')); $this->assertTrue(true, 'No exception was thrown when setIgnoreExtraKeys is true'); } /** * @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'), ), ); } } src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php000066400000000000000000000032551266465517700254400ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\BooleanNode; class BooleanNodeTest extends \PHPUnit_Framework_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()), ); } } src/Symfony/Component/Config/Tests/Definition/Builder/000077500000000000000000000000001266465517700232635ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php000066400000000000000000000153661266465517700305440ustar00rootroot00000000000000 * * 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\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition; use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; class ArrayNodeDefinitionTest extends \PHPUnit_Framework_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 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); } } src/Symfony/Component/Config/Tests/Definition/Builder/EnumNodeDefinitionTest.php000066400000000000000000000023321266465517700303570ustar00rootroot00000000000000 * * 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\EnumNodeDefinition; class EnumNodeDefinitionTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage ->values() must be called with at least two distinct values. */ public function testNoDistinctValues() { $def = new EnumNodeDefinition('foo'); $def->values(array('foo', 'foo')); } /** * @expectedException \RuntimeException * @expectedExceptionMessage You must call ->values() on enum nodes. */ public function testNoValuesPassed() { $def = new EnumNodeDefinition('foo'); $def->getNode(); } public function testGetNode() { $def = new EnumNodeDefinition('foo'); $def->values(array('foo', 'bar')); $node = $def->getNode(); $this->assertEquals(array('foo', 'bar'), $node->getValues()); } } src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php000066400000000000000000000144721266465517700270710ustar00rootroot00000000000000 * * 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\TreeBuilder; class ExprBuilderTest extends \PHPUnit_Framework_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 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)); } /** * 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)); } } src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php000066400000000000000000000052621266465517700270350ustar00rootroot00000000000000 * * 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; use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; class NodeBuilderTest extends \PHPUnit_Framework_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 { } src/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php000066400000000000000000000061521266465517700310610ustar00rootroot00000000000000 * * 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\IntegerNodeDefinition as NumericNodeDefinition; use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition; use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition; class NumericNodeDefinitionTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php000066400000000000000000000102321266465517700270400ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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()); } } src/Symfony/Component/Config/Tests/Definition/Dumper/000077500000000000000000000000001266465517700231315ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php000066400000000000000000000041671266465517700302460ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; class XmlReferenceDumperTest extends \PHPUnit_Framework_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, << scalar value EOL ); } } src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php000066400000000000000000000033621266465517700304040ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; class YamlReferenceDumperTest extends \PHPUnit_Framework_TestCase { public function testDumper() { $configuration = new ExampleConfiguration(); $dumper = new YamlReferenceDumper(); $this->markTestIncomplete('The Yaml Dumper currently does not support prototyped arrays'); $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); } private function getConfigurationAsString() { return <<<'EOL' acme_root: boolean: true scalar_empty: ~ scalar_null: ~ scalar_true: true scalar_false: false scalar_default: default scalar_array_empty: [] scalar_array_defaults: # Defaults: - elem1 - elem2 scalar_required: ~ # Required 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 parameters: # Prototype name: ~ connections: # Prototype - { user: ~, pass: ~ } EOL; } } src/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php000066400000000000000000000022121266465517700247550ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\EnumNode; class EnumNodeTest extends \PHPUnit_Framework_TestCase { public function testFinalizeValue() { $node = new EnumNode('foo', null, array('foo', 'bar')); $this->assertSame('foo', $node->finalize('foo')); } /** * @expectedException \InvalidArgumentException */ public function testConstructionWithOneValue() { new EnumNode('foo', null, array('foo', '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'); } } src/Symfony/Component/Config/Tests/Definition/FinalizationTest.php000066400000000000000000000041221266465517700256740ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\Definition\NodeInterface; class FinalizationTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php000066400000000000000000000034631266465517700251270ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\FloatNode; class FloatNodeTest extends \PHPUnit_Framework_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()), ); } } src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php000066400000000000000000000033101266465517700254460ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\IntegerNode; class IntegerNodeTest extends \PHPUnit_Framework_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()), ); } } src/Symfony/Component/Config/Tests/Definition/MergeTest.php000066400000000000000000000120771266465517700243140ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\Builder\TreeBuilder; class MergeTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php000066400000000000000000000143701266465517700261010ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\NodeInterface; use Symfony\Component\Config\Definition\Builder\TreeBuilder; class NormalizationTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php000066400000000000000000000153661266465517700272370ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\PrototypedArrayNode; use Symfony\Component\Config\Definition\ArrayNode; use Symfony\Component\Config\Definition\ScalarNode; class PrototypedArrayNodeTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php000066400000000000000000000062161266465517700252660ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Definition\ScalarNode; class ScalarNodeTest extends \PHPUnit_Framework_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'); $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"'); $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(''), ); } } src/Symfony/Component/Config/Tests/Exception/000077500000000000000000000000001266465517700215435ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Exception/FileLoaderLoadExceptionTest.php000066400000000000000000000060341266465517700276040ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Exception\FileLoaderLoadException; class FileLoaderLoadExceptionTest extends \PHPUnit_Framework_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() ); } } src/Symfony/Component/Config/Tests/FileLocatorTest.php000066400000000000000000000076701266465517700233730ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\FileLocator; class FileLocatorTest extends \PHPUnit_Framework_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 \InvalidArgumentException * @expectedExceptionMessage The file "foobar.xml" does not exist */ public function testLocateThrowsAnExceptionIfTheFileDoesNotExists() { $loader = new FileLocator(array(__DIR__.'/Fixtures')); $loader->locate('foobar.xml', __DIR__); } /** * @expectedException \InvalidArgumentException */ 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__); } } src/Symfony/Component/Config/Tests/Fixtures/000077500000000000000000000000001266465517700214165ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Again/000077500000000000000000000000001266465517700224355ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Again/foo.xml000066400000000000000000000000001266465517700237300ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Builder/000077500000000000000000000000001266465517700230045ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php000066400000000000000000000007201266465517700270370ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php000066400000000000000000000015631266465517700257160ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php000066400000000000000000000007271266465517700300670ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Config/Tests/Fixtures/Configuration/000077500000000000000000000000001266465517700242255ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php000066400000000000000000000053731266465517700310710ustar00rootroot00000000000000 * * 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') ->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() ->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('parameters') ->useAttributeAsKey('name') ->prototype('scalar')->end() ->end() ->arrayNode('connections') ->prototype('array') ->children() ->scalarNode('user')->end() ->scalarNode('pass')->end() ->end() ->end() ->end() ->end() ; return $treeBuilder; } } src/Symfony/Component/Config/Tests/Fixtures/Util/000077500000000000000000000000001266465517700223335ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml000066400000000000000000000002371266465517700257360ustar00rootroot00000000000000 ]> src/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml000066400000000000000000000000561266465517700245040ustar00rootroot00000000000000 src/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml000066400000000000000000000001231266465517700260170ustar00rootroot00000000000000 src/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd000066400000000000000000000004101266465517700243060ustar00rootroot00000000000000 src/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml000066400000000000000000000001301266465517700241460ustar00rootroot00000000000000 src/Symfony/Component/Config/Tests/Fixtures/foo.xml000066400000000000000000000000001266465517700227110ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Loader/000077500000000000000000000000001266465517700210135ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php000066400000000000000000000054131266465517700255610ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Loader\LoaderResolver; use Symfony\Component\Config\Loader\DelegatingLoader; class DelegatingLoaderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $loader->expects($this->once())->method('supports')->will($this->returnValue(false)); $resolver = new LoaderResolver(array($loader)); $loader = new DelegatingLoader($resolver); $loader->load('foo'); } } src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php000066400000000000000000000073421266465517700244000ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Loader\FileLoader; use Symfony\Component\Config\Loader\LoaderResolver; class FileLoaderTest extends \PHPUnit_Framework_TestCase { public function testImportWithFileLocatorDelegation() { $locatorMock = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $locatorMockForAdditionalLoader = $this->getMock('Symfony\Component\Config\FileLocatorInterface'); $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; } } src/Symfony/Component/Config/Tests/Loader/LoaderResolverTest.php000066400000000000000000000032671266465517700253240ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Loader\LoaderResolver; class LoaderResolverTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $resolver = new LoaderResolver(array( $loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface'), )); $this->assertEquals(array($loader), $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); } public function testResolve() { $loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface')); $this->assertEquals(array($loader), $resolver->getLoaders(), 'addLoader() adds a loader'); } } src/Symfony/Component/Config/Tests/Loader/LoaderTest.php000066400000000000000000000071001266465517700235700ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Loader\Loader; class LoaderTest extends \PHPUnit_Framework_TestCase { public function testGetSetResolver() { $resolver = $this->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface'); $loader = new ProjectLoader1(); $loader->setResolver($resolver); $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader'); } public function testResolve() { $resolvedLoader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $resolver = $this->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $resolvedLoader->expects($this->once()) ->method('load') ->with('foo') ->will($this->returnValue('yes')); $resolver = $this->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface'); $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->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $resolvedLoader->expects($this->once()) ->method('load') ->with('foo', 'bar') ->will($this->returnValue('yes')); $resolver = $this->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface'); $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() { } } src/Symfony/Component/Config/Tests/Resource/000077500000000000000000000000001266465517700213745ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php000066400000000000000000000140201266465517700264160ustar00rootroot00000000000000 * * 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\DirectoryResource; class DirectoryResourceTest extends \PHPUnit_Framework_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($this->directory, $resource->getResource(), '->getResource() returns the path to the resource'); } public function testGetPattern() { $resource = new DirectoryResource('foo', 'bar'); $this->assertEquals('bar', $resource->getPattern()); } 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'); $resource = new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); $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); 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($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)))); } } src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php000066400000000000000000000036431266465517700253420ustar00rootroot00000000000000 * * 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\FileResource; class FileResourceTest extends \PHPUnit_Framework_TestCase { protected $resource; protected $file; protected $time; protected function setUp() { $this->file = realpath(sys_get_temp_dir()).'/tmp.xml'; $this->time = time(); touch($this->file, $this->time); $this->resource = new FileResource($this->file); } protected function tearDown() { unlink($this->file); } public function testGetResource() { $this->assertSame(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource'); } public function testToString() { $this->assertSame(realpath($this->file), (string) $this->resource); } 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'); $resource = new FileResource('/____foo/foobar'.mt_rand(1, 999999)); $this->assertFalse($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()); } } src/Symfony/Component/Config/Tests/Util/000077500000000000000000000000001266465517700205225ustar00rootroot00000000000000src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php000066400000000000000000000167231266465517700236650ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Util\XmlUtils; class XmlUtilsTest extends \PHPUnit_Framework_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->getMock(__NAMESPACE__.'\Validator'); $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'; $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()); } } catch (\Exception $e) { restore_error_handler(); error_reporting($errorReporting); throw $e; } 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(); } src/Symfony/Component/Config/Util/000077500000000000000000000000001266465517700174205ustar00rootroot00000000000000src/Symfony/Component/Config/Util/XmlUtils.php000066400000000000000000000176541266465517700217270ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Config/composer.json000066400000000000000000000015541266465517700212320ustar00rootroot00000000000000{ "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.3.9", "symfony/filesystem": "~2.3" }, "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": "2.7-dev" } } } src/Symfony/Component/Config/phpunit.xml.dist000066400000000000000000000014721266465517700216620ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Console/000077500000000000000000000000001266465517700167005ustar00rootroot00000000000000src/Symfony/Component/Console/.gitignore000066400000000000000000000000421266465517700206640ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Console/Application.php000066400000000000000000001115531266465517700216620ustar00rootroot00000000000000 * * 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\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; 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\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\BufferedOutput; 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\Helper\DialogHelper; use Symfony\Component\Console\Helper\ProgressHelper; use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; 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 $terminalDimensions; private $defaultCommand; /** * Constructor. * * @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->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 * * @throws \Exception When doRun returns Exception */ public function run(InputInterface $input = null, OutputInterface $output = null) { 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'))) { $output->writeln($this->getLongVersion()); return 0; } $name = $this->getCommandName($input); if (true === $input->hasParameterOption(array('--help', '-h'))) { if (!$name) { $name = 'help'; $input = new ArrayInput(array('command' => 'help')); } 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 set 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() { return $this->definition; } /** * Gets the help message. * * @return string A help message. */ public function getHelp() { return $this->getLongVersion(); } /** * 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; } /** * 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 version %s', $this->getName(), $this->getVersion()); } return sprintf('%s', $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. * * @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. * * @param Command $command A Command object * * @return Command The registered command */ 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 \InvalidArgumentException When command name given does not exist */ public function get($name) { if (!isset($this->commands[$name])) { throw new \InvalidArgumentException(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 returns the global namespace which always exists. * * @return array 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 \InvalidArgumentException 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 \InvalidArgumentException($message); } $exact = in_array($namespace, $namespaces, true); if (count($namespaces) > 1 && !$exact) { throw new \InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions(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 \InvalidArgumentException 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 \InvalidArgumentException($message); } // 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 \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions)); } 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; } /** * Returns a text representation of the Application. * * @param string $namespace An optional namespace name * @param bool $raw Whether to return raw command list * * @return string A string representing the Application * * @deprecated since version 2.3, to be removed in 3.0. */ public function asText($namespace = null, $raw = false) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw); $descriptor->describe($output, $this, array('namespace' => $namespace, 'raw_output' => true)); return $output->fetch(); } /** * Returns an XML representation of the Application. * * @param string $namespace An optional namespace name * @param bool $asDom Whether to return a DOM or an XML string * * @return string|\DOMDocument An XML string representing the Application * * @deprecated since version 2.3, to be removed in 3.0. */ public function asXml($namespace = null, $asDom = false) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new XmlDescriptor(); if ($asDom) { return $descriptor->getApplicationDocument($this, $namespace); } $output = new BufferedOutput(); $descriptor->describe($output, $this, array('namespace' => $namespace)); return $output->fetch(); } /** * Renders a caught exception. * * @param \Exception $e An exception instance * @param OutputInterface $output An OutputInterface instance */ public function renderException($e, $output) { $output->writeln(''); do { $title = sprintf(' [%s] ', get_class($e)); $len = $this->stringWidth($title); $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 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); if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln('Exception trace:'); // 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)); } $output->writeln(''); } } while ($e = $e->getPrevious()); if (null !== $this->runningCommand) { $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName()))); $output->writeln(''); } } /** * Tries to figure out the terminal width in which this application runs. * * @return int|null */ protected function getTerminalWidth() { $dimensions = $this->getTerminalDimensions(); return $dimensions[0]; } /** * Tries to figure out the terminal height in which this application runs. * * @return int|null */ protected function getTerminalHeight() { $dimensions = $this->getTerminalDimensions(); return $dimensions[1]; } /** * Tries to figure out the terminal dimensions based on the current environment. * * @return array Array containing width and height */ public function getTerminalDimensions() { if ($this->terminalDimensions) { return $this->terminalDimensions; } if ('\\' === DIRECTORY_SEPARATOR) { // extract [w, H] from "wxh (WxH)" if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) { return array((int) $matches[1], (int) $matches[2]); } // extract [w, h] from "wxh" if (preg_match('/^(\d+)x(\d+)$/', $this->getConsoleMode(), $matches)) { return array((int) $matches[1], (int) $matches[2]); } } if ($sttyString = $this->getSttyColumns()) { // extract [w, h] from "rows h; columns w;" if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { return array((int) $matches[2], (int) $matches[1]); } // extract [w, h] from "; h rows; w columns" if (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { return array((int) $matches[2], (int) $matches[1]); } } return array(null, null); } /** * Sets terminal dimensions. * * Can be useful to force terminal dimensions for functional tests. * * @param int $width The width * @param int $height The height * * @return Application The current application */ public function setTerminalDimensions($width, $height) { $this->terminalDimensions = array($width, $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'))) { $output->setDecorated(true); } elseif (true === $input->hasParameterOption(array('--no-ansi'))) { $output->setDecorated(false); } if (true === $input->hasParameterOption(array('--no-interaction', '-n'))) { $input->setInteractive(false); } elseif (function_exists('posix_isatty') && $this->getHelperSet()->has('question')) { $inputStream = $this->getHelperSet()->get('question')->getInputStream(); if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) { $input->setInteractive(false); } } if (true === $input->hasParameterOption(array('--quiet', '-q'))) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); } else { if ($input->hasParameterOption('-vvv') || $input->hasParameterOption('--verbose=3') || $input->getParameterOption('--verbose') === 3) { $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); } elseif ($input->hasParameterOption('-vv') || $input->hasParameterOption('--verbose=2') || $input->getParameterOption('--verbose') === 2) { $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); } elseif ($input->hasParameterOption('-v') || $input->hasParameterOption('--verbose=1') || $input->hasParameterOption('--verbose') || $input->getParameterOption('--verbose')) { $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 * * @throws \Exception when the command being run threw an exception */ 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) { return $command->run($input, $output); } $event = new ConsoleCommandEvent($command, $input, $output); $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event); if ($event->commandShouldRun()) { try { $exitCode = $command->run($input, $output); } catch (\Exception $e) { $event = new ConsoleExceptionEvent($command, $input, $output, $e, $e->getCode()); $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event); $e = $event->getException(); $event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode()); $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); throw $e; } } 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 $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 DialogHelper(false), new ProgressHelper(false), new TableHelper(false), new DebugFormatterHelper(), new ProcessHelper(), new QuestionHelper(), )); } /** * Runs and parses stty -a if it's available, suppressing any error output. * * @return string */ private 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; } } /** * Runs and parses mode CON if it's available, suppressing any error output. * * @return string x or null if it could not be parsed */ private 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 $matches[2].'x'.$matches[1]; } } } /** * 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 array 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 */ public function setDefaultCommand($commandName) { $this->defaultCommand = $commandName; } private function stringWidth($string) { if (!function_exists('mb_strwidth')) { return strlen($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 (!function_exists('mb_strwidth')) { return str_split($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 array 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; } } src/Symfony/Component/Console/CHANGELOG.md000066400000000000000000000040631266465517700205140ustar00rootroot00000000000000CHANGELOG ========= 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) src/Symfony/Component/Console/Command/000077500000000000000000000000001266465517700202565ustar00rootroot00000000000000src/Symfony/Component/Console/Command/Command.php000066400000000000000000000450531266465517700223540ustar00rootroot00000000000000 * * 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\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; 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\BufferedOutput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application; use Symfony\Component\Console\Helper\HelperSet; /** * Base class for all commands. * * @author Fabien Potencier */ class Command { private $application; private $name; private $processTitle; private $aliases = array(); private $definition; private $help; private $description; private $ignoreValidationErrors = false; private $applicationDefinitionMerged = false; private $applicationDefinitionMergedWithArgs = 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 * * @throws \Exception * * @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 try { $input->bind($this->definition); } catch (\Exception $e) { if (!$this->ignoreValidationErrors) { throw $e; } } $this->initialize($input, $output); if (null !== $this->processTitle) { if (function_exists('cli_set_process_title')) { cli_set_process_title($this->processTitle); } 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 Command The current instance * * @throws \InvalidArgumentException * * @see execute() */ public function setCode($code) { if (!is_callable($code)) { throw new \InvalidArgumentException('Invalid callable provided to Command::setCode.'); } $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; } if ($mergeArgs) { $currentArguments = $this->definition->getArguments(); $this->definition->setArguments($this->application->getDefinition()->getArguments()); $this->definition->addArguments($currentArguments); } $this->definition->addOptions($this->application->getDefinition()->getOptions()); $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 Command The current instance */ 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 XML and Text 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 Command The current instance */ 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 Command The current instance */ 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 Command The current instance * * @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 Command The current instance */ public function setProcessTitle($title) { $this->processTitle = $title; return $this; } /** * Returns the command name. * * @return string The command name */ public function getName() { return $this->name; } /** * Sets the description for the command. * * @param string $description The description for the command * * @return Command The current instance */ 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 Command The current instance */ 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 Command The current instance * * @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 */ 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 \InvalidArgumentException if the helper is not defined */ public function getHelper($name) { return $this->helperSet->get($name); } /** * Returns a text representation of the command. * * @return string A string representing the command * * @deprecated since version 2.3, to be removed in 3.0. */ public function asText() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $descriptor->describe($output, $this, array('raw_output' => true)); return $output->fetch(); } /** * Returns an XML representation of the command. * * @param bool $asDom Whether to return a DOM or an XML string * * @return string|\DOMDocument An XML string representing the command * * @deprecated since version 2.3, to be removed in 3.0. */ public function asXml($asDom = false) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new XmlDescriptor(); if ($asDom) { return $descriptor->getCommandDocument($this); } $output = new BufferedOutput(); $descriptor->describe($output, $this); return $output->fetch(); } /** * 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)); } } } src/Symfony/Component/Console/Command/HelpCommand.php000066400000000000000000000054251266465517700231640ustar00rootroot00000000000000 * * 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('xml', null, InputOption::VALUE_NONE, 'To output help as XML'), 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')); } if ($input->getOption('xml')) { @trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED); $input->setOption('format', 'xml'); } $helper = new DescriptorHelper(); $helper->describe($output, $this->command, array( 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), )); $this->command = null; } } src/Symfony/Component/Console/Command/ListCommand.php000066400000000000000000000055571266465517700232150ustar00rootroot00000000000000 * * 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) { if ($input->getOption('xml')) { @trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED); $input->setOption('format', 'xml'); } $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('xml', null, InputOption::VALUE_NONE, 'To output list as XML'), 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'), )); } } src/Symfony/Component/Console/ConsoleEvents.php000066400000000000000000000030671266465517700222060ustar00rootroot00000000000000 * * 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. * * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent * instance. * * @Event * * @var string */ const COMMAND = 'console.command'; /** * The TERMINATE event allows you to attach listeners after a command is * executed by the console. * * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent * instance. * * @Event * * @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. The event listener method receives * a Symfony\Component\Console\Event\ConsoleExceptionEvent * instance. * * @Event * * @var string */ const EXCEPTION = 'console.exception'; } src/Symfony/Component/Console/Descriptor/000077500000000000000000000000001266465517700210165ustar00rootroot00000000000000src/Symfony/Component/Console/Descriptor/ApplicationDescription.php000066400000000000000000000073031266465517700262010ustar00rootroot00000000000000 * * 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; /** * @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 \InvalidArgumentException */ public function getCommand($name) { if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { throw new \InvalidArgumentException(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()) { 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; } } src/Symfony/Component/Console/Descriptor/Descriptor.php000066400000000000000000000067121266465517700236530ustar00rootroot00000000000000 * * 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; /** * @author Jean-François Simon * * @internal */ abstract class Descriptor implements DescriptorInterface { /** * @var OutputInterface */ private $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()); } src/Symfony/Component/Console/Descriptor/DescriptorInterface.php000066400000000000000000000013411266465517700254650ustar00rootroot00000000000000 * * 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()); } src/Symfony/Component/Console/Descriptor/JsonDescriptor.php000066400000000000000000000116111266465517700244770ustar00rootroot00000000000000 * * 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()), ); } } src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php000066400000000000000000000117001266465517700253470ustar00rootroot00000000000000 * * 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; /** * 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('-', 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('=', 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)); } } } src/Symfony/Component/Console/Descriptor/TextDescriptor.php000066400000000000000000000240431266465517700245150ustar00rootroot00000000000000 * * 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; /** * 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'] : strlen($argument->getName()); $spacingWidth = $totalWidth - strlen($argument->getName()) + 2; $this->writeText(sprintf(' %s%s%s%s', $argument->getName(), str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + + + 2 spaces preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $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 - strlen($synopsis) + 2; $this->writeText(sprintf(' %s%s%s%s%s', $synopsis, str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + + + 2 spaces preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $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, 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 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) { $this->writeText("\n"); $spacingWidth = $width - strlen($name); $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $description->getCommand($name)->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 input option/argument default value. * * @param mixed $default * * @return string */ private function formatDefaultValue($default) { if (PHP_VERSION_ID < 50400) { return str_replace(array('\/', '\\\\'), array('/', '\\'), json_encode($default)); } 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[] = strlen($command->getName()); foreach ($command->getAliases() as $alias) { $widths[] = 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(strlen($option->getShortcut()), 1) + 4 + strlen($option->getName()); if ($option->acceptValue()) { $valueLength = 1 + strlen($option->getName()); // = + value $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] $nameLength += $valueLength; } $totalWidth = max($totalWidth, $nameLength); } return $totalWidth; } } src/Symfony/Component/Console/Descriptor/XmlDescriptor.php000066400000000000000000000225231266465517700243320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Event/000077500000000000000000000000001266465517700177615ustar00rootroot00000000000000src/Symfony/Component/Console/Event/ConsoleCommandEvent.php000066400000000000000000000024751266465517700244050ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Event/ConsoleEvent.php000066400000000000000000000026701266465517700231030ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php000066400000000000000000000030751266465517700247620ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Event/ConsoleTerminateEvent.php000066400000000000000000000024321266465517700247500ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Formatter/000077500000000000000000000000001266465517700206435ustar00rootroot00000000000000src/Symfony/Component/Console/Formatter/OutputFormatter.php000066400000000000000000000147761266465517700245570ustar00rootroot00000000000000 * * 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 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|bool false if string is not format string */ private function createStyleFromString($string) { if (isset($this->styles[$string])) { return $this->styles[$string]; } if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($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]); } else { try { $style->setOption($match[1]); } catch (\InvalidArgumentException $e) { 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; } } src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php000066400000000000000000000031351266465517700263630ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php000066400000000000000000000152051266465517700255640ustar00rootroot00000000000000 * * 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 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)); } } src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php000066400000000000000000000025331266465517700274050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php000066400000000000000000000053451266465517700265560ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Formatter; /** * @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 OutputFormatterStyleStack */ public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) { $this->emptyStyle = $emptyStyle; return $this; } /** * @return OutputFormatterStyleInterface */ public function getEmptyStyle() { return $this->emptyStyle; } } src/Symfony/Component/Console/Helper/000077500000000000000000000000001266465517700201175ustar00rootroot00000000000000src/Symfony/Component/Console/Helper/DebugFormatterHelper.php000066400000000000000000000101261266465517700247020ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Console/Helper/DescriptorHelper.php000066400000000000000000000050401266465517700241050ustar00rootroot00000000000000 * * 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; /** * 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 DescriptorHelper */ public function register($format, DescriptorInterface $descriptor) { $this->descriptors[$format] = $descriptor; return $this; } /** * {@inheritdoc} */ public function getName() { return 'descriptor'; } } src/Symfony/Component/Console/Helper/DialogHelper.php000066400000000000000000000411041266465517700231670ustar00rootroot00000000000000 * * 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\Formatter\OutputFormatterStyle; /** * The Dialog class provides helpers to interact with the user. * * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link \Symfony\Component\Console\Helper\QuestionHelper} instead. */ class DialogHelper extends InputAwareHelper { private $inputStream; private static $shell; private static $stty; public function __construct($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED); } } /** * Asks the user to select a value. * * @param OutputInterface $output An Output instance * @param string|array $question The question to ask * @param array $choices List of choices to pick from * @param bool|string $default The default answer if the user enters nothing * @param bool|int $attempts Max number of times to ask before giving up (false by default, which means infinite) * @param string $errorMessage Message which will be shown if invalid value from choice list would be picked * @param bool $multiselect Select more than one value separated by comma * * @return int|string|array The selected value or values (the key of the choices array) * * @throws \InvalidArgumentException */ public function select(OutputInterface $output, $question, $choices, $default = null, $attempts = false, $errorMessage = 'Value "%s" is invalid', $multiselect = false) { $width = max(array_map('strlen', array_keys($choices))); $messages = (array) $question; foreach ($choices as $key => $value) { $messages[] = sprintf(" [%-{$width}s] %s", $key, $value); } $output->writeln($messages); $result = $this->askAndValidate($output, '> ', function ($picked) use ($choices, $errorMessage, $multiselect) { // Collapse all spaces. $selectedChoices = str_replace(' ', '', $picked); 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, $picked)); } $selectedChoices = explode(',', $selectedChoices); } else { $selectedChoices = array($picked); } $multiselectChoices = array(); foreach ($selectedChoices as $value) { if (empty($choices[$value])) { throw new \InvalidArgumentException(sprintf($errorMessage, $value)); } $multiselectChoices[] = $value; } if ($multiselect) { return $multiselectChoices; } return $picked; }, $attempts, $default); return $result; } /** * Asks a question to the user. * * @param OutputInterface $output An Output instance * @param string|array $question The question to ask * @param string $default The default answer if none is given by the user * @param array $autocomplete List of values to autocomplete * * @return string The user answer * * @throws \RuntimeException If there is no data to read in the input stream */ public function ask(OutputInterface $output, $question, $default = null, array $autocomplete = null) { if ($this->input && !$this->input->isInteractive()) { return $default; } $output->write($question); $inputStream = $this->inputStream ?: STDIN; if (null === $autocomplete || !$this->hasSttyAvailable()) { $ret = fgets($inputStream, 4096); if (false === $ret) { throw new \RuntimeException('Aborted'); } $ret = trim($ret); } else { $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 strlen($ret) > 0 ? $ret : $default; } /** * Asks a confirmation to the user. * * The question will be asked until the user answers by nothing, yes, or no. * * @param OutputInterface $output An Output instance * @param string|array $question The question to ask * @param bool $default The default answer if the user enters nothing * * @return bool true if the user has confirmed, false otherwise */ public function askConfirmation(OutputInterface $output, $question, $default = true) { $answer = 'z'; while ($answer && !in_array(strtolower($answer[0]), array('y', 'n'))) { $answer = $this->ask($output, $question); } if (false === $default) { return $answer && 'y' == strtolower($answer[0]); } return !$answer || 'y' == strtolower($answer[0]); } /** * Asks a question to the user, the response is hidden. * * @param OutputInterface $output An Output instance * @param string|array $question The question * @param bool $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not * * @return string The answer * * @throws \RuntimeException In case the fallback is deactivated and the response can not be hidden */ public function askHiddenResponse(OutputInterface $output, $question, $fallback = true) { 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; } $output->write($question); $value = rtrim(shell_exec($exe)); $output->writeln(''); if (isset($tmpExe)) { unlink($tmpExe); } return $value; } if ($this->hasSttyAvailable()) { $output->write($question); $sttyMode = shell_exec('stty -g'); shell_exec('stty -echo'); $value = fgets($this->inputStream ?: STDIN, 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()) { $output->write($question); $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; } if ($fallback) { return $this->ask($output, $question); } throw new \RuntimeException('Unable to hide the response'); } /** * Asks for a value and validates the response. * * The validator receives the data to validate. It must return the * validated data when the data is valid and throw an exception * otherwise. * * @param OutputInterface $output An Output instance * @param string|array $question The question to ask * @param callable $validator A PHP callback * @param int|false $attempts Max number of times to ask before giving up (false by default, which means infinite) * @param string $default The default answer if none is given by the user * @param array $autocomplete List of values to autocomplete * * @return mixed * * @throws \Exception When any of the validators return an error */ public function askAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $default = null, array $autocomplete = null) { $that = $this; $interviewer = function () use ($output, $question, $default, $autocomplete, $that) { return $that->ask($output, $question, $default, $autocomplete); }; return $this->validateAttempts($interviewer, $output, $validator, $attempts); } /** * Asks for a value, hide and validates the response. * * The validator receives the data to validate. It must return the * validated data when the data is valid and throw an exception * otherwise. * * @param OutputInterface $output An Output instance * @param string|array $question The question to ask * @param callable $validator A PHP callback * @param int|false $attempts Max number of times to ask before giving up (false by default, which means infinite) * @param bool $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not * * @return string The response * * @throws \Exception When any of the validators return an error * @throws \RuntimeException In case the fallback is deactivated and the response can not be hidden */ public function askHiddenResponseAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $fallback = true) { $that = $this; $interviewer = function () use ($output, $question, $fallback, $that) { return $that->askHiddenResponse($output, $question, $fallback); }; return $this->validateAttempts($interviewer, $output, $validator, $attempts); } /** * 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 setInputStream($stream) { $this->inputStream = $stream; } /** * Returns the helper's input stream. * * @return resource|null The input stream or null if the default STDIN is used */ public function getInputStream() { return $this->inputStream; } /** * {@inheritdoc} */ public function getName() { return 'dialog'; } /** * Return 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; } private function hasSttyAvailable() { if (null !== self::$stty) { return self::$stty; } exec('stty 2>&1', $output, $exitcode); return self::$stty = $exitcode === 0; } /** * Validate an attempt. * * @param callable $interviewer A callable that will ask for a question and return the result * @param OutputInterface $output An Output instance * @param callable $validator A PHP callback * @param int|false $attempts Max number of times to ask before giving up; false will ask infinitely * * @return string 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($interviewer, OutputInterface $output, $validator, $attempts) { $e = null; while (false === $attempts || $attempts--) { if (null !== $e) { $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($e->getMessage(), 'error')); } try { return call_user_func($validator, $interviewer()); } catch (\Exception $e) { } } throw $e; } } src/Symfony/Component/Console/Helper/FormatterHelper.php000066400000000000000000000044251266465517700237400ustar00rootroot00000000000000 * * 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); } /** * {@inheritdoc} */ public function getName() { return 'formatter'; } } src/Symfony/Component/Console/Helper/Helper.php000066400000000000000000000061301266465517700220470ustar00rootroot00000000000000 * * 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 A HelperSet instance */ 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 (!function_exists('mb_strwidth')) { return 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(2, '1 sec'), array(59, 'secs', 1), array(60, '1 min'), array(3600, 'mins', 60), array(5400, '1 hr'), array(86400, 'hrs', 3600), array(129600, '1 day'), array(604800, 'days', 86400), ); foreach ($timeFormats as $format) { if ($secs >= $format[0]) { continue; } if (2 == count($format)) { return $format[1]; } return ceil($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); } } src/Symfony/Component/Console/Helper/HelperInterface.php000066400000000000000000000016571266465517700237010ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Console/Helper/HelperSet.php000066400000000000000000000065711266465517700225340ustar00rootroot00000000000000 * * 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; /** * HelperSet represents a set of helpers to be used with a command. * * @author Fabien Potencier */ class HelperSet implements \IteratorAggregate { 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)); } if ('dialog' === $name && $this->helpers[$name] instanceof DialogHelper) { @trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED); } elseif ('progress' === $name && $this->helpers[$name] instanceof ProgressHelper) { @trigger_error('"Symfony\Component\Console\Helper\ProgressHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\ProgressBar" instead.', E_USER_DEPRECATED); } elseif ('table' === $name && $this->helpers[$name] instanceof TableHelper) { @trigger_error('"Symfony\Component\Console\Helper\TableHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\Table" instead.', E_USER_DEPRECATED); } 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; } public function getIterator() { return new \ArrayIterator($this->helpers); } } src/Symfony/Component/Console/Helper/InputAwareHelper.php000066400000000000000000000013531266465517700240510ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Helper/ProcessHelper.php000066400000000000000000000120001266465517700233770ustar00rootroot00000000000000 * * 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, $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, $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, $callback = null) { if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } $formatter = $this->getHelperSet()->get('debug_formatter'); $that = $this; return function ($type, $buffer) use ($output, $process, $callback, $formatter, $that) { $output->write($formatter->progress(spl_object_hash($process), $that->escapeString($buffer), Process::ERR === $type)); if (null !== $callback) { call_user_func($callback, $type, $buffer); } }; } /** * This method is public for PHP 5.3 compatibility, it should be private. * * @internal */ public function escapeString($str) { return str_replace('<', '\\<', $str); } /** * {@inheritdoc} */ public function getName() { return 'process'; } } src/Symfony/Component/Console/Helper/ProgressBar.php000066400000000000000000000432701266465517700230670ustar00rootroot00000000000000 * * 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; /** * 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 $lastMessagesLength = 0; private $formatLineCount; private $messages; private $overwrite = true; private static $formatters; private static $formats; /** * Constructor. * * @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); 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) { 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; } 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 progress bar step. * * @deprecated since version 2.6, to be removed in 3.0. Use {@link getProgress()} instead. * * @return int The progress bar step */ public function getStep() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED); return $this->getProgress(); } /** * Gets the current step position. * * @return int The progress bar step */ public function getProgress() { return $this->step; } /** * Gets the progress bar step width. * * @internal This method is public for PHP 5.3 compatibility, it should not be used. * * @return int The progress bar step width */ public 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 = (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 * * @throws \LogicException */ public function advance($step = 1) { $this->setProgress($this->step + $step); } /** * Sets the current progress. * * @deprecated since version 2.6, to be removed in 3.0. Use {@link setProgress()} instead. * * @param int $step The current progress * * @throws \LogicException */ public function setCurrent($step) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED); $this->setProgress($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 * * @throws \LogicException */ public function setProgress($step) { $step = (int) $step; if ($step < $this->step) { throw new \LogicException('You can\'t regress the progress bar.'); } if ($this->max && $step > $this->max) { $this->max = $step; } $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()); } // these 3 variables can be removed in favor of using $this in the closure when support for PHP 5.3 will be dropped. $self = $this; $output = $this->output; $messages = $this->messages; $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self, $output, $messages) { if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { $text = call_user_func($formatter, $self, $output); } elseif (isset($messages[$matches[1]])) { $text = $messages[$matches[1]]; } else { return $matches[0]; } if (isset($matches[2])) { $text = sprintf('%'.$matches[2], $text); } return $text; }, $this->format)); } /** * 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(str_repeat("\n", $this->formatLineCount)); } /** * 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) { $lines = explode("\n", $message); // append whitespace to match the line's length if (null !== $this->lastMessagesLength) { foreach ($lines as $i => $line) { if ($this->lastMessagesLength > Helper::strlenWithoutDecoration($this->output->getFormatter(), $line)) { $lines[$i] = str_pad($line, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); } } } if ($this->overwrite) { // move back to the beginning of the progress bar before redrawing it $this->output->write("\x0D"); } elseif ($this->step > 0) { // move to new line $this->output->writeln(''); } if ($this->formatLineCount) { $this->output->write(sprintf("\033[%dA", $this->formatLineCount)); } $this->output->write(implode("\n", $lines)); $this->lastMessagesLength = 0; foreach ($lines as $line) { $len = Helper::strlenWithoutDecoration($this->output->getFormatter(), $line); if ($len > $this->lastMessagesLength) { $this->lastMessagesLength = $len; } } } 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%', ); } } src/Symfony/Component/Console/Helper/ProgressHelper.php000066400000000000000000000302141266465517700235740ustar00rootroot00000000000000 * * 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\NullOutput; use Symfony\Component\Console\Output\OutputInterface; /** * The Progress class provides helpers to display progress output. * * @author Chris Jones * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0 * Use {@link ProgressBar} instead. */ class ProgressHelper extends Helper { const FORMAT_QUIET = ' %percent%%'; const FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%'; const FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%'; const FORMAT_QUIET_NOMAX = ' %current%'; const FORMAT_NORMAL_NOMAX = ' %current% [%bar%]'; const FORMAT_VERBOSE_NOMAX = ' %current% [%bar%] Elapsed: %elapsed%'; // options private $barWidth = 28; private $barChar = '='; private $emptyBarChar = '-'; private $progressChar = '>'; private $format = null; private $redrawFreq = 1; private $lastMessagesLength; private $barCharOriginal; /** * @var OutputInterface */ private $output; /** * Current step. * * @var int */ private $current; /** * Maximum number of steps. * * @var int */ private $max; /** * Start time of the progress bar. * * @var int */ private $startTime; /** * List of formatting variables. * * @var array */ private $defaultFormatVars = array( 'current', 'max', 'bar', 'percent', 'elapsed', ); /** * Available formatting variables. * * @var array */ private $formatVars; /** * Stored format part widths (used for padding). * * @var array */ private $widths = array( 'current' => 4, 'max' => 4, 'percent' => 3, 'elapsed' => 6, ); /** * Various time formats. * * @var array */ private $timeFormats = array( array(0, '???'), array(2, '1 sec'), array(59, 'secs', 1), array(60, '1 min'), array(3600, 'mins', 60), array(5400, '1 hr'), array(86400, 'hrs', 3600), array(129600, '1 day'), array(604800, 'days', 86400), ); public function __construct($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\ProgressBar class instead.', E_USER_DEPRECATED); } } /** * Sets the progress bar width. * * @param int $size The progress bar size */ public function setBarWidth($size) { $this->barWidth = (int) $size; } /** * Sets the bar character. * * @param string $char A character */ public function setBarCharacter($char) { $this->barChar = $char; } /** * Sets the empty bar character. * * @param string $char A character */ public function setEmptyBarCharacter($char) { $this->emptyBarChar = $char; } /** * Sets the progress bar character. * * @param string $char A character */ public function setProgressCharacter($char) { $this->progressChar = $char; } /** * Sets the progress bar format. * * @param string $format The format */ public function setFormat($format) { $this->format = $format; } /** * Sets the redraw frequency. * * @param int $freq The frequency in steps */ public function setRedrawFrequency($freq) { $this->redrawFreq = (int) $freq; } /** * Starts the progress output. * * @param OutputInterface $output An Output instance * @param int|null $max Maximum steps */ public function start(OutputInterface $output, $max = null) { $this->startTime = time(); $this->current = 0; $this->max = (int) $max; // Disabling output when it does not support ANSI codes as it would result in a broken display anyway. $this->output = $output->isDecorated() ? $output : new NullOutput(); $this->lastMessagesLength = 0; $this->barCharOriginal = ''; if (null === $this->format) { switch ($output->getVerbosity()) { case OutputInterface::VERBOSITY_QUIET: $this->format = self::FORMAT_QUIET_NOMAX; if ($this->max > 0) { $this->format = self::FORMAT_QUIET; } break; case OutputInterface::VERBOSITY_VERBOSE: case OutputInterface::VERBOSITY_VERY_VERBOSE: case OutputInterface::VERBOSITY_DEBUG: $this->format = self::FORMAT_VERBOSE_NOMAX; if ($this->max > 0) { $this->format = self::FORMAT_VERBOSE; } break; default: $this->format = self::FORMAT_NORMAL_NOMAX; if ($this->max > 0) { $this->format = self::FORMAT_NORMAL; } break; } } $this->initialize(); } /** * Advances the progress output X steps. * * @param int $step Number of steps to advance * @param bool $redraw Whether to redraw or not * * @throws \LogicException */ public function advance($step = 1, $redraw = false) { $this->setCurrent($this->current + $step, $redraw); } /** * Sets the current progress. * * @param int $current The current progress * @param bool $redraw Whether to redraw or not * * @throws \LogicException */ public function setCurrent($current, $redraw = false) { if (null === $this->startTime) { throw new \LogicException('You must start the progress bar before calling setCurrent().'); } $current = (int) $current; if ($current < $this->current) { throw new \LogicException('You can\'t regress the progress bar'); } if (0 === $this->current) { $redraw = true; } $prevPeriod = (int) ($this->current / $this->redrawFreq); $this->current = $current; $currPeriod = (int) ($this->current / $this->redrawFreq); if ($redraw || $prevPeriod !== $currPeriod || $this->max === $this->current) { $this->display(); } } /** * Outputs the current progress string. * * @param bool $finish Forces the end result * * @throws \LogicException */ public function display($finish = false) { if (null === $this->startTime) { throw new \LogicException('You must start the progress bar before calling display().'); } $message = $this->format; foreach ($this->generate($finish) as $name => $value) { $message = str_replace("%{$name}%", $value, $message); } $this->overwrite($this->output, $message); } /** * 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() { $this->overwrite($this->output, ''); } /** * Finishes the progress output. */ public function finish() { if (null === $this->startTime) { throw new \LogicException('You must start the progress bar before calling finish().'); } if (null !== $this->startTime) { if (!$this->max) { $this->barChar = $this->barCharOriginal; $this->display(true); } $this->startTime = null; $this->output->writeln(''); $this->output = null; } } /** * Initializes the progress helper. */ private function initialize() { $this->formatVars = array(); foreach ($this->defaultFormatVars as $var) { if (false !== strpos($this->format, "%{$var}%")) { $this->formatVars[$var] = true; } } if ($this->max > 0) { $this->widths['max'] = $this->strlen($this->max); $this->widths['current'] = $this->widths['max']; } else { $this->barCharOriginal = $this->barChar; $this->barChar = $this->emptyBarChar; } } /** * Generates the array map of format variables to values. * * @param bool $finish Forces the end result * * @return array Array of format vars and values */ private function generate($finish = false) { $vars = array(); $percent = 0; if ($this->max > 0) { $percent = (float) $this->current / $this->max; } if (isset($this->formatVars['bar'])) { $completeBars = 0; if ($this->max > 0) { $completeBars = floor($percent * $this->barWidth); } else { if (!$finish) { $completeBars = floor($this->current % $this->barWidth); } else { $completeBars = $this->barWidth; } } $emptyBars = $this->barWidth - $completeBars - $this->strlen($this->progressChar); $bar = str_repeat($this->barChar, $completeBars); if ($completeBars < $this->barWidth) { $bar .= $this->progressChar; $bar .= str_repeat($this->emptyBarChar, $emptyBars); } $vars['bar'] = $bar; } if (isset($this->formatVars['elapsed'])) { $elapsed = time() - $this->startTime; $vars['elapsed'] = str_pad($this->humaneTime($elapsed), $this->widths['elapsed'], ' ', STR_PAD_LEFT); } if (isset($this->formatVars['current'])) { $vars['current'] = str_pad($this->current, $this->widths['current'], ' ', STR_PAD_LEFT); } if (isset($this->formatVars['max'])) { $vars['max'] = $this->max; } if (isset($this->formatVars['percent'])) { $vars['percent'] = str_pad(floor($percent * 100), $this->widths['percent'], ' ', STR_PAD_LEFT); } return $vars; } /** * Converts seconds into human-readable format. * * @param int $secs Number of seconds * * @return string Time in readable format */ private function humaneTime($secs) { $text = ''; foreach ($this->timeFormats as $format) { if ($secs < $format[0]) { if (count($format) == 2) { $text = $format[1]; break; } else { $text = ceil($secs / $format[2]).' '.$format[1]; break; } } } return $text; } /** * Overwrites a previous message to the output. * * @param OutputInterface $output An Output instance * @param string $message The message */ private function overwrite(OutputInterface $output, $message) { $length = $this->strlen($message); // append whitespace to match the last line's length if (null !== $this->lastMessagesLength && $this->lastMessagesLength > $length) { $message = str_pad($message, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); } // carriage return $output->write("\x0D"); $output->write($message); $this->lastMessagesLength = $this->strlen($message); } /** * {@inheritdoc} */ public function getName() { return 'progress'; } } src/Symfony/Component/Console/Helper/QuestionHelper.php000066400000000000000000000320721266465517700236030ustar00rootroot00000000000000 * * 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\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 string 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 (!$question->getValidator()) { return $this->doAsk($output, $question); } $that = $this; $interviewer = function () use ($output, $question, $that) { return $that->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. * * @param resource $stream The input stream * * @throws \InvalidArgumentException In case the stream is not a resource */ public function setInputStream($stream) { if (!is_resource($stream)) { throw new \InvalidArgumentException('Input stream must be a valid resource.'); } $this->inputStream = $stream; } /** * Returns the helper's input stream. * * @return resource */ public function getInputStream() { return $this->inputStream; } /** * {@inheritdoc} */ public function getName() { return 'question'; } /** * Asks the question to the user. * * This method is public for PHP 5.3 compatibility, it should be private. * * @param OutputInterface $output * @param Question $question * * @return bool|mixed|null|string * * @throws \Exception * @throws \RuntimeException */ public 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 * * @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 * * @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 string 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($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 (\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; } } src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php000066400000000000000000000057631266465517700251770ustar00rootroot00000000000000 * * 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\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; /** * 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); } // make required if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { throw new \Exception('A value is required.'); } return $value; }); return parent::ask($input, $output, $question); } /** * {@inheritdoc} */ protected function writePrompt(OutputInterface $output, Question $question) { $text = $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: $choices = $question->getChoices(); $text = sprintf(' %s [%s]:', $text, $choices[$default]); break; default: $text = sprintf(' %s [%s]:', $text, $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); } } src/Symfony/Component/Console/Helper/Table.php000066400000000000000000000413541266465517700216660ustar00rootroot00000000000000 * * 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; /** * Provides helpers to display a table. * * @author Fabien Potencier * @author Саша Стаменковић * @author Abdellatif Ait boudad */ class Table { /** * Table headers. * * @var array */ private $headers = array(); /** * Table rows. * * @var array */ private $rows = array(); /** * Column widths cache. * * @var array */ private $columnWidths = array(); /** * Number of columns cache. * * @var array */ private $numberOfColumns; /** * @var OutputInterface */ private $output; /** * @var TableStyle */ private $style; 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 A TableStyle instance */ public static function getStyleDefinition($name) { if (!self::$styles) { self::$styles = self::initStyles(); } if (!self::$styles[$name]) { throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); } return self::$styles[$name]; } /** * Sets table style. * * @param TableStyle|string $name The style name or a TableStyle instance * * @return Table */ public function setStyle($name) { if ($name instanceof TableStyle) { $this->style = $name; } elseif (isset(self::$styles[$name])) { $this->style = self::$styles[$name]; } else { throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); } return $this; } /** * Gets the current table style. * * @return TableStyle */ public function getStyle() { return $this->style; } 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(); $this->rows = $this->buildTableRows($this->rows); $this->headers = $this->buildTableRows($this->headers); $this->renderRowSeparator(); if (!empty($this->headers)) { foreach ($this->headers as $header) { $this->renderRow($header, $this->style->getCellHeaderFormat()); $this->renderRowSeparator(); } } foreach ($this->rows as $row) { if ($row instanceof TableSeparator) { $this->renderRowSeparator(); } else { $this->renderRow($row, $this->style->getCellRowFormat()); } } if (!empty($this->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->getColumnWidth($column)).$this->style->getCrossingChar(); } $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup)); } /** * Renders vertical column separator. */ private function renderColumnSeparator() { $this->output->write(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; } $this->renderColumnSeparator(); foreach ($this->getRowColumns($row) as $column) { $this->renderCell($row, $column, $cellFormat); $this->renderColumnSeparator(); } $this->output->writeln(''); } /** * 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->getColumnWidth($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->getColumnWidth($nextColumn); } } // str_pad won't work properly with multi-byte strings, we need to fix the padding if (function_exists('mb_strwidth') && false !== $encoding = mb_detect_encoding($cell)) { $width += strlen($cell) - mb_strwidth($cell, $encoding); } if ($cell instanceof TableSeparator) { $this->output->write(sprintf($this->style->getBorderFormat(), str_repeat($this->style->getHorizontalBorderChar(), $width))); } else { $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); $content = sprintf($this->style->getCellRowContentFormat(), $cell); $this->output->write(sprintf($cellFormat, str_pad($content, $width, $this->style->getPaddingChar(), $this->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, ''), $unmergedRows); foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); } } } 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; } /** * Gets column width. * * @param int $column * * @return int */ private function getColumnWidth($column) { if (isset($this->columnWidths[$column])) { return $this->columnWidths[$column]; } foreach (array_merge($this->headers, $this->rows) as $row) { if ($row instanceof TableSeparator) { continue; } $lengths[] = $this->getCellWidth($row, $column); } return $this->columnWidths[$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) { if (isset($row[$column])) { $cell = $row[$column]; $cellWidth = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); if ($cell instanceof TableCell && $cell->getColspan() > 1) { // we assume that cell value will be across more than one column. $cellWidth = $cellWidth / $cell->getColspan(); } return $cellWidth; } return 0; } /** * Called after rendering to cleanup cache data. */ private function cleanup() { $this->columnWidths = 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, ); } } src/Symfony/Component/Console/Helper/TableCell.php000066400000000000000000000030241266465517700224560ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Helper; /** * @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()) { $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']; } } src/Symfony/Component/Console/Helper/TableHelper.php000066400000000000000000000140571266465517700230260ustar00rootroot00000000000000 * * 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\Output\NullOutput; /** * Provides helpers to display table output. * * @author Саша Стаменковић * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0 * Use {@link Table} instead. */ class TableHelper extends Helper { const LAYOUT_DEFAULT = 0; const LAYOUT_BORDERLESS = 1; const LAYOUT_COMPACT = 2; /** * @var Table */ private $table; public function __construct($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED); } $this->table = new Table(new NullOutput()); } /** * Sets table layout type. * * @param int $layout self::LAYOUT_* * * @return TableHelper * * @throws \InvalidArgumentException when the table layout is not known */ public function setLayout($layout) { switch ($layout) { case self::LAYOUT_BORDERLESS: $this->table->setStyle('borderless'); break; case self::LAYOUT_COMPACT: $this->table->setStyle('compact'); break; case self::LAYOUT_DEFAULT: $this->table->setStyle('default'); break; default: throw new \InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); } return $this; } public function setHeaders(array $headers) { $this->table->setHeaders($headers); return $this; } public function setRows(array $rows) { $this->table->setRows($rows); return $this; } public function addRows(array $rows) { $this->table->addRows($rows); return $this; } public function addRow(array $row) { $this->table->addRow($row); return $this; } public function setRow($column, array $row) { $this->table->setRow($column, $row); return $this; } /** * Sets padding character, used for cell padding. * * @param string $paddingChar * * @return TableHelper */ public function setPaddingChar($paddingChar) { $this->table->getStyle()->setPaddingChar($paddingChar); return $this; } /** * Sets horizontal border character. * * @param string $horizontalBorderChar * * @return TableHelper */ public function setHorizontalBorderChar($horizontalBorderChar) { $this->table->getStyle()->setHorizontalBorderChar($horizontalBorderChar); return $this; } /** * Sets vertical border character. * * @param string $verticalBorderChar * * @return TableHelper */ public function setVerticalBorderChar($verticalBorderChar) { $this->table->getStyle()->setVerticalBorderChar($verticalBorderChar); return $this; } /** * Sets crossing character. * * @param string $crossingChar * * @return TableHelper */ public function setCrossingChar($crossingChar) { $this->table->getStyle()->setCrossingChar($crossingChar); return $this; } /** * Sets header cell format. * * @param string $cellHeaderFormat * * @return TableHelper */ public function setCellHeaderFormat($cellHeaderFormat) { $this->table->getStyle()->setCellHeaderFormat($cellHeaderFormat); return $this; } /** * Sets row cell format. * * @param string $cellRowFormat * * @return TableHelper */ public function setCellRowFormat($cellRowFormat) { $this->table->getStyle()->setCellHeaderFormat($cellRowFormat); return $this; } /** * Sets row cell content format. * * @param string $cellRowContentFormat * * @return TableHelper */ public function setCellRowContentFormat($cellRowContentFormat) { $this->table->getStyle()->setCellRowContentFormat($cellRowContentFormat); return $this; } /** * Sets table border format. * * @param string $borderFormat * * @return TableHelper */ public function setBorderFormat($borderFormat) { $this->table->getStyle()->setBorderFormat($borderFormat); return $this; } /** * Sets cell padding type. * * @param int $padType STR_PAD_* * * @return TableHelper */ public function setPadType($padType) { $this->table->getStyle()->setPadType($padType); 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 | * +---------------+-----------------------+------------------+ * * @param OutputInterface $output */ public function render(OutputInterface $output) { $p = new \ReflectionProperty($this->table, 'output'); $p->setAccessible(true); $p->setValue($this->table, $output); $this->table->render(); } /** * {@inheritdoc} */ public function getName() { return 'table'; } } src/Symfony/Component/Console/Helper/TableSeparator.php000066400000000000000000000011421266465517700235360ustar00rootroot00000000000000 * * 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 string $value * @param array $options */ public function __construct(array $options = array()) { parent::__construct('', $options); } } src/Symfony/Component/Console/Helper/TableStyle.php000066400000000000000000000120741266465517700227040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Helper; /** * 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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 TableStyle */ 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; } } src/Symfony/Component/Console/Input/000077500000000000000000000000001266465517700177775ustar00rootroot00000000000000src/Symfony/Component/Console/Input/ArgvInput.php000066400000000000000000000246101266465517700224320ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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 $argv An array of parameters from the CLI (in the argv format) * @param InputDefinition $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; } /** * Processes command line arguments. */ 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, '=')) { $this->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1)); } 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 { throw new \RuntimeException('Too many arguments.'); } } /** * 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 = ''; } 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; } } /** * Returns the first argument from the raw parameters (not parsed). * * @return string The value of the first argument or null otherwise */ public function getFirstArgument() { foreach ($this->tokens as $token) { if ($token && '-' === $token[0]) { continue; } return $token; } } /** * 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 value(s) to look for in the raw parameters (can be an array) * * @return bool true if the value is contained in the raw parameters */ public function hasParameterOption($values) { $values = (array) $values; foreach ($this->tokens as $token) { foreach ($values as $value) { if ($token === $value || 0 === strpos($token, $value.'=')) { return true; } } } return 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 * * @return mixed The option value */ public function getParameterOption($values, $default = false) { $values = (array) $values; $tokens = $this->tokens; while (0 < count($tokens)) { $token = array_shift($tokens); 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() { $self = $this; $tokens = array_map(function ($token) use ($self) { if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { return $match[1].$self->escapeToken($match[2]); } if ($token && $token[0] !== '-') { return $self->escapeToken($token); } return $token; }, $this->tokens); return implode(' ', $tokens); } } src/Symfony/Component/Console/Input/ArrayInput.php000066400000000000000000000134551266465517700226160ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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 $definition A InputDefinition instance */ public function __construct(array $parameters, InputDefinition $definition = null) { $this->parameters = $parameters; parent::__construct($definition); } /** * Returns the first argument from the raw parameters (not parsed). * * @return string The value of the first argument or null otherwise */ public function getFirstArgument() { foreach ($this->parameters as $key => $value) { if ($key && '-' === $key[0]) { continue; } return $value; } } /** * 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) * * @return bool true if the value is contained in the raw parameters */ public function hasParameterOption($values) { $values = (array) $values; foreach ($this->parameters as $k => $v) { if (!is_int($k)) { $v = $k; } if (in_array($v, $values)) { return true; } } return 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 * * @return mixed The option value */ public function getParameterOption($values, $default = false) { $values = (array) $values; foreach ($this->parameters as $k => $v) { 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); } /** * Processes command line arguments. */ protected function parse() { foreach ($this->parameters as $key => $value) { 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 \InvalidArgumentException When option given doesn't exist */ private function addShortOption($shortcut, $value) { if (!$this->definition->hasShortcut($shortcut)) { throw new \InvalidArgumentException(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 \InvalidArgumentException When option given doesn't exist * @throws \InvalidArgumentException When a required value is missing */ private function addLongOption($name, $value) { if (!$this->definition->hasOption($name)) { throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); } $option = $this->definition->getOption($name); if (null === $value) { if ($option->isValueRequired()) { throw new \InvalidArgumentException(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; } } src/Symfony/Component/Console/Input/Input.php000066400000000000000000000145361266465517700216200ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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 { /** * @var InputDefinition */ protected $definition; protected $options = array(); protected $arguments = array(); protected $interactive = true; /** * Constructor. * * @param InputDefinition $definition A InputDefinition instance */ public function __construct(InputDefinition $definition = null) { if (null === $definition) { $this->definition = new InputDefinition(); } else { $this->bind($definition); $this->validate(); } } /** * Binds the current Input instance with the given arguments and options. * * @param InputDefinition $definition A InputDefinition instance */ public function bind(InputDefinition $definition) { $this->arguments = array(); $this->options = array(); $this->definition = $definition; $this->parse(); } /** * Processes command line arguments. */ abstract protected function parse(); /** * Validates the input. * * @throws \RuntimeException When not enough arguments are given */ 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))); } } /** * Checks if the input is interactive. * * @return bool Returns true if the input is interactive */ public function isInteractive() { return $this->interactive; } /** * Sets the input interactivity. * * @param bool $interactive If the input should be interactive */ public function setInteractive($interactive) { $this->interactive = (bool) $interactive; } /** * Returns the argument values. * * @return array An array of argument values */ public function getArguments() { return array_merge($this->definition->getArgumentDefaults(), $this->arguments); } /** * 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) { 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(); } /** * 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) { if (!$this->definition->hasArgument($name)) { throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); } $this->arguments[$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) { return $this->definition->hasArgument($name); } /** * Returns the options values. * * @return array An array of option values */ public function getOptions() { return array_merge($this->definition->getOptionDefaults(), $this->options); } /** * 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) { 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(); } /** * 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) { if (!$this->definition->hasOption($name)) { throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); } $this->options[$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) { 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); } } src/Symfony/Component/Console/Input/InputArgument.php000066400000000000000000000062411266465517700233150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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; } } src/Symfony/Component/Console/Input/InputAwareInterface.php000066400000000000000000000011361266465517700244110ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Console/Input/InputDefinition.php000066400000000000000000000311061266465517700236210ustar00rootroot00000000000000 * * 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\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; use Symfony\Component\Console\Output\BufferedOutput; /** * 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. * * @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); } /** * Returns a textual representation of the InputDefinition. * * @return string A string representing the InputDefinition * * @deprecated since version 2.3, to be removed in 3.0. */ public function asText() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $descriptor->describe($output, $this, array('raw_output' => true)); return $output->fetch(); } /** * Returns an XML representation of the InputDefinition. * * @param bool $asDom Whether to return a DOM or an XML string * * @return string|\DOMDocument An XML string representing the InputDefinition * * @deprecated since version 2.3, to be removed in 3.0. */ public function asXml($asDom = false) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); $descriptor = new XmlDescriptor(); if ($asDom) { return $descriptor->getInputDefinitionDocument($this); } $output = new BufferedOutput(); $descriptor->describe($output, $this); return $output->fetch(); } } src/Symfony/Component/Console/Input/InputInterface.php000066400000000000000000000100351266465517700234270ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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) * * @return bool true if the value is contained in the raw parameters */ public function hasParameterOption($values); /** * 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 * * @return mixed The option value */ public function getParameterOption($values, $default = false); /** * Binds the current Input instance with the given arguments and options. * * @param InputDefinition $definition A InputDefinition instance */ public function bind(InputDefinition $definition); /** * Validates if arguments given are correct. * * Throws an exception when not enough arguments are given. * * @throws \RuntimeException */ public function validate(); /** * Returns all the given arguments merged with the default values. * * @return array */ public function getArguments(); /** * Gets argument by name. * * @param string $name The name of the argument * * @return mixed */ 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(); /** * Gets an option by name. * * @param string $name The name of the option * * @return mixed */ 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); } src/Symfony/Component/Console/Input/InputOption.php000066400000000000000000000134041266465517700230020ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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() ; } } src/Symfony/Component/Console/Input/StringInput.php000066400000000000000000000055621266465517700230060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Input; /** * 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)); if (null !== $definition) { $this->bind($definition); } } /** * 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; } } src/Symfony/Component/Console/LICENSE000066400000000000000000000020511266465517700177030ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Console/Logger/000077500000000000000000000000001266465517700201175ustar00rootroot00000000000000src/Symfony/Component/Console/Logger/ConsoleLogger.php000066400000000000000000000073521266465517700234010ustar00rootroot00000000000000 * * 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 * * @link 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, ); /** * @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)); } // Write to the error output if necessary and available if ($this->formatLevelMap[$level] === self::ERROR && $this->output instanceof ConsoleOutputInterface) { $output = $this->output->getErrorOutput(); } else { $output = $this->output; } if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) { $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context))); } } /** * 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); } } src/Symfony/Component/Console/Output/000077500000000000000000000000001266465517700202005ustar00rootroot00000000000000src/Symfony/Component/Console/Output/BufferedOutput.php000066400000000000000000000015501266465517700236550ustar00rootroot00000000000000 * * 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"; } } } src/Symfony/Component/Console/Output/ConsoleOutput.php000066400000000000000000000076401266465517700235430ustar00rootroot00000000000000 * * 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. * * This class is a convenient wrapper around `StreamOutput`. * * $output = new ConsoleOutput(); * * This is equivalent to: * * $output = new StreamOutput(fopen('php://stdout', '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() { $outputStream = $this->hasStdoutSupport() ? 'php://stdout' : 'php://output'; return @fopen($outputStream, 'w') ?: fopen('php://output', 'w'); } /** * @return resource */ private function openErrorStream() { $errorStream = $this->hasStderrSupport() ? 'php://stderr' : 'php://output'; return fopen($errorStream, 'w'); } } src/Symfony/Component/Console/Output/ConsoleOutputInterface.php000066400000000000000000000015131266465517700253550ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Console/Output/NullOutput.php000066400000000000000000000037241266465517700230520ustar00rootroot00000000000000 * * 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; } public function isQuiet() { return true; } public function isVerbose() { return false; } public function isVeryVerbose() { return false; } public function isDebug() { return false; } /** * {@inheritdoc} */ public function writeln($messages, $type = self::OUTPUT_NORMAL) { // do nothing } /** * {@inheritdoc} */ public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) { // do nothing } } src/Symfony/Component/Console/Output/Output.php000066400000000000000000000100331266465517700222060ustar00rootroot00000000000000 * * 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; } public function isQuiet() { return self::VERBOSITY_QUIET === $this->verbosity; } public function isVerbose() { return self::VERBOSITY_VERBOSE <= $this->verbosity; } public function isVeryVerbose() { return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; } public function isDebug() { return self::VERBOSITY_DEBUG <= $this->verbosity; } /** * {@inheritdoc} */ public function writeln($messages, $type = self::OUTPUT_NORMAL) { $this->write($messages, true, $type); } /** * {@inheritdoc} */ public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) { if (self::VERBOSITY_QUIET === $this->verbosity) { return; } $messages = (array) $messages; 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; default: throw new \InvalidArgumentException(sprintf('Unknown output type given (%s)', $type)); } $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); } src/Symfony/Component/Console/Output/OutputInterface.php000066400000000000000000000051761266465517700240430ustar00rootroot00000000000000 * * 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 = 0; const VERBOSITY_NORMAL = 1; const VERBOSITY_VERBOSE = 2; const VERBOSITY_VERY_VERBOSE = 3; const VERBOSITY_DEBUG = 4; const OUTPUT_NORMAL = 0; const OUTPUT_RAW = 1; const OUTPUT_PLAIN = 2; /** * 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 $type The type of output (one of the OUTPUT constants) * * @throws \InvalidArgumentException When unknown output type is given */ public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL); /** * Writes a message to the output and adds a newline at the end. * * @param string|array $messages The message as an array of lines or a single string * @param int $type The type of output (one of the OUTPUT constants) * * @throws \InvalidArgumentException When unknown output type is given */ public function writeln($messages, $type = self::OUTPUT_NORMAL); /** * 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(); /** * 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(); } src/Symfony/Component/Console/Output/StreamOutput.php000066400000000000000000000056761266465517700234030ustar00rootroot00000000000000 * * 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; /** * 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 ? 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 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 false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); } } src/Symfony/Component/Console/Question/000077500000000000000000000000001266465517700205075ustar00rootroot00000000000000src/Symfony/Component/Console/Question/ChoiceQuestion.php000066400000000000000000000113171266465517700241450ustar00rootroot00000000000000 * * 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 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 ChoiceQuestion The current instance */ public function setMultiselect($multiselect) { $this->multiselect = $multiselect; $this->setValidator($this->getDefaultValidator()); return $this; } /** * Gets the prompt for choices. * * @return string */ public function getPrompt() { return $this->prompt; } /** * Sets the prompt for choices. * * @param string $prompt * * @return ChoiceQuestion The current instance */ 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 ChoiceQuestion The current instance */ 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); }; } } src/Symfony/Component/Console/Question/ConfirmationQuestion.php000066400000000000000000000030671266465517700254060ustar00rootroot00000000000000 * * 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; }; } } src/Symfony/Component/Console/Question/Question.php000066400000000000000000000131651266465517700230350ustar00rootroot00000000000000 * * 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 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 Question The current instance * * @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 Question The current instance */ 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 Question The current instance * * @throws \InvalidArgumentException * @throws \LogicException */ public function setAutocompleterValues($values) { if (is_array($values) && $this->isAssoc($values)) { $values = array_merge(array_keys($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 Question The current instance */ public function setValidator($validator) { $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 Question The current instance * * @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 Question The current instance */ public function setNormalizer($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')); } } src/Symfony/Component/Console/README.md000066400000000000000000000035621266465517700201650ustar00rootroot00000000000000Console Component ================= Console eases the creation of beautiful and testable command line interfaces. The Application object manages the CLI application: ```php use Symfony\Component\Console\Application; $console = new Application(); $console->run(); ``` The ``run()`` method parses the arguments and options passed on the command line and executes the right command. Registering a new command can easily be done via the ``register()`` method, which returns a ``Command`` instance: ```php use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; $console ->register('ls') ->setDefinition(array( new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'), )) ->setDescription('Displays the files in the given directory') ->setCode(function (InputInterface $input, OutputInterface $output) { $dir = $input->getArgument('dir'); $output->writeln(sprintf('Dir listing for %s', $dir)); }) ; ``` You can also register new commands via classes. The component provides a lot of features like output coloring, input and output abstractions (so that you can easily unit-test your commands), validation, automatic help messages, ... Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Console/ $ composer install $ phpunit Third Party ----------- `Resources/bin/hiddeninput.exe` is a third party binary provided within this component. Find sources and license at https://github.com/Seldaek/hidden-input. Resources --------- [The Console Component](https://symfony.com/doc/current/components/console.html) [How to create a Console Command](https://symfony.com/doc/current/cookbook/console/console_command.html) src/Symfony/Component/Console/Resources/000077500000000000000000000000001266465517700206525ustar00rootroot00000000000000src/Symfony/Component/Console/Resources/bin/000077500000000000000000000000001266465517700214225ustar00rootroot00000000000000src/Symfony/Component/Console/Resources/bin/hiddeninput.exe000066400000000000000000000220001266465517700244320ustar00rootroot00000000000000MZ@ !L!This program cannot be run in DOS mode. $,;B;B;B2מ:B2-B2ƞ9B2ў?Ba98B;CB2Ȟ:B2֞:B2Ӟ:BRich;BPELMoO  8 @`?@"P@ Pp!8!@ .text   `.rdata @@.data0@.rsrc @@@.relocP"@Bj$@xj @eEPV @EЃPV @MX @eEP5H @L @YY5\ @EP5` @D @YYP @MMT @3H; 0@uh@l3@$40@5h3@40@h$0@h(0@h 0@ @00@}jYjh"@3ۉ]dp]俀3@SVW0 @;t;u3Fuh4 @3F|3@;u j\Y;|3@u,5|3@h @h @YYtE5<0@|3@;uh @h @lYY|3@9]uSW8 @93@th3@Yt SjS3@$0@ @5$0@5(0@5 0@ 80@9,0@u7P @E MPQYYËeE80@39,0@uPh @9<0@u @E80@øMZf9@t3M<@@8PEuH t uՃv39xtv39j,0@p @jl @YY3@3@ @ t3@ @ p3@ @x3@V=0@u h@ @Yg=0@u j @Y3{U(H1@ D1@@1@<1@581@=41@f`1@f T1@f01@f,1@f%(1@f-$1@X1@EL1@EP1@E\1@0@P1@L0@@0@ D0@0@0@ @0@j?Yj @h!@$ @=0@ujYh ( @P, @ËUE8csmu*xu$@= t=!t="t=@u3]hH@ @3% @jh("@b53@5 @YEu u @YgjYe53@։E53@YYEEPEPu5l @YPUEu֣3@uփ3@E EjYËUuNYH]ËV!@!@W;stЃ;r_^ËV"@"@W;stЃ;r_^% @̋UMMZf9t3]ËA<8PEu3ҹ f9H‹]̋UEH<ASVq3WDv} H ;r X;r B(;r3_^[]̋UjhH"@he@dPSVW0@1E3PEdeEh@*tUE-@Ph@Pt;@$ЃEMd Y_^[]ËE3=‹ËeE3Md Y_^[]% @% @he@d5D$l$l$+SVW0@1E3PeuEEEEdËMd Y__^[]QËUuuu uh@h0@]ËVhh3V t VVVVV^3ËU0@eeSWN@;t t У0@`VEP< @u3u @3 @3 @3EP @E3E3;uO@ u 50@։50@^_[%t @%x @%| @% @% @% @% @% @% @Pd5D$ +d$ SVW(0@3PEuEEdËMd Y__^[]QËM3M%T @T$B J3J3l"@s###)r)b)H)4))(((((()#$%%&d&&$('''''(((6('H(Z(t(('''''l'^'R'F'>'>(0'')@W@@MoOl!@0@0@bad allocationH0@!@RSDSьJ!LZc:\users\seld\documents\visual studio 2010\Projects\hiddeninp\Release\hiddeninp.pdbe@@:@@@@"d"@"# $#&D H#(h ###)r)b)H)4))(((((()#$%%&d&&$('''''(((6('H(Z(t(('''''l'^'R'F'>'>(0'')GetConsoleModeSetConsoleMode;GetStdHandleKERNEL32.dll??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@AJ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ{??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@ZMSVCP90.dll_amsg_exit__getmainargs,_cexit|_exitf_XcptFilterexit__initenv_initterm_initterm_e<_configthreadlocale__setusermatherr _adjust_fdiv__p__commode__p__fmodej_encode_pointer__set_app_typeK_crt_debugger_hookC?terminate@@YAXXZMSVCR90.dll_unlock__dllonexitv_lock_onexit`_decode_pointers_except_handler4_common _invoke_watson?_controlfp_sInterlockedExchange!SleepInterlockedCompareExchange-TerminateProcessGetCurrentProcess>UnhandledExceptionFilterSetUnhandledExceptionFilterIsDebuggerPresentTQueryPerformanceCounterfGetTickCountGetCurrentThreadIdGetCurrentProcessIdOGetSystemTimeAsFileTimes__CxxFrameHandler3N@D$!@ 8Ph  @(CV(4VS_VERSION_INFOStringFileInfob040904b0QFileDescriptionReads from stdin without leaking info to the terminal and outputs back to stdout6 FileVersion1, 0, 0, 08 InternalNamehiddeninputPLegalCopyrightJordi Boggiano - 2012HOriginalFilenamehiddeninput.exe: ProductNameHidden Input: ProductVersion1, 0, 0, 0DVarFileInfo$Translation  PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDING@00!0/080F0L0T0^0d0n0{000000000000001#1-1@1J1O1T1v1{1111111111111112"2*23292A2M2_2j2p222222222222 333%303N3T3Z3`3f3l3s3z333333333333333334444%4;4B444444444445!5^5c5555H6M6_6}66677 7*7w7|777778 88=8E8P8V8\8b8h8n8t8z88889 $0001 1t1x12 2@2\2`2h2t20 0src/Symfony/Component/Console/Shell.php000066400000000000000000000143721266465517700204670ustar00rootroot00000000000000 * * 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\Input\StringInput; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Process\ProcessBuilder; use Symfony\Component\Process\PhpExecutableFinder; /** * A Shell wraps an Application to add shell capabilities to it. * * Support for history and completion only works with a PHP compiled * with readline support (either --with-readline or --with-libedit) * * @author Fabien Potencier * @author Martin Hasoň */ class Shell { private $application; private $history; private $output; private $hasReadline; private $processIsolation = false; /** * Constructor. * * If there is no readline support for the current PHP executable * a \RuntimeException exception is thrown. * * @param Application $application An application instance */ public function __construct(Application $application) { $this->hasReadline = function_exists('readline'); $this->application = $application; $this->history = getenv('HOME').'/.history_'.$application->getName(); $this->output = new ConsoleOutput(); } /** * Runs the shell. */ public function run() { $this->application->setAutoExit(false); $this->application->setCatchExceptions(true); if ($this->hasReadline) { readline_read_history($this->history); readline_completion_function(array($this, 'autocompleter')); } $this->output->writeln($this->getHeader()); $php = null; if ($this->processIsolation) { $finder = new PhpExecutableFinder(); $php = $finder->find(); $this->output->writeln(<<<'EOF' Running with process isolation, you should consider this: * each command is executed as separate process, * commands don't support interactivity, all params must be passed explicitly, * commands output is not colorized. EOF ); } while (true) { $command = $this->readline(); if (false === $command) { $this->output->writeln("\n"); break; } if ($this->hasReadline) { readline_add_history($command); readline_write_history($this->history); } if ($this->processIsolation) { $pb = new ProcessBuilder(); $process = $pb ->add($php) ->add($_SERVER['argv'][0]) ->add($command) ->inheritEnvironmentVariables(true) ->getProcess() ; $output = $this->output; $process->run(function ($type, $data) use ($output) { $output->writeln($data); }); $ret = $process->getExitCode(); } else { $ret = $this->application->run(new StringInput($command), $this->output); } if (0 !== $ret) { $this->output->writeln(sprintf('The command terminated with an error status (%s)', $ret)); } } } /** * Returns the shell header. * * @return string The header string */ protected function getHeader() { return <<{$this->application->getName()} shell ({$this->application->getVersion()}). At the prompt, type help for some help, or list to get a list of available commands. To exit the shell, type ^D. EOF; } /** * Renders a prompt. * * @return string The prompt */ protected function getPrompt() { // using the formatter here is required when using readline return $this->output->getFormatter()->format($this->application->getName().' > '); } protected function getOutput() { return $this->output; } protected function getApplication() { return $this->application; } /** * Tries to return autocompletion for the current entered text. * * @param string $text The last segment of the entered text * * @return bool|array A list of guessed strings or true */ private function autocompleter($text) { $info = readline_info(); $text = substr($info['line_buffer'], 0, $info['end']); if ($info['point'] !== $info['end']) { return true; } // task name? if (false === strpos($text, ' ') || !$text) { return array_keys($this->application->all()); } // options and arguments? try { $command = $this->application->find(substr($text, 0, strpos($text, ' '))); } catch (\Exception $e) { return true; } $list = array('--help'); foreach ($command->getDefinition()->getOptions() as $option) { $list[] = '--'.$option->getName(); } return $list; } /** * Reads a single line from standard input. * * @return string The single line from standard input */ private function readline() { if ($this->hasReadline) { $line = readline($this->getPrompt()); } else { $this->output->write($this->getPrompt()); $line = fgets(STDIN, 1024); $line = (false === $line || '' === $line) ? false : rtrim($line); } return $line; } public function getProcessIsolation() { return $this->processIsolation; } public function setProcessIsolation($processIsolation) { $this->processIsolation = (bool) $processIsolation; if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) { throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.'); } } } src/Symfony/Component/Console/Style/000077500000000000000000000000001266465517700200005ustar00rootroot00000000000000src/Symfony/Component/Console/Style/OutputStyle.php000066400000000000000000000044601266465517700230360ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Console/Style/StyleInterface.php000066400000000000000000000062651266465517700234430ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Console/Style/SymfonyStyle.php000066400000000000000000000252501266465517700232020ustar00rootroot00000000000000 * * 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\Application; 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; /** * 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. $this->lineLength = min($this->getTerminalWidth() - (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) { $this->autoPrependBlock(); $messages = is_array($messages) ? array_values($messages) : array($messages); $lines = array(); // add type if (null !== $type) { $messages[0] = sprintf('[%s] %s', $type, $messages[0]); } // wrap and add newlines for each element foreach ($messages as $key => $message) { $message = OutputFormatter::escape($message); $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - Helper::strlen($prefix), PHP_EOL, true))); if (count($messages) > 1 && $key < count($messages) - 1) { $lines[] = ''; } } if ($padding && $this->isDecorated()) { array_unshift($lines, ''); $lines[] = ''; } foreach ($lines as &$line) { $line = sprintf('%s%s', $prefix, $line); $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line)); if ($style) { $line = sprintf('<%s>%s', $style, $line); } } $this->writeln($lines); $this->newLine(); } /** * {@inheritdoc} */ public function title($message) { $this->autoPrependBlock(); $this->writeln(array( sprintf('%s', $message), sprintf('%s', str_repeat('=', strlen($message))), )); $this->newLine(); } /** * {@inheritdoc} */ public function section($message) { $this->autoPrependBlock(); $this->writeln(array( sprintf('%s', $message), sprintf('%s', str_repeat('-', strlen($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(); if (!is_array($message)) { $this->writeln(sprintf(' // %s', $message)); return; } foreach ($message as $element) { $this->text($element); } } /** * {@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) { $headers = array_map(function ($value) { return sprintf('%s', $value); }, $headers); $table = new Table($this); $table->setHeaders($headers); $table->setRows($rows); $table->setStyle('symfony-style-guide'); $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 getTerminalWidth() { $application = new Application(); $dimensions = $application->getTerminalDimensions(); return $dimensions[0] ?: self::MAX_LINE_LENGTH; } 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)); } } src/Symfony/Component/Console/Tester/000077500000000000000000000000001266465517700201465ustar00rootroot00000000000000src/Symfony/Component/Console/Tester/ApplicationTester.php000066400000000000000000000065331266465517700243200ustar00rootroot00000000000000 * * 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\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 $output; private $statusCode; /** * Constructor. * * @param Application $application An Application instance to test. */ 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 * * @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->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->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 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; } } src/Symfony/Component/Console/Tester/CommandTester.php000066400000000000000000000071131266465517700234260ustar00rootroot00000000000000 * * 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 */ class CommandTester { private $command; private $input; private $output; 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 (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; } } src/Symfony/Component/Console/Tests/000077500000000000000000000000001266465517700200025ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/ApplicationTest.php000066400000000000000000001350321266465517700236220ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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 version 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 \InvalidArgumentException * @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 \InvalidArgumentException * @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 \InvalidArgumentException * @expectedExceptionMessage There are no commands defined in the "bar" namespace. */ public function testFindInvalidNamespace() { $application = new Application(); $application->findNamespace('bar'); } /** * @expectedException \InvalidArgumentException * @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) { $this->setExpectedException('InvalidArgumentException', $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 \InvalidArgumentException * @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 an \InvalidArgumentException if command does not exist, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException 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 an \InvalidArgumentException if command does not exist, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException 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 \InvalidArgumentException if a command is ambiguous because of a subnamespace, with alternatives'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $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 an \InvalidArgumentException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist'); $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, without alternatives'); } // Test if "bar1" command throw an "\InvalidArgumentException" 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 an \InvalidArgumentException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist'); $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternative : "afoobar1"'); $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternative : "foo:bar1"'); $this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws an \InvalidArgumentException 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 an \InvalidArgumentException if namespace does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if namespace does not exist'); $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, without alternatives'); } try { $application->find('foo2:command'); $this->fail('->find() throws an \InvalidArgumentException if namespace does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if namespace does not exist'); $this->assertRegExp('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative'); $this->assertRegExp('/foo/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo"'); $this->assertRegExp('/foo1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo1"'); $this->assertRegExp('/foo3/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo3"'); } } public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() { $application = $this->getMock('Symfony\Component\Console\Application', array('getNamespaces')); $application->expects($this->once()) ->method('getNamespaces') ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); } /** * @expectedException \InvalidArgumentException * @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 = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') ->will($this->returnValue(120)); $tester = new ApplicationTester($application); $application->setCatchExceptions(true); $tester->run(array('command' => 'foo'), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); $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'); } } /** * @group legacy */ public function testLegacyAsText() { $application = new Application(); $application->add(new \FooCommand()); $this->ensureStaticCommandHelp($application); $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext1.txt', $this->normalizeLineBreaks($application->asText()), '->asText() returns a text representation of the application'); $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext2.txt', $this->normalizeLineBreaks($application->asText('foo')), '->asText() returns a text representation of the application'); } /** * @group legacy */ public function testLegacyAsXml() { $application = new Application(); $application->add(new \FooCommand()); $this->ensureStaticCommandHelp($application); $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml1.txt', $application->asXml(), '->asXml() returns an XML representation of the application'); $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml2.txt', $application->asXml('foo'), '->asXml() returns an XML representation of the application'); } public function testRenderException() { $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') ->will($this->returnValue(120)); $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exception'); $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); $this->assertContains('Exception trace', $tester->getDisplay(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getDisplay(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)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); $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'); $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') ->will($this->returnValue(32)); $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal'); } /** * @requires extension mbstring */ public function testRenderExceptionWithDoubleWidthCharacters() { $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') ->will($this->returnValue(120)); $application->register('foo')->setCode(function () { throw new \Exception('エラーメッセージ'); }); $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); $tester->run(array('command' => 'foo'), array('decorated' => true)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') ->will($this->returnValue(32)); $application->register('foo')->setCode(function () { throw new \Exception('コマンドの実行中にエラーが発生しました。'); }); $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal'); } 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'); $tester->run(array('command' => 'list', '-q' => true)); $this->assertSame('', $tester->getDisplay(), '->run() removes all output 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->getMock('Symfony\Component\Console\Application', array('doRun')); $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->getMock('Symfony\Component\Console\Application', array('doRun')); $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 * @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')); $this->assertTrue($helperSet->has('dialog')); $this->assertTrue($helperSet->has('progress')); } 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 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 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'); } /** * @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 = $application->getHelperSet()->get('question')->getInputStream(); $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()); } } src/Symfony/Component/Console/Tests/Command/000077500000000000000000000000001266465517700213605ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Command/CommandTest.php000066400000000000000000000354141266465517700243160ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } 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 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) { $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 testGetSynopsis() { $command = new \TestCommand(); $command->addOption('foo'); $command->addArgument('bar'); $this->assertEquals('namespace:name [--foo] [--] []', $command->getSynopsis(), '->getSynopsis() returns the synopsis'); } 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'); } 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 \InvalidArgumentException * @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->getMock('TestCommand', array('execute')); $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 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 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()); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid callable provided to Command::setCode. */ public function testSetCodeWithNonCallable() { $command = new \TestCommand(); $command->setCode(array($this, 'nonExistentMethod')); } public function callableMethodCommand(InputInterface $input, OutputInterface $output) { $output->writeln('from the code...'); } /** * @group legacy */ public function testLegacyAsText() { $command = new \TestCommand(); $command->setApplication(new Application()); $tester = new CommandTester($command); $tester->execute(array('command' => $command->getName())); $this->assertStringEqualsFile(self::$fixturesPath.'/command_astext.txt', $command->asText(), '->asText() returns a text representation of the command'); } /** * @group legacy */ public function testLegacyAsXml() { $command = new \TestCommand(); $command->setApplication(new Application()); $tester = new CommandTester($command); $tester->execute(array('command' => $command->getName())); $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/command_asxml.txt', $command->asXml(), '->asXml() returns an XML representation of the command'); } } src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php000066400000000000000000000070651266465517700251300ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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 [--xml] [--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'); } } src/Symfony/Component/Console/Tests/Command/ListCommandTest.php000066400000000000000000000100221266465517700251360ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Application; class ListCommandTest extends \PHPUnit_Framework_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))); } } src/Symfony/Component/Console/Tests/Descriptor/000077500000000000000000000000001266465517700221205ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php000066400000000000000000000073041266465517700272770ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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(); private 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()))); } } src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php000066400000000000000000000020201266465517700264330ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php000066400000000000000000000011041266465517700273060ustar00rootroot00000000000000 * * 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; class MarkdownDescriptorTest extends AbstractDescriptorTest { protected function getDescriptor() { return new MarkdownDescriptor(); } protected function getFormat() { return 'md'; } } src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php000066400000000000000000000063371266465517700257460ustar00rootroot00000000000000 * * 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"), ); } 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'), ); } 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(), ); } } src/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php000066400000000000000000000010711266465517700264530ustar00rootroot00000000000000 * * 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; class TextDescriptorTest extends AbstractDescriptorTest { protected function getDescriptor() { return new TextDescriptor(); } protected function getFormat() { return 'txt'; } } src/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php000066400000000000000000000010661266465517700262730ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Console/Tests/Fixtures/000077500000000000000000000000001266465517700216135ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php000066400000000000000000000002611266465517700247600ustar00rootroot00000000000000setName('bar:buc'); } } src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php000066400000000000000000000006041266465517700267070ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php000066400000000000000000000011151266465517700267060ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php000066400000000000000000000012061266465517700260210ustar00rootroot00000000000000 * * 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') ; } } src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php000066400000000000000000000016441266465517700260300ustar00rootroot00000000000000 * * 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) ; } } src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php000066400000000000000000000014371266465517700246450ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php000066400000000000000000000011251266465517700244260ustar00rootroot00000000000000setName('foo:bar1') ->setDescription('The foo:bar1 command') ->setAliases(array('afoobar1')) ; } protected function execute(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; } } src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php000066400000000000000000000007551266465517700244370ustar00rootroot00000000000000setName('foo1:bar') ->setDescription('The foo1:bar command') ->setAliases(array('afoobar2')) ; } protected function execute(InputInterface $input, OutputInterface $output) { } } src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php000066400000000000000000000015011266465517700244260ustar00rootroot00000000000000setName('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', 0, $e); } } } src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php000066400000000000000000000002641266465517700244340ustar00rootroot00000000000000setName('foo3:bar:toh'); } } src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php000066400000000000000000000002131266465517700244270ustar00rootroot00000000000000setName('0foo:bar')->setDescription('0foo:bar command'); } } src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php000066400000000000000000000014001266465517700243410ustar00rootroot00000000000000setName('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'); } } src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php000066400000000000000000000011511266465517700271200ustar00rootroot00000000000000setName('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; } } src/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php000066400000000000000000000011471266465517700271260ustar00rootroot00000000000000setName('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; } } src/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php000066400000000000000000000010571266465517700250360ustar00rootroot00000000000000setName('foobar:foo') ->setDescription('The foobar:foo command') ; } protected function execute(InputInterface $input, OutputInterface $output) { $this->input = $input; $this->output = $output; } } src/Symfony/Component/Console/Tests/Fixtures/Style/000077500000000000000000000000001266465517700227135ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/000077500000000000000000000000001266465517700254005ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/000077500000000000000000000000001266465517700270165ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php000066400000000000000000000006761266465517700313750ustar00rootroot00000000000000caution('Lorem ipsum dolor sit amet'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php000066400000000000000000000007601266465517700313700ustar00rootroot00000000000000title('Title'); $output->warning('Lorem ipsum dolor sit amet'); $output->title('Title'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php000066400000000000000000000011411266465517700313630ustar00rootroot00000000000000warning('Warning'); $output->caution('Caution'); $output->error('Error'); $output->success('Success'); $output->note('Note'); $output->block('Custom block', 'CUSTOM', 'fg=white;bg=green', 'X ', true); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php000066400000000000000000000007021266465517700313660ustar00rootroot00000000000000title('First title'); $output->title('Second title'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php000066400000000000000000000023171266465517700313730ustar00rootroot00000000000000write('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'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php000066400000000000000000000017041266465517700313730ustar00rootroot00000000000000writeln('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', )); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php000066400000000000000000000011221266465517700313660ustar00rootroot00000000000000listing(array( 'Lorem ipsum dolor sit amet', 'consectetur adipiscing elit', )); $output->success('Lorem ipsum dolor sit amet'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php000066400000000000000000000013101266465517700313660ustar00rootroot00000000000000title('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'); }; src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/000077500000000000000000000000001266465517700267405ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt000066400000000000000000000001731266465517700312610ustar00rootroot00000000000000 ! [CAUTION] Lorem ipsum dolor sit amet src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt000066400000000000000000000002251266465517700312600ustar00rootroot00000000000000 Title ===== [WARNING] Lorem ipsum dolor sit amet Title ===== src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt000066400000000000000000000013351266465517700312640ustar00rootroot00000000000000 [WARNING] Warning ! [CAUTION] Caution [ERROR] Error [OK] Success ! [NOTE] Note X [CUSTOM] Custom block src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt000066400000000000000000000000651266465517700312640ustar00rootroot00000000000000 First title =========== Second title ============ src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt000066400000000000000000000005041266465517700312630ustar00rootroot00000000000000Lorem 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 =========== src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt000066400000000000000000000004141266465517700312640ustar00rootroot00000000000000Lorem 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 src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt000066400000000000000000000002711266465517700312660ustar00rootroot00000000000000 * Lorem ipsum dolor sit amet * consectetur adipiscing elit [OK] Lorem ipsum dolor sit amet src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt000066400000000000000000000001211266465517700312610ustar00rootroot00000000000000 Title ===== // Duis aute irure dolor in reprehenderit in voluptate velit esse src/Symfony/Component/Console/Tests/Fixtures/TestCommand.php000066400000000000000000000012721266465517700245440ustar00rootroot00000000000000setName('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'); } } src/Symfony/Component/Console/Tests/Fixtures/application_1.json000066400000000000000000000073471266465517700252440ustar00rootroot00000000000000{"commands":[{"name":"help","usage":["help [--xml] [--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":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","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"},"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 [--xml] [--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":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"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"]}]} src/Symfony/Component/Console/Tests/Fixtures/application_1.md000066400000000000000000000072421266465517700246650ustar00rootroot00000000000000UNKNOWN ======= * help * list help ---- * Description: Displays help for a command * Usage: * `help [--xml] [--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: **xml:** * Name: `--xml` * Shortcut: * Accept value: no * Is value required: no * Is multiple: no * Description: To output help as XML * 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'` **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 [--xml] [--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: **xml:** * Name: `--xml` * Shortcut: * Accept value: no * Is value required: no * Is multiple: no * Description: To output list as XML * Default: `false` **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'` src/Symfony/Component/Console/Tests/Fixtures/application_1.txt000066400000000000000000000013641266465517700251030ustar00rootroot00000000000000Console 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 src/Symfony/Component/Console/Tests/Fixtures/application_1.xml000066400000000000000000000113561266465517700250660ustar00rootroot00000000000000 help [--xml] [--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 [--xml] [--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 src/Symfony/Component/Console/Tests/Fixtures/application_2.json000066400000000000000000000160731266465517700252410ustar00rootroot00000000000000{"commands":[{"name":"help","usage":["help [--xml] [--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":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","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"},"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 [--xml] [--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":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"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"]}]}src/Symfony/Component/Console/Tests/Fixtures/application_2.md000066400000000000000000000160441266465517700246660ustar00rootroot00000000000000My Symfony application ====================== * alias1 * alias2 * help * list **descriptor:** * descriptor:command1 * descriptor:command2 help ---- * Description: Displays help for a command * Usage: * `help [--xml] [--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: **xml:** * Name: `--xml` * Shortcut: * Accept value: no * Is value required: no * Is multiple: no * Description: To output help as XML * 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'` **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 [--xml] [--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: **xml:** * Name: `--xml` * Shortcut: * Accept value: no * Is value required: no * Is multiple: no * Description: To output list as XML * Default: `false` **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` src/Symfony/Component/Console/Tests/Fixtures/application_2.txt000066400000000000000000000021031266465517700250740ustar00rootroot00000000000000My Symfony application version 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: alias1 command 1 description alias2 command 1 description help Displays help for a command list Lists commands descriptor descriptor:command1 command 1 description descriptor:command2 command 2 description src/Symfony/Component/Console/Tests/Fixtures/application_2.xml000066400000000000000000000215131266465517700250630ustar00rootroot00000000000000 help [--xml] [--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 [--xml] [--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 src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt000066400000000000000000000015521266465517700263330ustar00rootroot00000000000000Console 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: afoobar The foo:bar command help Displays help for a command list Lists commands foo foo:bar The foo:bar command src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt000066400000000000000000000013431266465517700263320ustar00rootroot00000000000000Console 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 for the "foo" namespace: foo:bar The foo:bar command src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt000066400000000000000000000147471266465517700261610ustar00rootroot00000000000000 help [--xml] [--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 [--xml] [--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 foo:bar afoobar The foo:bar command The foo:bar command afoobar help list foo:bar src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt000066400000000000000000000033641266465517700261530ustar00rootroot00000000000000 foo:bar afoobar The foo:bar command The foo:bar command src/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt000066400000000000000000000000311266465517700263610ustar00rootroot00000000000000Console Toolsrc/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt000066400000000000000000000002121266465517700302110ustar00rootroot00000000000000 [InvalidArgumentException] Command "foo" is not defined. src/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt000066400000000000000000000003311266465517700302140ustar00rootroot00000000000000 [InvalidArgumentException] The "--foo" option does not exist. list [--xml] [--raw] [--format FORMAT] [--] [] src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt000066400000000000000000000006221266465517700302200ustar00rootroot00000000000000 [Exception] Third exception comment [Exception] Second exception comment [Exception] First exception

    this is html

    foo3:bar src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt000066400000000000000000000013261266465517700320750ustar00rootroot00000000000000    [Exception]   Third exception comment       [Exception]   Second exception comment       [Exception]   First exception 

    this is html

        foo3:bar src/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt000066400000000000000000000002421266465517700302170ustar00rootroot00000000000000 [InvalidArgumentException] Command "foo" is not define d. src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt000066400000000000000000000001431266465517700326060ustar00rootroot00000000000000 [Exception] エラーメッセージ foo src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt000066400000000000000000000002551266465517700344650ustar00rootroot00000000000000    [Exception]   エラーメッセージ    foo src/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt000066400000000000000000000002661266465517700326150ustar00rootroot00000000000000 [Exception] コマンドの実行中にエラーが 発生しました。 foo src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt000066400000000000000000000010711266465517700256230ustar00rootroot00000000000000Console 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 src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt000066400000000000000000000020551266465517700256270ustar00rootroot00000000000000Usage: help [options] [--] [] Arguments: command The command to execute command_name The command name [default: "help"] Options: --xml To output help as XML --format=FORMAT The output format (txt, xml, json, or md) [default: "txt"] --raw To output raw command help -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 Help: 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. src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt000066400000000000000000000012671266465517700256340ustar00rootroot00000000000000Usage: list [options] [--] [] Arguments: namespace The namespace name Options: --xml To output list as XML --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 src/Symfony/Component/Console/Tests/Fixtures/application_run4.txt000066400000000000000000000000151266465517700256230ustar00rootroot00000000000000Console Tool src/Symfony/Component/Console/Tests/Fixtures/command_1.json000066400000000000000000000002741266465517700243470ustar00rootroot00000000000000{"name":"descriptor:command1","usage":["descriptor:command1", "alias1", "alias2"],"description":"command 1 description","help":"command 1 help","definition":{"arguments":[],"options":[]}} src/Symfony/Component/Console/Tests/Fixtures/command_1.md000066400000000000000000000002341266465517700237720ustar00rootroot00000000000000descriptor:command1 ------------------- * Description: command 1 description * Usage: * `descriptor:command1` * `alias1` * `alias2` command 1 help src/Symfony/Component/Console/Tests/Fixtures/command_1.txt000066400000000000000000000001541266465517700242120ustar00rootroot00000000000000Usage: descriptor:command1 alias1 alias2 Help: command 1 help src/Symfony/Component/Console/Tests/Fixtures/command_1.xml000066400000000000000000000005171266465517700241760ustar00rootroot00000000000000 descriptor:command1 alias1 alias2 command 1 description command 1 help src/Symfony/Component/Console/Tests/Fixtures/command_2.json000066400000000000000000000010651266465517700243470ustar00rootroot00000000000000{"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}}}} src/Symfony/Component/Console/Tests/Fixtures/command_2.md000066400000000000000000000011041266465517700237700ustar00rootroot00000000000000descriptor: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` src/Symfony/Component/Console/Tests/Fixtures/command_2.txt000066400000000000000000000005301266465517700242110ustar00rootroot00000000000000Usage: descriptor:command2 [options] [--] descriptor:command2 -o|--option_name descriptor:command2 Arguments: argument_name Options: -o, --option_name Help: command 2 help src/Symfony/Component/Console/Tests/Fixtures/command_2.xml000066400000000000000000000014121266465517700241720ustar00rootroot00000000000000 descriptor:command2 [-o|--option_name] [--] <argument_name> descriptor:command2 -o|--option_name <argument_name> descriptor:command2 <argument_name> command 2 description command 2 help src/Symfony/Component/Console/Tests/Fixtures/command_astext.txt000066400000000000000000000013171266465517700253640ustar00rootroot00000000000000Usage: namespace:name name Arguments: command The command to execute 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 Help: help src/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt000066400000000000000000000033221266465517700251760ustar00rootroot00000000000000 namespace:name name description help The command to execute src/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt000066400000000000000000000014441266465517700260770ustar00rootroot00000000000000Arguments: foo The foo argument baz The baz argument [default: true] bar The bar argument [default: ["http://foo.com/"]] Options: -f, --foo=FOO The foo option --baz[=BAZ] The baz option [default: false] -b, --bar[=BAR] The bar option [default: "bar"] --qux[=QUX] The qux option [default: ["http://foo.com/","bar"]] (multiple values allowed) --qux2[=QUX2] The qux2 option [default: {"foo":"bar"}] (multiple values allowed)src/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt000066400000000000000000000023471266465517700257160ustar00rootroot00000000000000 The foo argument The baz argument true The bar argument bar src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json000066400000000000000000000001351266465517700257660ustar00rootroot00000000000000{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null} src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md000066400000000000000000000001641266465517700254170ustar00rootroot00000000000000**argument_name:** * Name: argument_name * Is required: yes * Is array: no * Description: * Default: `NULL` src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt000066400000000000000000000000351266465517700256330ustar00rootroot00000000000000 argument_name src/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml000066400000000000000000000002341266465517700256150ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json000066400000000000000000000001571266465517700257730ustar00rootroot00000000000000{"name":"argument_name","is_required":false,"is_array":true,"description":"argument description","default":[]} src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md000066400000000000000000000002061266465517700254150ustar00rootroot00000000000000**argument_name:** * Name: argument_name * Is required: no * Is array: yes * Description: argument description * Default: `array ()` src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt000066400000000000000000000000631266465517700256350ustar00rootroot00000000000000 argument_name argument description src/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml000066400000000000000000000002601266465517700256150ustar00rootroot00000000000000 argument description src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json000066400000000000000000000001751266465517700257740ustar00rootroot00000000000000{"name":"argument_name","is_required":false,"is_array":false,"description":"argument description","default":"default_value"} src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md000066400000000000000000000002141266465517700254150ustar00rootroot00000000000000**argument_name:** * Name: argument_name * Is required: no * Is array: no * Description: argument description * Default: `'default_value'` src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt000066400000000000000000000001411266465517700256330ustar00rootroot00000000000000 argument_name argument description [default: "default_value"] src/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml000066400000000000000000000003421266465517700256170ustar00rootroot00000000000000 argument description default_value src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.json000066400000000000000000000001731266465517700257730ustar00rootroot00000000000000{"name":"argument_name","is_required":true,"is_array":false,"description":"multiline argument description","default":null} src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.md000066400000000000000000000002161266465517700254200ustar00rootroot00000000000000**argument_name:** * Name: argument_name * Is required: yes * Is array: no * Description: multiline argument description * Default: `NULL` src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.txt000066400000000000000000000001331266465517700256350ustar00rootroot00000000000000 argument_name multiline argument description src/Symfony/Component/Console/Tests/Fixtures/input_argument_4.xml000066400000000000000000000002721266465517700256220ustar00rootroot00000000000000 multiline argument description src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json000066400000000000000000000000361266465517700262740ustar00rootroot00000000000000{"arguments":[],"options":[]} src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md000066400000000000000000000000001266465517700257120ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt000066400000000000000000000000001266465517700261310ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml000066400000000000000000000001361266465517700261240ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json000066400000000000000000000002121266465517700262710ustar00rootroot00000000000000{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":[]} src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md000066400000000000000000000002041266465517700257210ustar00rootroot00000000000000### Arguments: **argument_name:** * Name: argument_name * Is required: yes * Is array: no * Description: * Default: `NULL` src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt000066400000000000000000000000731266465517700261440ustar00rootroot00000000000000Arguments: argument_name src/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml000066400000000000000000000003611266465517700261250ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json000066400000000000000000000002701266465517700262760ustar00rootroot00000000000000{"arguments":[],"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}} src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md000066400000000000000000000002571266465517700257320ustar00rootroot00000000000000### Options: **option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: no * Is value required: no * Is multiple: no * Description: * Default: `false` src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt000066400000000000000000000000751266465517700261470ustar00rootroot00000000000000Options: -o, --option_name src/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml000066400000000000000000000004011266465517700261210ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json000066400000000000000000000004441266465517700263020ustar00rootroot00000000000000{"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}}} src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md000066400000000000000000000004641266465517700257330ustar00rootroot00000000000000### 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` src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt000066400000000000000000000001771266465517700261530ustar00rootroot00000000000000Arguments: argument_name Options: -o, --option_name src/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml000066400000000000000000000006241266465517700261310ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_1.json000066400000000000000000000002151266465517700254530ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false} src/Symfony/Component/Console/Tests/Fixtures/input_option_1.md000066400000000000000000000002411266465517700251010ustar00rootroot00000000000000**option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: no * Is value required: no * Is multiple: no * Description: * Default: `false` src/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt000066400000000000000000000000411266465517700253160ustar00rootroot00000000000000 -o, --option_name src/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml000066400000000000000000000002621266465517700253040ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_2.json000066400000000000000000000002501266465517700254530ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"option description","default":"default_value"} src/Symfony/Component/Console/Tests/Fixtures/input_option_2.md000066400000000000000000000002701266465517700251040ustar00rootroot00000000000000**option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: yes * Is value required: no * Is multiple: no * Description: option description * Default: `'default_value'` src/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt000066400000000000000000000001611266465517700253220ustar00rootroot00000000000000 -o, --option_name[=OPTION_NAME] option description [default: "default_value"] src/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml000066400000000000000000000004041266465517700253030ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_3.json000066400000000000000000000002341266465517700254560ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"option description","default":null} src/Symfony/Component/Console/Tests/Fixtures/input_option_3.md000066400000000000000000000002561266465517700251110ustar00rootroot00000000000000**option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: yes * Is value required: yes * Is multiple: no * Description: option description * Default: `NULL` src/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt000066400000000000000000000001011266465517700253150ustar00rootroot00000000000000 -o, --option_name=OPTION_NAME option description src/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml000066400000000000000000000003221266465517700253030ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_4.json000066400000000000000000000002321266465517700254550ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":true,"description":"option description","default":[]} src/Symfony/Component/Console/Tests/Fixtures/input_option_4.md000066400000000000000000000002621266465517700251070ustar00rootroot00000000000000**option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: yes * Is value required: no * Is multiple: yes * Description: option description * Default: `array ()` src/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt000066400000000000000000000001601266465517700253230ustar00rootroot00000000000000 -o, --option_name[=OPTION_NAME] option description (multiple values allowed) src/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml000066400000000000000000000003221266465517700253040ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_5.json000066400000000000000000000002461266465517700254630ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"multiline option description","default":null} src/Symfony/Component/Console/Tests/Fixtures/input_option_5.md000066400000000000000000000002721266465517700251110ustar00rootroot00000000000000**option_name:** * Name: `--option_name` * Shortcut: `-o` * Accept value: yes * Is value required: yes * Is multiple: no * Description: multiline option description * Default: `NULL` src/Symfony/Component/Console/Tests/Fixtures/input_option_5.txt000066400000000000000000000001711266465517700253260ustar00rootroot00000000000000 -o, --option_name=OPTION_NAME multiline option description src/Symfony/Component/Console/Tests/Fixtures/input_option_5.xml000066400000000000000000000003341266465517700253100ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Fixtures/input_option_6.json000066400000000000000000000002531266465517700254620ustar00rootroot00000000000000{"name":"--option_name","shortcut":"-o|-O","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"option with multiple shortcuts","default":null} src/Symfony/Component/Console/Tests/Fixtures/input_option_6.md000066400000000000000000000002751266465517700251150ustar00rootroot00000000000000**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` src/Symfony/Component/Console/Tests/Fixtures/input_option_6.txt000066400000000000000000000001171266465517700253270ustar00rootroot00000000000000 -o|O, --option_name=OPTION_NAME option with multiple shortcuts src/Symfony/Component/Console/Tests/Fixtures/input_option_6.xml000066400000000000000000000003601266465517700253100ustar00rootroot00000000000000 src/Symfony/Component/Console/Tests/Formatter/000077500000000000000000000000001266465517700217455ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php000066400000000000000000000041671266465517700305210ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Formatter\OutputFormatterStyleStack; use Symfony\Component\Console\Formatter\OutputFormatterStyle; class OutputFormatterStyleStackTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php000066400000000000000000000076101266465517700275270ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Formatter\OutputFormatterStyle; class OutputFormatterStyleTest extends \PHPUnit_Framework_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->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->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'); } } } src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php000066400000000000000000000202151266465517700265020ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Formatter\OutputFormatterStyle; class OutputFormatterTest extends \PHPUnit_Framework_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')); } 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') ); $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') ); } 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'; } } src/Symfony/Component/Console/Tests/Helper/000077500000000000000000000000001266465517700212215ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php000066400000000000000000000062101266465517700256740ustar00rootroot00000000000000 * * 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\Helper\FormatterHelper; class FormatterHelperTest extends \PHPUnit_Framework_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' ); } /** * @requires extension mbstring */ 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' ); } /** * @requires extension mbstring */ 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' ); } } src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php000066400000000000000000000130511266465517700244650ustar00rootroot00000000000000 * * 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\Helper\HelperSet; use Symfony\Component\Console\Command\Command; class HelperSetTest extends \PHPUnit_Framework_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->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()); } } /** * Create a generic mock for the helper interface. Optionally check for a call to setHelperSet with a specific * helperset instance. * * @param string $name * @param HelperSet $helperset allows a mock to verify a particular helperset set is being added to the Helper */ private function getGenericMockHelper($name, HelperSet $helperset = null) { $mock_helper = $this->getMock('\Symfony\Component\Console\Helper\HelperInterface'); $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; } } src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php000066400000000000000000000214021266465517700262550ustar00rootroot00000000000000 * * 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\Input\ArrayInput; use Symfony\Component\Console\Helper\DialogHelper; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Output\StreamOutput; /** * @group legacy */ class LegacyDialogHelperTest extends \PHPUnit_Framework_TestCase { public function testSelect() { $dialog = new DialogHelper(); $helperSet = new HelperSet(array(new FormatterHelper())); $dialog->setHelperSet($helperSet); $heroes = array('Superman', 'Batman', 'Spiderman'); $dialog->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); $this->assertEquals('2', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, '2')); $this->assertEquals('1', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes)); $this->assertEquals('1', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes)); $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', false)); rewind($output->getStream()); $this->assertContains('Input "Fabien" is not a superhero!', stream_get_contents($output->getStream())); try { $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, 1)); $this->fail(); } catch (\InvalidArgumentException $e) { $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); } $this->assertEquals(array('1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); $this->assertEquals(array('0', '2'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); $this->assertEquals(array('0', '2'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); $this->assertEquals(array('0', '1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, '0,1', false, 'Input "%s" is not a superhero!', true)); $this->assertEquals(array('0', '1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, ' 0 , 1 ', false, 'Input "%s" is not a superhero!', true)); } public function testAsk() { $dialog = new DialogHelper(); $dialog->setInputStream($this->getInputStream("\n8AM\n")); $this->assertEquals('2PM', $dialog->ask($this->getOutputStream(), 'What time is it?', '2PM')); $this->assertEquals('8AM', $dialog->ask($output = $this->getOutputStream(), 'What time is it?', '2PM')); 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 DialogHelper(); $dialog->setInputStream($inputStream); $bundles = array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'); $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('AsseticBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('FrameworkBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('SecurityBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('FooBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('AsseticBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); $this->assertEquals('FooBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); } /** * @group tty */ public function testAskHiddenResponse() { if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test is not supported on Windows'); } $dialog = new DialogHelper(); $dialog->setInputStream($this->getInputStream("8AM\n")); $this->assertEquals('8AM', $dialog->askHiddenResponse($this->getOutputStream(), 'What time is it?')); } public function testAskConfirmation() { $dialog = new DialogHelper(); $dialog->setInputStream($this->getInputStream("\n\n")); $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?')); $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); $dialog->setInputStream($this->getInputStream("y\nyes\n")); $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); $dialog->setInputStream($this->getInputStream("n\nno\n")); $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', true)); $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', true)); } public function testAskAndValidate() { $dialog = new DialogHelper(); $helperSet = new HelperSet(array(new FormatterHelper())); $dialog->setHelperSet($helperSet); $question = 'What color was the white horse of Henry IV?'; $error = 'This is not a color!'; $validator = function ($color) use ($error) { if (!in_array($color, array('white', 'black'))) { throw new \InvalidArgumentException($error); } return $color; }; $dialog->setInputStream($this->getInputStream("\nblack\n")); $this->assertEquals('white', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); $this->assertEquals('black', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); try { $this->assertEquals('white', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); $this->fail(); } catch (\InvalidArgumentException $e) { $this->assertEquals($error, $e->getMessage()); } } public function testNoInteraction() { $dialog = new DialogHelper(); $input = new ArrayInput(array()); $input->setInteractive(false); $dialog->setInput($input); $this->assertEquals('not yet', $dialog->ask($this->getOutputStream(), 'Do you have a job?', 'not yet')); } protected function getInputStream($input) { $stream = fopen('php://memory', 'r+', false); fwrite($stream, $input); rewind($stream); return $stream; } protected function getOutputStream() { return new StreamOutput(fopen('php://memory', 'r+', false)); } private function hasSttyAvailable() { exec('stty 2>&1', $output, $exitcode); return $exitcode === 0; } } src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php000066400000000000000000000173511266465517700266720ustar00rootroot00000000000000 * * 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\Helper\ProgressHelper; use Symfony\Component\Console\Output\StreamOutput; /** * @group legacy * @group time-sensitive */ class LegacyProgressHelperTest extends \PHPUnit_Framework_TestCase { public function testAdvance() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream()); $progress->advance(); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 1 [->--------------------------]'), stream_get_contents($output->getStream())); } public function testAdvanceWithStep() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream()); $progress->advance(5); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); } public function testAdvanceMultipleTimes() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream()); $progress->advance(3); $progress->advance(2); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 3 [--->------------------------]').$this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); } public function testCustomizations() { $progress = new ProgressHelper(); $progress->setBarWidth(10); $progress->setBarCharacter('_'); $progress->setEmptyBarCharacter(' '); $progress->setProgressCharacter('/'); $progress->setFormat(' %current%/%max% [%bar%] %percent%%'); $progress->start($output = $this->getOutputStream(), 10); $progress->advance(); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 1/10 [_/ ] 10%'), stream_get_contents($output->getStream())); } public function testPercent() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(), 50); $progress->display(); $progress->advance(); $progress->advance(); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 0/50 [>---------------------------] 0%').$this->generateOutput(' 1/50 [>---------------------------] 2%').$this->generateOutput(' 2/50 [=>--------------------------] 4%'), stream_get_contents($output->getStream())); } public function testOverwriteWithShorterLine() { $progress = new ProgressHelper(); $progress->setFormat(' %current%/%max% [%bar%] %percent%%'); $progress->start($output = $this->getOutputStream(), 50); $progress->display(); $progress->advance(); // set shorter format $progress->setFormat(' %current%/%max% [%bar%]'); $progress->advance(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 0/50 [>---------------------------] 0%'). $this->generateOutput(' 1/50 [>---------------------------] 2%'). $this->generateOutput(' 2/50 [=>--------------------------] '), stream_get_contents($output->getStream()) ); } public function testSetCurrentProgress() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(), 50); $progress->display(); $progress->advance(); $progress->setCurrent(15); $progress->setCurrent(25); rewind($output->getStream()); $this->assertEquals( $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()) ); } /** * @expectedException \LogicException * @expectedExceptionMessage You must start the progress bar */ public function testSetCurrentBeforeStarting() { $progress = new ProgressHelper(); $progress->setCurrent(15); } /** * @expectedException \LogicException * @expectedExceptionMessage You can't regress the progress bar */ public function testRegressProgress() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(), 50); $progress->setCurrent(15); $progress->setCurrent(10); } public function testRedrawFrequency() { $progress = $this->getMock('Symfony\Component\Console\Helper\ProgressHelper', array('display')); $progress->expects($this->exactly(4)) ->method('display'); $progress->setRedrawFrequency(2); $progress->start($output = $this->getOutputStream(), 6); $progress->setCurrent(1); $progress->advance(2); $progress->advance(2); $progress->advance(1); } /** * @requires extension mbstring */ public function testMultiByteSupport() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream()); $progress->setBarCharacter('■'); $progress->advance(3); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 3 [■■■>------------------------]'), stream_get_contents($output->getStream())); } public function testClear() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(), 50); $progress->setCurrent(25); $progress->clear(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 25/50 [==============>-------------] 50%').$this->generateOutput(''), stream_get_contents($output->getStream()) ); } public function testPercentNotHundredBeforeComplete() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(), 200); $progress->display(); $progress->advance(199); $progress->advance(); rewind($output->getStream()); $this->assertEquals($this->generateOutput(' 0/200 [>---------------------------] 0%').$this->generateOutput(' 199/200 [===========================>] 99%').$this->generateOutput(' 200/200 [============================] 100%'), stream_get_contents($output->getStream())); } public function testNonDecoratedOutput() { $progress = new ProgressHelper(); $progress->start($output = $this->getOutputStream(false)); $progress->advance(); rewind($output->getStream()); $this->assertEquals('', stream_get_contents($output->getStream())); } protected function getOutputStream($decorated = true) { return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated); } protected $lastMessagesLength; protected function generateOutput($expected) { $expectedout = $expected; if ($this->lastMessagesLength !== null) { $expectedout = str_pad($expected, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); } $this->lastMessagesLength = strlen($expectedout); return "\x0D".$expectedout; } } src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php000066400000000000000000000255421266465517700261160ustar00rootroot00000000000000 * * 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\Helper\TableHelper; use Symfony\Component\Console\Output\StreamOutput; /** * @group legacy */ class LegacyTableHelperTest extends \PHPUnit_Framework_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, $layout, $expected) { $table = new TableHelper(); $table ->setHeaders($headers) ->setRows($rows) ->setLayout($layout) ; $table->render($output = $this->getOutputStream()); $this->assertEquals($expected, $this->getOutputContent($output)); } /** * @dataProvider testRenderProvider */ public function testRenderAddRows($headers, $rows, $layout, $expected) { $table = new TableHelper(); $table ->setHeaders($headers) ->addRows($rows) ->setLayout($layout) ; $table->render($output = $this->getOutputStream()); $this->assertEquals($expected, $this->getOutputContent($output)); } /** * @dataProvider testRenderProvider */ public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected) { $table = new TableHelper(); $table ->setHeaders($headers) ->setLayout($layout) ; foreach ($rows as $row) { $table->addRow($row); } $table->render($output = $this->getOutputStream()); $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, TableHelper::LAYOUT_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, TableHelper::LAYOUT_COMPACT, << 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'), ), TableHelper::LAYOUT_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'), ), TableHelper::LAYOUT_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 ), ); } /** * @requires extension mbstring */ public function testRenderMultiByte() { $table = new TableHelper(); $table ->setHeaders(array('■■')) ->setRows(array(array(1234))) ->setLayout(TableHelper::LAYOUT_DEFAULT) ; $table->render($output = $this->getOutputStream()); $expected = <<<'TABLE' +------+ | ■■ | +------+ | 1234 | +------+ TABLE; $this->assertEquals($expected, $this->getOutputContent($output)); } /** * @requires extension mbstring */ public function testRenderFullWidthCharacters() { $table = new TableHelper(); $table ->setHeaders(array('あいうえお')) ->setRows(array(array(1234567890))) ->setLayout(TableHelper::LAYOUT_DEFAULT) ; $table->render($output = $this->getOutputStream()); $expected = <<<'TABLE' +------------+ | あいうえお | +------------+ | 1234567890 | +------------+ TABLE; $this->assertEquals($expected, $this->getOutputContent($output)); } protected function getOutputStream() { return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false); } protected function getOutputContent(StreamOutput $output) { rewind($output->getStream()); return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); } } src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php000066400000000000000000000112221266465517700253460ustar00rootroot00000000000000 * * 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\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; class ProcessHelperTest extends \PHPUnit_Framework_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 = <<42';" OUT 42 RES Command ran successfully EOT; $successOutputProcessDebug = <<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()); } } src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php000066400000000000000000000554641266465517700250410ustar00rootroot00000000000000 * * 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\Helper\ProgressBar; use Symfony\Component\Console\Helper\Helper; use Symfony\Component\Console\Output\StreamOutput; /** * @group time-sensitive */ class ProgressBarTest extends \PHPUnit_Framework_TestCase { public function testMultipleStart() { $bar = new ProgressBar($output = $this->getOutputStream()); $bar->start(); $bar->advance(); $bar->start(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 9/10 [=========================>--] 90%'). $this->generateOutput(' 10/10 [============================] 100%'). $this->generateOutput(' 11/11 [============================] 100%'), stream_get_contents($output->getStream()) ); } public function testFormat() { $expected = $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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()); } /** * @expectedException \LogicException * @expectedExceptionMessage You can't regress the progress bar */ public function testRegressProgress() { $bar = new ProgressBar($output = $this->getOutputStream(), 50); $bar->start(); $bar->setProgress(15); $bar->setProgress(10); } public function testRedrawFrequency() { $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream(), 6)); $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->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream())); $bar->expects($this->exactly(2))->method('display'); $bar->setRedrawFrequency(0); $bar->start(); $bar->advance(); } public function testRedrawFrequencyIsAtLeastOneIfSmallerOneGiven() { $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream())); $bar->expects($this->exactly(2))->method('display'); $bar->setRedrawFrequency(0.9); $bar->start(); $bar->advance(); } /** * @requires extension mbstring */ public function testMultiByteSupport() { $bar = new ProgressBar($output = $this->getOutputStream()); $bar->start(); $bar->setBarCharacter('■'); $bar->advance(3); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 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( $this->generateOutput(' 0/2 [>---------------------------] 0%')."\n". $this->generateOutput(' 0/3 [#---------------------------] 0%')."\n". rtrim($this->generateOutput(' 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($this->generateOutput(' 0 [>---------------------------]')). rtrim($this->generateOutput(' 1 [->--------------------------]')). rtrim($this->generateOutput(' 2 [-->-------------------------]')). rtrim($this->generateOutput(' 3 [--->------------------------]')). rtrim($this->generateOutput(' 3 [============================]')), 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( $this->generateOutput(' 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( $this->generateOutput(">---------------------------\nfoobar"). $this->generateOutput("=========>------------------\nfoobar "). $this->generateOutput(" \n "). $this->generateOutput("============================\nfoobar "), stream_get_contents($output->getStream()) ); } /** * @requires extension mbstring */ public function testAnsiColorsAndEmojis() { $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(); $bar->setMessage('Looks good to me...', 'title'); $bar->advance(4); $bar->setMessage('Thanks, bye', 'title'); $bar->finish(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput( " \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" ). $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" ). $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()) ); } public function testSetFormat() { $bar = new ProgressBar($output = $this->getOutputStream()); $bar->setFormat('normal'); $bar->start(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 0 [>---------------------------]'), stream_get_contents($output->getStream()) ); $bar = new ProgressBar($output = $this->getOutputStream(), 10); $bar->setFormat('normal'); $bar->start(); rewind($output->getStream()); $this->assertEquals( $this->generateOutput(' 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".($count ? sprintf("\033[%dA", $count) : '').$expected; } } src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php000066400000000000000000000412431266465517700255450ustar00rootroot00000000000000 * * 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 \PHPUnit_Framework_TestCase { public function testAskChoice() { $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)); } public function testAsk() { $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())); } 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(); $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)); } public function testAskHiddenResponse() { 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)); } /** * @dataProvider getAskConfirmationData */ public function testAskConfirmation($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')); } 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(); $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)); } 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); $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()); } } /** * @dataProvider simpleAnswerProvider */ public function testSelectChoiceFromSimpleChoices($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); } 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(); $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); } 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(); $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); } /** * @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(); $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); } 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->createInputInterfaceMock(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->getMock('\Symfony\Component\Console\Output\OutputInterface'); $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); } 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->getMock('Symfony\Component\Console\Input\InputInterface'); $mock->expects($this->any()) ->method('isInteractive') ->will($this->returnValue($interactive)); return $mock; } private function hasSttyAvailable() { exec('stty 2>&1', $output, $exitcode); return $exitcode === 0; } } src/Symfony/Component/Console/Tests/Helper/TableStyleTest.php000066400000000000000000000013261266465517700246440ustar00rootroot00000000000000 * * 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\Helper\TableStyle; class TableStyleTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Helper/TableTest.php000066400000000000000000000506271266465517700236330ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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) { $table = new Table($output = $this->getOutputStream()); $table ->setHeaders($headers) ->setRows($rows) ->setStyle($style) ; $table->render(); $this->assertEquals($expected, $this->getOutputContent($output)); } /** * @dataProvider testRenderProvider */ public function testRenderAddRows($headers, $rows, $style, $expected) { $table = new Table($output = $this->getOutputStream()); $table ->setHeaders($headers) ->addRows($rows) ->setStyle($style) ; $table->render(); $this->assertEquals($expected, $this->getOutputContent($output)); } /** * @dataProvider testRenderProvider */ public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected) { $table = new Table($output = $this->getOutputStream()); $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', <<
    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', <<
    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', <<
    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)), ), ), 'default', <<
    array( array('ISBN', 'Title', 'Author'), array( array( new TableCell('9971-5-0210-0', array('rowspan' => 3)), 'Divine Comedy', 'Dante Alighieri', ), array('A Tale of Two Cities', 'Charles Dickens'), 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', <<
    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', <<
    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', <<
    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', <<
    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', <<
    array( array( array(new TableCell('Main title', array('colspan' => 3))), array('ISBN', 'Title', 'Author'), ), array(), 'default', <<
    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', <<
    getOutputStream()); $table ->setHeaders(array('■■')) ->setRows(array(array(1234))) ->setStyle('default') ; $table->render(); $expected = <<
    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 = <<
    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 = <<
    assertEquals($expected, $this->getOutputContent($output)); $this->assertEquals($table, $table->addRow(new TableSeparator()), 'fluent interface on addRow() with a single TableSeparator() works'); } protected function getOutputStream() { return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false); } protected function getOutputContent(StreamOutput $output) { rewind($output->getStream()); return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); } } src/Symfony/Component/Console/Tests/Input/000077500000000000000000000000001266465517700211015ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php000066400000000000000000000355601266465517700244020ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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', '-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) { $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(), 'Too many arguments.', ), 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 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, $expected) { $input = new ArgvInput($argv); $this->assertEquals($expected, $input->getParameterOption($key), '->getParameterOption() returns the expected value'); } public function provideGetParameterOptionValues() { return array( array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'dev'), array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'dev'), array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'dev'), array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'dev'), array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), '1'), array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), '1'), ); } 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'); } } src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php000066400000000000000000000124431266465517700245540ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } public function testGetParameterOption() { $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); $input = new ArrayInput(array('Fabien', '--foo' => 'bar')); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); } 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', ), ); } /** * @dataProvider provideInvalidInput */ public function testParseInvalidInput($parameters, $definition, $expectedExceptionMessage) { $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); } } src/Symfony/Component/Console/Tests/Input/InputArgumentTest.php000066400000000000000000000102701266465517700252540ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Input\InputArgument; class InputArgumentTest extends \PHPUnit_Framework_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) { $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'); } } src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php000066400000000000000000000446541266465517700255770ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class InputDefinitionTest extends \PHPUnit_Framework_TestCase { protected static $fixtures; protected $foo, $bar, $foo1, $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]'); } /** * @group legacy */ public function testLegacyAsText() { $definition = new InputDefinition(array( new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'), new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true), new InputArgument('bar', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The bar argument', array('http://foo.com/')), new InputOption('foo', 'f', InputOption::VALUE_REQUIRED, 'The foo option'), new InputOption('baz', null, InputOption::VALUE_OPTIONAL, 'The baz option', false), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL, 'The bar option', 'bar'), new InputOption('qux', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux option', array('http://foo.com/', 'bar')), new InputOption('qux2', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux2 option', array('foo' => 'bar')), )); $this->assertStringEqualsFile(self::$fixtures.'/definition_astext.txt', $definition->asText(), '->asText() returns a textual representation of the InputDefinition'); } /** * @group legacy */ public function testLegacyAsXml() { $definition = new InputDefinition(array( new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'), new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true), new InputArgument('bar', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The bar argument', array('bar')), new InputOption('foo', 'f', InputOption::VALUE_REQUIRED, 'The foo option'), new InputOption('baz', null, InputOption::VALUE_OPTIONAL, 'The baz option', false), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL, 'The bar option', 'bar'), )); $this->assertXmlStringEqualsXmlFile(self::$fixtures.'/definition_asxml.txt', $definition->asXml(), '->asXml() returns an XML representation of the InputDefinition'); } 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'); } } src/Symfony/Component/Console/Tests/Input/InputOptionTest.php000066400000000000000000000217701266465517700247510ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Input\InputOption; class InputOptionTest extends \PHPUnit_Framework_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) { $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)); } } src/Symfony/Component/Console/Tests/Input/InputTest.php000066400000000000000000000136371266465517700235630ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Input/StringInputTest.php000066400000000000000000000115571266465517700247510ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\StringInput; class StringInputTest extends \PHPUnit_Framework_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')); } /** * @group legacy */ public function testLegacyInputOptionDefinitionInConstructor() { $definition = new InputDefinition( array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) ); $input = new StringInput('--foo=bar', $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); } } src/Symfony/Component/Console/Tests/Logger/000077500000000000000000000000001266465517700212215ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php000066400000000000000000000030771266465517700253430ustar00rootroot00000000000000 * * 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 Psr\Log\Test\LoggerInterfaceTest; use Psr\Log\LogLevel; use Symfony\Component\Console\Logger\ConsoleLogger; use Symfony\Component\Console\Tests\Fixtures\DummyOutput; use Symfony\Component\Console\Output\OutputInterface; /** * Console logger test. * * @author Kévin Dunglas */ class ConsoleLoggerTest extends LoggerInterfaceTest { /** * @var DummyOutput */ protected $output; /** * {@inheritdoc} */ 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, )); } /** * {@inheritdoc} */ public function getLogs() { return $this->output->getLogs(); } } src/Symfony/Component/Console/Tests/Output/000077500000000000000000000000001266465517700213025ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php000066400000000000000000000015431266465517700255010ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Output\Output; class ConsoleOutputTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Output/NullOutputTest.php000066400000000000000000000023651266465517700250140ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\OutputInterface; class NullOutputTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Output/OutputTest.php000066400000000000000000000123661266465517700241630ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Formatter\OutputFormatterStyle; class OutputTest extends \PHPUnit_Framework_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'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Unknown output type given (24) */ public function testWriteWithInvalidOutputType() { $output = new TestOutput(); $output->writeln('foo', 24); } 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'); } } class TestOutput extends Output { public $output = ''; public function clear() { $this->output = ''; } protected function doWrite($message, $newline) { $this->output .= $message.($newline ? "\n" : ''); } } src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php000066400000000000000000000034071266465517700253330ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\StreamOutput; class StreamOutputTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Style/000077500000000000000000000000001266465517700211025ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php000066400000000000000000000060051266465517700251410ustar00rootroot00000000000000 * * 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\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Tester\CommandTester; class SymfonyStyleTest extends PHPUnit_Framework_TestCase { /** @var Command */ protected $command; /** @var CommandTester */ protected $tester; protected function setUp() { $this->command = new Command('sfstyle'); $this->tester = new CommandTester($this->command); } protected function tearDown() { $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)); } public function inputCommandToOutputFilesProvider() { $baseDir = __DIR__.'/../Fixtures/Style/SymfonyStyle'; return array_map(null, glob($baseDir.'/command/command_*.php'), glob($baseDir.'/output/output_*.txt')); } public function testLongWordsBlockWrapping() { $word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon'; $wordLength = strlen($word); $maxLineLength = SymfonyStyle::MAX_LINE_LENGTH - 3; $this->command->setCode(function (InputInterface $input, OutputInterface $output) use ($word) { $sfStyle = new SymfonyStyleWithForcedLineLength($input, $output); $sfStyle->block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false); }); $this->tester->execute(array(), array('interactive' => false, 'decorated' => false)); $expectedCount = (int) ceil($wordLength / ($maxLineLength)) + (int) ($wordLength > $maxLineLength - 5); $this->assertSame($expectedCount, substr_count($this->tester->getDisplay(true), ' § ')); } } /** * Use this class in tests to force the line length * and ensure a consistent output for expectations. */ class SymfonyStyleWithForcedLineLength extends SymfonyStyle { public function __construct(InputInterface $input, OutputInterface $output) { parent::__construct($input, $output); $ref = new \ReflectionProperty(get_parent_class($this), 'lineLength'); $ref->setAccessible(true); $ref->setValue($this, 120); } } src/Symfony/Component/Console/Tests/Tester/000077500000000000000000000000001266465517700212505ustar00rootroot00000000000000src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php000066400000000000000000000045441266465517700262620ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Application; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Tester\ApplicationTester; class ApplicationTesterTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php000066400000000000000000000055021266465517700253700ustar00rootroot00000000000000 * * 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 Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Tester\CommandTester; class CommandTesterTest extends \PHPUnit_Framework_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())); } } src/Symfony/Component/Console/composer.json000066400000000000000000000020141266465517700214170ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/event-dispatcher": "~2.1", "symfony/process": "~2.1", "psr/log": "~1.0" }, "suggest": { "symfony/event-dispatcher": "", "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": "2.7-dev" } } } src/Symfony/Component/Console/phpunit.xml.dist000066400000000000000000000014731266465517700220600ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/CssSelector/000077500000000000000000000000001266465517700175275ustar00rootroot00000000000000src/Symfony/Component/CssSelector/.gitignore000066400000000000000000000000421266465517700215130ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/CssSelector/CHANGELOG.md000066400000000000000000000000521266465517700213350ustar00rootroot00000000000000CHANGELOG ========= 2.1.0 ----- * none src/Symfony/Component/CssSelector/CssSelector.php000066400000000000000000000074551266465517700225040ustar00rootroot00000000000000 * * 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; /** * CssSelector is the main entry point of the component and can convert CSS * selectors to XPath expressions. * * $xpath = CssSelector::toXpath('h1.foo'); * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS * for more details. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. Neither the name of Ian Bicking nor the names of its contributors may * 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 IAN BICKING 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. * * @author Fabien Potencier */ class CssSelector { private static $html = true; /** * Translates a CSS expression to its XPath equivalent. * Optionally, a prefix can be added to the resulting XPath * expression with the $prefix parameter. * * @param mixed $cssExpr The CSS expression. * @param string $prefix An optional prefix for the XPath expression. * * @return string */ public static function toXPath($cssExpr, $prefix = 'descendant-or-self::') { $translator = new Translator(); if (self::$html) { $translator->registerExtension(new HtmlExtension($translator)); } $translator ->registerParserShortcut(new EmptyStringParser()) ->registerParserShortcut(new ElementParser()) ->registerParserShortcut(new ClassParser()) ->registerParserShortcut(new HashParser()) ; return $translator->cssToXPath($cssExpr, $prefix); } /** * Enables the HTML extension. */ public static function enableHtmlExtension() { self::$html = true; } /** * Disables the HTML extension. */ public static function disableHtmlExtension() { self::$html = false; } } src/Symfony/Component/CssSelector/Exception/000077500000000000000000000000001266465517700214655ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Exception/ExceptionInterface.php000066400000000000000000000011001266465517700257450ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php000066400000000000000000000012011266465517700272200ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/CssSelector/Exception/InternalErrorException.php000066400000000000000000000011771266465517700266510ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/CssSelector/Exception/ParseException.php000066400000000000000000000011761266465517700251340ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php000066400000000000000000000035761266465517700263700ustar00rootroot00000000000000 * * 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 SyntaxErrorException */ 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 SyntaxErrorException */ public static function pseudoElementFound($pseudoElement, $unexpectedLocation) { return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation)); } /** * @param int $position * * @return SyntaxErrorException */ public static function unclosedString($position) { return new self(sprintf('Unclosed/invalid string at %s.', $position)); } /** * @return SyntaxErrorException */ public static function nestedNot() { return new self('Got nested ::not().'); } /** * @return SyntaxErrorException */ public static function stringAsFunctionArgument() { return new self('String not allowed as function argument.'); } } src/Symfony/Component/CssSelector/LICENSE000066400000000000000000000020511266465517700205320ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/CssSelector/Node/000077500000000000000000000000001266465517700204145ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Node/AbstractNode.php000066400000000000000000000016261266465517700235030ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Node/AttributeNode.php000066400000000000000000000051111266465517700236740ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/ClassNode.php000066400000000000000000000027551266465517700230110ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php000066400000000000000000000037061266465517700251620ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/ElementNode.php000066400000000000000000000031041266465517700233220ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/FunctionNode.php000066400000000000000000000040311266465517700235160ustar00rootroot00000000000000 * * 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 */ 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.']' : ''); } } src/Symfony/Component/CssSelector/Node/HashNode.php000066400000000000000000000027321266465517700226220ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/NegationNode.php000066400000000000000000000031401266465517700234750ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/NodeInterface.php000066400000000000000000000016261266465517700236400ustar00rootroot00000000000000 * * 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 */ 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(); } src/Symfony/Component/CssSelector/Node/PseudoNode.php000066400000000000000000000030601266465517700231710ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Node/SelectorNode.php000066400000000000000000000032221266465517700235120ustar00rootroot00000000000000 * * 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 */ 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 : ''); } } src/Symfony/Component/CssSelector/Node/Specificity.php000066400000000000000000000042311266465517700234000ustar00rootroot00000000000000 * * 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 */ 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 Specificity */ 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; } } src/Symfony/Component/CssSelector/Parser/000077500000000000000000000000001266465517700207635ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Parser/Handler/000077500000000000000000000000001266465517700223405ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php000066400000000000000000000021341266465517700257510ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php000066400000000000000000000015411266465517700262500ustar00rootroot00000000000000 * * 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 */ interface HandlerInterface { /** * @param Reader $reader * @param TokenStream $stream * * @return bool */ public function handle(Reader $reader, TokenStream $stream); } src/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php000066400000000000000000000033561266465517700252410ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php000066400000000000000000000034001266465517700264260ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php000066400000000000000000000027031266465517700256010ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php000066400000000000000000000050631266465517700256210ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php000066400000000000000000000022201266465517700264370ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Parser.php000066400000000000000000000305031266465517700227310ustar00rootroot00000000000000 * * 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 */ 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 * * @throws SyntaxErrorException * * @return array */ 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 * * @throws SyntaxErrorException * * @return Node\SelectorNode */ 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 * * @throws SyntaxErrorException * * @return array */ 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 * * @throws SyntaxErrorException * * @return Node\AttributeNode */ 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()); } } src/Symfony/Component/CssSelector/Parser/ParserInterface.php000066400000000000000000000014571266465517700245600ustar00rootroot00000000000000 * * 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 */ interface ParserInterface { /** * Parses given selector source into an array of tokens. * * @param string $source * * @return SelectorNode[] */ public function parse($source); } src/Symfony/Component/CssSelector/Parser/Reader.php000066400000000000000000000044141266465517700227010ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/CssSelector/Parser/Shortcut/000077500000000000000000000000001266465517700225765ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php000066400000000000000000000030501266465517700255270ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php000066400000000000000000000025301266465517700260550ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php000066400000000000000000000022721266465517700267540ustar00rootroot00000000000000 * * 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 */ class EmptyStringParser implements ParserInterface { /** * {@inheritdoc} */ public function parse($source) { // Matches an empty string if ($source == '') { return array(new SelectorNode(new ElementNode(null, '*'))); } return array(); } } src/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php000066400000000000000000000030401266465517700253440ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/CssSelector/Parser/Token.php000066400000000000000000000056571266465517700225710ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Parser/TokenStream.php000066400000000000000000000071031266465517700237310ustar00rootroot00000000000000 * * 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 */ 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 TokenStream */ public function push(Token $token) { $this->tokens[] = $token; return $this; } /** * Freezes stream. * * @return TokenStream */ public function freeze() { $this->frozen = true; return $this; } /** * Returns next token. * * @throws InternalErrorException If there is no more token * * @return 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. * * @throws SyntaxErrorException If next token is not an identifier * * @return string The identifier token value */ public function getNextIdentifier() { $next = $this->getNext(); if (!$next->isIdentifier()) { throw SyntaxErrorException::unexpectedToken('identifier', $next); } return $next->getValue(); } /** * Returns nex identifier or star delimiter token. * * @throws SyntaxErrorException If next token is not an identifier or a star delimiter * * @return null|string The identifier token value or null if star found */ 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(); } } } src/Symfony/Component/CssSelector/Parser/Tokenizer/000077500000000000000000000000001266465517700227355ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php000066400000000000000000000041041266465517700254170ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php000066400000000000000000000037301266465517700270750ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php000066400000000000000000000066101266465517700271440ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/README.md000066400000000000000000000025561266465517700210160ustar00rootroot00000000000000CssSelector Component ===================== CssSelector converts CSS selectors to XPath expressions. The component only goal is to convert CSS selectors to their XPath equivalents: ```php use Symfony\Component\CssSelector\CssSelector; print CssSelector::toXPath('div.item > h4 > a'); ``` HTML and XML are different -------------------------- The `CssSelector` component comes with an `HTML` extension which is enabled by default. If you need to use this component with `XML` documents, you have to disable this `HTML` extension. That's because, `HTML` tag & attribute names are always lower-cased, but case-sensitive in `XML`: ```php // disable `HTML` extension: CssSelector::disableHtmlExtension(); // re-enable `HTML` extension: CssSelector::enableHtmlExtension(); ``` When the `HTML` extension is enabled, tag names are lower-cased, attribute names are lower-cased, the following extra pseudo-classes are supported: `checked`, `link`, `disabled`, `enabled`, `selected`, `invalid`, `hover`, `visited`, and the `lang()` function is also added. Resources --------- 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. You can run the unit tests with the following command: $ cd path/to/Symfony/Component/CssSelector/ $ composer install $ phpunit src/Symfony/Component/CssSelector/Tests/000077500000000000000000000000001266465517700206315ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/CssSelectorTest.php000066400000000000000000000060351266465517700244370ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\CssSelector; class CssSelectorTest extends \PHPUnit_Framework_TestCase { public function testCssToXPath() { $this->assertEquals('descendant-or-self::*', CssSelector::toXPath('')); $this->assertEquals('descendant-or-self::h1', CssSelector::toXPath('h1')); $this->assertEquals("descendant-or-self::h1[@id = 'foo']", CssSelector::toXPath('h1#foo')); $this->assertEquals("descendant-or-self::h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]", CssSelector::toXPath('h1.foo')); $this->assertEquals('descendant-or-self::foo:h1', CssSelector::toXPath('foo|h1')); } /** @dataProvider getCssToXPathWithoutPrefixTestData */ public function testCssToXPathWithoutPrefix($css, $xpath) { $this->assertEquals($xpath, CssSelector::toXPath($css, ''), '->parse() parses an input string and returns a node'); } public function testParseExceptions() { try { CssSelector::toXPath('h1:'); $this->fail('->parse() throws an Exception if the css selector is not valid'); } catch (\Exception $e) { $this->assertInstanceOf('\Symfony\Component\CssSelector\Exception\ParseException', $e, '->parse() throws an Exception if the css selector is not valid'); $this->assertEquals('Expected identifier, but found.', $e->getMessage(), '->parse() throws an Exception if the css selector is not valid'); } } 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 ')]"), ); } } src/Symfony/Component/CssSelector/Tests/Node/000077500000000000000000000000001266465517700215165ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php000066400000000000000000000017021266465517700254400ustar00rootroot00000000000000 * * 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\NodeInterface; abstract class AbstractNodeTest extends \PHPUnit_Framework_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(); } src/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php000066400000000000000000000026751266465517700256520ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php000066400000000000000000000015501266465517700247430ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php000066400000000000000000000023431266465517700271200ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php000066400000000000000000000017031266465517700252670ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php000066400000000000000000000032421266465517700254630ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php000066400000000000000000000015261266465517700245640ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php000066400000000000000000000016631266465517700254470ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php000066400000000000000000000014371266465517700251410ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php000066400000000000000000000016641266465517700254640ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php000066400000000000000000000041671266465517700253520ustar00rootroot00000000000000 * * 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\Specificity; class SpecificityTest extends \PHPUnit_Framework_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), ); } } src/Symfony/Component/CssSelector/Tests/Parser/000077500000000000000000000000001266465517700220655ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/Parser/Handler/000077500000000000000000000000001266465517700234425ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php000066400000000000000000000043101266465517700300520ustar00rootroot00000000000000 * * 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\Reader; use Symfony\Component\CssSelector\Parser\Token; use Symfony\Component\CssSelector\Parser\TokenStream; /** * @author Jean-François Simon */ abstract class AbstractHandlerTest extends \PHPUnit_Framework_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)); } } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php000066400000000000000000000031221266465517700277110ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php000066400000000000000000000025621266465517700272010ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php000066400000000000000000000030011266465517700303650ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php000066400000000000000000000026551266465517700275510ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php000066400000000000000000000027511266465517700275640ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php000066400000000000000000000022631266465517700304100ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php000066400000000000000000000312441266465517700246760ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->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+'), ); } } src/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php000066400000000000000000000055761266465517700246550ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Parser\Reader; class ReaderTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/000077500000000000000000000000001266465517700237005ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php000066400000000000000000000026131266465517700274750ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Node\SelectorNode; use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser; /** * @author Jean-François Simon */ class ClassParserTest extends \PHPUnit_Framework_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]'), ); } } src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php000066400000000000000000000023301266465517700300150ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Node\SelectorNode; use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser; /** * @author Jean-François Simon */ class ElementParserTest extends \PHPUnit_Framework_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]'), ); } } src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.php000066400000000000000000000017621266465517700307210ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Node\SelectorNode; use Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser; /** * @author Jean-François Simon */ class EmptyStringParserTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php000066400000000000000000000025451266465517700273170ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Node\SelectorNode; use Symfony\Component\CssSelector\Parser\Shortcut\HashParser; /** * @author Jean-François Simon */ class HashParserTest extends \PHPUnit_Framework_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]'), ); } } src/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.php000066400000000000000000000061611266465517700256760ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\Parser\Token; use Symfony\Component\CssSelector\Parser\TokenStream; class TokenStreamTest extends \PHPUnit_Framework_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->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->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()); } } src/Symfony/Component/CssSelector/Tests/XPath/000077500000000000000000000000001266465517700216555ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/000077500000000000000000000000001266465517700234665ustar00rootroot00000000000000src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html000066400000000000000000000030671266465517700251410ustar00rootroot00000000000000
    link
    1. content

    hi there guy

    src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml000066400000000000000000000004751266465517700251370ustar00rootroot00000000000000 a b c d e f src/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html000066400000000000000000000352041266465517700265060ustar00rootroot00000000000000

    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
    src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php000066400000000000000000000415001266465517700253570ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\XPath\Extension\HtmlExtension; use Symfony\Component\CssSelector\XPath\Translator; class TranslatorTest extends \PHPUnit_Framework_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 ); } } src/Symfony/Component/CssSelector/XPath/000077500000000000000000000000001266465517700205535ustar00rootroot00000000000000src/Symfony/Component/CssSelector/XPath/Extension/000077500000000000000000000000001266465517700225275ustar00rootroot00000000000000src/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php000066400000000000000000000023331266465517700267010ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php000066400000000000000000000112631266465517700305560ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php000066400000000000000000000044731266465517700274070ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php000066400000000000000000000027471266465517700270470ustar00rootroot00000000000000 * * 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 */ 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(); } src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php000066400000000000000000000136151266465517700267300ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php000066400000000000000000000150651266465517700260500ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php000066400000000000000000000160231266465517700260240ustar00rootroot00000000000000 * * 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 */ 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 NodeExtension */ 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); } } src/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php000066400000000000000000000076611266465517700273740ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/CssSelector/XPath/Translator.php000066400000000000000000000204521266465517700234200ustar00rootroot00000000000000 * * 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 */ 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(); /** * Constructor. */ 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 Translator */ 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 Translator */ 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 * * @throws ExpressionErrorException * * @return XPathExpr */ 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); } } src/Symfony/Component/CssSelector/XPath/TranslatorInterface.php000066400000000000000000000022211266465517700252330ustar00rootroot00000000000000 * * 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 */ 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::'); } src/Symfony/Component/CssSelector/XPath/XPathExpr.php000066400000000000000000000054611266465517700231550ustar00rootroot00000000000000 * * 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 */ 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 XPathExpr */ 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 XPathExpr */ public function addNameTest() { if ('*' !== $this->element) { $this->addCondition('name() = '.Translator::getXpathLiteral($this->element)); $this->element = '*'; } return $this; } /** * @return XPathExpr */ public function addStarPrefix() { $this->path .= '*/'; return $this; } /** * Joins another XPathExpr with a combiner. * * @param string $combiner * @param XPathExpr $expr * * @return XPathExpr */ 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; } } src/Symfony/Component/CssSelector/composer.json000066400000000000000000000015751266465517700222610ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\CssSelector\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/CssSelector/phpunit.xml.dist000066400000000000000000000014771266465517700227130ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Debug/000077500000000000000000000000001266465517700163245ustar00rootroot00000000000000src/Symfony/Component/Debug/.gitignore000066400000000000000000000000421266465517700203100ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Debug/CHANGELOG.md000066400000000000000000000013461266465517700201410ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Debug/Debug.php000066400000000000000000000033001266465517700200570ustar00rootroot00000000000000 * * 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 = null, $displayErrors = true) { if (static::$enabled) { return; } static::$enabled = true; if (null !== $errorReportingLevel) { error_reporting($errorReportingLevel); } else { error_reporting(-1); } if ('cli' !== php_sapi_name()) { 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); } $handler = ErrorHandler::register(); if (!$displayErrors) { $handler->throwAt(0, true); } DebugClassLoader::enable(); } } src/Symfony/Component/Debug/DebugClassLoader.php000066400000000000000000000265171266465517700222130ustar00rootroot00000000000000 * * 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 $wasFinder; 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|object $classLoader Passing an object is @deprecated since version 2.5 and support for it will be removed in 3.0 */ public function __construct($classLoader) { $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); if ($this->wasFinder) { @trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED); $this->classLoader = array($classLoader, 'loadClass'); $this->isFinder = true; } else { $this->classLoader = $classLoader; $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile'); } if (!isset(self::$caseCheck)) { self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0; } } /** * Gets the wrapped class loader. * * @return callable|object A class loader. Since version 2.5, returning an object is @deprecated and support for it will be removed in 3.0 */ public function getClassLoader() { return $this->wasFinder ? $this->classLoader[0] : $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); } } /** * Finds a file by class name. * * @param string $class A class name to resolve to file * * @return string|null * * @deprecated since version 2.5, to be removed in 3.0. */ public function findFile($class) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if ($this->wasFinder) { return $this->classLoader[0]->findFile($class); } } /** * 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; } } catch (\Exception $e) { ErrorHandler::unstackErrors(); throw $e; } ErrorHandler::unstackErrors(); $exists = class_exists($class, false) || interface_exists($class, false) || (function_exists('trait_exists') && 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 = $refl->getParentClass(); if (!$parent || strncmp($ns, $parent->name, $len)) { if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) { @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED); } foreach ($refl->getInterfaceNames() as $interface) { if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($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; } } } src/Symfony/Component/Debug/ErrorHandler.php000066400000000000000000000653261266465517700214400ustar00rootroot00000000000000 * * 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\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, only once for repeated errors * - 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 */ class ErrorHandler { /** * @deprecated since version 2.6, to be removed in 3.0. */ const TYPE_DEPRECATION = -100; 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 $loggedTraces = array(); private $isRecursive = 0; private $isRoot = false; private $exceptionHandler; private static $reservedMemory; private static $stackedErrors = array(); private static $stackedErrorLevels = array(); /** * Same init value as thrownErrors. * * @deprecated since version 2.6, to be removed in 3.0. */ private $displayErrors = 0x1FFF; /** * Registers the error handler. * * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels * @param bool $replace Whether to replace or not any existing handler * * @return self The registered error handler */ public static function register($handler = null, $replace = true) { if (null === self::$reservedMemory) { self::$reservedMemory = str_repeat('x', 10240); register_shutdown_function(__CLASS__.'::handleFatalError'); } $levels = -1; if ($handlerIsNew = !$handler instanceof self) { // @deprecated polymorphism, to be removed in 3.0 if (null !== $handler) { $levels = $replace ? $handler : 0; $replace = true; } $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($levels & $handler->thrownErrors, true); return $handler; } /** * 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 = null, $replace = false) { $loggers = array(); if (is_array($levels)) { foreach ($levels as $type => $logLevel) { if (empty($this->loggers[$type][0]) || $replace) { $loggers[$type] = array($logger, $logLevel); } } } else { if (null === $levels) { $levels = E_ALL | E_STRICT; } foreach ($this->loggers as $type => $log) { if (($type & $levels) && (empty($log[0]) || $replace)) { $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; 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]; } $this->reRegister($prevLogged | $this->thrownErrors); 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 * * @throws \InvalidArgumentException */ public function setExceptionHandler($handler) { if (null !== $handler && !is_callable($handler)) { throw new \LogicException('The exception handler must be a valid PHP callable.'); } $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); // $this->displayErrors is @deprecated since version 2.6 $this->displayErrors = $this->thrownErrors; 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 $file * @param int $line * @param array $context * * @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, array $context, array $backtrace = null) { $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; } if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && ($this->scopedErrors & $type)) { $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; } if ($throw) { if (($this->scopedErrors & $type) && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { // Checking for class existence is a work around for https://bugs.php.net/42098 $throw = new ContextErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line, $context); } else { $throw = new \ErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line); } if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) { // Exceptions thrown from error handlers are sometimes not caught by the exception // handler and shutdown handlers are bypassed before 5.4.8/5.3.18. // We temporarily re-enable display_errors to prevent any blank page related to this bug. $throw->errorHandlerCanary = new ErrorHandlerCanary(); } throw $throw; } // For duplicated errors, log the trace only once $e = md5("{$type}/{$line}/{$file}\x00{$message}", true); $trace = true; if (!($this->tracedErrors & $type) || isset($this->loggedTraces[$e])) { $trace = false; } else { $this->loggedTraces[$e] = 1; } $e = compact('type', 'file', 'line', 'level'); if ($type & $level) { if ($this->scopedErrors & $type) { $e['scope_vars'] = $context; if ($trace) { $e['stack'] = $backtrace ?: debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT); } } elseif ($trace) { if (null === $backtrace) { $e['stack'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); } else { foreach ($backtrace as &$frame) { unset($frame['args'], $frame); } $e['stack'] = $backtrace; } } } if ($this->isRecursive) { $log = 0; } elseif (self::$stackedErrorLevels) { self::$stackedErrors[] = array($this->loggers[$type][0], ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, $message, $e); } else { try { $this->isRecursive = true; $this->loggers[$type][0]->log(($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, $message, $e); $this->isRecursive = false; } catch (\Exception $e) { $this->isRecursive = false; throw $e; } } 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) { $e = array( 'type' => $type, 'file' => $exception->getFile(), 'line' => $exception->getLine(), 'level' => error_reporting(), 'stack' => $exception->getTrace(), ); if ($exception instanceof FatalErrorException) { if ($exception instanceof FatalThrowableError) { $error = array( 'type' => $type, 'message' => $message = $exception->getMessage(), 'file' => $e['file'], 'line' => $e['line'], ); } 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 & $e['type']) { $this->loggers[$e['type']][0]->log($this->loggers[$e['type']][1], $message, $e); } } 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 } 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) { $e = error_reporting($level); if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { // If the user changed the error level, do not overwrite it error_reporting($e); } } if (empty(self::$stackedErrorLevels)) { $errors = self::$stackedErrors; self::$stackedErrors = array(); foreach ($errors as $e) { $e[0]->log($e[1], $e[2], $e[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(), ); } /** * Sets the level at which the conversion to Exception is done. * * @param int|null $level The level (null to use the error_reporting() value and 0 to disable) * * @deprecated since version 2.6, to be removed in 3.0. Use throwAt() instead. */ public function setLevel($level) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED); $level = null === $level ? error_reporting() : $level; $this->throwAt($level, true); } /** * Sets the display_errors flag value. * * @param int $displayErrors The display_errors flag value * * @deprecated since version 2.6, to be removed in 3.0. Use throwAt() instead. */ public function setDisplayErrors($displayErrors) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED); if ($displayErrors) { $this->throwAt($this->displayErrors, true); } else { $displayErrors = $this->displayErrors; $this->throwAt(0, true); $this->displayErrors = $displayErrors; } } /** * Sets a logger for the given channel. * * @param LoggerInterface $logger A logger interface * @param string $channel The channel associated with the logger (deprecation, emergency or scream) * * @deprecated since version 2.6, to be removed in 3.0. Use setLoggers() or setDefaultLogger() instead. */ public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') { @trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED); $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if (!$handler instanceof self) { return; } if ('deprecation' === $channel) { $handler->setDefaultLogger($logger, E_DEPRECATED | E_USER_DEPRECATED, true); $handler->screamAt(E_DEPRECATED | E_USER_DEPRECATED); } elseif ('scream' === $channel) { $handler->setDefaultLogger($logger, E_ALL | E_STRICT, false); $handler->screamAt(E_ALL | E_STRICT); } elseif ('emergency' === $channel) { $handler->setDefaultLogger($logger, E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR, true); $handler->screamAt(E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); } } /** * @deprecated since version 2.6, to be removed in 3.0. Use handleError() instead. */ public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) { $this->handleError(E_USER_DEPRECATED, 'The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleError() method instead.', __FILE__, __LINE__, array()); return $this->handleError($level, $message, $file, $line, (array) $context); } /** * Handles PHP fatal errors. * * @deprecated since version 2.6, to be removed in 3.0. Use handleFatalError() instead. */ public function handleFatal() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED); static::handleFatalError(); } } /** * Private class used to work around https://bugs.php.net/54275. * * @author Nicolas Grekas * * @internal */ class ErrorHandlerCanary { private static $displayErrors = null; public function __construct() { if (null === self::$displayErrors) { self::$displayErrors = ini_set('display_errors', 1); } } public function __destruct() { if (null !== self::$displayErrors) { ini_set('display_errors', self::$displayErrors); self::$displayErrors = null; } } } src/Symfony/Component/Debug/Exception/000077500000000000000000000000001266465517700202625ustar00rootroot00000000000000src/Symfony/Component/Debug/Exception/ClassNotFoundException.php000066400000000000000000000014741266465517700254020ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Debug/Exception/ContextErrorException.php000066400000000000000000000015531266465517700253140ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Debug/Exception/DummyException.php000066400000000000000000000011171266465517700237450ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Debug\Exception; @trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); /** * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0. */ class DummyException extends \ErrorException { } src/Symfony/Component/Debug/Exception/FatalErrorException.php000066400000000000000000000064141266465517700247200ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Exception; /** * Fatal Error Exception. * * @author Fabien Potencier * @author Konstanton Myakshin * @author Nicolas Grekas * * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class FatalErrorException extends \ErrorException { } namespace Symfony\Component\Debug\Exception; use Symfony\Component\HttpKernel\Exception\FatalErrorException as LegacyFatalErrorException; /** * Fatal Error Exception. * * @author Konstanton Myakshin */ class FatalErrorException extends LegacyFatalErrorException { 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); } } src/Symfony/Component/Debug/Exception/FatalThrowableError.php000066400000000000000000000021041266465517700247010ustar00rootroot00000000000000 * * 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 = 'Fatal error: '.$e->getMessage(); $severity = E_ERROR; } \ErrorException::__construct( $message, $e->getCode(), $severity, $e->getFile(), $e->getLine() ); $this->setTrace($e->getTrace()); } } src/Symfony/Component/Debug/Exception/FlattenException.php000066400000000000000000000201451266465517700242510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Exception; use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException; /** * FlattenException wraps a PHP Exception to be able to serialize it. * * Basically, this class removes all objects from the trace. * * @author Fabien Potencier * * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class FlattenException { private $handler; public static function __callStatic($method, $args) { if (!method_exists('Symfony\Component\Debug\Exception\FlattenException', $method)) { throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_called_class(), $method)); } return call_user_func_array(array('Symfony\Component\Debug\Exception\FlattenException', $method), $args); } public function __call($method, $args) { if (!isset($this->handler)) { $this->handler = new DebugFlattenException(); } if (!method_exists($this->handler, $method)) { throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_class($this), $method)); } return call_user_func_array(array($this->handler, $method), $args); } } namespace Symfony\Component\Debug\Exception; use Symfony\Component\HttpKernel\Exception\FlattenException as LegacyFlattenException; 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 extends LegacyFlattenException { 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 (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_resource($value)) { $result[$key] = array('resource', get_resource_type($value)); } elseif ($value instanceof \__PHP_Incomplete_Class) { // Special case of object, is_object will return false $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($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']; } } src/Symfony/Component/Debug/Exception/OutOfMemoryException.php000066400000000000000000000006501266465517700251000ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Debug/Exception/UndefinedFunctionException.php000066400000000000000000000014531266465517700262640ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Debug/Exception/UndefinedMethodException.php000066400000000000000000000014461266465517700257210ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Debug/ExceptionHandler.php000066400000000000000000000432501266465517700222750ustar00rootroot00000000000000 * * 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\HttpFoundation\Response; use Symfony\Component\Debug\Exception\FlattenException; use Symfony\Component\Debug\Exception\OutOfMemoryException; /** * 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) { if (false !== strpos($charset, '%')) { // Swap $charset and $fileLinkFormat for BC reasons $pivot = $fileLinkFormat; $fileLinkFormat = $charset; $charset = $pivot; } $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 ExceptionHandler The registered exception handler */ 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($handler) { if (null !== $handler && !is_callable($handler)) { throw new \LogicException('The exception handler must be a valid PHP callable.'); } $old = $this->handler; $this->handler = $handler; return $old; } /** * Sets the format for links to source files. * * @param string $format The format for links to source files * * @return string The previous file link format. */ public function setFileLinkFormat($format) { $old = $this->fileLinkFormat; $this->fileLinkFormat = $format; 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->failSafeHandle($exception); return; } $caughtLength = $this->caughtLength = 0; ob_start(array($this, 'catchOutput')); $this->failSafeHandle($exception); while (null === $this->caughtBuffer && ob_end_flush()) { // Empty loop, everything is in the condition } if (isset($this->caughtBuffer[0])) { ob_start(array($this, 'cleanOutput')); 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 a response for the given Exception. * * If you have the Symfony HttpFoundation component installed, * this method will use it to create and send the response. If not, * it will fallback to plain PHP functions. * * @param \Exception $exception An \Exception instance */ private function failSafeHandle(\Exception $exception) { if (class_exists('Symfony\Component\HttpFoundation\Response', false) && __CLASS__ !== get_class($this) && ($reflector = new \ReflectionMethod($this, 'createResponse')) && __CLASS__ !== $reflector->class ) { $response = $this->createResponse($exception); $response->sendHeaders(); $response->sendContent(); return; } $this->sendPhpResponse($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 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)); } /** * Creates the error Response associated with the given Exception. * * @param \Exception|FlattenException $exception An \Exception instance * * @return Response A Response instance */ public function createResponse($exception) { if (!$exception instanceof FlattenException) { $exception = FlattenException::create($exception); } return Response::create($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders())->setCharset($this->charset); } /** * 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; -webkit-border-bottom-right-radius: 16px; -webkit-border-bottom-left-radius: 16px; -moz-border-radius-bottomright: 16px; -moz-border-radius-bottomleft: 16px; 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; } .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; -webkit-border-top-left-radius: 16px; -webkit-border-top-right-radius: 16px; -moz-border-radius-topleft: 16px; -moz-border-radius-topright: 16px; 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; -webkit-border-radius: 10px; -moz-border-radius: 10px; 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) { $path = $this->escapeHtml($path); $file = preg_match('#[^/\\\\]*$#', $path, $file) ? $file[0] : $path; if ($linkFormat = $this->fileLinkFormat) { $link = strtr($this->escapeHtml($linkFormat), array('%f' => $path, '%l' => (int) $line)); return sprintf(' in %s line %d', $link, $file, $line); } return sprintf(' in %s line %d', $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 ('string' === $item[0]) { $formattedValue = sprintf("'%s'", $this->escapeHtml($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", '', var_export($this->escapeHtml((string) $item[1]), true)); } $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); } return implode(', ', $result); } /** * Returns an UTF-8 and HTML encoded string. * * @deprecated since version 2.7, to be removed in 3.0. */ protected static function utf8Htmlize($str) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8'); } /** * HTML-encodes a string. */ private function escapeHtml($str) { return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), $this->charset); } /** * @internal */ public function catchOutput($buffer) { $this->caughtBuffer = $buffer; return ''; } /** * @internal */ public function cleanOutput($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; } } src/Symfony/Component/Debug/FatalErrorHandler/000077500000000000000000000000001266465517700216635ustar00rootroot00000000000000src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php000066400000000000000000000171531266465517700304050ustar00rootroot00000000000000 * * 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; use Symfony\Component\ClassLoader\UniversalClassLoader as SymfonyUniversalClassLoader; /** * 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(); // @deprecated since version 2.5. Returning an object from DebugClassLoader::getClassLoader() is deprecated. if (is_object($function)) { $function = array($function); } if (!is_array($function)) { continue; } } if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader || $function[0] instanceof SymfonyUniversalClassLoader) { 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) || (function_exists('trait_exists') && trait_exists($class, false)); } } src/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php000066400000000000000000000016771266465517700275670ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php000066400000000000000000000057651266465517700313000ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php000066400000000000000000000034761266465517700307300ustar00rootroot00000000000000 * * 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); $candidates = array(); foreach (get_class_methods($className) 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); } } src/Symfony/Component/Debug/LICENSE000066400000000000000000000020511266465517700173270ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Debug/README.md000066400000000000000000000016661266465517700176140ustar00rootroot00000000000000Debug Component =============== Debug provides tools to make debugging easier. Enabling all debug tools is as easy as calling the `enable()` method on the main `Debug` class: ```php use Symfony\Component\Debug\Debug; Debug::enable(); ``` You can also use the tools individually: ```php use Symfony\Component\Debug\DebugClassLoader; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\ExceptionHandler; if ('cli' !== php_sapi_name()) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif (!ini_get('log_errors') || ini_get('error_log')) { ini_set('display_errors', 1); } ErrorHandler::register(); DebugClassLoader::enable(); ``` This component can optionally take advantage of the features of the HttpKernel and HttpFoundation components. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Debug/ $ composer install $ phpunit src/Symfony/Component/Debug/Resources/000077500000000000000000000000001266465517700202765ustar00rootroot00000000000000src/Symfony/Component/Debug/Resources/ext/000077500000000000000000000000001266465517700210765ustar00rootroot00000000000000src/Symfony/Component/Debug/Resources/ext/README.md000066400000000000000000000056631266465517700223670ustar00rootroot00000000000000Symfony 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 ``` src/Symfony/Component/Debug/Resources/ext/config.m4000066400000000000000000000043121266465517700226050ustar00rootroot00000000000000dnl $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 src/Symfony/Component/Debug/Resources/ext/config.w32000066400000000000000000000005311266465517700226770ustar00rootroot00000000000000// $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"); } src/Symfony/Component/Debug/Resources/ext/php_symfony_debug.h000066400000000000000000000035131266465517700247720ustar00rootroot00000000000000/* * 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 */ src/Symfony/Component/Debug/Resources/ext/symfony_debug.c000066400000000000000000000152051266465517700241170ustar00rootroot00000000000000/* * 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(); } src/Symfony/Component/Debug/Resources/ext/tests/000077500000000000000000000000001266465517700222405ustar00rootroot00000000000000src/Symfony/Component/Debug/Resources/ext/tests/001.phpt000066400000000000000000000051261266465517700234410ustar00rootroot00000000000000--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 src/Symfony/Component/Debug/Resources/ext/tests/002.phpt000066400000000000000000000016201266465517700234350ustar00rootroot00000000000000--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 ( ) ) ) src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt000066400000000000000000000012031266465517700236520ustar00rootroot00000000000000--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 ( ) ) ) src/Symfony/Component/Debug/Resources/ext/tests/003.phpt000066400000000000000000000040421266465517700234370ustar00rootroot00000000000000--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 ) src/Symfony/Component/Debug/Tests/000077500000000000000000000000001266465517700174265ustar00rootroot00000000000000src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php000066400000000000000000000240771266465517700241540ustar00rootroot00000000000000 * * 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\DebugClassLoader; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\ContextErrorException; class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase { /** * @var int Error reporting level before running tests. */ private $errorReporting; private $loader; protected function setUp() { $this->errorReporting = error_reporting(E_ALL | E_STRICT); $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 restore_error_handler(); restore_exception_handler(); $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()); } } catch (\Exception $exception) { restore_error_handler(); restore_exception_handler(); throw $exception; } } /** * @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 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__.'\Float' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); } } } src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php000066400000000000000000000410251266465517700233700ustar00rootroot00000000000000 * * 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 Psr\Log\LogLevel; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\ContextErrorException; /** * ErrorHandlerTest. * * @author Robert Schönthal * @author Nicolas Grekas */ class ErrorHandlerTest extends \PHPUnit_Framework_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 restore_error_handler(); restore_exception_handler(); $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('Symfony\Component\Debug\ErrorHandler', $trace[0]['class']); $this->assertEquals('handleError', $trace[0]['function']); $this->assertEquals('->', $trace[0]['type']); $this->assertEquals(__FILE__, $trace[1]['file']); $this->assertEquals(__CLASS__, $trace[1]['class']); $this->assertEquals('triggerNotice', $trace[1]['function']); $this->assertEquals('::', $trace[1]['type']); $this->assertEquals(__FILE__, $trace[1]['file']); $this->assertEquals(__CLASS__, $trace[2]['class']); $this->assertEquals(__FUNCTION__, $trace[2]['function']); $this->assertEquals('->', $trace[2]['type']); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } // 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)); restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } public function testDefaultLogger() { try { $handler = ErrorHandler::register(); $logger = $this->getMock('Psr\Log\LoggerInterface'); $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())); restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } 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->getMock('Psr\Log\LoggerInterface'); $that = $this; $warnArgCheck = function ($logLevel, $message, $context) use ($that) { $that->assertEquals('info', $logLevel); $that->assertEquals('foo', $message); $that->assertArrayHasKey('type', $context); $that->assertEquals($context['type'], E_USER_DEPRECATED); $that->assertArrayHasKey('stack', $context); $that->assertInternalType('array', $context['stack']); }; $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->getMock('Psr\Log\LoggerInterface'); $that = $this; $logArgCheck = function ($level, $message, $context) use ($that) { $that->assertEquals('Undefined variable: undefVar', $message); $that->assertArrayHasKey('type', $context); $that->assertEquals($context['type'], E_NOTICE); }; $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 testHandleDeprecation() { $that = $this; $logArgCheck = function ($level, $message, $context) use ($that) { $that->assertEquals(LogLevel::INFO, $level); $that->assertArrayHasKey('level', $context); $that->assertEquals(E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED, $context['level']); $that->assertArrayHasKey('stack', $context); }; $logger = $this->getMock('Psr\Log\LoggerInterface'); $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->getMock('Psr\Log\LoggerInterface'); $that = $this; $logArgCheck = function ($level, $message, $context) use ($that) { $that->assertEquals('Uncaught Exception: foo', $message); $that->assertArrayHasKey('type', $context); $that->assertEquals($context['type'], E_ERROR); }; $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); } $that = $this; $handler->setExceptionHandler(function ($e) use ($exception, $that) { $that->assertSame($exception, $e); }); $handler->handleException($exception); restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } public function testErrorStacking() { try { $handler = ErrorHandler::register(); $handler->screamAt(E_USER_WARNING); $logger = $this->getMock('Psr\Log\LoggerInterface'); $logger ->expects($this->exactly(2)) ->method('log') ->withConsecutive( array($this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')), array($this->equalTo(LogLevel::DEBUG), $this->equalTo('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(); restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } public function testHandleFatalError() { try { $handler = ErrorHandler::register(); $error = array( 'type' => E_PARSE, 'message' => 'foo', 'file' => 'bar', 'line' => 123, ); $logger = $this->getMock('Psr\Log\LoggerInterface'); $that = $this; $logArgCheck = function ($level, $message, $context) use ($that) { $that->assertEquals('Fatal Parse Error: foo', $message); $that->assertArrayHasKey('type', $context); $that->assertEquals($context['type'], E_PARSE); }; $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; } } public function testHandleFatalErrorOnHHVM() { try { $handler = ErrorHandler::register(); $logger = $this->getMock('Psr\Log\LoggerInterface'); $logger ->expects($this->once()) ->method('log') ->with( $this->equalTo(LogLevel::CRITICAL), $this->equalTo('Fatal Error: foo'), $this->equalTo(array( 'type' => 1, 'file' => 'bar', 'line' => 123, 'level' => -1, 'stack' => array(456), )) ) ; $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); restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } /** * @group legacy */ public function testLegacyInterface() { try { $handler = ErrorHandler::register(0); $this->assertFalse($handler->handle(0, 'foo', 'foo.php', 12, array())); restore_error_handler(); restore_exception_handler(); $logger = $this->getMock('Psr\Log\LoggerInterface'); $that = $this; $logArgCheck = function ($level, $message, $context) use ($that) { $that->assertEquals('Undefined variable: undefVar', $message); $that->assertArrayHasKey('type', $context); $that->assertEquals($context['type'], E_NOTICE); }; $logger ->expects($this->once()) ->method('log') ->will($this->returnCallback($logArgCheck)) ; $handler = ErrorHandler::register(E_NOTICE); @$handler->setLogger($logger, 'scream'); unset($undefVar); @$undefVar++; restore_error_handler(); restore_exception_handler(); } catch (\Exception $e) { restore_error_handler(); restore_exception_handler(); throw $e; } } } src/Symfony/Component/Debug/Tests/Exception/000077500000000000000000000000001266465517700213645ustar00rootroot00000000000000src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php000066400000000000000000000250541266465517700262170ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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 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(); $serializeTrace = serialize($trace); $this->assertContains('*SKIPPED over 10000 entries*', $serializeTrace); $this->assertNotContains('*value1*', $serializeTrace); } private function createException($foo) { return new \Exception(); } public function testSetTraceIncompleteClass() { $flattened = FlattenException::create(new \Exception('test', 123)); $flattened->setTrace( array( array( 'file' => __FILE__, 'line' => 123, 'function' => 'test', 'args' => array( unserialize('O:14:"BogusTestClass":0:{}'), ), ), ), '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(), ), array( 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => 'test', 'file' => __FILE__, 'line' => 123, 'args' => array( array( 'incomplete-object', 'BogusTestClass', ), ), ), ), ), ), $flattened->toArray()); } } src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php000066400000000000000000000100071266465517700242310ustar00rootroot00000000000000 * * 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; 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Debug\ExceptionHandler', array('sendPhpResponse')); $handler ->expects($this->exactly(2)) ->method('sendPhpResponse'); $handler->handle($exception); $that = $this; $handler->setHandler(function ($e) use ($exception, $that) { $that->assertSame($exception, $e); }); $handler->handle($exception); } public function testHandleOutOfMemoryException() { $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__); $handler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('sendPhpResponse')); $handler ->expects($this->once()) ->method('sendPhpResponse'); $that = $this; $handler->setHandler(function ($e) use ($that) { $that->fail('OutOfMemoryException should bypass the handler'); }); $handler->handle($exception); } } src/Symfony/Component/Debug/Tests/FatalErrorHandler/000077500000000000000000000000001266465517700227655ustar00rootroot00000000000000src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php000066400000000000000000000204451266465517700323450ustar00rootroot00000000000000 * * 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 Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; use Symfony\Component\ClassLoader\UniversalClassLoader as SymfonyUniversalClassLoader; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; use Symfony\Component\Debug\DebugClassLoader; use Composer\Autoload\ClassLoader as ComposerClassLoader; class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_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()); } /** * @group legacy */ public function testLegacyHandleClassNotFound() { $prefixes = array('Symfony\Component\Debug\Exception\\' => realpath(__DIR__.'/../../Exception')); $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader(); $symfonyUniversalClassLoader->registerPrefixes($prefixes); $this->testHandleClassNotFound( 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($symfonyUniversalClassLoader, 'loadClass') ); } 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); } } src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php000066400000000000000000000061331266465517700332300ustar00rootroot00000000000000 * * 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 Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; class UndefinedFunctionFatalErrorHandlerTest extends \PHPUnit_Framework_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() { } src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php000066400000000000000000000050121266465517700326560ustar00rootroot00000000000000 * * 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 Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; class UndefinedMethodFatalErrorHandlerTest extends \PHPUnit_Framework_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\"?", ), ); } } src/Symfony/Component/Debug/Tests/Fixtures/000077500000000000000000000000001266465517700212375ustar00rootroot00000000000000src/Symfony/Component/Debug/Tests/Fixtures/ClassAlias.php000066400000000000000000000001761266465517700237730ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Debug/Tests/MockExceptionHandler.php000066400000000000000000000007341266465517700242110ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Debug/composer.json000066400000000000000000000017651266465517700210570ustar00rootroot00000000000000{ "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.3.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.2", "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Debug/phpunit.xml.dist000066400000000000000000000016421266465517700215020ustar00rootroot00000000000000 ./Tests/ ./Resources/ext/tests/ ./ ./Tests ./vendor src/Symfony/Component/DependencyInjection/000077500000000000000000000000001266465517700212175ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/.gitignore000066400000000000000000000000421266465517700232030ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/DependencyInjection/Alias.php000066400000000000000000000022251266465517700227620ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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; } } src/Symfony/Component/DependencyInjection/CHANGELOG.md000066400000000000000000000022711266465517700230320ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/DependencyInjection/Compiler/000077500000000000000000000000001266465517700227715ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php000066400000000000000000000120171266465517700312600ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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 ($definition->getFactoryService(false)) { $this->processArguments(array(new Reference($definition->getFactoryService(false)))); } 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()); } if ($argument->getFactoryService(false)) { $this->processArguments(array(new Reference($argument->getFactoryService(false)))); } } } } /** * 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; } } src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php000066400000000000000000000025301266465517700275340ustar00rootroot00000000000000 * * 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)); } } } } } src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php000066400000000000000000000044521266465517700310420ustar00rootroot00000000000000 * * 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])) { $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); } } } } src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php000066400000000000000000000073671266465517700311020ustar00rootroot00000000000000 * * 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\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 * - synthetic services are always of non-prototype scope * * @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)); } // synthetic service has non-prototype scope if ($definition->isSynthetic() && ContainerInterface::SCOPE_PROTOTYPE === $definition->getScope()) { throw new RuntimeException(sprintf('A synthetic service ("%s") cannot be of scope "prototype".', $id)); } if ($definition->getFactory() && ($definition->getFactoryClass(false) || $definition->getFactoryService(false) || $definition->getFactoryMethod(false))) { throw new RuntimeException(sprintf('A service ("%s") can use either the old or the new factory syntax, not both.', $id)); } // non-synthetic, non-abstract service has class if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass()) { if ($definition->getFactory() || $definition->getFactoryClass(false) || $definition->getFactoryService(false)) { 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)); } } } } } } } src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php000066400000000000000000000040651266465517700343350ustar00rootroot00000000000000 * * 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); } } } } } src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php000066400000000000000000000126521266465517700307010ustar00rootroot00000000000000 * * 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\ContainerInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Exception\ScopeCrossingInjectionException; use Symfony\Component\DependencyInjection\Exception\ScopeWideningInjectionException; /** * Checks the validity of references. * * The following checks are performed by this pass: * - target definitions are not abstract * - target definitions are of equal or wider scope * - target definitions are in the same scope hierarchy * * @author Johannes M. Schmitt */ class CheckReferenceValidityPass implements CompilerPassInterface { private $container; private $currentId; private $currentScope; private $currentScopeAncestors; private $currentScopeChildren; /** * Processes the ContainerBuilder to validate References. * * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { $this->container = $container; $children = $this->container->getScopeChildren(); $ancestors = array(); $scopes = $this->container->getScopes(); foreach ($scopes as $name => $parent) { $ancestors[$name] = array($parent); while (isset($scopes[$parent])) { $ancestors[$name][] = $parent = $scopes[$parent]; } } foreach ($container->getDefinitions() as $id => $definition) { if ($definition->isSynthetic() || $definition->isAbstract()) { continue; } $this->currentId = $id; $this->currentScope = $scope = $definition->getScope(); if (ContainerInterface::SCOPE_CONTAINER === $scope) { $this->currentScopeChildren = array_keys($scopes); $this->currentScopeAncestors = array(); } elseif (ContainerInterface::SCOPE_PROTOTYPE !== $scope) { $this->currentScopeChildren = isset($children[$scope]) ? $children[$scope] : array(); $this->currentScopeAncestors = isset($ancestors[$scope]) ? $ancestors[$scope] : array(); } $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 )); } $this->validateScope($argument, $targetDefinition); } } } /** * Validates the scope of a single Reference. * * @param Reference $reference * @param Definition $definition * * @throws ScopeWideningInjectionException when the definition references a service of a narrower scope * @throws ScopeCrossingInjectionException when the definition references a service of another scope hierarchy */ private function validateScope(Reference $reference, Definition $definition = null) { if (ContainerInterface::SCOPE_PROTOTYPE === $this->currentScope) { return; } if (!$reference->isStrict()) { return; } if (null === $definition) { return; } if ($this->currentScope === $scope = $definition->getScope()) { return; } $id = (string) $reference; if (in_array($scope, $this->currentScopeChildren, true)) { throw new ScopeWideningInjectionException($this->currentId, $this->currentScope, $id, $scope); } if (!in_array($scope, $this->currentScopeAncestors, true)) { throw new ScopeCrossingInjectionException($this->currentId, $this->currentScope, $id, $scope); } } /** * 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); } } src/Symfony/Component/DependencyInjection/Compiler/Compiler.php000066400000000000000000000047361266465517700252660ustar00rootroot00000000000000 * * 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; /** * 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; /** * Constructor. */ 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 */ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) { $this->passConfig->addPass($pass, $type); } /** * 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) { foreach ($this->passConfig->getPasses() as $pass) { $pass->process($container); } } } src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php000066400000000000000000000013151266465517700277240ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php000066400000000000000000000033711266465517700276000ustar00rootroot00000000000000 * * 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 */ class DecoratorServicePass implements CompilerPassInterface { public function process(ContainerBuilder $container) { foreach ($container->getDefinitions() as $id => $definition) { if (!$decorated = $definition->getDecoratedService()) { continue; } $definition->setDecoratedService(null); list($inner, $renamedId) = $decorated; 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 { $definition = $container->getDefinition($inner); $public = $definition->isPublic(); $definition->setPublic(false); $container->setDefinition($renamedId, $definition); } $container->setAlias($inner, new Alias($id, $public)); } } } src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php000066400000000000000000000015751266465517700300100ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php000066400000000000000000000121171266465517700312660ustar00rootroot00000000000000 * * 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\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(); foreach ($container->getDefinitions() as $id => $definition) { $this->currentId = $id; $definition->setArguments( $this->inlineArguments($container, $definition->getArguments()) ); $definition->setMethodCalls( $this->inlineArguments($container, $definition->getMethodCalls()) ); $definition->setProperties( $this->inlineArguments($container, $definition->getProperties()) ); $configurator = $this->inlineArguments($container, array($definition->getConfigurator())); $definition->setConfigurator($configurator[0]); $factory = $this->inlineArguments($container, array($definition->getFactory())); $definition->setFactory($factory[0]); } } /** * Processes inline arguments. * * @param ContainerBuilder $container The ContainerBuilder * @param array $arguments An array of arguments * * @return array */ private function inlineArguments(ContainerBuilder $container, array $arguments) { foreach ($arguments as $k => $argument) { if (is_array($argument)) { $arguments[$k] = $this->inlineArguments($container, $argument); } elseif ($argument instanceof Reference) { if (!$container->hasDefinition($id = (string) $argument)) { continue; } if ($this->isInlineableDefinition($container, $id, $definition = $container->getDefinition($id))) { $this->compiler->addLogMessage($this->formatter->formatInlineService($this, $id, $this->currentId)); if (ContainerInterface::SCOPE_PROTOTYPE !== $definition->getScope()) { $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())); } } return $arguments; } /** * Checks if the definition is inlineable. * * @param ContainerBuilder $container * @param string $id * @param Definition $definition * * @return bool If the definition is inlineable */ private function isInlineableDefinition(ContainerBuilder $container, $id, Definition $definition) { if (ContainerInterface::SCOPE_PROTOTYPE === $definition->getScope()) { 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; } if (count($ids) > 1 && $definition->getFactoryService(false)) { return false; } return $container->getDefinition(reset($ids))->getScope() === $definition->getScope(); } } src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php000066400000000000000000000026741266465517700267650ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php000066400000000000000000000040741266465517700320220ustar00rootroot00000000000000 * * 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\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); foreach ($exprLangProviders as $provider) { $tmpContainer->addExpressionLanguageProvider($provider); } $extension->load($config, $tmpContainer); $container->merge($tmpContainer); $container->getParameterBag()->add($parameters); } $container->addDefinitions($definitions); $container->addAliases($aliases); } } src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php000066400000000000000000000133251266465517700255420ustar00rootroot00000000000000 * * 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; /** * Constructor. */ public function __construct() { $this->mergePass = new MergeExtensionConfigurationPass(); $this->optimizationPasses = array( new ExtensionCompilerPass(), new ResolveDefinitionTemplatesPass(), new DecoratorServicePass(), new ResolveParameterPlaceHoldersPass(), new CheckDefinitionValidityPass(), new ResolveReferencesToAliasesPass(), new ResolveInvalidReferencesPass(), new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), ); $this->removingPasses = array( new RemovePrivateAliasesPass(), new RemoveAbstractDefinitionsPass(), new ReplaceAliasByActualDefinitionPass(), new RepeatedPass(array( new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass(), new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass(), )), new CheckExceptionOnInvalidReferenceBehaviorPass(), ); } /** * Returns all passes in order to be processed. * * @return array An array of all passes to process */ public function getPasses() { return array_merge( array($this->mergePass), $this->beforeOptimizationPasses, $this->optimizationPasses, $this->beforeRemovingPasses, $this->removingPasses, $this->afterRemovingPasses ); } /** * Adds a pass. * * @param CompilerPassInterface $pass A Compiler pass * @param string $type The pass type * * @throws InvalidArgumentException when a pass type doesn't exist */ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION) { $property = $type.'Passes'; if (!isset($this->$property)) { throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type)); } $passes = &$this->$property; $passes[] = $pass; } /** * Gets all passes for the AfterRemoving pass. * * @return array An array of passes */ public function getAfterRemovingPasses() { return $this->afterRemovingPasses; } /** * Gets all passes for the BeforeOptimization pass. * * @return array An array of passes */ public function getBeforeOptimizationPasses() { return $this->beforeOptimizationPasses; } /** * Gets all passes for the BeforeRemoving pass. * * @return array An array of passes */ public function getBeforeRemovingPasses() { return $this->beforeRemovingPasses; } /** * Gets all passes for the Optimization pass. * * @return array An array of passes */ public function getOptimizationPasses() { return $this->optimizationPasses; } /** * Gets all passes for the Removing pass. * * @return array An array of passes */ public function getRemovingPasses() { return $this->removingPasses; } /** * Gets all passes for the Merge pass. * * @return array An array of passes */ 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 array $passes An array of passes */ public function setAfterRemovingPasses(array $passes) { $this->afterRemovingPasses = $passes; } /** * Sets the BeforeOptimization passes. * * @param array $passes An array of passes */ public function setBeforeOptimizationPasses(array $passes) { $this->beforeOptimizationPasses = $passes; } /** * Sets the BeforeRemoving passes. * * @param array $passes An array of passes */ public function setBeforeRemovingPasses(array $passes) { $this->beforeRemovingPasses = $passes; } /** * Sets the Optimization passes. * * @param array $passes An array of passes */ public function setOptimizationPasses(array $passes) { $this->optimizationPasses = $passes; } /** * Sets the Removing passes. * * @param array $passes An array of passes */ public function setRemovingPasses(array $passes) { $this->removingPasses = $passes; } } src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php000066400000000000000000000020461266465517700314500ustar00rootroot00000000000000 * * 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')); } } } } src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php000066400000000000000000000023641266465517700304300ustar00rootroot00000000000000 * * 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')); } } } src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php000066400000000000000000000053241266465517700311520ustar00rootroot00000000000000 * * 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); $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'unused')); $hasChanged = true; } } if ($hasChanged) { $this->repeatedPass->setRepeat(); } } } src/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php000066400000000000000000000012631266465517700302200ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php000066400000000000000000000040421266465517700260620ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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) { $this->repeat = false; foreach ($this->passes as $pass) { $pass->process($container); } if ($this->repeat) { $this->process($container); } } /** * 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; } } src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php000066400000000000000000000117351266465517700323230ustar00rootroot00000000000000 * * 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; private $sourceId; /** * 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) { $this->compiler = $container->getCompiler(); $this->formatter = $this->compiler->getLoggingFormatter(); foreach ($container->getAliases() as $id => $alias) { $aliasId = (string) $alias; try { $definition = $container->getDefinition($aliasId); } catch (InvalidArgumentException $e) { throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $id, $alias), null, $e); } if ($definition->isPublic()) { continue; } $definition->setPublic(true); $container->setDefinition($id, $definition); $container->removeDefinition($aliasId); $this->updateReferences($container, $aliasId, $id); // we have to restart the process due to concurrent modification of // the container $this->process($container); break; } } /** * Updates references to remove aliases. * * @param ContainerBuilder $container The container * @param string $currentId The alias identifier being replaced * @param string $newId The id of the service the alias points to */ private function updateReferences($container, $currentId, $newId) { foreach ($container->getAliases() as $id => $alias) { if ($currentId === (string) $alias) { $container->setAlias($id, $newId); } } foreach ($container->getDefinitions() as $id => $definition) { $this->sourceId = $id; $definition->setArguments( $this->updateArgumentReferences($definition->getArguments(), $currentId, $newId) ); $definition->setMethodCalls( $this->updateArgumentReferences($definition->getMethodCalls(), $currentId, $newId) ); $definition->setProperties( $this->updateArgumentReferences($definition->getProperties(), $currentId, $newId) ); $definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(false), $currentId, $newId), false); $definition->setFactory($this->updateFactoryReference($definition->getFactory(), $currentId, $newId)); } } /** * Updates argument references. * * @param array $arguments An array of Arguments * @param string $currentId The alias identifier * @param string $newId The identifier the alias points to * * @return array */ private function updateArgumentReferences(array $arguments, $currentId, $newId) { foreach ($arguments as $k => $argument) { if (is_array($argument)) { $arguments[$k] = $this->updateArgumentReferences($argument, $currentId, $newId); } elseif ($argument instanceof Reference) { if ($currentId === (string) $argument) { $arguments[$k] = new Reference($newId, $argument->getInvalidBehavior()); $this->compiler->addLogMessage($this->formatter->formatUpdateReference($this, $this->sourceId, $currentId, $newId)); } } } return $arguments; } private function updateFactoryServiceReference($factoryService, $currentId, $newId) { if (null === $factoryService) { return; } return $currentId === $factoryService ? $newId : $factoryService; } private function updateFactoryReference($factory, $currentId, $newId) { if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) { return $factory; } if ($currentId === (string) $factory[0]) { $factory[0] = new Reference($newId, $factory[0]->getInvalidBehavior()); } return $factory; } } src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php000066400000000000000000000142301266465517700316400ustar00rootroot00000000000000 * * 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\RuntimeException; /** * This replaces all DefinitionDecorator instances with their equivalent fully * merged Definition instance. * * @author Johannes M. Schmitt */ class ResolveDefinitionTemplatesPass implements CompilerPassInterface { private $container; private $compiler; private $formatter; /** * Process the ContainerBuilder to replace DefinitionDecorator instances with their real Definition instances. * * @param ContainerBuilder $container */ public function process(ContainerBuilder $container) { $this->container = $container; $this->compiler = $container->getCompiler(); $this->formatter = $this->compiler->getLoggingFormatter(); foreach ($container->getDefinitions() as $id => $definition) { // yes, we are specifically fetching the definition from the // container to ensure we are not operating on stale data $definition = $container->getDefinition($id); if (!$definition instanceof DefinitionDecorator || $definition->isAbstract()) { continue; } $this->resolveDefinition($id, $definition); } } /** * Resolves the definition. * * @param string $id The definition identifier * @param DefinitionDecorator $definition * * @return Definition * * @throws \RuntimeException When the definition is invalid */ private function resolveDefinition($id, DefinitionDecorator $definition) { if (!$this->container->hasDefinition($parent = $definition->getParent())) { throw new RuntimeException(sprintf('The parent definition "%s" defined for definition "%s" does not exist.', $parent, $id)); } $parentDef = $this->container->getDefinition($parent); if ($parentDef instanceof DefinitionDecorator) { $parentDef = $this->resolveDefinition($parent, $parentDef); } $this->compiler->addLogMessage($this->formatter->formatResolveInheritance($this, $id, $parent)); $def = new Definition(); // merge in parent definition // purposely ignored attributes: scope, abstract, tags $def->setClass($parentDef->getClass()); $def->setArguments($parentDef->getArguments()); $def->setMethodCalls($parentDef->getMethodCalls()); $def->setProperties($parentDef->getProperties()); if ($parentDef->getFactoryClass(false)) { $def->setFactoryClass($parentDef->getFactoryClass(false)); } if ($parentDef->getFactoryMethod(false)) { $def->setFactoryMethod($parentDef->getFactoryMethod(false)); } if ($parentDef->getFactoryService(false)) { $def->setFactoryService($parentDef->getFactoryService(false)); } $def->setFactory($parentDef->getFactory()); $def->setConfigurator($parentDef->getConfigurator()); $def->setFile($parentDef->getFile()); $def->setPublic($parentDef->isPublic()); $def->setLazy($parentDef->isLazy()); // overwrite with values specified in the decorator $changes = $definition->getChanges(); if (isset($changes['class'])) { $def->setClass($definition->getClass()); } if (isset($changes['factory_class'])) { $def->setFactoryClass($definition->getFactoryClass(false)); } if (isset($changes['factory_method'])) { $def->setFactoryMethod($definition->getFactoryMethod(false)); } if (isset($changes['factory_service'])) { $def->setFactoryService($definition->getFactoryService(false)); } 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['decorated_service'])) { $decoratedService = $definition->getDecoratedService(); if (null === $decoratedService) { $def->setDecoratedService($decoratedService); } else { $def->setDecoratedService($decoratedService[0], $decoratedService[1]); } } // 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)); } // these attributes are always taken from the child $def->setAbstract($definition->isAbstract()); $def->setScope($definition->getScope()); $def->setTags($definition->getTags()); // set new definition on container $this->container->setDefinition($id, $def); return $def; } } src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php000066400000000000000000000066361266465517700312740ustar00rootroot00000000000000 * * 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 * * @return array * * @throws RuntimeException When the config is invalid */ private function processArguments(array $arguments, $inMethodCall = false) { foreach ($arguments as $k => $argument) { if (is_array($argument)) { $arguments[$k] = $this->processArguments($argument, $inMethodCall); } 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 ($inMethodCall) { throw new RuntimeException('Method shouldn\'t be called.'); } $arguments[$k] = null; } } } return $arguments; } } src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php000066400000000000000000000050741266465517700321050ustar00rootroot00000000000000 * * 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())); if ($definition->getFactoryClass(false)) { $definition->setFactoryClass($parameterBag->resolveValue($definition->getFactoryClass(false))); } $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(); } } src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php000066400000000000000000000077511266465517700315710ustar00rootroot00000000000000 * * 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\Definition; 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())); $definition->setFactoryService($this->processFactoryService($definition->getFactoryService(false)), false); } 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(), $argument->isStrict()); } } } return $arguments; } private function processFactoryService($factoryService) { if (null === $factoryService) { return; } return $this->getDefinitionId($factoryService); } 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(), $factory[0]->isStrict()); } 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; } } src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php000066400000000000000000000054461266465517700277140ustar00rootroot00000000000000 * * 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 The node matching the supplied identifier * * @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[] An array of all ServiceReferenceGraphNode objects */ 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); } } src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php000066400000000000000000000027601266465517700304750ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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 ServiceReferenceGraphNode */ 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; } } src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php000066400000000000000000000047541266465517700305230ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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; } } src/Symfony/Component/DependencyInjection/Container.php000066400000000000000000000427761266465517700236720ustar00rootroot00000000000000 * * 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\InactiveScopeException; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; 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 IntrospectableContainerInterface { /** * @var ParameterBagInterface */ protected $parameterBag; protected $services = array(); protected $methodMap = array(); protected $aliases = array(); protected $scopes = array(); protected $scopeChildren = array(); protected $scopedServices = array(); protected $scopeStacks = array(); protected $loading = array(); private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_'); /** * Constructor. * * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance */ public function __construct(ParameterBagInterface $parameterBag = null) { $this->parameterBag = $parameterBag ?: new ParameterBag(); } /** * 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 * @param string $scope The scope of the service * * @throws RuntimeException When trying to set a service in an inactive scope * @throws InvalidArgumentException When trying to set a service in the prototype scope */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { if (self::SCOPE_PROTOTYPE === $scope) { throw new InvalidArgumentException(sprintf('You cannot set service "%s" of scope "prototype".', $id)); } $id = strtolower($id); if ('service_container' === $id) { // BC: 'service_container' is no longer a self-reference but always // $this, so ignore this call. // @todo Throw InvalidArgumentException in next major release. return; } if (self::SCOPE_CONTAINER !== $scope) { if (!isset($this->scopedServices[$scope])) { throw new RuntimeException(sprintf('You cannot set service "%s" of inactive scope.', $id)); } $this->scopedServices[$scope][$id] = $service; } if (isset($this->aliases[$id])) { unset($this->aliases[$id]); } $this->services[$id] = $service; if (method_exists($this, $method = 'synchronize'.strtr($id, $this->underscoreMap).'Service')) { $this->$method(); } if (null === $service) { if (self::SCOPE_CONTAINER !== $scope) { unset($this->scopedServices[$scope][$id]); } unset($this->services[$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) { for ($i = 2;;) { if ('service_container' === $id || isset($this->aliases[$id]) || isset($this->services[$id]) || array_key_exists($id, $this->services) ) { return true; } if (--$i && $id !== $lcId = strtolower($id)) { $id = $lcId; } else { return method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service'); } } } /** * 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]) || array_key_exists($id, $this->services)) { 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 (method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) { // $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->services as $key => $associatedService) { $lev = levenshtein($id, $key); if ($lev <= strlen($id) / 3 || false !== strpos($key, $id)) { $alternatives[] = $key; } } throw new ServiceNotFoundException($id, null, null, $alternatives); } return; } $this->loading[$id] = true; try { $service = $this->$method(); } catch (\Exception $e) { unset($this->loading[$id]); unset($this->services[$id]); if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { return; } throw $e; } 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) { // BC: 'service_container' was a synthetic service previously. // @todo Change to false in next major release. return true; } if (isset($this->aliases[$id])) { $id = $this->aliases[$id]; } return isset($this->services[$id]) || array_key_exists($id, $this->services); } /** * Gets all service ids. * * @return array An array of all defined service ids */ public function getServiceIds() { $ids = array(); $r = new \ReflectionClass($this); foreach ($r->getMethods() as $method) { if (preg_match('/^get(.+)Service$/', $method->name, $match)) { $ids[] = self::underscore($match[1]); } } $ids[] = 'service_container'; return array_unique(array_merge($ids, array_keys($this->services))); } /** * This is called when you enter a scope. * * @param string $name * * @throws RuntimeException When the parent scope is inactive * @throws InvalidArgumentException When the scope does not exist */ public function enterScope($name) { if (!isset($this->scopes[$name])) { throw new InvalidArgumentException(sprintf('The scope "%s" does not exist.', $name)); } if (self::SCOPE_CONTAINER !== $this->scopes[$name] && !isset($this->scopedServices[$this->scopes[$name]])) { throw new RuntimeException(sprintf('The parent scope "%s" must be active when entering this scope.', $this->scopes[$name])); } // check if a scope of this name is already active, if so we need to // remove all services of this scope, and those of any of its child // scopes from the global services map if (isset($this->scopedServices[$name])) { $services = array($this->services, $name => $this->scopedServices[$name]); unset($this->scopedServices[$name]); foreach ($this->scopeChildren[$name] as $child) { if (isset($this->scopedServices[$child])) { $services[$child] = $this->scopedServices[$child]; unset($this->scopedServices[$child]); } } // update global map $this->services = call_user_func_array('array_diff_key', $services); array_shift($services); // add stack entry for this scope so we can restore the removed services later if (!isset($this->scopeStacks[$name])) { $this->scopeStacks[$name] = new \SplStack(); } $this->scopeStacks[$name]->push($services); } $this->scopedServices[$name] = array(); } /** * This is called to leave the current scope, and move back to the parent * scope. * * @param string $name The name of the scope to leave * * @throws InvalidArgumentException if the scope is not active */ public function leaveScope($name) { if (!isset($this->scopedServices[$name])) { throw new InvalidArgumentException(sprintf('The scope "%s" is not active.', $name)); } // remove all services of this scope, or any of its child scopes from // the global service map $services = array($this->services, $this->scopedServices[$name]); unset($this->scopedServices[$name]); foreach ($this->scopeChildren[$name] as $child) { if (isset($this->scopedServices[$child])) { $services[] = $this->scopedServices[$child]; unset($this->scopedServices[$child]); } } // update global map $this->services = call_user_func_array('array_diff_key', $services); // check if we need to restore services of a previous scope of this type if (isset($this->scopeStacks[$name]) && count($this->scopeStacks[$name]) > 0) { $services = $this->scopeStacks[$name]->pop(); $this->scopedServices += $services; if ($this->scopeStacks[$name]->isEmpty()) { unset($this->scopeStacks[$name]); } foreach ($services as $array) { foreach ($array as $id => $service) { $this->set($id, $service, $name); } } } } /** * Adds a scope to the container. * * @param ScopeInterface $scope * * @throws InvalidArgumentException */ public function addScope(ScopeInterface $scope) { $name = $scope->getName(); $parentScope = $scope->getParentName(); if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) { throw new InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name)); } if (isset($this->scopes[$name])) { throw new InvalidArgumentException(sprintf('A scope with name "%s" already exists.', $name)); } if (self::SCOPE_CONTAINER !== $parentScope && !isset($this->scopes[$parentScope])) { throw new InvalidArgumentException(sprintf('The parent scope "%s" does not exist, or is invalid.', $parentScope)); } $this->scopes[$name] = $parentScope; $this->scopeChildren[$name] = array(); // normalize the child relations while ($parentScope !== self::SCOPE_CONTAINER) { $this->scopeChildren[$parentScope][] = $name; $parentScope = $this->scopes[$parentScope]; } } /** * Returns whether this container has a certain scope. * * @param string $name The name of the scope * * @return bool */ public function hasScope($name) { return isset($this->scopes[$name]); } /** * Returns whether this scope is currently active. * * This does not actually check if the passed scope actually exists. * * @param string $name * * @return bool */ public function isScopeActive($name) { return isset($this->scopedServices[$name]); } /** * 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))); } } src/Symfony/Component/DependencyInjection/ContainerAware.php000066400000000000000000000014451266465517700246360ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; /** * A simple implementation of ContainerAwareInterface. * * @author Fabien Potencier */ abstract class ContainerAware implements ContainerAwareInterface { /** * @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; } } src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php000066400000000000000000000012541266465517700264550ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php000066400000000000000000000013401266465517700256340ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/DependencyInjection/ContainerBuilder.php000066400000000000000000001025361266465517700251700ustar00rootroot00000000000000 * * 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\InactiveScopeException; 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\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 Definition[] */ private $obsoleteDefinitions = 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(); /** * 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 ContainerBuilder The current instance */ 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 ContainerBuilder The current instance */ 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 ContainerBuilder The current instance */ 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 ContainerBuilder The current instance */ 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 ContainerBuilder The current instance * * @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 * * @return ContainerBuilder The current instance */ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) { $this->getCompiler()->addPass($pass, $type); $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; } /** * Returns all Scopes. * * @return array An array of scopes */ public function getScopes() { return $this->scopes; } /** * Returns all Scope children. * * @return array An array of scope children. */ public function getScopeChildren() { return $this->scopeChildren; } /** * Sets a service. * * @param string $id The service identifier * @param object $service The service instance * @param string $scope The scope * * @throws BadMethodCallException When this ContainerBuilder is frozen */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { $id = strtolower($id); if ($this->isFrozen()) { // setting a synthetic service on a frozen container is alright if ( (!isset($this->definitions[$id]) && !isset($this->obsoleteDefinitions[$id])) || (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic()) || (isset($this->obsoleteDefinitions[$id]) && !$this->obsoleteDefinitions[$id]->isSynthetic()) ) { throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id)); } } if (isset($this->definitions[$id])) { $this->obsoleteDefinitions[$id] = $this->definitions[$id]; } unset($this->definitions[$id], $this->aliasDefinitions[$id]); parent::set($id, $service, $scope); if (isset($this->obsoleteDefinitions[$id]) && $this->obsoleteDefinitions[$id]->isSynchronized(false)) { $this->synchronize($id); } } /** * 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 (!array_key_exists($id, $this->definitions) && isset($this->aliasDefinitions[$id])) { return $this->get($this->aliasDefinitions[$id]); } 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); } catch (\Exception $e) { unset($this->loading[$id]); if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { return; } throw $e; } 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)); } } /** * 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); if ($this->trackResources) { foreach ($this->definitions as $definition) { if ($definition->isLazy() && ($class = $definition->getClass()) && class_exists($class)) { $this->addClassResource(new \ReflectionClass($class)); } } } $this->extensionConfigs = array(); parent::compile(); } /** * 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 array_key_exists(strtolower($id), $this->definitions); } /** * 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 (!array_key_exists($id, $this->definitions)) { 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 scope is inactive * @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 * * @internal this method is public because of PHP 5.3 limitations, do not use it explicitly in your code */ public function createService(Definition $definition, $id, $tryProxy = true) { 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 ($tryProxy && $definition->isLazy()) { $container = $this; $proxy = $this ->getProxyInstantiator() ->instantiateProxy( $container, $definition, $id, function () use ($definition, $id, $container) { return $container->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); } elseif (null !== $definition->getFactoryMethod(false)) { if (null !== $definition->getFactoryClass(false)) { $factory = $parameterBag->resolveValue($definition->getFactoryClass(false)); } elseif (null !== $definition->getFactoryService(false)) { $factory = $this->get($parameterBag->resolveValue($definition->getFactoryService(false))); } else { throw new RuntimeException(sprintf('Cannot create service "%s" from factory method without a factory service or factory class.', $id)); } $service = call_user_func_array(array($factory, $definition->getFactoryMethod(false)), $arguments); } else { $r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass())); $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments); } if ($tryProxy || !$definition->isLazy()) { // share only if proxying failed, or if not a proxy $this->shareService($definition, $service, $id); } foreach ($definition->getMethodCalls() as $call) { $this->callMethod($service, $call); } $properties = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties()))); foreach ($properties as $name => $value) { $service->$name = $value; } 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) { $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); } public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) { $this->expressionLanguageProviders[] = $provider; } /** * @return ExpressionFunctionProviderInterface[] */ public function getExpressionLanguageProviders() { return $this->expressionLanguageProviders; } /** * 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; } /** * Synchronizes a service change. * * This method updates all services that depend on the given * service by calling all methods referencing it. * * @param string $id A service id * * @deprecated since version 2.7, will be removed in 3.0. */ private function synchronize($id) { if ('request' !== $id) { @trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED); } foreach ($this->definitions as $definitionId => $definition) { // only check initialized services if (!$this->initialized($definitionId)) { continue; } foreach ($definition->getMethodCalls() as $call) { foreach ($call[1] as $argument) { if ($argument instanceof Reference && $id == (string) $argument) { $this->callMethod($this->get($definitionId), $call); } } } } } 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 $id * * @throws InactiveScopeException */ private function shareService(Definition $definition, $service, $id) { if (self::SCOPE_PROTOTYPE !== $scope = $definition->getScope()) { if (self::SCOPE_CONTAINER !== $scope && !isset($this->scopedServices[$scope])) { throw new InactiveScopeException($id, $scope); } $this->services[$lowerId = strtolower($id)] = $service; if (self::SCOPE_CONTAINER !== $scope) { $this->scopedServices[$scope][$lowerId] = $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; } } src/Symfony/Component/DependencyInjection/ContainerInterface.php000066400000000000000000000067121266465517700255010ustar00rootroot00000000000000 * * 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; const SCOPE_CONTAINER = 'container'; const SCOPE_PROTOTYPE = 'prototype'; /** * Sets a service. * * @param string $id The service identifier * @param object $service The service instance * @param string $scope The scope of the service */ public function set($id, $service, $scope = self::SCOPE_CONTAINER); /** * 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); /** * 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); /** * Enters the given scope. * * @param string $name */ public function enterScope($name); /** * Leaves the current scope, and re-enters the parent scope. * * @param string $name */ public function leaveScope($name); /** * Adds a scope to the container. * * @param ScopeInterface $scope */ public function addScope(ScopeInterface $scope); /** * Whether this container has the given scope. * * @param string $name * * @return bool */ public function hasScope($name); /** * Determines whether the given scope is currently active. * * It does however not check if the scope actually exists. * * @param string $name * * @return bool */ public function isScopeActive($name); } src/Symfony/Component/DependencyInjection/Definition.php000066400000000000000000000430041266465517700240210ustar00rootroot00000000000000 * * 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 $factoryClass; private $factoryMethod; private $factoryService; private $scope = ContainerInterface::SCOPE_CONTAINER; private $properties = array(); private $calls = array(); private $configurator; private $tags = array(); private $public = true; private $synthetic = false; private $abstract = false; private $synchronized = false; private $lazy = false; private $decoratedService; protected $arguments; /** * Constructor. * * @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 Definition The current instance */ 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 name of the class that acts as a factory using the factory method, * which will be invoked statically. * * @param string $factoryClass The factory class name * * @return Definition The current instance * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryClass($factoryClass) { @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED); $this->factoryClass = $factoryClass; return $this; } /** * Gets the factory class. * * @return string|null The factory class name * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryClass($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); } return $this->factoryClass; } /** * Sets the factory method able to create an instance of this class. * * @param string $factoryMethod The factory method name * * @return Definition The current instance * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryMethod($factoryMethod) { @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED); $this->factoryMethod = $factoryMethod; return $this; } /** * 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 * * @return Definition The current instance * * @throws InvalidArgumentException In case the decorated service id and the new decorated service id are equals. */ public function setDecoratedService($id, $renamedId = null) { 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); } return $this; } /** * Gets the service that decorates this service. * * @return null|array An array composed of the decorated service id and the new id for it, null if no service is decorated */ public function getDecoratedService() { return $this->decoratedService; } /** * Gets the factory method. * * @return string|null The factory method name * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryMethod($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); } return $this->factoryMethod; } /** * Sets the name of the service that acts as a factory using the factory method. * * @param string $factoryService The factory service id * * @return Definition The current instance * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryService($factoryService, $triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED); } $this->factoryService = $factoryService; return $this; } /** * Gets the factory service id. * * @return string|null The factory service id * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryService($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); } return $this->factoryService; } /** * Sets the service class. * * @param string $class The service class * * @return Definition The current instance */ 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 Definition The current instance */ 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 Definition The current instance */ public function addArgument($argument) { $this->arguments[] = $argument; return $this; } /** * Sets a specific argument. * * @param int $index * @param mixed $argument * * @return Definition The current instance * * @throws OutOfBoundsException When the replaced argument does not exist */ public function replaceArgument($index, $argument) { 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 Definition The current instance */ 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 Definition The current instance * * @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 Definition The current instance */ 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 Definition the current instance */ 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 Definition The current instance */ 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 Definition */ public function clearTag($name) { unset($this->tags[$name]); return $this; } /** * Clears the tags for this definition. * * @return Definition The current instance */ 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 Definition The current instance */ 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 the scope of the service. * * @param string $scope Whether the service must be shared or not * * @return Definition The current instance */ public function setScope($scope) { $this->scope = $scope; return $this; } /** * Returns the scope of the service. * * @return string */ public function getScope() { return $this->scope; } /** * Sets the visibility of this service. * * @param bool $boolean * * @return Definition The current instance */ 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 synchronized flag of this service. * * @param bool $boolean * * @return Definition The current instance * * @deprecated since version 2.7, will be removed in 3.0. */ public function setSynchronized($boolean, $triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); } $this->synchronized = (bool) $boolean; return $this; } /** * Whether this service is synchronized. * * @return bool * * @deprecated since version 2.7, will be removed in 3.0. */ public function isSynchronized($triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); } return $this->synchronized; } /** * Sets the lazy flag of this service. * * @param bool $lazy * * @return Definition The current instance */ 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 Definition the current instance */ 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 Definition the current instance */ 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; } /** * Sets a configurator to call after the service is fully initialized. * * @param callable $callable A PHP callable * * @return Definition The current instance */ public function setConfigurator($callable) { $this->configurator = $callable; 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; } } src/Symfony/Component/DependencyInjection/DefinitionDecorator.php000066400000000000000000000114411266465517700256640ustar00rootroot00000000000000 * * 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(); /** * Constructor. * * @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 setFactoryClass($class) { $this->changes['factory_class'] = true; return parent::setFactoryClass($class); } /** * {@inheritdoc} */ public function setFactoryMethod($method) { $this->changes['factory_method'] = true; return parent::setFactoryMethod($method); } /** * {@inheritdoc} */ public function setFactoryService($service, $triggerDeprecationError = true) { $this->changes['factory_service'] = true; return parent::setFactoryService($service, $triggerDeprecationError); } /** * {@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) { $this->changes['decorated_service'] = true; return parent::setDecoratedService($id, $renamedId); } /** * 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 DefinitionDecorator the current instance * * @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; } } src/Symfony/Component/DependencyInjection/Dumper/000077500000000000000000000000001266465517700224535ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Dumper/Dumper.php000066400000000000000000000014151266465517700244210ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @param ContainerBuilder $container The service container to dump */ public function __construct(ContainerBuilder $container) { $this->container = $container; } } src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php000066400000000000000000000012771266465517700262500ustar00rootroot00000000000000 * * 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()); } src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php000066400000000000000000000236331266465517700261420ustar00rootroot00000000000000 * * 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\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Scope; /** * 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->startDot().$this->addNodes().$this->addEdges().$this->endDot(); } /** * 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, $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' => ContainerInterface::SCOPE_PROTOTYPE !== $definition->getScope() ? 'filled' : 'dotted'))); $container->setDefinition($id, new Definition('stdClass')); } foreach ($container->getServiceIds() as $id) { $service = $container->get($id); if (array_key_exists($id, $container->getAliases())) { continue; } if (!$container->hasDefinition($id)) { $class = ('service_container' === $id) ? get_class($this->container) : get_class($service); $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->getScopes() as $scope => $parentScope) { $container->addScope(new Scope($scope, $parentScope)); } 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($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($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; } } src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php000066400000000000000000001523021266465517700250730ustar00rootroot00000000000000 * * 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\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\ExpressionLanguage\ExpressionFunctionProviderInterface; /** * 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; /** * @var ExpressionFunctionProviderInterface[] */ private $expressionLanguageProviders = array(); /** * @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 */ public function dump(array $options = array()) { $this->targetDirRegex = null; $options = array_merge(array( 'class' => 'ProjectServiceContainer', 'base_class' => 'Container', 'namespace' => '', ), $options); 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(); } else { $code .= $this->addConstructor(); } $code .= $this->addServices(). $this->addDefaultParametersMethod(). $this->endClass(). $this->addProxyClasses() ; $this->targetDirRegex = null; 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 = ''; foreach ($definitions as $definition) { $code .= "\n".$this->getProxyDumper()->getProxyCode($definition); } return $code; } /** * Generates the require_once statement for service includes. * * @param string $id The service id * @param Definition $definition * * @return string */ private function addServiceInclude($id, $definition) { $template = " require_once %s;\n"; $code = ''; if (null !== $file = $definition->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($id, $sDefinition, '$'.$name, ' = '); if (!$this->hasReference($id, $sDefinition->getMethodCalls(), true) && !$this->hasReference($id, $sDefinition->getProperties(), true)) { $code .= $this->addServiceMethodCalls(null, $sDefinition, $name); $code .= $this->addServiceProperties(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) { $class = $definition->getClass(); if ('\\' === substr($class, 0, 1)) { $class = substr($class, 1); } $class = $this->dumpValue($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 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 && ContainerInterface::SCOPE_CONTAINER === $definition->getScope()) { $instantiation = "\$this->services['$id'] = ".($simple ? '' : '$instance'); } elseif (!$isProxyCandidate && ContainerInterface::SCOPE_PROTOTYPE !== $scope = $definition->getScope()) { $instantiation = "\$this->services['$id'] = \$this->scopedServices['$scope']['$id'] = ".($simple ? '' : '$instance'); } elseif (!$simple) { $instantiation = '$instance'; } $return = ''; if ($simple) { $return = 'return '; } else { $instantiation .= ' = '; } $code = $this->addNewInstance($id, $definition, $return, $instantiation); 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) { 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, $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, $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) { $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->addServiceMethodCalls(null, $iDefinition, $name); $code .= $this->addServiceProperties(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, $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 (strpos($class, "'") === 0) { return sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $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) { $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()) { $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]); } } } elseif ($definition->getFactoryClass(false)) { $return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryClass(false), $definition->getFactoryMethod(false)); } elseif ($definition->getFactoryService(false)) { $return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryService(false), $definition->getFactoryMethod(false)); } $scope = $definition->getScope(); if (!in_array($scope, array(ContainerInterface::SCOPE_CONTAINER, ContainerInterface::SCOPE_PROTOTYPE))) { if ($return && 0 === strpos($return[count($return) - 1], '@return')) { $return[] = ''; } $return[] = sprintf("@throws InactiveScopeException when the '%s' service is requested while the '%s' scope is not active", $id, $scope); } $return = implode("\n * ", $return); $doc = ''; if (ContainerInterface::SCOPE_PROTOTYPE !== $scope) { $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->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'; $code = <<camelize($id)}Service($lazyInitialization) { EOF; $code .= $isProxyCandidate ? $this->getProxyDumper()->getProxyFactoryCode($definition, $id) : ''; if (!in_array($scope, array(ContainerInterface::SCOPE_CONTAINER, ContainerInterface::SCOPE_PROTOTYPE))) { $code .= <<scopedServices['$scope'])) { throw new InactiveScopeException('$id', '$scope'); } EOF; } 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 { $code .= $this->addServiceInclude($id, $definition). $this->addServiceLocalTempVariables($id, $definition). $this->addServiceInlinedDefinitions($id, $definition). $this->addServiceInstance($id, $definition). $this->addServiceInlinedDefinitionsSetup($id, $definition). $this->addServiceMethodCalls($id, $definition). $this->addServiceProperties($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 = $synchronizers = ''; $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); } $synchronizers .= $this->addServiceSynchronizer($id, $definition); } return $publicServices.$synchronizers.$privateServices; } /** * Adds synchronizer methods. * * @param string $id A service identifier * @param Definition $definition A Definition instance * * @return string|null * * @deprecated since version 2.7, will be removed in 3.0. */ private function addServiceSynchronizer($id, Definition $definition) { if (!$definition->isSynchronized(false)) { return; } if ('request' !== $id) { @trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED); } $code = ''; foreach ($this->container->getDefinitions() as $definitionId => $definition) { foreach ($definition->getMethodCalls() as $call) { foreach ($call[1] as $argument) { if ($argument instanceof Reference && $id == (string) $argument) { $arguments = array(); foreach ($call[1] as $value) { $arguments[] = $this->dumpValue($value); } $call = $this->wrapServiceConditionals($call[1], sprintf("\$this->get('%s')->%s(%s);", $definitionId, $call[0], implode(', ', $arguments))); $code .= <<initialized('$definitionId')) { $call } EOF; } } } } if (!$code) { return; } return <<camelize($id)}Service() { $code } EOF; } private function addNewInstance($id, Definition $definition, $return, $instantiation) { $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 (strpos($class, "'") === 0) { return sprintf(" $return{$instantiation}%s::%s(%s);\n", $this->dumpLiteralClass($class), $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", $callable, $arguments ? implode(', ', $arguments) : ''); } elseif (null !== $definition->getFactoryMethod(false)) { if (null !== $definition->getFactoryClass(false)) { $class = $this->dumpValue($definition->getFactoryClass(false)); // If the class is a string we can optimize call_user_func away if (strpos($class, "'") === 0) { return sprintf(" $return{$instantiation}%s::%s(%s);\n", $this->dumpLiteralClass($class), $definition->getFactoryMethod(false), $arguments ? implode(', ', $arguments) : ''); } return sprintf(" $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($definition->getFactoryClass(false)), $definition->getFactoryMethod(false), $arguments ? ', '.implode(', ', $arguments) : ''); } if (null !== $definition->getFactoryService(false)) { return sprintf(" $return{$instantiation}%s->%s(%s);\n", $this->getServiceCall($definition->getFactoryService(false)), $definition->getFactoryMethod(false), implode(', ', $arguments)); } throw new RuntimeException(sprintf('Factory method requires a factory service or factory class in service definition for %s', $id)); } 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 <<exportTargetDirs(); $arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null; $code = <<container->getScopes()) > 0) { $code .= "\n"; $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n"; } $code .= $this->addMethodMap(); $code .= $this->addAliases(); $code .= <<<'EOF' } EOF; return $code; } /** * Adds the constructor for a frozen container. * * @return string */ private function addFrozenConstructor() { $targetDirs = $this->exportTargetDirs(); $code = <<container->getParameterBag()->all()) { $code .= "\n \$this->parameters = \$this->getDefaultParameters();\n"; } $code .= <<<'EOF' $this->services = $this->scopedServices = $this->scopeStacks = array(); EOF; $code .= "\n"; if (count($scopes = $this->container->getScopes()) > 0) { $code .= ' $this->scopes = '.$this->dumpValue($scopes).";\n"; $code .= ' $this->scopeChildren = '.$this->dumpValue($this->container->getScopeChildren()).";\n"; } else { $code .= " \$this->scopes = array();\n"; $code .= " \$this->scopeChildren = array();\n"; } $code .= $this->addMethodMap(); $code .= $this->addAliases(); $code .= <<<'EOF' } EOF; return $code; } /** * Adds the constructor for a frozen container. * * @return string */ private function addFrozenCompile() { return <<container->getDefinitions()) { return ''; } $code = " \$this->methodMap = array(\n"; ksort($definitions); foreach ($definitions as $id => $definition) { $code .= ' '.var_export($id, true).' => '.var_export('get'.$this->camelize($id).'Service', true).",\n"; } return $code." );\n"; } /** * Adds the aliases property definition. * * @return string */ private function addAliases() { if (!$aliases = $this->container->getAliases()) { if ($this->container->isFrozen()) { return "\n \$this->aliases = array();\n"; } else { return ''; } } $code = " \$this->aliases = array(\n"; ksort($aliases); foreach ($aliases as $alias => $id) { $id = (string) $id; while (isset($aliases[$id])) { $id = (string) $aliases[$id]; } $code .= ' '.var_export($alias, true).' => '.var_export($id, true).",\n"; } return $code." );\n"; } /** * Adds default parameters method. * * @return string */ private function addDefaultParametersMethod() { if (!$this->container->getParameterBag()->all()) { return ''; } $parameters = $this->exportParameters($this->container->getParameterBag()->all()); $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))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } return $this->parameters[$name]; } /** * {@inheritdoc} */ public function hasParameter($name) { $name = strtolower($name); return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); } /** * {@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) { $this->parameterBag = new FrozenParameterBag($this->parameters); } return $this->parameterBag; } EOF; } $code .= << $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), var_export($key, true), $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])) { $visited[$argumentId] = true; $service = $this->container->getDefinition($argumentId); $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)', $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'); } if (null !== $value->getFactoryMethod(false)) { if (null !== $value->getFactoryClass(false)) { return sprintf("call_user_func(array(%s, '%s')%s)", $this->dumpValue($value->getFactoryClass(false)), $value->getFactoryMethod(false), count($arguments) > 0 ? ', '.implode(', ', $arguments) : ''); } elseif (null !== $value->getFactoryService(false)) { $service = $this->dumpValue($value->getFactoryService(false)); return sprintf('%s->%s(%s)', 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService(false)), $value->getFactoryMethod(false), implode(', ', $arguments)); } else { throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.'); } } $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 { $that = $this; $replaceParameters = function ($match) use ($that) { return "'.".$that->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.'); } else { 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, '$')) { throw new RuntimeException('Cannot dump definitions which have a variable class name.'); } 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 */ public 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)); } /** * @deprecated since version 2.6.2, to be removed in 3.0. * Use \Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead. * * @param ExpressionFunctionProviderInterface $provider */ public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED); $this->expressionLanguageProviders[] = $provider; } /** * 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 (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) { return sprintf('$this->get(\'%s\', ContainerInterface::NULL_ON_INVALID_REFERENCE)', $id); } else { if ($this->container->hasAlias($id)) { $id = (string) $this->container->getAlias($id); } return sprintf('$this->get(\'%s\')', $id); } } /** * Convert a service id to a valid PHP method name. * * @param string $id * * @return string * * @throws InvalidArgumentException */ private function camelize($id) { $name = Container::camelize($id); if (!preg_match('/^[a-zA-Z0-9_\x7f-\xff]+$/', $name)) { throw new InvalidArgumentException(sprintf('Service id "%s" cannot be converted to a valid PHP method name.', $id)); } return $name; } /** * 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 = array_merge($this->container->getExpressionLanguageProviders(), $this->expressionLanguageProviders); $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] ? var_export(substr($value, 0, $matches[0][1]), true).'.' : ''; $suffix = $matches[0][1] + strlen($matches[0][0]); $suffix = isset($value[$suffix]) ? '.'.var_export(substr($value, $suffix), true) : ''; $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 var_export($value, true); } } src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php000066400000000000000000000301651266465517700251060ustar00rootroot00000000000000 * * 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 $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->getFactoryMethod(false)) { $service->setAttribute('factory-method', $definition->getFactoryMethod(false)); } if ($definition->getFactoryClass(false)) { $service->setAttribute('factory-class', $definition->getFactoryClass(false)); } if ($definition->getFactoryService(false)) { $service->setAttribute('factory-service', $definition->getFactoryService(false)); } if (ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope()) { $service->setAttribute('scope', $scope); } if (!$definition->isPublic()) { $service->setAttribute('public', 'false'); } if ($definition->isSynthetic()) { $service->setAttribute('synthetic', 'true'); } if ($definition->isSynchronized(false)) { $service->setAttribute('synchronized', 'true'); } if ($definition->isLazy()) { $service->setAttribute('lazy', 'true'); } if (null !== $decorated = $definition->getDecoratedService()) { list($decorated, $renamedId) = $decorated; $service->setAttribute('decorates', $decorated); if (null !== $renamedId) { $service->setAttribute('decoration-inner-name', $renamedId); } } 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 ($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($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'); } if (!$value->isStrict()) { $element->setAttribute('strict', 'false'); } } 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($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; } } } src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php000066400000000000000000000236441266465517700252540ustar00rootroot00000000000000 * * 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->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->isSynchronized(false)) { $code .= sprintf(" synchronized: true\n"); } if ($definition->getFactoryClass(false)) { $code .= sprintf(" factory_class: %s\n", $this->dumper->dump($definition->getFactoryClass(false))); } if ($definition->isLazy()) { $code .= sprintf(" lazy: true\n"); } if ($definition->getFactoryMethod(false)) { $code .= sprintf(" factory_method: %s\n", $this->dumper->dump($definition->getFactoryMethod(false))); } if ($definition->getFactoryService(false)) { $code .= sprintf(" factory_service: %s\n", $this->dumper->dump($definition->getFactoryService(false))); } 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 (ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope()) { $code .= sprintf(" scope: %s\n", $this->dumper->dump($scope)); } if (null !== $decorated = $definition->getDecoratedService()) { list($decorated, $renamedId) = $decorated; $code .= sprintf(" decorates: %s\n", $decorated); if (null !== $renamedId) { $code .= sprintf(" decoration_inner_name: %s\n", $renamedId); } } 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", $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($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($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; } } src/Symfony/Component/DependencyInjection/Exception/000077500000000000000000000000001266465517700231555ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Exception/BadMethodCallException.php000066400000000000000000000007241266465517700301730ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/ExceptionInterface.php000066400000000000000000000010021266465517700274360ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/InactiveScopeException.php000066400000000000000000000017561266465517700303120ustar00rootroot00000000000000 * * 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 you try to create a service of an inactive scope. * * @author Johannes M. Schmitt */ class InactiveScopeException extends RuntimeException { private $serviceId; private $scope; public function __construct($serviceId, $scope, \Exception $previous = null) { parent::__construct(sprintf('You cannot create a service ("%s") of an inactive scope ("%s").', $serviceId, $scope), 0, $previous); $this->serviceId = $serviceId; $this->scope = $scope; } public function getServiceId() { return $this->serviceId; } public function getScope() { return $this->scope; } } src/Symfony/Component/DependencyInjection/Exception/InvalidArgumentException.php000066400000000000000000000010311266465517700306310ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/LogicException.php000066400000000000000000000006741266465517700266110ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/OutOfBoundsException.php000066400000000000000000000007161266465517700277600ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php000066400000000000000000000016401266465517700327720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php000066400000000000000000000053021266465517700311420ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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 */ public function __construct($key, $sourceId = null, $sourceKey = null, \Exception $previous = null, array $alternatives = array()) { $this->key = $key; $this->sourceId = $sourceId; $this->sourceKey = $sourceKey; $this->alternatives = $alternatives; 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).'"?'; } } 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(); } } src/Symfony/Component/DependencyInjection/Exception/RuntimeException.php000066400000000000000000000007731266465517700271770ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/DependencyInjection/Exception/ScopeCrossingInjectionException.php000066400000000000000000000036451266465517700322010ustar00rootroot00000000000000 * * 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 the a scope crossing injection is detected. * * @author Johannes M. Schmitt */ class ScopeCrossingInjectionException extends RuntimeException { private $sourceServiceId; private $sourceScope; private $destServiceId; private $destScope; public function __construct($sourceServiceId, $sourceScope, $destServiceId, $destScope, \Exception $previous = null) { parent::__construct(sprintf( 'Scope Crossing Injection detected: The definition "%s" references the service "%s" which belongs to another scope hierarchy. ' .'This service might not be available consistently. Generally, it is safer to either move the definition "%s" to scope "%s", or ' .'declare "%s" as a child scope of "%s". If you can be sure that the other scope is always active, you can set the reference to strict=false to get rid of this error.', $sourceServiceId, $destServiceId, $sourceServiceId, $destScope, $sourceScope, $destScope ), 0, $previous); $this->sourceServiceId = $sourceServiceId; $this->sourceScope = $sourceScope; $this->destServiceId = $destServiceId; $this->destScope = $destScope; } public function getSourceServiceId() { return $this->sourceServiceId; } public function getSourceScope() { return $this->sourceScope; } public function getDestServiceId() { return $this->destServiceId; } public function getDestScope() { return $this->destScope; } } src/Symfony/Component/DependencyInjection/Exception/ScopeWideningInjectionException.php000066400000000000000000000036271266465517700321560ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Exception; /** * Thrown when a scope widening injection is detected. * * @author Johannes M. Schmitt */ class ScopeWideningInjectionException extends RuntimeException { private $sourceServiceId; private $sourceScope; private $destServiceId; private $destScope; public function __construct($sourceServiceId, $sourceScope, $destServiceId, $destScope, \Exception $previous = null) { parent::__construct(sprintf( 'Scope Widening Injection detected: The definition "%s" references the service "%s" which belongs to a narrower scope. ' .'Generally, it is safer to either move "%s" to scope "%s" or alternatively rely on the provider pattern by injecting the container itself, and requesting the service "%s" each time it is needed. ' .'In rare, special cases however that might not be necessary, then you can set the reference to strict=false to get rid of this error.', $sourceServiceId, $destServiceId, $sourceServiceId, $destScope, $destServiceId ), 0, $previous); $this->sourceServiceId = $sourceServiceId; $this->sourceScope = $sourceScope; $this->destServiceId = $destServiceId; $this->destScope = $destScope; } public function getSourceServiceId() { return $this->sourceServiceId; } public function getSourceScope() { return $this->sourceScope; } public function getDestServiceId() { return $this->destServiceId; } public function getDestScope() { return $this->destScope; } } src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php000066400000000000000000000017631266465517700324600ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php000066400000000000000000000026751266465517700306340ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/DependencyInjection/ExpressionLanguage.php000066400000000000000000000017051266465517700255360ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php000066400000000000000000000024501266465517700272470ustar00rootroot00000000000000 * * 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); }), ); } } src/Symfony/Component/DependencyInjection/Extension/000077500000000000000000000000001266465517700231735ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php000066400000000000000000000017321266465517700322340ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/Extension/Extension.php000066400000000000000000000072651266465517700256720ustar00rootroot00000000000000 * * 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 { /** * Returns the base path for the XSD files. * * @return string The XSD base path */ public function getXsdValidationBasePath() { return false; } /** * Returns the namespace to be used for this extension (XML namespace). * * @return string The XML namespace */ 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']); } } src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php000066400000000000000000000026721266465517700275100ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php000066400000000000000000000011151266465517700310150ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php000066400000000000000000000014641266465517700303770ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; /** * IntrospectableContainerInterface defines additional introspection functionality * for containers, allowing logic to be implemented based on a Container's state. * * @author Evan Villemez */ interface IntrospectableContainerInterface extends ContainerInterface { /** * 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); } src/Symfony/Component/DependencyInjection/LICENSE000066400000000000000000000020511266465517700222220ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/DependencyInjection/LazyProxy/000077500000000000000000000000001266465517700232005ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/000077500000000000000000000000001266465517700256575ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/InstantiatorInterface.php000066400000000000000000000025121266465517700326700ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/LazyProxy/Instantiator/RealServiceInstantiator.php000066400000000000000000000015561266465517700332030ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/000077500000000000000000000000001266465517700251045ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php000066400000000000000000000024331266465517700306740ustar00rootroot00000000000000 * * 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 * * @return string */ public function getProxyFactoryCode(Definition $definition, $id); /** * Generates the code for the lazy proxy. * * @param Definition $definition * * @return string */ public function getProxyCode(Definition $definition); } src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php000066400000000000000000000016641266465517700277130ustar00rootroot00000000000000 * * 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 ''; } } src/Symfony/Component/DependencyInjection/Loader/000077500000000000000000000000001266465517700224255ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php000066400000000000000000000022401266465517700256770ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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; } } src/Symfony/Component/DependencyInjection/Loader/FileLoader.php000066400000000000000000000020541266465517700251450ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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); } } src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php000066400000000000000000000026271266465517700256130ustar00rootroot00000000000000 * * 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\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)); $result = parse_ini_file($path, true); if (false === $result || array() === $result) { throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource)); } if (isset($result['parameters']) && is_array($result['parameters'])) { foreach ($result['parameters'] as $key => $value) { $this->container->setParameter($key, $value); } } } /** * {@inheritdoc} */ public function supports($resource, $type = null) { return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION); } } src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php000066400000000000000000000023461266465517700256210ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php000066400000000000000000000506041266465517700256320ustar00rootroot00000000000000 * * 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')) { $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', 'scope', 'public', 'factory-class', 'factory-method', 'factory-service', 'synthetic', 'lazy', 'abstract') as $key) { if ($value = $service->getAttribute($key)) { if (in_array($key, array('factory-class', 'factory-method', 'factory-service'))) { @trigger_error(sprintf('The "%s" attribute of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, (string) $service->getAttribute('id'), $file), E_USER_DEPRECATED); } $method = 'set'.str_replace('-', '', $key); $definition->$method(XmlUtils::phpize($value)); } } if ($value = $service->getAttribute('synchronized')) { $triggerDeprecation = 'request' !== (string) $service->getAttribute('id'); if ($triggerDeprecation) { @trigger_error(sprintf('The "synchronized" attribute of service "%s" in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', (string) $service->getAttribute('id'), $file), E_USER_DEPRECATED); } $definition->setSynchronized(XmlUtils::phpize($value), $triggerDeprecation); } if ($files = $this->getChildren($service, 'file')) { $definition->setFile($files[0]->nodeValue); } $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, false); } 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, false); } 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 for BC too $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); } if ($value = $service->getAttribute('decorates')) { $renameId = $service->hasAttribute('decoration-inner-name') ? $service->getAttribute('decoration-inner-name') : null; $definition->setDecoratedService($value, $renameId); } 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 "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); if ($services = $this->getChildren($node, 'service')) { $definitions[$id] = array($node, $file, true); $services[0]->setAttribute('id', $id); } } } // resolve definitions krsort($definitions); foreach ($definitions as $id => $def) { list($domElement, $file, $wild) = $def; // anonymous services are always private // we could not use the constant false here, because of XML parsing $domElement->setAttribute('public', 'false'); 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')); } if (!$arg->hasAttribute('key')) { $key = !$arguments ? 0 : max(array_keys($arguments)) + 1; } else { $key = $arg->getAttribute('key'); } // parameter keys are case insensitive if ('parameter' == $name && $lowercase) { $key = strtolower($key); } // this is used by DefinitionDecorator to overwrite a specific // argument of the parent definition if ($arg->hasAttribute('index')) { $key = 'index_'.$arg->getAttribute('index'); } 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; } if ($strict = $arg->getAttribute('strict')) { $strict = XmlUtils::phpize($strict); } else { $strict = true; } $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior, $strict); 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($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 ; $valid = @$dom->schemaValidateSource($source); foreach ($tmpfiles as $tmpfile) { @unlink($tmpfile); } return $valid; } /** * 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); } } src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php000066400000000000000000000361431266465517700257760ustar00rootroot00000000000000 * * 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\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 $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($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($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 $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)); } if (isset($service['alias'])) { $public = !array_key_exists('public', $service) || (bool) $service['public']; $this->container->setAlias($id, new Alias($service['alias'], $public)); 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['scope'])) { $definition->setScope($service['scope']); } if (isset($service['synthetic'])) { $definition->setSynthetic($service['synthetic']); } if (isset($service['synchronized'])) { @trigger_error(sprintf('The "synchronized" key of service "%s" in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $id, $file), E_USER_DEPRECATED); $definition->setSynchronized($service['synchronized'], 'request' !== $id); } 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 (isset($service['factory'])) { if (is_string($service['factory'])) { if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) { $parts = explode(':', $service['factory']); $definition->setFactory(array($this->resolveServices('@'.$parts[0]), $parts[1])); } else { $definition->setFactory($service['factory']); } } else { $definition->setFactory(array($this->resolveServices($service['factory'][0]), $service['factory'][1])); } } if (isset($service['factory_class'])) { @trigger_error(sprintf('The "factory_class" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED); $definition->setFactoryClass($service['factory_class']); } if (isset($service['factory_method'])) { @trigger_error(sprintf('The "factory_method" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED); $definition->setFactoryMethod($service['factory_method']); } if (isset($service['factory_service'])) { @trigger_error(sprintf('The "factory_service" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED); $definition->setFactoryService($service['factory_service']); } 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'])) { if (is_string($service['configurator'])) { $definition->setConfigurator($service['configurator']); } else { $definition->setConfigurator(array($this->resolveServices($service['configurator'][0]), $service['configurator'][1])); } } 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'])) { $renameId = isset($service['decoration_inner_name']) ? $service['decoration_inner_name'] : null; $definition->setDecoratedService($service['decorates'], $renameId); } $this->container->setDefinition($id, $definition); } /** * 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)); } 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); $strict = false; } else { $strict = true; } if (null !== $invalidBehavior) { $value = new Reference($value, $invalidBehavior, $strict); } } return $value; } /** * Loads from Extensions. * * @param array $content */ private function loadFromExtensions($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); } } } src/Symfony/Component/DependencyInjection/Loader/schema/000077500000000000000000000000001266465517700236655ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Loader/schema/dic/000077500000000000000000000000001266465517700244245ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/000077500000000000000000000000001266465517700262475ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd000066400000000000000000000171111266465517700311070ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Parameter.php000066400000000000000000000013641266465517700236540ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @param string $id The parameter key */ public function __construct($id) { $this->id = $id; } /** * __toString. * * @return string The parameter key */ public function __toString() { return (string) $this->id; } } src/Symfony/Component/DependencyInjection/ParameterBag/000077500000000000000000000000001266465517700235515ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php000066400000000000000000000031301266465517700277750ustar00rootroot00000000000000 * * 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 { /** * Constructor. * * 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.'); } } src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php000066400000000000000000000176731266465517700266320ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @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; } } /** * Gets the service container parameters. * * @return array An array of parameters */ public function all() { return $this->parameters; } /** * 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) { $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; } } throw new ParameterNotFoundException($name, null, null, null, $alternatives); } 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; } /** * 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) { 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)]); } /** * Replaces parameter placeholders (%name%) by their values for all parameters. */ 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 = strtolower($match[1]); if (isset($resolving[$key])) { throw new ParameterCircularReferenceException(array_keys($resolving)); } $resolving[$key] = true; return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving); } $self = $this; return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($self, $resolving, $value) { // skip %% if (!isset($match[1])) { return '%%'; } $key = strtolower($match[1]); if (isset($resolving[$key])) { throw new ParameterCircularReferenceException(array_keys($resolving)); } $resolved = $self->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[$key] = true; return $self->isResolved() ? $resolved : $self->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; } 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; } } src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php000066400000000000000000000051171266465517700304410ustar00rootroot00000000000000 * * 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); /** * 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); } src/Symfony/Component/DependencyInjection/README.md000066400000000000000000000031271266465517700225010ustar00rootroot00000000000000DependencyInjection Component ============================= DependencyInjection manages your services via a robust and flexible Dependency Injection Container. Here is a simple example that shows how to register services and parameters: ```php use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; $sc = new ContainerBuilder(); $sc ->register('foo', '%foo.class%') ->addArgument(new Reference('bar')) ; $sc->setParameter('foo.class', 'Foo'); $sc->get('foo'); ``` Method Calls (Setter Injection): ```php $sc = new ContainerBuilder(); $sc ->register('bar', '%bar.class%') ->addMethodCall('setFoo', array(new Reference('foo'))) ; $sc->setParameter('bar.class', 'Bar'); $sc->get('bar'); ``` Factory Class: If your service is retrieved by calling a static method: ```php $sc = new ContainerBuilder(); $sc ->register('bar', '%bar.class%') ->setFactory(array('%bar.class%', 'getInstance')) ->addArgument('Aarrg!!!') ; $sc->setParameter('bar.class', 'Bar'); $sc->get('bar'); ``` File Include: For some services, especially those that are difficult or impossible to autoload, you may need the container to include a file before instantiating your class. ```php $sc = new ContainerBuilder(); $sc ->register('bar', '%bar.class%') ->setFile('/path/to/file') ->addArgument('Aarrg!!!') ; $sc->setParameter('bar.class', 'Bar'); $sc->get('bar'); ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/DependencyInjection/ $ composer install $ phpunit src/Symfony/Component/DependencyInjection/Reference.php000066400000000000000000000030341266465517700236260ustar00rootroot00000000000000 * * 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; private $strict; /** * Constructor. * * @param string $id The service identifier * @param int $invalidBehavior The behavior when the service does not exist * @param bool $strict Sets how this reference is validated * * @see Container */ public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $strict = true) { $this->id = strtolower($id); $this->invalidBehavior = $invalidBehavior; $this->strict = $strict; } /** * __toString. * * @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; } /** * Returns true when this Reference is strict. * * @return bool */ public function isStrict() { return $this->strict; } } src/Symfony/Component/DependencyInjection/Scope.php000066400000000000000000000014161266465517700230030ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; /** * Scope class. * * @author Johannes M. Schmitt */ class Scope implements ScopeInterface { private $name; private $parentName; public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER) { $this->name = $name; $this->parentName = $parentName; } public function getName() { return $this->name; } public function getParentName() { return $this->parentName; } } src/Symfony/Component/DependencyInjection/ScopeInterface.php000066400000000000000000000007271266465517700246300ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; /** * Scope Interface. * * @author Johannes M. Schmitt */ interface ScopeInterface { public function getName(); public function getParentName(); } src/Symfony/Component/DependencyInjection/SimpleXMLElement.php000066400000000000000000000070221266465517700250550ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection; @trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\ExpressionLanguage\Expression; /** * SimpleXMLElement class. * * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0. */ class SimpleXMLElement extends \SimpleXMLElement { /** * Converts an attribute as a PHP type. * * @param string $name * * @return mixed */ public function getAttributeAsPhp($name) { return self::phpize($this[$name]); } /** * Returns arguments as valid PHP types. * * @param string $name * @param bool $lowercase * * @return mixed */ public function getArgumentsAsPhp($name, $lowercase = true) { $arguments = array(); foreach ($this->$name as $arg) { if (isset($arg['name'])) { $arg['key'] = (string) $arg['name']; } $key = isset($arg['key']) ? (string) $arg['key'] : (!$arguments ? 0 : max(array_keys($arguments)) + 1); // parameter keys are case insensitive if ('parameter' == $name && $lowercase) { $key = strtolower($key); } // this is used by DefinitionDecorator to overwrite a specific // argument of the parent definition if (isset($arg['index'])) { $key = 'index_'.$arg['index']; } switch ($arg['type']) { case 'service': $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; if (isset($arg['on-invalid']) && 'ignore' == $arg['on-invalid']) { $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; } elseif (isset($arg['on-invalid']) && 'null' == $arg['on-invalid']) { $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; } if (isset($arg['strict'])) { $strict = self::phpize($arg['strict']); } else { $strict = true; } $arguments[$key] = new Reference((string) $arg['id'], $invalidBehavior, $strict); break; case 'expression': $arguments[$key] = new Expression((string) $arg); break; case 'collection': $arguments[$key] = $arg->getArgumentsAsPhp($name, false); break; case 'string': $arguments[$key] = (string) $arg; break; case 'constant': $arguments[$key] = constant((string) $arg); break; default: $arguments[$key] = self::phpize($arg); } } return $arguments; } /** * Converts an xml value to a PHP type. * * @param mixed $value * * @return mixed */ public static function phpize($value) { return XmlUtils::phpize($value); } } src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php000066400000000000000000000013171266465517700266110ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/DependencyInjection/Tests/000077500000000000000000000000001266465517700223215ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Compiler/000077500000000000000000000000001266465517700240735ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php000066400000000000000000000101551266465517700332230ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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(); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/AutoAliasServicePassTest.php000066400000000000000000000100241266465517700314730ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\AutoAliasServicePass; use Symfony\Component\DependencyInjection\ContainerBuilder; class AutoAliasServicePassTest extends \PHPUnit_Framework_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()); $this->assertInstanceOf('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault', $container->get('example')); } 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->assertInstanceOf('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql', $container->get('example')); } 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->assertInstanceOf('Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariaDb', $container->get('example')); } } class ServiceClassDefault { } class ServiceClassMysql extends ServiceClassDefault { } class ServiceClassMariaDb extends ServiceClassMysql { } src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php000066400000000000000000000102631266465517700330010ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php000066400000000000000000000064651266465517700330420ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class CheckDefinitionValidityPassTest extends \PHPUnit_Framework_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 testProcessDetectsSyntheticPrototypeDefinitions() { $container = new ContainerBuilder(); $container->register('a')->setSynthetic(true)->setScope(ContainerInterface::SCOPE_PROTOTYPE); $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); } /** * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException * @group legacy */ public function testLegacyProcessDetectsBothFactorySyntaxesUsed() { $container = new ContainerBuilder(); $container->register('a')->setFactory(array('a', 'b'))->setFactoryClass('a'); $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); } } CheckExceptionOnInvalidReferenceBehaviorPassTest.php000066400000000000000000000036641266465517700362240ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Compiler * * 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\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class CheckExceptionOnInvalidReferenceBehaviorPassTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php000066400000000000000000000057151266465517700326450ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Scope; use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class CheckReferenceValidityPassTest extends \PHPUnit_Framework_TestCase { public function testProcessIgnoresScopeWideningIfNonStrictReference() { $container = new ContainerBuilder(); $container->register('a')->addArgument(new Reference('b', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false)); $container->register('b')->setScope('prototype'); $this->process($container); } /** * @expectedException \RuntimeException */ public function testProcessDetectsScopeWidening() { $container = new ContainerBuilder(); $container->register('a')->addArgument(new Reference('b')); $container->register('b')->setScope('prototype'); $this->process($container); } public function testProcessIgnoresCrossScopeHierarchyReferenceIfNotStrict() { $container = new ContainerBuilder(); $container->addScope(new Scope('a')); $container->addScope(new Scope('b')); $container->register('a')->setScope('a')->addArgument(new Reference('b', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false)); $container->register('b')->setScope('b'); $this->process($container); } /** * @expectedException \RuntimeException */ public function testProcessDetectsCrossScopeHierarchyReference() { $container = new ContainerBuilder(); $container->addScope(new Scope('a')); $container->addScope(new Scope('b')); $container->register('a')->setScope('a')->addArgument(new Reference('b')); $container->register('b')->setScope('b'); $this->process($container); } /** * @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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/DecoratorServicePassTest.php000066400000000000000000000057611266465517700315470ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass; class DecoratorServicePassTest extends \PHPUnit_Framework_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()); } protected function process(ContainerBuilder $container) { $repeatedPass = new DecoratorServicePass(); $repeatedPass->process($container); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php000066400000000000000000000031771266465517700317520ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\ExtensionCompilerPass; /** * @author Wouter J */ class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase { private $container; private $pass; protected function setUp() { $this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); $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->getMock('Symfony\Component\DependencyInjection\\'.( $hasInlineCompile ? 'Compiler\CompilerPassInterface' : 'Extension\ExtensionInterface' )); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php000066400000000000000000000167621266465517700332420ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Scope; 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 \PHPUnit_Framework_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 testProcessDoesNotInlineWhenAliasedServiceIsNotOfPrototypeScope() { $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 testProcessDoesInlineServiceOfPrototypeScope() { $container = new ContainerBuilder(); $container ->register('foo') ->setScope('prototype') ; $container ->register('bar') ->setPublic(false) ->setScope('prototype') ; $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 testProcessInlinesOnlyIfSameScope() { $container = new ContainerBuilder(); $container->addScope(new Scope('foo')); $a = $container->register('a')->setPublic(false)->setScope('foo'); $b = $container->register('b')->addArgument(new Reference('a')); $this->process($container); $arguments = $b->getArguments(); $this->assertEquals(new Reference('a'), $arguments[0]); $this->assertTrue($container->hasDefinition('a')); } 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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php000066400000000000000000000063061266465517700277340ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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.'); } } LegacyResolveParameterPlaceHoldersPassTest.php000066400000000000000000000021641266465517700351120ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Compiler * * 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\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * @group legacy */ class LegacyResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_TestCase { public function testFactoryClassParametersShouldBeResolved() { $compilerPass = new ResolveParameterPlaceHoldersPass(); $container = new ContainerBuilder(); $container->setParameter('foo.factory.class', 'FooFactory'); $fooDefinition = $container->register('foo', '%foo.factory.class%'); $fooDefinition->setFactoryClass('%foo.factory.class%'); $compilerPass->process($container); $fooDefinition = $container->getDefinition('foo'); $this->assertSame('FooFactory', $fooDefinition->getFactoryClass()); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php000066400000000000000000000037701266465517700337660ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase { public function testExpressionLanguageProviderForwarding() { $tmpProviders = array(); $extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface'); $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->getMock('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface'); $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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php000066400000000000000000000065301266465517700331140ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; use Symfony\Component\DependencyInjection\Compiler\RepeatedPass; use Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class RemoveUnusedDefinitionsPassTest extends \PHPUnit_Framework_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')); } protected function process(ContainerBuilder $container) { $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass())); $repeatedPass->process($container); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php000066400000000000000000000054611266465517700342640ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_TestCase { public function testProcess() { $container = new ContainerBuilder(); $aDefinition = $container->register('a', '\stdClass'); $aDefinition->setFactoryService('b', false); $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'); $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->assertSame('b_alias', $aDefinition->getFactoryService(false)); $resolvedFactory = $aDefinition->getFactory(false); $this->assertSame('b_alias', (string) $resolvedFactory[0]); } /** * @group legacy */ public function testPrivateAliasesInFactory() { $container = new ContainerBuilder(); $container->register('a', 'Bar\FooClass'); $container->register('b', 'Bar\FooClass') ->setFactoryService('a') ->setFactoryMethod('getInstance'); $container->register('c', 'stdClass')->setPublic(false); $container->setAlias('c_alias', 'c'); $this->process($container); $this->assertInstanceOf('Bar\FooClass', $container->get('b')); } /** * @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); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php000066400000000000000000000136431266465517700336110ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass; use Symfony\Component\DependencyInjection\ContainerBuilder; class ResolveDefinitionTemplatesPassTest extends \PHPUnit_Framework_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 testProcessDoesNotCopyScope() { $container = new ContainerBuilder(); $container ->register('parent') ->setScope('foo') ; $container ->setDefinition('child', new DefinitionDecorator('parent')) ; $this->process($container); $def = $container->getDefinition('child'); $this->assertEquals(ContainerInterface::SCOPE_CONTAINER, $def->getScope()); } 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 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 testSetDecoratedServiceOnServiceHasParent() { $container = new ContainerBuilder(); $container->register('parent', 'stdClass'); $container->setDefinition('child1', new DefinitionDecorator('parent')) ->setDecoratedService('foo', 'foo_inner') ; $this->process($container); $this->assertEquals(array('foo', 'foo_inner'), $container->getDefinition('child1')->getDecoratedService()); } protected function process(ContainerBuilder $container) { $pass = new ResolveDefinitionTemplatesPass(); $pass->process($container); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php000066400000000000000000000047411266465517700332310ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Compiler\ResolveInvalidReferencesPass; use Symfony\Component\DependencyInjection\ContainerBuilder; class ResolveInvalidReferencesPassTest extends \PHPUnit_Framework_TestCase { public function testProcess() { $container = new ContainerBuilder(); $def = $container ->register('foo') ->setArguments(array(new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE))) ->addMethodCall('foo', array(new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) ; $this->process($container); $arguments = $def->getArguments(); $this->assertNull($arguments[0]); $this->assertCount(0, $def->getMethodCalls()); } 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()); } public function testStrictFlagIsPreserved() { $container = new ContainerBuilder(); $container->register('bar'); $def = $container ->register('foo') ->addArgument(new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE, false)) ; $this->process($container); $this->assertFalse($def->getArgument(0)->isStrict()); } protected function process(ContainerBuilder $container) { $pass = new ResolveInvalidReferencesPass(); $pass->process($container); } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php000066400000000000000000000062761266465517700340540ustar00rootroot00000000000000 * * 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\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; use Symfony\Component\DependencyInjection\ContainerBuilder; class ResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php000066400000000000000000000065771266465517700335400ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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]); } /** * @group legacy */ public function testResolveFactoryService() { $container = new ContainerBuilder(); $container->register('factory', 'Factory'); $container->setAlias('factory_alias', new Alias('factory')); $foo = new Definition(); $foo->setFactoryService('factory_alias'); $foo->setFactoryMethod('createFoo'); $container->setDefinition('foo', $foo); $this->process($container); $this->assertSame('factory', $foo->getFactoryService()); } protected function process(ContainerBuilder $container) { $pass = new ResolveReferencesToAliasesPass(); $pass->process($container); } } src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php000066400000000000000000001047451266465517700271360ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Resource\ResourceInterface; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Exception\InactiveScopeException; use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; 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\Scope; use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\ExpressionLanguage\Expression; class ContainerBuilderTest extends \PHPUnit_Framework_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'); } } 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'); } public function testGet() { $builder = new ContainerBuilder(); try { $builder->get('foo'); $this->fail('->get() throws a ServiceNotFoundException if the service does not exist'); } catch (ServiceNotFoundException $e) { $this->assertEquals('You have requested a non-existent service "foo".', $e->getMessage(), '->get() throws a ServiceNotFoundException if the service does not exist'); } $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'); $builder->register('foo', 'stdClass'); $this->assertInternalType('object', $builder->get('foo'), '->get() returns the service definition associated with the id'); $builder->set('bar', $bar = new \stdClass()); $this->assertEquals($bar, $builder->get('bar'), '->get() returns the service associated with the id'); $builder->register('bar', 'stdClass'); $this->assertEquals($bar, $builder->get('bar'), '->get() returns the service associated with the id even if a definition has been defined'); $builder->register('baz', 'stdClass')->setArguments(array(new Reference('baz'))); try { @$builder->get('baz'); $this->fail('->get() throws a ServiceCircularReferenceException if the service has a circular reference to itself'); } catch (\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) { $this->assertEquals('Circular reference detected for service "baz", path: "baz".', $e->getMessage(), '->get() throws a LogicException if the service has a circular reference to itself'); } $builder->register('foobar', 'stdClass')->setScope('container'); $this->assertTrue($builder->get('bar') === $builder->get('bar'), '->get() always returns the same instance if the service is shared'); } /** * @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 testGetReturnsNullOnInactiveScope() { $builder = new ContainerBuilder(); $builder->register('foo', 'stdClass')->setScope('request'); $this->assertNull($builder->get('foo', ContainerInterface::NULL_ON_INVALID_REFERENCE)); } public function testGetReturnsNullOnInactiveScopeWhenServiceIsCreatedByAMethod() { $builder = new ProjectContainer(); $this->assertNull($builder->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE)); } 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 testAddGetCompilerPass() { $builder = new ContainerBuilder(); $builder->setResourceTracking(false); $builderCompilerPasses = $builder->getCompiler()->getPassConfig()->getPasses(); $builder->addCompilerPass($this->getMock('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')); $this->assertCount(count($builder->getCompiler()->getPassConfig()->getPasses()) - 1, $builderCompilerPasses); } public function testCreateService() { $builder = new ContainerBuilder(); $builder->register('foo1', 'Bar\FooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php'); $this->assertInstanceOf('\Bar\FooClass', $builder->get('foo1'), '->createService() requires the file defined by the service definition'); $builder->register('foo2', 'Bar\FooClass')->setFile(__DIR__.'/Fixtures/includes/%file%.php'); $builder->setParameter('file', 'foo'); $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 testLegacyCreateServiceFactory() { $builder = new ContainerBuilder(); $builder->register('bar', 'Bar\FooClass'); $builder ->register('foo1', 'Bar\FooClass') ->setFactoryClass('%foo_class%') ->setFactoryMethod('getInstance') ->addArgument(array('foo' => '%value%', '%value%' => 'foo', new Reference('bar'))) ; $builder->setParameter('value', 'bar'); $builder->setParameter('foo_class', 'Bar\FooClass'); $this->assertTrue($builder->get('foo1')->called, '->createService() calls the factory method to create the service instance'); $this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar')), $builder->get('foo1')->arguments, '->createService() passes the arguments to the factory method'); } public function testLegacyCreateServiceFactoryService() { $builder = new ContainerBuilder(); $builder->register('foo_service', 'Bar\FooClass'); $builder ->register('foo', 'Bar\FooClass') ->setFactoryService('%foo_service%') ->setFactoryMethod('getInstance') ; $builder->setParameter('foo_service', 'foo_service'); $this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance'); } 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'); $this->assertTrue($builder->get('foo1')->configured, '->createService() calls the configurator'); $builder->register('foo2', 'Bar\FooClass')->setConfigurator(array('%class%', 'configureStatic')); $builder->setParameter('class', 'BazClass'); $this->assertTrue($builder->get('foo2')->configured, '->createService() calls the configurator'); $builder->register('baz', 'BazClass'); $builder->register('foo3', 'Bar\FooClass')->setConfigurator(array(new Reference('baz'), 'configure')); $this->assertTrue($builder->get('foo3')->configured, '->createService() calls the configurator'); $builder->register('foo4', 'Bar\FooClass')->setConfigurator(array($builder->getDefinition('baz'), 'configure')); $this->assertTrue($builder->get('foo4')->configured, '->createService() calls the configurator'); $builder->register('foo5', 'Bar\FooClass')->setConfigurator('foo'); 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'); } 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'); } /** * @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 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->setExpectedException('LogicException'); $container->getExtension('no_registered'); } public function testRegisteredButNotLoadedExtension() { $extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface'); $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->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface'); $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()); } /** * @expectedException \BadMethodCallException */ public function testThrowsExceptionWhenAddServiceOnAFrozenContainer() { $container = new ContainerBuilder(); $container->compile(); $container->set('a', new \stdClass()); } 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')); } /** * @group legacy */ public function testLegacySetOnSynchronizedService() { $container = new ContainerBuilder(); $container->register('baz', 'BazClass') ->setSynchronized(true) ; $container->register('bar', 'BarClass') ->addMethodCall('setBaz', array(new Reference('baz'))) ; $container->set('baz', $baz = new \BazClass()); $this->assertSame($baz, $container->get('bar')->getBaz()); $container->set('baz', $baz = new \BazClass()); $this->assertSame($baz, $container->get('bar')->getBaz()); } /** * @group legacy */ public function testLegacySynchronizedServiceWithScopes() { $container = new ContainerBuilder(); $container->addScope(new Scope('foo')); $container->register('baz', 'BazClass') ->setSynthetic(true) ->setSynchronized(true) ->setScope('foo') ; $container->register('bar', 'BarClass') ->addMethodCall('setBaz', array(new Reference('baz', ContainerInterface::NULL_ON_INVALID_REFERENCE, false))) ; $container->compile(); $container->enterScope('foo'); $container->set('baz', $outerBaz = new \BazClass(), 'foo'); $this->assertSame($outerBaz, $container->get('bar')->getBaz()); $container->enterScope('foo'); $container->set('baz', $innerBaz = new \BazClass(), 'foo'); $this->assertSame($innerBaz, $container->get('bar')->getBaz()); $container->leaveScope('foo'); $this->assertNotSame($innerBaz, $container->get('bar')->getBaz()); $this->assertSame($outerBaz, $container->get('bar')->getBaz()); $container->leaveScope('foo'); } /** * @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 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); } } class FooClass { } class ProjectContainer extends ContainerBuilder { public function getFoobazService() { throw new InactiveScopeException('foo', 'request'); } } src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php000066400000000000000000000625121266465517700256220ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Scope; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Exception\InactiveScopeException; class ContainerTest extends \PHPUnit_Framework_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('scoped', 'scoped_foo', 'scoped_synchronized_foo', 'inactive', '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->assertEquals($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'); } /** * @expectedException \InvalidArgumentException */ public function testSetDoesNotAllowPrototypeScope() { $c = new Container(); $c->set('foo', new \stdClass(), Container::SCOPE_PROTOTYPE); } /** * @expectedException \RuntimeException */ public function testSetDoesNotAllowInactiveScope() { $c = new Container(); $c->addScope(new Scope('foo')); $c->set('foo', new \stdClass(), 'foo'); } public function testSetAlsoSetsScopedService() { $c = new Container(); $c->addScope(new Scope('foo')); $c->enterScope('foo'); $c->set('foo', $foo = new \stdClass(), 'foo'); $scoped = $this->getField($c, 'scopedServices'); $this->assertTrue(isset($scoped['foo']['foo']), '->set() sets a scoped service'); $this->assertSame($foo, $scoped['foo']['foo'], '->set() sets a scoped service'); } public function testSetAlsoCallsSynchronizeService() { $c = new ProjectServiceContainer(); $c->addScope(new Scope('foo')); $c->enterScope('foo'); $c->set('scoped_synchronized_foo', $bar = new \stdClass(), 'foo'); $this->assertTrue($c->synchronized, '->set() calls synchronize*Service() if it is defined for 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->assertEquals($foo, $sc->get('foo'), '->get() returns the service for the given id'); $this->assertEquals($foo, $sc->get('Foo'), '->get() returns the service for the given id, and converts id to lowercase'); $this->assertEquals($sc->__bar, $sc->get('bar'), '->get() returns the service for the given id'); $this->assertEquals($sc->__foo_bar, $sc->get('foo_bar'), '->get() returns the service if a get*Method() is defined'); $this->assertEquals($sc->__foo_baz, $sc->get('foo.baz'), '->get() returns the service if a get*Method() is defined'); $this->assertEquals($sc->__foo_baz, $sc->get('foo\\baz'), '->get() returns the service if a get*Method() is defined'); $sc->set('bar', $bar = new \stdClass()); $this->assertEquals($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('bar', $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'); } } public function testGetReturnsNullOnInactiveScope() { $sc = new ProjectServiceContainer(); $this->assertNull($sc->get('inactive', 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'); $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 testEnterLeaveCurrentScope() { $container = new ProjectServiceContainer(); $container->addScope(new Scope('foo')); $container->enterScope('foo'); $scoped1 = $container->get('scoped'); $scopedFoo1 = $container->get('scoped_foo'); $container->enterScope('foo'); $scoped2 = $container->get('scoped'); $scoped3 = $container->get('SCOPED'); $scopedFoo2 = $container->get('scoped_foo'); $container->leaveScope('foo'); $scoped4 = $container->get('scoped'); $scopedFoo3 = $container->get('scoped_foo'); $this->assertNotSame($scoped1, $scoped2); $this->assertSame($scoped2, $scoped3); $this->assertSame($scoped1, $scoped4); $this->assertNotSame($scopedFoo1, $scopedFoo2); $this->assertSame($scopedFoo1, $scopedFoo3); } public function testEnterLeaveScopeWithChildScopes() { $container = new Container(); $container->addScope(new Scope('foo')); $container->addScope(new Scope('bar', 'foo')); $this->assertFalse($container->isScopeActive('foo')); $container->enterScope('foo'); $container->enterScope('bar'); $this->assertTrue($container->isScopeActive('foo')); $this->assertFalse($container->has('a')); $a = new \stdClass(); $container->set('a', $a, 'bar'); $scoped = $this->getField($container, 'scopedServices'); $this->assertTrue(isset($scoped['bar']['a'])); $this->assertSame($a, $scoped['bar']['a']); $this->assertTrue($container->has('a')); $container->leaveScope('foo'); $scoped = $this->getField($container, 'scopedServices'); $this->assertFalse(isset($scoped['bar'])); $this->assertFalse($container->isScopeActive('foo')); $this->assertFalse($container->has('a')); } public function testEnterScopeRecursivelyWithInactiveChildScopes() { $container = new Container(); $container->addScope(new Scope('foo')); $container->addScope(new Scope('bar', 'foo')); $this->assertFalse($container->isScopeActive('foo')); $container->enterScope('foo'); $this->assertTrue($container->isScopeActive('foo')); $this->assertFalse($container->isScopeActive('bar')); $this->assertFalse($container->has('a')); $a = new \stdClass(); $container->set('a', $a, 'foo'); $scoped = $this->getField($container, 'scopedServices'); $this->assertTrue(isset($scoped['foo']['a'])); $this->assertSame($a, $scoped['foo']['a']); $this->assertTrue($container->has('a')); $container->enterScope('foo'); $scoped = $this->getField($container, 'scopedServices'); $this->assertFalse(isset($scoped['a'])); $this->assertTrue($container->isScopeActive('foo')); $this->assertFalse($container->isScopeActive('bar')); $this->assertFalse($container->has('a')); $container->enterScope('bar'); $this->assertTrue($container->isScopeActive('bar')); $container->leaveScope('foo'); $this->assertTrue($container->isScopeActive('foo')); $this->assertFalse($container->isScopeActive('bar')); $this->assertTrue($container->has('a')); } public function testEnterChildScopeRecursively() { $container = new Container(); $container->addScope(new Scope('foo')); $container->addScope(new Scope('bar', 'foo')); $container->enterScope('foo'); $container->enterScope('bar'); $this->assertTrue($container->isScopeActive('bar')); $this->assertFalse($container->has('a')); $a = new \stdClass(); $container->set('a', $a, 'bar'); $scoped = $this->getField($container, 'scopedServices'); $this->assertTrue(isset($scoped['bar']['a'])); $this->assertSame($a, $scoped['bar']['a']); $this->assertTrue($container->has('a')); $container->enterScope('bar'); $scoped = $this->getField($container, 'scopedServices'); $this->assertFalse(isset($scoped['a'])); $this->assertTrue($container->isScopeActive('foo')); $this->assertTrue($container->isScopeActive('bar')); $this->assertFalse($container->has('a')); $container->leaveScope('bar'); $this->assertTrue($container->isScopeActive('foo')); $this->assertTrue($container->isScopeActive('bar')); $this->assertTrue($container->has('a')); } /** * @expectedException \InvalidArgumentException */ public function testEnterScopeNotAdded() { $container = new Container(); $container->enterScope('foo'); } /** * @expectedException \RuntimeException */ public function testEnterScopeDoesNotAllowInactiveParentScope() { $container = new Container(); $container->addScope(new Scope('foo')); $container->addScope(new Scope('bar', 'foo')); $container->enterScope('bar'); } public function testLeaveScopeNotActive() { $container = new Container(); $container->addScope(new Scope('foo')); try { $container->leaveScope('foo'); $this->fail('->leaveScope() throws a \LogicException if the scope is not active yet'); } catch (\Exception $e) { $this->assertInstanceOf('\LogicException', $e, '->leaveScope() throws a \LogicException if the scope is not active yet'); $this->assertEquals('The scope "foo" is not active.', $e->getMessage(), '->leaveScope() throws a \LogicException if the scope is not active yet'); } try { $container->leaveScope('bar'); $this->fail('->leaveScope() throws a \LogicException if the scope does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\LogicException', $e, '->leaveScope() throws a \LogicException if the scope does not exist'); $this->assertEquals('The scope "bar" is not active.', $e->getMessage(), '->leaveScope() throws a \LogicException if the scope does not exist'); } } /** * @expectedException \InvalidArgumentException * @dataProvider getBuiltInScopes */ public function testAddScopeDoesNotAllowBuiltInScopes($scope) { $container = new Container(); $container->addScope(new Scope($scope)); } /** * @expectedException \InvalidArgumentException */ public function testAddScopeDoesNotAllowExistingScope() { $container = new Container(); $container->addScope(new Scope('foo')); $container->addScope(new Scope('foo')); } /** * @expectedException \InvalidArgumentException * @dataProvider getInvalidParentScopes */ public function testAddScopeDoesNotAllowInvalidParentScope($scope) { $c = new Container(); $c->addScope(new Scope('foo', $scope)); } public function testAddScope() { $c = new Container(); $c->addScope(new Scope('foo')); $c->addScope(new Scope('bar', 'foo')); $this->assertSame(array('foo' => 'container', 'bar' => 'foo'), $this->getField($c, 'scopes')); $this->assertSame(array('foo' => array('bar'), 'bar' => array()), $this->getField($c, 'scopeChildren')); $c->addScope(new Scope('baz', 'bar')); $this->assertSame(array('foo' => 'container', 'bar' => 'foo', 'baz' => 'bar'), $this->getField($c, 'scopes')); $this->assertSame(array('foo' => array('bar', 'baz'), 'bar' => array('baz'), 'baz' => array()), $this->getField($c, 'scopeChildren')); } public function testHasScope() { $c = new Container(); $this->assertFalse($c->hasScope('foo')); $c->addScope(new Scope('foo')); $this->assertTrue($c->hasScope('foo')); } /** * @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')); } public function testIsScopeActive() { $c = new Container(); $this->assertFalse($c->isScopeActive('foo')); $c->addScope(new Scope('foo')); $this->assertFalse($c->isScopeActive('foo')); $c->enterScope('foo'); $this->assertTrue($c->isScopeActive('foo')); $c->leaveScope('foo'); $this->assertFalse($c->isScopeActive('foo')); } public function getInvalidParentScopes() { return array( array(ContainerInterface::SCOPE_PROTOTYPE), array('bar'), ); } public function getBuiltInScopes() { return array( array(ContainerInterface::SCOPE_CONTAINER), array(ContainerInterface::SCOPE_PROTOTYPE), ); } 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')); } } class ProjectServiceContainer extends Container { public $__bar, $__foo_bar, $__foo_baz; public $synchronized; public function __construct() { parent::__construct(); $this->__bar = new \stdClass(); $this->__foo_bar = new \stdClass(); $this->__foo_baz = new \stdClass(); $this->synchronized = false; $this->aliases = array('alias' => 'bar'); } protected function getScopedService() { if (!$this->isScopeActive('foo')) { throw new \RuntimeException('Invalid call'); } return $this->services['scoped'] = $this->scopedServices['foo']['scoped'] = new \stdClass(); } protected function getScopedFooService() { if (!$this->isScopeActive('foo')) { throw new \RuntimeException('invalid call'); } return $this->services['scoped_foo'] = $this->scopedServices['foo']['scoped_foo'] = new \stdClass(); } protected function getScopedSynchronizedFooService() { if (!$this->isScopeActive('foo')) { throw new \RuntimeException('invalid call'); } return $this->services['scoped_bar'] = $this->scopedServices['foo']['scoped_bar'] = new \stdClass(); } protected function synchronizeScopedSynchronizedFooService() { $this->synchronized = true; } protected function getInactiveService() { throw new InactiveScopeException('request', 'request'); } 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!'); } } src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php000066400000000000000000000066331266465517700257310ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; class CrossCheckTest extends \PHPUnit_Framework_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('sf_service_container', 'sf'); file_put_contents($tmp, file_get_contents(self::$fixturesPath.'/'.$type.'/'.$fixture)); $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() { $tests = array( array('services1.xml', 'xml'), array('services2.xml', 'xml'), array('services6.xml', 'xml'), array('services8.xml', 'xml'), array('services9.xml', 'xml'), ); if (class_exists('Symfony\Component\Yaml\Yaml')) { $tests = array_merge($tests, array( array('services1.yml', 'yaml'), array('services2.yml', 'yaml'), array('services6.yml', 'yaml'), array('services8.yml', 'yaml'), array('services9.yml', 'yaml'), )); } return $tests; } } src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php000066400000000000000000000101461266465517700276270ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\DefinitionDecorator; class DefinitionDecoratorTest extends \PHPUnit_Framework_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'), ); } /** * @dataProvider provideLegacyPropertyTests * @group legacy */ public function testLegacySetProperty($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 provideLegacyPropertyTests() { return array( array('factoryClass', 'factory_class'), array('factoryMethod', 'factory_method'), array('factoryService', 'factory_service'), ); } 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 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); } } src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php000066400000000000000000000255771266465517700260020ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Definition; class DefinitionTest extends \PHPUnit_Framework_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'); $this->assertEquals(array('foo', 'foo.renamed'), $def->getDecoratedService()); $def->setDecoratedService(null); $this->assertNull($def->getDecoratedService()); $def = new Definition('stdClass'); $def->setDecoratedService('foo'); $this->assertEquals(array('foo', null), $def->getDecoratedService()); $def->setDecoratedService(null); $this->assertNull($def->getDecoratedService()); $def = new Definition('stdClass'); $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 testSetGetScope() { $def = new Definition('stdClass'); $this->assertEquals('container', $def->getScope()); $this->assertSame($def, $def->setScope('foo')); $this->assertEquals('foo', $def->getScope()); } 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.'); } /** * @group legacy */ public function testLegacySetIsSynchronized() { $def = new Definition('stdClass'); $this->assertFalse($def->isSynchronized(), '->isSynchronized() returns false by default'); $this->assertSame($def, $def->setSynchronized(true), '->setSynchronized() implements a fluent interface'); $this->assertTrue($def->isSynchronized(), '->isSynchronized() returns true if the service is synchronized.'); } 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 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 */ public function testReplaceArgumentShouldCheckBounds() { $def = new Definition('stdClass'); $def->addArgument('foo'); $def->replaceArgument(1, '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()); } } src/Symfony/Component/DependencyInjection/Tests/Dumper/000077500000000000000000000000001266465517700235555ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php000066400000000000000000000101731266465517700300770ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Dumper\GraphvizDumper; class GraphvizDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/../Fixtures/'; } /** * @group legacy */ public function testLegacyDump() { $container = include self::$fixturesPath.'/containers/legacy-container9.php'; $dumper = new GraphvizDumper($container); $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/legacy-services9.dot')), $dumper->dump(), '->dump() dumps services'); } 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'); } public function testDumpWithScopes() { $container = include self::$fixturesPath.'/containers/container18.php'; $dumper = new GraphvizDumper($container); $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services18.dot')), $dumper->dump(), '->dump() dumps services'); } } src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php000066400000000000000000000244321266465517700270370ustar00rootroot00000000000000 * * 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 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; class PhpDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } public function testDump() { $dumper = new PhpDumper($container = 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'); $container = new ContainerBuilder(); new PhpDumper($container); } 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'); } /** * @expectedException \InvalidArgumentException */ public function testExportParameters() { $dumper = new PhpDumper(new ContainerBuilder(new ParameterBag(array('foo' => new Reference('foo'))))); $dumper->dump(); } 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'); } } /** * @group legacy */ public function testLegacySynchronizedServices() { $container = include self::$fixturesPath.'/containers/container20.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/services20.php')), $dumper->dump(), '->dump() dumps services'); } 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'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Service id "bar$" cannot be converted to a valid PHP method name. */ public function testAddServiceInvalidServiceId() { $container = new ContainerBuilder(); $container->register('bar$', 'FooClass'); $dumper = new PhpDumper($container); $dumper->dump(); } /** * @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->assertEquals($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(); } } src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php000066400000000000000000000171461266465517700270540ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Dumper\XmlDumper; class XmlDumperTest extends \PHPUnit_Framework_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'); } /** * @group legacy */ public function testLegacyAddService() { $container = include self::$fixturesPath.'/containers/legacy-container9.php'; $dumper = new XmlDumper($container); $this->assertEquals(str_replace('%path%', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath.'/xml/legacy-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 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()); } } src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php000066400000000000000000000075001266465517700272070ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Dumper\YamlDumper; use Symfony\Component\Yaml\Yaml; class YamlDumperTest extends \PHPUnit_Framework_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'); } /** * @group legacy */ public function testLegacyAddService() { $container = include self::$fixturesPath.'/containers/legacy-container9.php'; $dumper = new YamlDumper($container); $this->assertEquals(str_replace('%path%', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath.'/yaml/legacy-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 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'); } } private function assertEqualYamlStructure($yaml, $expected, $message = '') { $this->assertEquals(Yaml::parse($expected), Yaml::parse($yaml), $message); } } src/Symfony/Component/DependencyInjection/Tests/Extension/000077500000000000000000000000001266465517700242755ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php000066400000000000000000000047711266465517700276330ustar00rootroot00000000000000 * * 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; class ExtensionTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/000077500000000000000000000000001266465517700241325ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/000077500000000000000000000000001266465517700262775ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container10.php000066400000000000000000000004731266465517700311370ustar00rootroot00000000000000 register('foo', 'FooClass')-> addArgument(new Reference('bar')) ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container11.php000066400000000000000000000004631266465517700311370ustar00rootroot00000000000000 register('foo', 'FooClass')-> addArgument(new Definition('BarClass', array(new Definition('BazClass')))) ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container12.php000066400000000000000000000004171266465517700311370ustar00rootroot00000000000000 register('foo', 'FooClass\\Foo')-> addArgument('foo<>&bar')-> addTag('foo"bar\\bar', array('foo' => 'foo"barřž€')) ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php000066400000000000000000000005171266465517700311410ustar00rootroot00000000000000 register('foo', 'FooClass')-> addArgument(new Reference('bar')) ; $container-> register('bar', 'BarClass') ; $container->compile(); return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php000066400000000000000000000006711266465517700311430ustar00rootroot00000000000000register('foo', 'FooClass\\Foo') ->setDecoratedService('bar', 'bar.woozy') ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container16.php000066400000000000000000000003221266465517700311360ustar00rootroot00000000000000register('foo', 'FooClass\\Foo') ->setDecoratedService('bar') ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container17.php000066400000000000000000000002571266465517700311460ustar00rootroot00000000000000register('foo', '%foo.class%') ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container18.php000066400000000000000000000004721266465517700311460ustar00rootroot00000000000000addScope(new Scope('request')); $container-> register('foo', 'FooClass')-> setScope('request') ; $container->compile(); return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container19.php000066400000000000000000000012311266465517700311410ustar00rootroot00000000000000register('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; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container20.php000066400000000000000000000010471266465517700311360ustar00rootroot00000000000000register('request', 'Request') ->setSynchronized(true) ; $container ->register('depends_on_request', 'stdClass') ->addMethodCall('setRequest', array(new Reference('request', ContainerInterface::NULL_ON_INVALID_REFERENCE, false))) ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php000066400000000000000000000010421266465517700311320ustar00rootroot00000000000000setConfigurator(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; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container8.php000066400000000000000000000006221266465517700310620ustar00rootroot00000000000000 '%baz%', 'baz' => 'bar', 'bar' => 'foo is %%foo bar', 'escape' => '@escapeme', 'values' => array(true, false, null, 0, 1000.3, 'true', 'false', 'null'), ))); return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php000066400000000000000000000077141266465517700310740ustar00rootroot00000000000000register('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'))) ->setScope('container') ->setConfigurator(array(new Reference('foo.baz'), 'configure')) ; $container ->register('foo_bar', '%foo_class%') ->setScope('prototype') ; $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('decorated', 'stdClass') ; $container ->register('decorator_service', 'stdClass') ->setDecoratedService('decorated') ; $container ->register('decorator_service_with_name', 'stdClass') ->setDecoratedService('decorated', 'decorated.pif-pouf') ; $container ->register('new_factory', 'FactoryClass') ->setProperty('foo', 'bar') ->setScope('container') ->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')) ; return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php000066400000000000000000000025451266465517700323330ustar00rootroot00000000000000 register('foo', 'Bar\FooClass')-> addTag('foo', array('foo' => 'foo'))-> addTag('foo', array('bar' => 'bar'))-> setFactoryClass('Bar\\FooClass')-> setFactoryMethod('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%')-> setFactoryClass('%baz_class%')-> setFactoryMethod('getInstance')-> setConfigurator(array('%baz_class%', 'configureStatic1')) ; $container-> register('factory_service', 'Bar')-> setFactoryService('foo.baz')-> setFactoryMethod('getInstance') ; $container->getParameterBag()->clear(); $container->getParameterBag()->add(array( 'baz_class' => 'BazClass', 'foo' => 'bar', )); return $container; src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/000077500000000000000000000000001266465517700257645ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/legacy-services9.dot000066400000000000000000000016711266465517700316570ustar00rootroot00000000000000digraph 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\nBar\\FooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; node_foo_baz [label="foo.baz\nBazClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; node_factory_service [label="factory_service\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_bar [label="bar\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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services1.dot000066400000000000000000000005271266465517700304040ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10-1.dot000066400000000000000000000010541266465517700306160ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services10.dot000066400000000000000000000010631266465517700304600ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot000066400000000000000000000010731266465517700304640ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot000066400000000000000000000005021266465517700304610ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services17.dot000066400000000000000000000006631266465517700304740ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services18.dot000066400000000000000000000006601266465517700304720ustar00rootroot00000000000000digraph 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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot000066400000000000000000000065161266465517700304200ustar00rootroot00000000000000digraph 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_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_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_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"]; } src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/000077500000000000000000000000001266465517700257405ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php000066400000000000000000000022521266465517700317550ustar00rootroot00000000000000setDefinition('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) { } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectWithXsdExtension.php000066400000000000000000000005331266465517700332700ustar00rootroot00000000000000 "ProjectWithXsdExtensionInPhar.phar!ProjectWithXsdExtensionInPhar.phplTUlWѶschema/project-1.0.xsdTUrr |M*c(.k&`GBMBsrc/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php000066400000000000000000000015321266465517700301070ustar00rootroot00000000000000configure(); } 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; } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php000066400000000000000000000024141266465517700305700ustar00rootroot00000000000000addFromString('ProjectWithXsdExtensionInPhar.php', <<addFromString('schema/project-1.0.xsd', << EOT ); $phar->setStub(''); src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php000066400000000000000000000012541266465517700272360ustar00rootroot00000000000000arguments = $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; } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/schema/000077500000000000000000000000001266465517700272005ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/schema/project-1.0.xsd000066400000000000000000000006411266465517700316630ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/000077500000000000000000000000001266465517700247115ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/nonvalid.ini000066400000000000000000000000531266465517700272220ustar00rootroot00000000000000{NOT AN INI FILE} {JUST A PLAIN TEXT FILE} src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters.ini000066400000000000000000000000471266465517700275560ustar00rootroot00000000000000[parameters] foo = bar bar = %foo% src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters1.ini000066400000000000000000000000451266465517700276350ustar00rootroot00000000000000[parameters] FOO = foo baz = baz src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/parameters2.ini000066400000000000000000000000501266465517700276320ustar00rootroot00000000000000[parameters] imported_from_ini = true src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/000077500000000000000000000000001266465517700247215ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php000066400000000000000000000015471266465517700275030ustar00rootroot00000000000000parameters = $this->getDefaultParameters(); $this->services = $this->scopedServices = $this->scopeStacks = array(); $this->scopes = array(); $this->scopeChildren = array(); $this->methodMap = array( 'test' => 'getTestService', ); $this->aliases = array(); } /** * {@inheritdoc} */ public function compile() { throw new LogicException('You cannot compile a dumped frozen container.'); } /** * 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))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } return $this->parameters[$name]; } /** * {@inheritdoc} */ public function hasParameter($name) { $name = strtolower($name); return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); } /** * {@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) { $this->parameterBag = new FrozenParameterBag($this->parameters); } return $this->parameterBag; } /** * Gets the default parameters. * * @return array An array of the default parameters */ protected function getDefaultParameters() { return array( 'empty_value' => '', 'some_string' => '-', ); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php000066400000000000000000000063321266465517700274240ustar00rootroot00000000000000targetDirs[$i] = $dir = dirname($dir); } $this->parameters = $this->getDefaultParameters(); $this->services = $this->scopedServices = $this->scopeStacks = array(); $this->scopes = array(); $this->scopeChildren = array(); $this->methodMap = array( 'test' => 'getTestService', ); $this->aliases = array(); } /** * {@inheritdoc} */ public function compile() { throw new LogicException('You cannot compile a dumped frozen container.'); } /** * 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))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } return $this->parameters[$name]; } /** * {@inheritdoc} */ public function hasParameter($name) { $name = strtolower($name); return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); } /** * {@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) { $this->parameterBag = new FrozenParameterBag($this->parameters); } return $this->parameterBag; } /** * Gets the default parameters. * * @return array An array of the default parameters */ protected function getDefaultParameters() { return array( 'foo' => ('wiz'.$this->targetDirs[1]), 'bar' => __DIR__, 'baz' => (__DIR__.'/PhpDumperTest.php'), 'buz' => $this->targetDirs[2], ); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php000066400000000000000000000037501266465517700274340ustar00rootroot00000000000000methodMap = 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'] = call_user_func(array(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; } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services20.php000066400000000000000000000041121266465517700274150ustar00rootroot00000000000000methodMap = array( 'depends_on_request' => 'getDependsOnRequestService', 'request' => 'getRequestService', ); } /** * Gets the 'depends_on_request' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \stdClass A stdClass instance. */ protected function getDependsOnRequestService() { $this->services['depends_on_request'] = $instance = new \stdClass(); $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE)); return $instance; } /** * Gets the 'request' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \Request A Request instance. */ protected function getRequestService() { return $this->services['request'] = new \Request(); } /** * Updates the 'request' service. */ protected function synchronizeRequestService() { if ($this->initialized('depends_on_request')) { $this->get('depends_on_request')->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE)); } } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php000066400000000000000000000027301266465517700273470ustar00rootroot00000000000000getDefaultParameters())); } /** * 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', ), ); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php000066400000000000000000000261011266465517700273460ustar00rootroot00000000000000getDefaultParameters())); $this->methodMap = array( 'bar' => 'getBarService', 'baz' => 'getBazService', 'configurator_service' => 'getConfiguratorServiceService', 'configured_service' => 'getConfiguredServiceService', 'decorated' => 'getDecoratedService', 'decorator_service' => 'getDecoratorServiceService', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', 'factory_service' => 'getFactoryServiceService', '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->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(); $this->get('configurator_service')->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 '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 '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->setBar($this->get('bar')); $instance->initialize(); $instance->foo = 'bar'; $instance->moo = $a; $instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')); 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($this->get('inlined')); 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 = $this->get('new_factory')->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 '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->setBaz($this->get('baz')); $instance->pub = 'pub'; 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', ); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php000066400000000000000000000232141266465517700312240ustar00rootroot00000000000000parameters = $this->getDefaultParameters(); $this->services = $this->scopedServices = $this->scopeStacks = array(); $this->scopes = array(); $this->scopeChildren = array(); $this->methodMap = array( 'bar' => 'getBarService', 'baz' => 'getBazService', 'configured_service' => 'getConfiguredServiceService', 'decorator_service' => 'getDecoratorServiceService', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', 'factory_service' => 'getFactoryServiceService', '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.'); } /** * 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 '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 '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 '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->setBar($this->get('bar')); $instance->initialize(); $instance->foo = 'bar'; $instance->moo = $a; $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar'); 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->setBaz($this->get('baz')); $a->pub = 'pub'; $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))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } return $this->parameters[$name]; } /** * {@inheritdoc} */ public function hasParameter($name) { $name = strtolower($name); return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); } /** * {@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) { $this->parameterBag = new FrozenParameterBag($this->parameters); } return $this->parameterBag; } /** * 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', ); } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/simple.php000066400000000000000000000000571266465517700267250ustar00rootroot00000000000000setParameter('foo', 'foo'); src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/000077500000000000000000000000001266465517700247325ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension1/000077500000000000000000000000001266465517700270275ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension1/services.xml000066400000000000000000000007311266465517700313750ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension2/000077500000000000000000000000001266465517700270305ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extension2/services.xml000066400000000000000000000007311266465517700313760ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/000077500000000000000000000000001266465517700271315ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services1.xml000066400000000000000000000007241266465517700315620ustar00rootroot00000000000000 BAR %project.parameter.foo% src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services2.xml000066400000000000000000000012471266465517700315640ustar00rootroot00000000000000 BAR src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services3.xml000066400000000000000000000012611266465517700315610ustar00rootroot00000000000000 BAR src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services4.xml000066400000000000000000000002751266465517700315660ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services5.xml000066400000000000000000000007561266465517700315730ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services6.xml000066400000000000000000000007751266465517700315750ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/extensions/services7.xml000066400000000000000000000010071266465517700315630ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy-services6.xml000066400000000000000000000010711266465517700306260ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy-services9.xml000066400000000000000000000031731266465517700306360ustar00rootroot00000000000000 BazClass bar foo foo is %foo% %foo% true bar foo is %foo% %foo% src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/namespaces.xml000066400000000000000000000013161266465517700275740ustar00rootroot00000000000000 foo src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/nonvalid.xml000066400000000000000000000000451266465517700272650ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services1.xml000066400000000000000000000004151266465517700273600ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services10.xml000066400000000000000000000010141266465517700274340ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services13.xml000066400000000000000000000005511266465517700274440ustar00rootroot00000000000000 true src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml000066400000000000000000000015331266465517700274460ustar00rootroot00000000000000 app app src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services2.xml000066400000000000000000000023321266465517700273610ustar00rootroot00000000000000 a string bar 0 4 null true true false on off 1.3 1000.3 a string foo bar value PHP_EOL src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services20.xml000066400000000000000000000011131266465517700274350ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services21.xml000066400000000000000000000014311266465517700274410ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services3.xml000066400000000000000000000007371266465517700273710ustar00rootroot00000000000000 foo true false src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4.xml000066400000000000000000000010151266465517700273600ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services4_bad_import.xml000066400000000000000000000005471266465517700315710ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services5.xml000066400000000000000000000012441266465517700273650ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml000066400000000000000000000047361266465517700273770ustar00rootroot00000000000000 %path%/foo.php foo true false service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default") foo true false src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services7.xml000066400000000000000000000005271266465517700273720ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services8.xml000066400000000000000000000015701266465517700273720ustar00rootroot00000000000000 %baz% bar foo is %%foo bar @escapeme true false null 0 1000.3 true false null src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml000066400000000000000000000104611266465517700273720ustar00rootroot00000000000000 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 bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_with_empty_name.xml000066400000000000000000000006261266465517700315040ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/tag_without_name.xml000066400000000000000000000006161266465517700310150ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/withdoctype.xml000066400000000000000000000000611266465517700300140ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/000077500000000000000000000000001266465517700250745ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_calls.yml000066400000000000000000000001071266465517700275210ustar00rootroot00000000000000services: method_call1: class: FooClass calls: foo src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_format.yml000066400000000000000000000000261266465517700277130ustar00rootroot00000000000000parameters: FOO: bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_import.yml000066400000000000000000000000271266465517700277360ustar00rootroot00000000000000imports: - foo.yml src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_imports.yml000066400000000000000000000000251266465517700301170ustar00rootroot00000000000000imports: foo:bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_parameters.yml000066400000000000000000000000301266465517700305610ustar00rootroot00000000000000parameters: foo:bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_service.yml000066400000000000000000000000271266465517700300640ustar00rootroot00000000000000services: foo: bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/bad_services.yml000066400000000000000000000000161266465517700302450ustar00rootroot00000000000000services: foo src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag1.yml000066400000000000000000000001561266465517700271240ustar00rootroot00000000000000services: foo_service: class: FooClass # tags is not an array tags: string src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag2.yml000066400000000000000000000002161266465517700271220ustar00rootroot00000000000000services: foo_service: class: FooClass tags: # tag is missing the name key foo_tag: { foo: bar } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag3.yml000066400000000000000000000002451266465517700271250ustar00rootroot00000000000000services: foo_service: class: FooClass tags: # tag-attribute is not a scalar - { name: foo, bar: { foo: foo, bar: bar } } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/badtag4.yml000066400000000000000000000001641266465517700271260ustar00rootroot00000000000000services: foo_service: class: FooClass tags: # tag is not an array - foo src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy-services6.yml000066400000000000000000000004321266465517700307710ustar00rootroot00000000000000services: constructor: { class: FooClass, factory_method: getInstance } factory_service: { class: BazClass, factory_method: getInstance, factory_service: baz_factory } request: class: Request synthetic: true synchronized: true lazy: true src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy-services9.yml000066400000000000000000000015441266465517700310010ustar00rootroot00000000000000parameters: baz_class: BazClass foo: bar services: foo: class: Bar\FooClass tags: - { name: foo, foo: foo } - { name: foo, bar: bar } factory_class: Bar\FooClass factory_method: getInstance 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, { }] configurator: sc_configure foo.baz: class: '%baz_class%' factory_class: '%baz_class%' factory_method: getInstance configurator: ['%baz_class%', configureStatic1] factory_service: class: Bar factory_method: getInstance factory_service: foo.baz src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid1.yml000066400000000000000000000000131266465517700275040ustar00rootroot00000000000000foo: bar src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/nonvalid2.yml000066400000000000000000000000061266465517700275070ustar00rootroot00000000000000false src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services1.yml000066400000000000000000000000011266465517700275120ustar00rootroot00000000000000 src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services10.yml000066400000000000000000000002201266465517700275750ustar00rootroot00000000000000parameters: project.parameter.foo: BAR services: project.service.foo: class: BAR project: test: '%project.parameter.foo%' src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services11.yml000066400000000000000000000000211266465517700275750ustar00rootroot00000000000000foobarfoobar: {} src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services13.yml000066400000000000000000000001071266465517700276040ustar00rootroot00000000000000# used to test imports in XML parameters: imported_from_yaml: true src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services14.yml000066400000000000000000000002361266465517700276100ustar00rootroot00000000000000services: factory: { class: FooBarClass, factory: baz:getClass} factory_with_static_call: { class: FooBarClass, factory: FooBacFactory::createFooBar} src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services2.yml000066400000000000000000000003121266465517700275200ustar00rootroot00000000000000parameters: FOO: bar values: - true - false - 0 - 1000.3 bar: foo escape: '@@escapeme' foo_bar: '@foo_bar' MixedCase: MixedCaseKey: value src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services20.yml000066400000000000000000000003121266465517700276000ustar00rootroot00000000000000services: request: class: Request synthetic: true synchronized: true depends_on_request: class: stdClass calls: - [setRequest, ['@?request']] src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services21.yml000066400000000000000000000004751266465517700276130ustar00rootroot00000000000000services: manager: class: UserManager arguments: - true calls: - method: setLogger arguments: - '@logger' - method: setClass arguments: - User tags: - name: manager alias: user src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services3.yml000066400000000000000000000001041266465517700275200ustar00rootroot00000000000000parameters: foo: foo values: - true - false src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml000066400000000000000000000004751266465517700275340ustar00rootroot00000000000000imports: - { 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" } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4_bad_import.yml000066400000000000000000000000771266465517700317320ustar00rootroot00000000000000imports: - { resource: foo_fake.yml, ignore_errors: true } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml000066400000000000000000000025621266465517700275350ustar00rootroot00000000000000services: foo: { class: FooClass } baz: { class: BazClass } scope.container: { class: FooClass, scope: container } scope.custom: { class: FooClass, scope: custom } scope.prototype: { class: FooClass, scope: prototype } 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 decorator_service: decorates: decorated decorator_service_with_name: decorates: decorated decoration_inner_name: decorated.pif-pouf new_factory1: { class: FooBarClass, factory: factory} new_factory2: { class: FooBarClass, factory: ['@baz', getClass]} new_factory3: { class: FooBarClass, factory: [BazClass, getInstance]} src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services7.yml000066400000000000000000000000471266465517700275320ustar00rootroot00000000000000services: foo: { class: BarClass } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services8.yml000066400000000000000000000002441266465517700275320ustar00rootroot00000000000000parameters: foo: '%baz%' baz: bar bar: 'foo is %%foo bar' escape: '@@escapeme' values: [true, false, null, 0, 1000.3, 'true', 'false', 'null'] src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml000066400000000000000000000051051266465517700275340ustar00rootroot00000000000000parameters: 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%' scope: prototype 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] decorated: class: stdClass decorator_service: class: stdClass decorates: decorated decorator_service_with_name: class: stdClass decorates: decorated decoration_inner_name: decorated.pif-pouf 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] alias_for_foo: '@foo' alias_for_alias: '@foo' src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_empty_string.yml000066400000000000000000000002171266465517700321760ustar00rootroot00000000000000services: foo_service: class: FooClass tags: # tag name is an empty string - { name: '', foo: bar } src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/tag_name_no_string.yml000066400000000000000000000002141266465517700314510ustar00rootroot00000000000000services: foo_service: class: FooClass tags: # tag name is not a string - { name: [], foo: bar } src/Symfony/Component/DependencyInjection/Tests/LazyProxy/000077500000000000000000000000001266465517700243025ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/000077500000000000000000000000001266465517700267615ustar00rootroot00000000000000RealServiceInstantiatorTest.php000066400000000000000000000021711266465517700350600ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator * * 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 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 \PHPUnit_Framework_TestCase { public function testInstantiateProxy() { $instantiator = new RealServiceInstantiator(); $instance = new \stdClass(); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $callback = function () use ($instance) { return $instance; }; $this->assertSame($instance, $instantiator->instantiateProxy($container, new Definition(), 'foo', $callback)); } } src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/000077500000000000000000000000001266465517700262065ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/NullDumperTest.php000066400000000000000000000017421266465517700316520ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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)); } } src/Symfony/Component/DependencyInjection/Tests/LegacyContainerBuilderTest.php000066400000000000000000000030571266465517700302550ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; /** * @group legacy */ class LegacyContainerBuilderTest extends \PHPUnit_Framework_TestCase { public function testCreateServiceFactoryMethod() { $builder = new ContainerBuilder(); $builder->register('bar', 'stdClass'); $builder->register('foo1', 'Bar\FooClass')->setFactoryClass('Bar\FooClass')->setFactoryMethod('getInstance')->addArgument(array('foo' => '%value%', '%value%' => 'foo', new Reference('bar'))); $builder->setParameter('value', 'bar'); $this->assertTrue($builder->get('foo1')->called, '->createService() calls the factory method to create the service instance'); $this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar')), $builder->get('foo1')->arguments, '->createService() passes the arguments to the factory method'); } public function testCreateServiceFactoryService() { $builder = new ContainerBuilder(); $builder->register('baz_service')->setFactoryService('baz_factory')->setFactoryMethod('getInstance'); $builder->register('baz_factory', 'BazClass'); $this->assertInstanceOf('BazClass', $builder->get('baz_service')); } } src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php000066400000000000000000000032071266465517700271110ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Definition; /** * @group legacy */ class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase { public function testSetGetFactoryClass() { $def = new Definition('stdClass'); $this->assertNull($def->getFactoryClass()); $this->assertSame($def, $def->setFactoryClass('stdClass2'), '->setFactoryClass() implements a fluent interface.'); $this->assertEquals('stdClass2', $def->getFactoryClass(), '->getFactoryClass() returns current class to construct this service.'); } public function testSetGetFactoryMethod() { $def = new Definition('stdClass'); $this->assertNull($def->getFactoryMethod()); $this->assertSame($def, $def->setFactoryMethod('foo'), '->setFactoryMethod() implements a fluent interface'); $this->assertEquals('foo', $def->getFactoryMethod(), '->getFactoryMethod() returns the factory method name'); } public function testSetGetFactoryService() { $def = new Definition('stdClass'); $this->assertNull($def->getFactoryService()); $this->assertSame($def, $def->setFactoryService('foo.bar'), '->setFactoryService() implements a fluent interface.'); $this->assertEquals('foo.bar', $def->getFactoryService(), '->getFactoryService() returns current service to construct this service.'); } } src/Symfony/Component/DependencyInjection/Tests/Loader/000077500000000000000000000000001266465517700235275ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php000066400000000000000000000022341266465517700276440ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\ClosureLoader; class ClosureLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php000066400000000000000000000041101266465517700275420ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\IniFileLoader; use Symfony\Component\Config\FileLocator; class IniFileLoaderTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; protected $container; protected $loader; public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } protected function setUp() { $this->container = new ContainerBuilder(); $this->loader = new IniFileLoader($this->container, new FileLocator(self::$fixturesPath.'/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'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The file "foo.ini" does not exist (in: */ public function testExceptionIsRaisedWhenIniFileDoesNotExist() { $this->loader->load('foo.ini'); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The "nonvalid.ini" file is not valid. */ public function testExceptionIsRaisedWhenIniFileCannotBeParsed() { @$this->loader->load('nonvalid.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'); } } src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php000066400000000000000000000022551266465517700275620ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; use Symfony\Component\Config\FileLocator; class PhpFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php000066400000000000000000000710451266465517700275760ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; 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 \PHPUnit_Framework_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 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.'/xml')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), $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'); // 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(4, $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'); // 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('BazClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones'); } /** * @group legacy */ public function testLegacyLoadServices() { $container = new ContainerBuilder(); $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); $loader->load('legacy-services6.xml'); $services = $container->getDefinitions(); $this->assertEquals('FooClass', $services['constructor']->getClass()); $this->assertEquals('getInstance', $services['constructor']->getFactoryMethod()); $this->assertNull($services['factory_service']->getClass()); $this->assertEquals('baz_factory', $services['factory_service']->getFactoryService()); $this->assertEquals('getInstance', $services['factory_service']->getFactoryMethod()); $this->assertTrue($services['request']->isSynthetic(), '->load() parses the synthetic flag'); $this->assertTrue($services['request']->isSynchronized(), '->load() parses the synchronized flag'); $this->assertTrue($services['request']->isLazy(), '->load() parses the lazy flag'); $this->assertNull($services['request']->getDecoratedService()); } 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->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('container', $services['scope.container']->getScope()); $this->assertEquals('custom', $services['scope.custom']->getScope()); $this->assertEquals('prototype', $services['scope.prototype']->getScope()); $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', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false), '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', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false), '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), $services['decorator_service']->getDecoratedService()); $this->assertEquals(array('decorated', 'decorated.pif-pouf'), $services['decorator_service_with_name']->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 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]); } } src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php000066400000000000000000000411651266465517700277400ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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), '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.'/yaml')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), 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), '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'); // Bad import throws no exception due to ignore_errors value. $loader->load('services4_bad_import.yml'); } /** * @group legacy */ public function testLegacyLoadServices() { $container = new ContainerBuilder(); $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')); $loader->load('legacy-services6.yml'); $services = $container->getDefinitions(); $this->assertEquals('FooClass', $services['constructor']->getClass()); $this->assertEquals('getInstance', $services['constructor']->getFactoryMethod()); $this->assertEquals('BazClass', $services['factory_service']->getClass()); $this->assertEquals('baz_factory', $services['factory_service']->getFactoryService()); $this->assertEquals('getInstance', $services['factory_service']->getFactoryMethod()); $this->assertTrue($services['request']->isSynthetic(), '->load() parses the synthetic flag'); $this->assertTrue($services['request']->isSynchronized(), '->load() parses the synchronized flag'); $this->assertTrue($services['request']->isLazy(), '->load() parses the lazy flag'); $this->assertNull($services['request']->getDecoratedService()); } 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->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('container', $services['scope.container']->getScope()); $this->assertEquals('custom', $services['scope.custom']->getScope()); $this->assertEquals('prototype', $services['scope.prototype']->getScope()); $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), $services['decorator_service']->getDecoratedService()); $this->assertEquals(array('decorated', 'decorated.pif-pouf'), $services['decorator_service_with_name']->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 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'); } } src/Symfony/Component/DependencyInjection/Tests/ParameterBag/000077500000000000000000000000001266465517700246535ustar00rootroot00000000000000src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php000066400000000000000000000027351266465517700317510ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; class FrozenParameterBagTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php000066400000000000000000000324741266465517700305700ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } } public function testGetThrowParameterNotFoundException() { $bag = new ParameterBag(array( 'foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', )); try { $bag->get('foo1'); $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 "foo1". Did you mean this: "foo"?', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices'); } try { $bag->get('bag'); $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 "bag". Did you mean one of these: "bar", "baz"?', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices'); } try { $bag->get(''); $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 "".', $e->getMessage(), '->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices'); } } 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.'), ); } } src/Symfony/Component/DependencyInjection/Tests/ParameterTest.php000066400000000000000000000011731266465517700256140ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Parameter; class ParameterTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/DependencyInjection/Tests/ReferenceTest.php000066400000000000000000000015151266465517700255720ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; class ReferenceTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/DependencyInjection/Variable.php000066400000000000000000000014711266465517700234600ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @param string $name */ public function __construct($name) { $this->name = $name; } /** * Converts the object to a string. * * @return string */ public function __toString() { return $this->name; } } src/Symfony/Component/DependencyInjection/composer.json000066400000000000000000000022251266465517700237420ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/yaml": "~2.1", "symfony/config": "~2.2", "symfony/expression-language": "~2.6" }, "conflict": { "symfony/expression-language": "<2.6" }, "suggest": { "symfony/yaml": "", "symfony/config": "", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them" }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/DependencyInjection/phpunit.xml.dist000066400000000000000000000015071266465517700243750ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/DomCrawler/000077500000000000000000000000001266465517700173355ustar00rootroot00000000000000src/Symfony/Component/DomCrawler/.gitignore000066400000000000000000000000421266465517700213210ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/DomCrawler/CHANGELOG.md000066400000000000000000000031331266465517700211460ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/DomCrawler/Crawler.php000066400000000000000000000754711266465517700214630ustar00rootroot00000000000000 * * 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\CssSelector; /** * Crawler eases navigation of a list of \DOMElement objects. * * @author Fabien Potencier */ class Crawler extends \SplObjectStorage { /** * @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; /** * Constructor. * * @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); } /** * Removes all the nodes. */ public function clear() { $this->removeAll($this); } /** * 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() if (function_exists('mb_convert_encoding')) { $content = mb_convert_encoding($content, 'HTML-ENTITIES', $charset); } elseif (function_exists('iconv')) { $content = preg_replace_callback( '/[\x80-\xFF]+/', function ($m) { $m = unpack('C*', $m[0]); $i = 1; $entities = ''; while (isset($m[$i])) { 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; }, iconv($charset, 'UTF-8', $content) ); } } 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 */ public function addXmlContent($content, $charset = 'UTF-8') { // 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, LIBXML_NONET | (defined('LIBXML_PARSEHUGE') ? LIBXML_PARSEHUGE : 0)); } libxml_use_internal_errors($internalErrors); libxml_disable_entity_loader($disableEntities); $this->addDocument($dom); } /** * 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) { $this->attach($node->documentElement); } else { $this->attach($node); } } // Serializing and unserializing a crawler creates DOM objects in a corrupted state. DOM elements are not properly serializable. public function unserialize($serialized) { throw new \BadMethodCallException('A Crawler cannot be serialized.'); } public function serialize() { throw new \BadMethodCallException('A Crawler cannot be serialized.'); } /** * Returns a node given its position in the node list. * * @param int $position The position * * @return Crawler A new instance of the Crawler with the selected node, or an empty Crawler if it does not exist. */ public function eq($position) { foreach ($this as $i => $node) { if ($i == $position) { return $this->createSubCrawler($node); } } 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 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 Crawler A Crawler instance with the sliced nodes */ public function slice($offset = 0, $length = -1) { return $this->createSubCrawler(iterator_to_array(new \LimitIterator($this, $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 Crawler A Crawler instance with the selected nodes. */ public function reduce(\Closure $closure) { $nodes = array(); foreach ($this 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 Crawler A Crawler instance with the first selected node */ public function first() { return $this->eq(0); } /** * Returns the last node of the current selection. * * @return Crawler A Crawler instance with the last selected node */ public function last() { return $this->eq(count($this) - 1); } /** * Returns the siblings nodes of the current selection. * * @return Crawler A Crawler instance with the sibling nodes * * @throws \InvalidArgumentException When current node is empty */ public function siblings() { if (!count($this)) { 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 Crawler A Crawler instance with the next sibling nodes * * @throws \InvalidArgumentException When current node is empty */ public function nextAll() { if (!count($this)) { 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 Crawler A Crawler instance with the previous sibling nodes * * @throws \InvalidArgumentException */ public function previousAll() { if (!count($this)) { 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 Crawler A Crawler instance with the parents nodes of the current selection * * @throws \InvalidArgumentException When current node is empty */ public function parents() { if (!count($this)) { throw new \InvalidArgumentException('The current node list is empty.'); } $node = $this->getNode(0); $nodes = array(); while ($node = $node->parentNode) { if (1 === $node->nodeType) { $nodes[] = $node; } } return $this->createSubCrawler($nodes); } /** * Returns the children nodes of the current selection. * * @return Crawler A Crawler instance with the children nodes * * @throws \InvalidArgumentException When current node is empty */ public function children() { if (!count($this)) { 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 (!count($this)) { 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 (!count($this)) { 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 (!count($this)) { 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 (!count($this)) { throw new \InvalidArgumentException('The current node list is empty.'); } $html = ''; foreach ($this->getNode(0)->childNodes as $child) { $html .= $child->ownerDocument->saveHTML($child); } return $html; } /** * 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 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 Crawler A new instance of Crawler with the filtered list of nodes */ 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 Crawler A new instance of Crawler with the filtered list of nodes * * @throws \RuntimeException if the CssSelector Component is not available */ public function filter($selector) { if (!class_exists('Symfony\\Component\\CssSelector\\CssSelector')) { throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector is not installed (you can use filterXPath instead).'); } // The CssSelector already prefixes the selector with descendant-or-self:: return $this->filterRelativeXPath(CssSelector::toXPath($selector)); } /** * Selects links by name or alt value for clickable images. * * @param string $value The link text * * @return Crawler A new instance of Crawler with the filtered list of nodes */ 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 a button by name or alt value for images. * * @param string $value The button text * * @return Crawler A new instance of Crawler with the filtered list of nodes */ 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 */ public function link($method = 'get') { if (!count($this)) { throw new \InvalidArgumentException('The current node list is empty.'); } $node = $this->getNode(0); 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 */ public function links() { $links = array(); foreach ($this as $node) { $links[] = new Link($node, $this->baseHref, 'get'); } return $links; } /** * 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 */ public function form(array $values = null, $method = null) { if (!count($this)) { throw new \InvalidArgumentException('The current node list is empty.'); } $form = new Form($this->getNode(0), $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 Crawler */ private function filterRelativeXPath($xpath) { $prefixes = $this->findNamespacePrefixes($xpath); $crawler = $this->createSubCrawler(null); foreach ($this 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(); $unionPattern = '/\|(?![^\[]*\])/'; // An expression which will never match to replace expressions which cannot match in the crawler // We cannot simply drop $nonMatchingExpression = 'a[name() = "b"]'; // Split any unions into individual expressions. foreach (preg_split($unionPattern, $xpath) as $expression) { $expression = trim($expression); $parenthesis = ''; // If the union is inside some braces, we need to preserve the opening braces and apply // the change only inside it. if (preg_match('/^[\(\s*]+/', $expression, $matches)) { $parenthesis = $matches[0]; $expression = substr($expression, strlen($parenthesis)); } // BC for Symfony 2.4 and lower were elements were adding in a fake _root parent if (0 === strpos($expression, '/_root/')) { $expression = './'.substr($expression, 7); } elseif (0 === strpos($expression, 'self::*/')) { $expression = './'.substr($expression, 8); } // add prefix before absolute element selector if (empty($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] || 0 === strpos($expression, 'self::')) { // the only direct child in Symfony 2.4 and lower is _root, which is already handled previously // so let's drop the expression entirely $expression = $nonMatchingExpression; } elseif ('.' === $expression[0]) { // '.' is the fake root element in Symfony 2.4 and lower, which is excluded from results $expression = $nonMatchingExpression; } elseif (0 === strpos($expression, 'descendant::')) { $expression = 'descendant-or-self::'.substr($expression, strlen('descendant::')); } 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; } return implode(' | ', $expressions); } /** * @param int $position * * @return \DOMElement|null */ public function getNode($position) { foreach ($this as $i => $node) { if ($i == $position) { return $node; } } } /** * @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); return $crawler; } } src/Symfony/Component/DomCrawler/Field/000077500000000000000000000000001266465517700203605ustar00rootroot00000000000000src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php000066400000000000000000000220551266465517700240570ustar00rootroot00000000000000 * * 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. * * This method should only be used internally. * * @param \DOMElement $node * * @throws \LogicException When choice provided is not multiple nor radio */ 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(); $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : 'on'; $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; } } src/Symfony/Component/DomCrawler/Field/FileFormField.php000066400000000000000000000064571266465517700235540ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/DomCrawler/Field/FormField.php000066400000000000000000000043031266465517700227400ustar00rootroot00000000000000 * * 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 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(); } src/Symfony/Component/DomCrawler/Field/InputFormField.php000066400000000000000000000026241266465517700237640ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/DomCrawler/Field/TextareaFormField.php000066400000000000000000000017231266465517700244410ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/DomCrawler/Form.php000066400000000000000000000351511266465517700207560ustar00rootroot00000000000000 * * 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 Form */ 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 * * @throws \InvalidArgumentException when the name is malformed */ 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[] An array of fields */ 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)); } } } src/Symfony/Component/DomCrawler/FormFieldRegistry.php000066400000000000000000000144611266465517700234540ustar00rootroot00000000000000 * * 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. */ class FormFieldRegistry { private $fields = array(); private $base; /** * Adds a field to the registry. * * @param FormField $field The field * * @throws \InvalidArgumentException when the name is malformed */ 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 * * @throws \InvalidArgumentException when the name is malformed */ 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 when the name is malformed * @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 when the name is malformed * @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 FormFieldRegistry */ 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 * * @throws \InvalidArgumentException when the name is malformed */ private function getSegments($name) { if (preg_match('/^(?P[^[]+)(?P(\[.*)|$)/', $name, $m)) { $segments = array($m['base']); while (!empty($m['extra'])) { if (preg_match('/^\[(?P.*?)\](?P.*)$/', $m['extra'], $m)) { $segments[] = $m['segment']; } else { throw new \InvalidArgumentException(sprintf('Malformed field path "%s"', $name)); } } return $segments; } throw new \InvalidArgumentException(sprintf('Malformed field path "%s"', $name)); } } src/Symfony/Component/DomCrawler/LICENSE000066400000000000000000000020511266465517700203400ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/DomCrawler/Link.php000066400000000000000000000124031266465517700207430ustar00rootroot00000000000000 * * 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 { /** * @var \DOMElement */ protected $node; /** * @var string The method to use for the link */ protected $method; /** * @var string The URI of the page where the link is embedded (or the base href) */ protected $currentUri; /** * Constructor. * * @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 */ protected function getRawUri() { return $this->node->getAttribute('href'); } /** * 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 */ 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; } /** * 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; } } src/Symfony/Component/DomCrawler/README.md000066400000000000000000000015261266465517700206200ustar00rootroot00000000000000DomCrawler Component ==================== DomCrawler eases DOM navigation for HTML and XML documents. If you are familiar with jQuery, DomCrawler is a PHP equivalent: ```php use Symfony\Component\DomCrawler\Crawler; $crawler = new Crawler(); $crawler->addContent('

    Hello World!

    '); print $crawler->filterXPath('descendant-or-self::body/p')->text(); ``` If you are also using the CssSelector component, you can use CSS Selectors instead of XPath expressions: ```php use Symfony\Component\DomCrawler\Crawler; $crawler = new Crawler(); $crawler->addContent('

    Hello World!

    '); print $crawler->filter('body > p')->text(); ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/DomCrawler/ $ composer install $ phpunit src/Symfony/Component/DomCrawler/Tests/000077500000000000000000000000001266465517700204375ustar00rootroot00000000000000src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php000077500000000000000000001341431266465517700234200ustar00rootroot00000000000000 * * 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 Symfony\Component\CssSelector\CssSelector; use Symfony\Component\DomCrawler\Crawler; class CrawlerTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $crawler = new Crawler(); $this->assertCount(0, $crawler, '__construct() returns an empty crawler'); $crawler = new Crawler(new \DOMNode()); $this->assertCount(1, $crawler, '__construct() takes a node as a first argument'); } 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'); 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 \DOMElement'); $crawler = new Crawler(); $crawler->add('Foo'); $this->assertEquals('Foo', $crawler->filterXPath('//body')->text(), '->add() adds nodes from a string'); } /** * @expectedException \InvalidArgumentException */ public function testAddInvalidNode() { $crawler = new Crawler(); $crawler->add(1); } 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'); $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'); $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() { 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 \DOMElement'); } public function testClear() { $crawler = new Crawler(new \DOMNode()); $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 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('/_root/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 )')); } 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 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('/_root'), '->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(9, $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() { CssSelector::disableHtmlExtension(); $crawler = $this->createTestXmlCrawler()->filter('yt|accessControl'); $this->assertCount(2, $crawler, '->filter() automatically registers namespaces'); } public function testFilterWithMultipleNamespaces() { CssSelector::disableHtmlExtension(); $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 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'
    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'); } } public function testSelectLinkAndLinkFiltered() { $html = <<<'HTML'
    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 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'); } } 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'); } } 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 testSetValueOnMultiValuedFieldsWithMalformedName() { $form = $this->createForm('
    '); try { $form['foo[bar'] = 'bar'; $this->fail('->offsetSet() throws an \InvalidArgumentException exception if the name is malformed.'); } catch (\InvalidArgumentException $e) { $this->assertTrue(true, '->offsetSet() throws an \InvalidArgumentException exception if the name is malformed.'); } } 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'); } /** * @expectedException \InvalidArgumentException */ public function testFormFieldRegistryAddThrowAnExceptionWhenTheNameIsMalformed() { $registry = new FormFieldRegistry(); $registry->add($this->getFormFieldMock('[foo]')); } /** * @expectedException \InvalidArgumentException */ public function testFormFieldRegistryRemoveThrowAnExceptionWhenTheNameIsMalformed() { $registry = new FormFieldRegistry(); $registry->remove('[foo]'); } /** * @expectedException \InvalidArgumentException */ public function testFormFieldRegistryGetThrowAnExceptionWhenTheNameIsMalformed() { $registry = new FormFieldRegistry(); $registry->get('[foo]'); } /** * @expectedException \InvalidArgumentException */ public function testFormFieldRegistryGetThrowAnExceptionWhenTheFieldDoesNotExist() { $registry = new FormFieldRegistry(); $registry->get('foo'); } /** * @expectedException \InvalidArgumentException */ public function testFormFieldRegistrySetThrowAnExceptionWhenTheNameIsMalformed() { $registry = new FormFieldRegistry(); $registry->set('[foo]', null); } /** * @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() { } } src/Symfony/Component/Form/Guess/000077500000000000000000000000001266465517700172675ustar00rootroot00000000000000src/Symfony/Component/Form/Guess/Guess.php000066400000000000000000000060631266465517700210730ustar00rootroot00000000000000 * * 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 Guess|null The guess with the highest confidence */ 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; } } src/Symfony/Component/Form/Guess/TypeGuess.php000066400000000000000000000030631266465517700217320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Form/Guess/ValueGuess.php000066400000000000000000000017451266465517700220720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Form/LICENSE000066400000000000000000000020511266465517700172040ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Form/NativeRequestHandler.php000066400000000000000000000154511266465517700230150ustar00rootroot00000000000000 * * 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. $contentLength = $this->serverParams->getContentLength(); $maxContentLength = $this->serverParams->getPostMaxSize(); if (!empty($maxContentLength) && $contentLength > $maxContentLength) { // Submit the form, but don't clear the default values $form->submit(null, false); $form->addError(new FormError( $form->getConfig()->getOption('post_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; } } src/Symfony/Component/Form/PreloadedExtension.php000066400000000000000000000044741266465517700225170ustar00rootroot00000000000000 * * 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 exceptions 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 array[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->types = $types; $this->typeExtensions = $typeExtensions; $this->typeGuesser = $typeGuesser; } /** * {@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; } } src/Symfony/Component/Form/README.md000066400000000000000000000010341266465517700174560ustar00rootroot00000000000000Form Component ============== Form provides tools for defining forms, rendering and mapping request data to related models. Furthermore it provides integration with the Validation component. Resources --------- Silex integration: https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/FormServiceProvider.php Documentation: https://symfony.com/doc/2.7/book/forms.html Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Form/ $ composer install $ phpunit src/Symfony/Component/Form/RequestHandlerInterface.php000066400000000000000000000012341266465517700234610ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Form/ResolvedFormType.php000066400000000000000000000227401266465517700221700ustar00rootroot00000000000000 * * 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; 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) { if (!preg_match('/^[a-z0-9_]*$/i', $innerType->getName())) { throw new InvalidArgumentException(sprintf( 'The "%s" form type name ("%s") is not valid. Names must only contain letters, numbers, and "_".', get_class($innerType), $innerType->getName() )); } 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 getName() { return $this->innerType->getName(); } /** * {@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\OptionsResolverInterface 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->setDefaultOptions($this->optionsResolver); if (method_exists($this->innerType, 'configureOptions')) { $reflector = new \ReflectionMethod($this->innerType, 'setDefaultOptions'); $isOldOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType'; $reflector = new \ReflectionMethod($this->innerType, 'configureOptions'); $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType'; if ($isOldOverwritten && !$isNewOverwritten) { @trigger_error(get_class($this->innerType).': The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED); } } else { @trigger_error(get_class($this->innerType).': The FormTypeInterface::configureOptions() method will be added in Symfony 3.0. You should extend AbstractType or implement it in your classes.', E_USER_DEPRECATED); } foreach ($this->typeExtensions as $extension) { $extension->setDefaultOptions($this->optionsResolver); if (method_exists($extension, 'configureOptions')) { $reflector = new \ReflectionMethod($extension, 'setDefaultOptions'); $isOldOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension'; $reflector = new \ReflectionMethod($extension, 'configureOptions'); $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension'; if ($isOldOverwritten && !$isNewOverwritten) { @trigger_error(get_class($extension).': The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED); } } else { @trigger_error(get_class($this->innerType).': The FormTypeExtensionInterface::configureOptions() method will be added in Symfony 3.0. You should extend AbstractTypeExtension or implement it in your classes.', E_USER_DEPRECATED); } } } 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); } } src/Symfony/Component/Form/ResolvedFormTypeFactory.php000066400000000000000000000012221266465517700235100ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Form/ResolvedFormTypeFactoryInterface.php000066400000000000000000000024261266465517700253400ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Form/ResolvedFormTypeInterface.php000066400000000000000000000064121266465517700240070ustar00rootroot00000000000000 * * 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\OptionsResolverInterface; /** * A wrapper for a form type and its extensions. * * @author Bernhard Schussek */ interface ResolvedFormTypeInterface { /** * Returns the name of the type. * * @return string The type name. */ public function getName(); /** * Returns the parent type. * * @return ResolvedFormTypeInterface|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 OptionsResolverInterface The options resolver. */ public function getOptionsResolver(); } src/Symfony/Component/Form/Resources/000077500000000000000000000000001266465517700201535ustar00rootroot00000000000000src/Symfony/Component/Form/Resources/config/000077500000000000000000000000001266465517700214205ustar00rootroot00000000000000src/Symfony/Component/Form/Resources/config/validation.xml000066400000000000000000000010561266465517700242760ustar00rootroot00000000000000 src/Symfony/Component/Form/Resources/translations/000077500000000000000000000000001266465517700226745ustar00rootroot00000000000000src/Symfony/Component/Form/Resources/translations/validators.ar.xlf000066400000000000000000000020171266465517700261600ustar00rootroot00000000000000 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. قيمة رمز الموقع غير صحيحة. من فضلك اعد ارسال النموذج. src/Symfony/Component/Form/Resources/translations/validators.az.xlf000066400000000000000000000016561266465517700262000ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.bg.xlf000066400000000000000000000021151266465517700261450ustar00rootroot00000000000000 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 токен. Моля, опитайте да изпратите формата отново. src/Symfony/Component/Form/Resources/translations/validators.ca.xlf000066400000000000000000000017061266465517700261450ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.cs.xlf000066400000000000000000000016651266465517700261730ustar00rootroot00000000000000 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ář. src/Symfony/Component/Form/Resources/translations/validators.da.xlf000066400000000000000000000016011266465517700261400ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.de.xlf000066400000000000000000000017431266465517700261530ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.el.xlf000066400000000000000000000022071266465517700261570ustar00rootroot00000000000000 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 δεν είναι έγκυρο. Παρακαλούμε δοκιμάστε να υποβάλετε τη φόρμα ξανά. src/Symfony/Component/Form/Resources/translations/validators.en.xlf000066400000000000000000000016501266465517700261620ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.es.xlf000066400000000000000000000017271266465517700261740ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.et.xlf000066400000000000000000000016601266465517700261710ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.eu.xlf000066400000000000000000000015741266465517700261760ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.fa.xlf000066400000000000000000000020361266465517700261450ustar00rootroot00000000000000 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 نامعتبر است. لطفا فرم را مجددا ارسال فرمایید.. src/Symfony/Component/Form/Resources/translations/validators.fi.xlf000066400000000000000000000017331266465517700261600ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.fr.xlf000066400000000000000000000017271266465517700261740ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.gl.xlf000066400000000000000000000017211266465517700261610ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.he.xlf000066400000000000000000000017431266465517700261570ustar00rootroot00000000000000 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 אינו חוקי. אנא נסה לשלוח שוב את הטופס. src/Symfony/Component/Form/Resources/translations/validators.hr.xlf000066400000000000000000000016721266465517700261750ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.hu.xlf000066400000000000000000000017141266465517700261750ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.hy.xlf000066400000000000000000000020711266465517700261760ustar00rootroot00000000000000 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 արժեքը անթույլատրելի է: Փորձեք նորից ուղարկել ձևը. src/Symfony/Component/Form/Resources/translations/validators.id.xlf000066400000000000000000000016761266465517700261640ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.it.xlf000066400000000000000000000016711266465517700261770ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.ja.xlf000066400000000000000000000020311266465517700261440ustar00rootroot00000000000000 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トークンが無効です、再送信してください。 src/Symfony/Component/Form/Resources/translations/validators.lb.xlf000066400000000000000000000017751266465517700261650ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.lt.xlf000066400000000000000000000016511266465517700262000ustar00rootroot00000000000000 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ą. src/Symfony/Component/Form/Resources/translations/validators.lv.xlf000066400000000000000000000017611266465517700262040ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.mn.xlf000066400000000000000000000020161266465517700261670ustar00rootroot00000000000000 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 буруу байна. Формоо дахин илгээнэ үү. src/Symfony/Component/Form/Resources/translations/validators.nl.xlf000066400000000000000000000016751266465517700262000ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.no.xlf000066400000000000000000000015501266465517700261730ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.pl.xlf000066400000000000000000000017071266465517700261760ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.pt.xlf000066400000000000000000000017111266465517700262010ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf000066400000000000000000000017011266465517700265630ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.ro.xlf000066400000000000000000000017421266465517700262020ustar00rootroot00000000000000 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ă. src/Symfony/Component/Form/Resources/translations/validators.ru.xlf000066400000000000000000000022151266465517700262040ustar00rootroot00000000000000 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 значение недопустимо. Пожалуйста, попробуйте повторить отправку формы. src/Symfony/Component/Form/Resources/translations/validators.sk.xlf000066400000000000000000000016771266465517700262060ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.sl.xlf000066400000000000000000000016551266465517700262030ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf000066400000000000000000000020631266465517700271740ustar00rootroot00000000000000 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 вредност је невалидна. Покушајте поново. src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf000066400000000000000000000016561266465517700271700ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.sv.xlf000066400000000000000000000015541266465517700262130ustar00rootroot00000000000000 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. src/Symfony/Component/Form/Resources/translations/validators.uk.xlf000066400000000000000000000021711266465517700261760ustar00rootroot00000000000000 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 значення недопустиме. Будь-ласка, спробуйте відправити форму знову. src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf000066400000000000000000000016111266465517700265560ustar00rootroot00000000000000 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 验证符无效, 请重新提交. src/Symfony/Component/Form/ReversedTransformer.php000066400000000000000000000023621266465517700227170ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Form/SubmitButton.php000066400000000000000000000021561266465517700213550ustar00rootroot00000000000000 * * 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 SubmitButton The button instance * * @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; } } src/Symfony/Component/Form/SubmitButtonBuilder.php000066400000000000000000000011601266465517700226560ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Form/SubmitButtonTypeInterface.php000066400000000000000000000007321266465517700240360ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Form/Test/000077500000000000000000000000001266465517700171205ustar00rootroot00000000000000src/Symfony/Component/Form/Test/DeprecationErrorHandler.php000066400000000000000000000021611266465517700243760ustar00rootroot00000000000000 * * 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\FormEvent; /** * @deprecated since version 2.3, to be removed in 3.0. */ class DeprecationErrorHandler { public static function handle($errorNumber, $message, $file, $line, $context) { if ($errorNumber & ~E_USER_DEPRECATED) { return true; } return \PHPUnit_Util_ErrorHandler::handleError($errorNumber, $message, $file, $line); } public static function handleBC($errorNumber, $message, $file, $line, $context) { if ($errorNumber & ~E_USER_DEPRECATED) { return true; } return false; } public static function preBind($listener, FormEvent $event) { set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle')); $listener->preBind($event); restore_error_handler(); } } src/Symfony/Component/Form/Test/FormBuilderInterface.php000066400000000000000000000006631266465517700236710ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Form/Test/FormIntegrationTestCase.php000066400000000000000000000015041266465517700243740ustar00rootroot00000000000000 * * 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\Forms; use Symfony\Component\Form\FormFactoryInterface; /** * @author Bernhard Schussek */ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase { /** * @var FormFactoryInterface */ protected $factory; protected function setUp() { $this->factory = Forms::createFormFactoryBuilder() ->addExtensions($this->getExtensions()) ->getFormFactory(); } protected function getExtensions() { return array(); } } src/Symfony/Component/Form/Test/FormInterface.php000066400000000000000000000006271266465517700223620ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Form/Test/FormPerformanceTestCase.php000066400000000000000000000031171266465517700243540ustar00rootroot00000000000000 * * 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(); } } /** * @since Method available since Release 2.3.0 * * @return int */ public function getMaxRunningTime() { return $this->maxRunningTime; } } src/Symfony/Component/Form/Test/TypeTestCase.php000066400000000000000000000017661266465517700222200ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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')); } } src/Symfony/Component/Form/Tests/000077500000000000000000000000001266465517700173035ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/AbstractBootstrap3HorizontalLayoutTest.php000066400000000000000000000110361266465517700276510ustar00rootroot00000000000000 * * 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', 'date'); $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', 'text'); $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', 'text'); $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', 'text'); $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', 'text', 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('form', null, array( 'method' => 'get', 'action' => 'http://example.com/directory', )); $html = $this->renderStart($form->createView()); $this->assertSame('
    ', $html); } public function testStartTagWithOverriddenVars() { $form = $this->factory->create('form', 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('form', null, array( 'method' => 'get', 'action' => 'http://example.com/directory', )) ->add('file', 'file') ->getForm(); $html = $this->renderStart($form->createView()); $this->assertSame('', $html); } public function testStartTagWithExtraAttributes() { $form = $this->factory->create('form', null, array( 'method' => 'get', 'action' => 'http://example.com/directory', )); $html = $this->renderStart($form->createView(), array( 'attr' => array('class' => 'foobar'), )); $this->assertSame('', $html); } } src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php000066400000000000000000002162121266465517700256020ustar00rootroot00000000000000 * * 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', 'date'); $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', 'text'); $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', 'text'); $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', 'text'); $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', 'text', 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', 'text'); $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', 'text'); $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', 'checkbox', 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', 'checkbox', 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', 'checkbox', 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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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 testSelectWithSizeBiggerThanOneCanBeRequired() { $form = $this->factory->createNamed('name', 'choice', null, array( 'choices' => array('a', 'b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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 testSingleChoiceAttributes() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => false, 'expanded' => false, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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"]'.$classPart.'[not(@selected)][.="[trans]Choice&B[/trans]"] ] [count(./option)=2] ' ); } public function testSingleChoiceWithPreferred() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', null, array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array( 'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'Group&2' => array('Choice&C' => '&c'), ), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'required' => true, 'multiple' => true, 'expanded' => false, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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"]'.$classPart.'[not(@selected)][.="[trans]Choice&B[/trans]"] ] [count(./option)=2] ' ); } public function testMultipleChoiceSkipsPlaceholder() { $form = $this->factory->createNamed('name', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithLabelsAsFalse() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithLabelsSetByCallable() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithLabelsSetFalseByCallable() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithoutTranslation() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedAttributes() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => false, 'expanded' => true, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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)]'.$classPart.' ] ] /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithPlaceholder() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testSingleChoiceExpandedWithBooleanValue() { $form = $this->factory->createNamed('name', 'choice', true, array( 'choices' => array('Choice&A' => '1', 'Choice&B' => '0'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpanded() { $form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpandedWithLabelsAsFalse() { $form = $this->factory->createNamed('name', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpandedWithLabelsSetByCallable() { $form = $this->factory->createNamed('name', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpandedWithLabelsSetFalseByCallable() { $form = $this->factory->createNamed('name', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpandedWithoutTranslation() { $form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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"][@class="form-control"] ] ' ); } public function testMultipleChoiceExpandedAttributes() { $form = $this->factory->createNamed('name', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => true, 'expanded' => true, 'required' => true, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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)]'.$classPart.' ] ] /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"][@class="form-control"] ] ' ); } public function testCountry() { $form = $this->factory->createNamed('name', 'country', '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', 'country', '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', 'datetime', '2011-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="2011"][@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', 'datetime', 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' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5'); $form = $this->factory->createNamed('name', 'datetime', $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="2011"][@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', 'datetime', '2011-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="2011"][@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', 'datetime', '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', 'datetime', '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', 'datetime', '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', 'date', '2011-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="2011"][@selected="selected"]] ] [count(./select)=3] ' ); } public function testDateChoiceWithPlaceholderGlobal() { $form = $this->factory->createNamed('name', 'date', 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', 'date', 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', 'date', '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', 'date', '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', 'birthday', '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', 'birthday', '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', 'email', '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', 'email', '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', 'hidden', 'foo&bar'); $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), '/input [@type="hidden"] [@name="name"] [@class="my&class form-control"] [@value="foo&bar"] ' ); } public function testReadOnly() { $form = $this->factory->createNamed('name', 'text', null, array( 'read_only' => true, )); $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), '/input [@type="text"] [@name="name"] [@class="my&class form-control"] [@readonly="readonly"] ' ); } public function testDisabled() { $form = $this->factory->createNamed('name', 'text', 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', 'integer', 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', 'language', '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', 'locale', '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', 'money', 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', 'number', 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', 'password', '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', 'password', 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', 'password', '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', 'percent', 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', 'radio', 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', 'radio', 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', 'radio', 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 testTextarea() { $form = $this->factory->createNamed('name', 'textarea', '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', 'text', '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', 'text', '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', 'search', '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', 'time', '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', 'time', '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', 'time', '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', 'time', '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', 'time', 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', 'time', 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', 'timezone', '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', 'timezone', 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', 'url', $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', 'button'); $this->assertWidgetMatchesXpath($form->createView(), array('attr' => array('class' => 'my&class')), '/button[@type="button"][@name="name"][.="[trans]Name[/trans]"][@class="my&class btn"]' ); } public function testSubmit() { $form = $this->factory->createNamed('name', 'submit'); $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', 'reset'); $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', 'text', 'value', array( 'required' => true, 'disabled' => true, 'read_only' => true, 'attr' => array('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', 'text', 'value', array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertSame('', $html); } public function testButtonAttributes() { $form = $this->factory->createNamed('button', 'button', 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', 'button', null, array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertSame('', $html); } } src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php000066400000000000000000000662461266465517700242760ustar00rootroot00000000000000 * * 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\Tests\Fixtures\AlternatingRowType; use Symfony\Component\Security\Csrf\CsrfToken; abstract class AbstractDivLayoutTest extends AbstractLayoutTest { public function testRow() { $form = $this->factory->createNamed('name', 'text'); $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', 'text')->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', 'repeated'); $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', 'button'); $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', 'form') ->add('field1', 'text') ->add('field2', 'repeated') ->add('field3', 'text') ->add('field4', 'text') ->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', 'form') ->add('field1', 'text') ->add('field2', 'text'); $child2 = $this->factory->createNamedBuilder('child2', 'form') ->add('field1', 'text') ->add('field2', 'text'); $view = $this->factory->createNamedBuilder('parent', 'form') ->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', 'form') ->add('first', 'text') ->add('password', 'repeated') ->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', 'form') ->add('first', 'text') ->add('password', 'repeated') ->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', 'form') ->add('first', 'text') ->add('password', 'repeated') ->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', 'collection', array('a', 'b'), array( 'type' => 'text', )); $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', 'collection', $data, array( 'type' => new 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', 'collection', array(), array( 'type' => 'text', )); $this->assertWidgetMatchesXpath($form->createView(), array(), '/div [./input[@type="hidden"][@id="names__token"]] [count(./div)=0] ' ); } public function testCollectionRow() { $collection = $this->factory->createNamedBuilder( 'collection', 'collection', array('a', 'b'), array('type' => 'text') ); $form = $this->factory->createNamedBuilder('form', 'form') ->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', 'form') ->setMethod('PUT') ->setAction('http://example.com') ->add('firstName', 'text') ->add('lastName', 'text') ->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', 'form') ->add('firstName', 'text') ->add('lastName', 'text') ->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', 'form') ->add($this->factory ->createNamedBuilder('child', 'form', null, array('error_bubbling' => false)) ->add('grandChild', 'form') ) ->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', 'form') ->add($this->factory // No CSRF protection on nested forms ->createNamedBuilder('child', 'form') ->add($this->factory->createNamedBuilder('grandchild', 'text')) ) ->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', 'repeated', 'foobar', array( 'type' => 'text', )); $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', 'repeated', 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', 'form') ->add('name', 'search') ->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', 'text'); $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', 'text', 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', 'email') ->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', 'form') ->add('field', 'text'); $view = $this->factory->createNamedBuilder('parent', 'form') ->add('field', 'text') ->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', 'collection', $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', 'choice', 'a', array( 'choices' => array('ChoiceA' => 'a', 'ChoiceB' => 'b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'form') ->add('field1', 'text') ->add('field2', 'text') ->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', 'form') ->add('field1', 'text') ->add('field2', 'text') ->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', 'form', null, array( 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), )); $form->add('text', 'text'); $html = $this->renderWidget($form->createView()); // compare plain HTML to check the whitespace $this->assertContains('
    ', $html); } public function testWidgetContainerAttributeNameRepeatedIfTrue() { $form = $this->factory->createNamed('form', 'form', null, array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertContains('
    ', $html); } } src/Symfony/Component/Form/Tests/AbstractExtensionTest.php000066400000000000000000000027421266465517700243210ustar00rootroot00000000000000 * * 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\AbstractExtension; use Symfony\Component\Form\Tests\Fixtures\FooType; class AbstractExtensionTest extends \PHPUnit_Framework_TestCase { public function testHasType() { $loader = new ConcreteExtension(); $this->assertTrue($loader->hasType('foo')); $this->assertFalse($loader->hasType('bar')); } public function testGetType() { $loader = new ConcreteExtension(); $this->assertInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType', $loader->getType('foo')); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Custom resolver "Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver" must extend "Symfony\Component\OptionsResolver\OptionsResolver". */ public function testCustomOptionsResolver() { $extension = new Fixtures\FooTypeBarExtension(); $resolver = new Fixtures\CustomOptionsResolver(); $extension->setDefaultOptions($resolver); } } class ConcreteExtension extends AbstractExtension { protected function loadTypes() { return array(new FooType()); } protected function loadTypeGuesser() { } } src/Symfony/Component/Form/Tests/AbstractFormTest.php000066400000000000000000000057731266465517700232570ustar00rootroot00000000000000 * * 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\FormBuilder; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase { /** * @var EventDispatcherInterface */ protected $dispatcher; /** * @var \Symfony\Component\Form\FormFactoryInterface */ protected $factory; /** * @var \Symfony\Component\Form\FormInterface */ protected $form; protected function setUp() { // We need an actual dispatcher to use the deprecated // bindRequest() method $this->dispatcher = new EventDispatcher(); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $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->getMock('Symfony\Component\Form\Test\FormInterface'); $config = $this->getMock('Symfony\Component\Form\FormConfigInterface'); $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->getMock('Symfony\Component\Form\DataMapperInterface'); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getDataTransformer() { return $this->getMock('Symfony\Component\Form\DataTransformerInterface'); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getFormValidator() { return $this->getMock('Symfony\Component\Form\FormValidatorInterface'); } } src/Symfony/Component/Form/Tests/AbstractLayoutTest.php000066400000000000000000002130421266465517700236170ustar00rootroot00000000000000 * * 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; abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\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->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface'); 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()); protected function renderEnctype(FormView $view) { $this->markTestSkipped(sprintf('Legacy %s::renderEnctype() is not implemented.', get_class($this))); } 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); /** * @group legacy */ public function testEnctype() { $form = $this->factory->createNamedBuilder('name', 'form') ->add('file', 'file') ->getForm(); $this->assertEquals('enctype="multipart/form-data"', $this->renderEnctype($form->createView())); } /** * @group legacy */ public function testNoEnctype() { $form = $this->factory->createNamedBuilder('name', 'form') ->add('text', 'text') ->getForm(); $this->assertEquals('', $this->renderEnctype($form->createView())); } public function testLabel() { $form = $this->factory->createNamed('name', 'text'); $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', 'text', null, array( 'translation_domain' => false, )); $this->assertMatchesXpath($this->renderLabel($form->createView()), '/label [@for="name"] [.="Name"] ' ); } public function testLabelOnForm() { $form = $this->factory->createNamed('name', 'date'); $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', 'text', 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', 'text'); $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', 'text', 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', 'text'); $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', 'text'); $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', 'text'); $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', 'text', 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', 'text') ->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', 'text') ->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', 'form', null, $options) ->add('myfield', 'text') ->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', 'form', null, $options) ->add('myfield', 'text', 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 testLabelFormatOnButton() { $form = $this->factory->createNamedBuilder('myform') ->add('mybutton', 'button') ->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', 'button') ->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', 'text'); $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', 'text'); $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', 'checkbox', true); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="checkbox"] [@name="name"] [@checked="checked"] [@value="1"] ' ); } public function testUncheckedCheckbox() { $form = $this->factory->createNamed('name', 'checkbox', false); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="checkbox"] [@name="name"] [not(@checked)] ' ); } public function testCheckboxWithValue() { $form = $this->factory->createNamed('name', 'checkbox', 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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', null, array( 'choices' => array('a', 'b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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 testSingleChoiceAttributes() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => false, 'expanded' => false, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $this->assertWidgetMatchesXpath($form->createView(), array(), '/select [@name="name"] [not(@required)] [ ./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"] /following-sibling::option[@value="&b"]'.$classPart.'[not(@selected)][.="[trans]Choice&B[/trans]"] ] [count(./option)=2] ' ); } public function testSingleChoiceWithPreferred() { $form = $this->factory->createNamed('name', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', null, array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array( 'Group&1' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'Group&2' => array('Choice&C' => '&c'), ), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'required' => true, 'multiple' => true, 'expanded' => false, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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"]'.$classPart.'[not(@selected)][.="[trans]Choice&B[/trans]"] ] [count(./option)=2] ' ); } public function testMultipleChoiceSkipsPlaceholder() { $form = $this->factory->createNamed('name', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', array('&a'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'multiple' => false, 'expanded' => true, 'choice_translation_domain' => false, )); $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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => false, 'expanded' => true, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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"]'.$classPart.'[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', 'choice', '&a', array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b'), 'choices_as_values' => true, '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 testSingleChoiceExpandedWithBooleanValue() { $form = $this->factory->createNamed('name', 'choice', true, array( 'choices' => array('Choice&A' => '1', 'Choice&B' => '0'), 'choices_as_values' => true, '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', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, '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', 'choice', array('&a', '&c'), array( 'choices' => array('Choice&A' => '&a', 'Choice&B' => '&b', 'Choice&C' => '&c'), 'choices_as_values' => true, 'choice_attr' => array('Choice&B' => array('class' => 'foo&bar')), 'multiple' => true, 'expanded' => true, 'required' => true, )); $classPart = in_array('choice_attr', $this->testableFeatures) ? '[@class="foo&bar"]' : ''; $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"]'.$classPart.'[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', 'country', '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', 'country', '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', 'datetime', '2011-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="2011"][@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', 'datetime', 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' => '2011', 'month' => '2', 'day' => '3', 'hour' => '4', 'minute' => '5'); $form = $this->factory->createNamed('name', 'datetime', $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="2011"][@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', 'datetime', '2011-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="2011"][@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', 'datetime', '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', 'datetime', '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', 'datetime', '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', 'date', '2011-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="2011"][@selected="selected"]] ] [count(./select)=3] ' ); } public function testDateChoiceWithPlaceholderGlobal() { $form = $this->factory->createNamed('name', 'date', 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', 'date', 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', 'date', '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', 'date', '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', 'form') ->add('date', 'date') ->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', 'birthday', '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', 'birthday', '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', 'email', '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', 'email', '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', 'file'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="file"] ' ); } public function testHidden() { $form = $this->factory->createNamed('name', 'hidden', 'foo&bar'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="hidden"] [@name="name"] [@value="foo&bar"] ' ); } public function testReadOnly() { $form = $this->factory->createNamed('name', 'text', null, array( 'read_only' => true, )); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="text"] [@name="name"] [@readonly="readonly"] ' ); } public function testDisabled() { $form = $this->factory->createNamed('name', 'text', null, array( 'disabled' => true, )); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="text"] [@name="name"] [@disabled="disabled"] ' ); } public function testInteger() { $form = $this->factory->createNamed('name', 'integer', 123); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="number"] [@name="name"] [@value="123"] ' ); } public function testLanguage() { $form = $this->factory->createNamed('name', 'language', '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', 'locale', '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', 'money', 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', 'number', 1234.56); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="text"] [@name="name"] [@value="1234.56"] ' ); } public function testPassword() { $form = $this->factory->createNamed('name', 'password', 'foo&bar'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="password"] [@name="name"] ' ); } public function testPasswordSubmittedWithNotAlwaysEmpty() { $form = $this->factory->createNamed('name', 'password', 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', 'password', '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', 'percent', 0.1); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="text"] [@name="name"] [@value="10"] [contains(.., "%")] ' ); } public function testCheckedRadio() { $form = $this->factory->createNamed('name', 'radio', true); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="radio"] [@name="name"] [@checked="checked"] [@value="1"] ' ); } public function testUncheckedRadio() { $form = $this->factory->createNamed('name', 'radio', false); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="radio"] [@name="name"] [not(@checked)] ' ); } public function testRadioWithValue() { $form = $this->factory->createNamed('name', 'radio', false, array( 'value' => 'foo&bar', )); $this->assertWidgetMatchesXpath($form->createView(), array(), '/input [@type="radio"] [@name="name"] [@value="foo&bar"] ' ); } public function testTextarea() { $form = $this->factory->createNamed('name', 'textarea', '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', 'text', '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', 'text', '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', 'search', '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', 'time', '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', 'time', '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', 'time', '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', 'time', '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', 'time', 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', 'time', 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', 'form') ->add('time', 'time') ->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', 'timezone', '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', 'timezone', 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', 'url', $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', 'form', array('items' => array('one', 'two', 'three'))) ->add('items', 'collection', 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('', 'form') ->add('child', 'text') ->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', 'button'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/button[@type="button"][@name="name"][.="[trans]Name[/trans]"]' ); } public function testButtonLabelIsEmpty() { $form = $this->factory->createNamed('name', 'button'); $this->assertSame('', $this->renderLabel($form->createView())); } public function testSubmit() { $form = $this->factory->createNamed('name', 'submit'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/button[@type="submit"][@name="name"]' ); } public function testReset() { $form = $this->factory->createNamed('name', 'reset'); $this->assertWidgetMatchesXpath($form->createView(), array(), '/button[@type="reset"][@name="name"]' ); } public function testStartTag() { $form = $this->factory->create('form', null, array( 'method' => 'get', 'action' => 'http://example.com/directory', )); $html = $this->renderStart($form->createView()); $this->assertSame('
    ', $html); } public function testStartTagForPutRequest() { $form = $this->factory->create('form', 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('form', 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('form', null, array( 'method' => 'get', 'action' => 'http://example.com/directory', )) ->add('file', 'file') ->getForm(); $html = $this->renderStart($form->createView()); $this->assertSame('', $html); } public function testStartTagWithExtraAttributes() { $form = $this->factory->create('form', 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', 'text', 'value', array( 'required' => true, 'disabled' => true, 'read_only' => true, 'attr' => array('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', 'text', 'value', array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertSame('', $html); } public function testWidgetAttributeHiddenIfFalse() { $form = $this->factory->createNamed('text', 'text', 'value', array( 'attr' => array('foo' => false), )); $html = $this->renderWidget($form->createView()); $this->assertNotContains('foo="', $html); } public function testButtonAttributes() { $form = $this->factory->createNamed('button', 'button', 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', 'button', null, array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertSame('', $html); } public function testButtonAttributeHiddenIfFalse() { $form = $this->factory->createNamed('button', 'button', null, array( 'attr' => array('foo' => false), )); $html = $this->renderWidget($form->createView()); $this->assertNotContains('foo="', $html); } public function testTextareaWithWhitespaceOnlyContentRetainsValue() { $form = $this->factory->createNamed('textarea', 'textarea', ' '); $html = $this->renderWidget($form->createView()); $this->assertContains('> ', $html); } public function testTextareaWithWhitespaceOnlyContentRetainsValueWhenRenderingForm() { $form = $this->factory->createBuilder('form', array('textarea' => ' ')) ->add('textarea', 'textarea') ->getForm(); $html = $this->renderForm($form->createView()); $this->assertContains('> ', $html); } public function testWidgetContainerAttributeHiddenIfFalse() { $form = $this->factory->createNamed('form', 'form', 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', 'form') ->add('firstName', 'text', array('attr' => array('title' => 'Foo'))) ->add('lastName', 'text', 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]"]'); } } src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php000066400000000000000000000253421266465517700252740ustar00rootroot00000000000000 * * 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\FormFactory; use Symfony\Component\Form\Forms; use Symfony\Component\Form\RequestHandlerInterface; /** * @author Bernhard Schussek */ abstract class AbstractRequestHandlerTest extends \PHPUnit_Framework_TestCase { /** * @var RequestHandlerInterface */ protected $requestHandler; /** * @var FormFactory */ protected $factory; protected $request; protected $serverParams; protected function setUp() { $this->serverParams = $this->getMock( 'Symfony\Component\Form\Util\ServerParams', array('getNormalizedIniPostMaxSize', 'getContentLength') ); $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', 'text', 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->getMock('Symfony\Component\Form\FormConfigInterface'); $config->expects($this->any()) ->method('getMethod') ->will($this->returnValue($method)); $config->expects($this->any()) ->method('getCompound') ->will($this->returnValue($compound)); $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $form->expects($this->any()) ->method('getName') ->will($this->returnValue($name)); $form->expects($this->any()) ->method('getConfig') ->will($this->returnValue($config)); return $form; } } src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php000066400000000000000000000353421266465517700245740ustar00rootroot00000000000000 * * 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', 'text'); $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', 'text', 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', 'repeated'); $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', 'repeated'); $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', 'button'); $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', 'form') ->add('field1', 'text') ->add('field2', 'repeated') ->add('field3', 'text') ->add('field4', 'text') ->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', 'collection', array('a', 'b'), array( 'type' => 'text', )); $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', 'collection', array(), array( 'type' => 'text', )); $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', 'form') ->setMethod('PUT') ->setAction('http://example.com') ->add('firstName', 'text') ->add('lastName', 'text') ->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', 'form') ->add('firstName', 'text') ->add('lastName', 'text') ->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', 'form') ->add($this->factory ->createNamedBuilder('child', 'form', null, array('error_bubbling' => false)) ->add('grandChild', 'form') ) ->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', 'form') ->add($this->factory // No CSRF protection on nested forms ->createNamedBuilder('child', 'form') ->add($this->factory->createNamedBuilder('grandchild', 'text')) ) ->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', 'repeated', 'foobar', array( 'type' => 'text', )); $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', 'repeated', 'foobar', array( 'type' => 'password', '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', 'collection', $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', 'form') ->add('field1', 'text') ->add('field2', 'text') ->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', 'form') ->add('field1', 'text') ->add('field2', 'text') ->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', 'form', null, array( 'attr' => array('class' => 'foobar', 'data-foo' => 'bar'), )); $form->add('text', 'text'); $html = $this->renderWidget($form->createView()); // compare plain HTML to check the whitespace $this->assertContains('
    ', $html); } public function testWidgetContainerAttributeNameRepeatedIfTrue() { $form = $this->factory->createNamed('form', 'form', null, array( 'attr' => array('foo' => true), )); $html = $this->renderWidget($form->createView()); // foo="foo" $this->assertContains('
    ', $html); } } src/Symfony/Component/Form/Tests/ButtonTest.php000066400000000000000000000033511266465517700221310ustar00rootroot00000000000000 * * 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\ButtonBuilder; use Symfony\Component\Form\FormBuilder; /** * @author Bernhard Schussek */ class ButtonTest extends \PHPUnit_Framework_TestCase { private $dispatcher; private $factory; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); } /** * @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); } } src/Symfony/Component/Form/Tests/CallbackTransformerTest.php000066400000000000000000000025061266465517700245760ustar00rootroot00000000000000 * * 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\CallbackTransformer; class CallbackTransformerTest extends \PHPUnit_Framework_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')); } /** * @dataProvider invalidCallbacksProvider * * @expectedException \InvalidArgumentException */ public function testConstructorWithInvalidCallbacks($transformCallback, $reverseTransformCallback) { new CallbackTransformer($transformCallback, $reverseTransformCallback); } public function invalidCallbacksProvider() { return array( array(null, function () {}), array(function () {}, null), ); } } src/Symfony/Component/Form/Tests/ChoiceList/000077500000000000000000000000001266465517700213315ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php000066400000000000000000000127761266465517700264310ustar00rootroot00000000000000 * * 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; /** * @author Bernhard Schussek */ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_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(); } src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php000066400000000000000000000157261266465517700257420ustar00rootroot00000000000000 * * 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', 'a', false, true, $this->object, null); } protected function getValues() { return array('0', '1', '2', '3', '4', '5', '6', '7'); } /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException */ public function testFailIfKeyMismatch() { new ArrayChoiceList(array(0 => 'a', 1 => 'b'), array(1 => 'a', 2 => 'b')); } 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'))); } } src/Symfony/Component/Form/Tests/ChoiceList/ArrayKeyChoiceListTest.php000066400000000000000000000152361266465517700264070ustar00rootroot00000000000000 * * 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\ArrayKeyChoiceList; /** * @author Bernhard Schussek */ class ArrayKeyChoiceListTest extends AbstractChoiceListTest { private $object; protected function setUp() { parent::setUp(); $this->object = new \stdClass(); } protected function createChoiceList() { return new ArrayKeyChoiceList(array_flip($this->getChoices())); } protected function getChoices() { return array(0, 1, 'a', 'b', ''); } protected function getValues() { return array('0', '1', 'a', 'b', ''); } public function testUseChoicesAsValuesByDefault() { $list = new ArrayKeyChoiceList(array('' => 'Empty', 0 => 'Zero', 1 => 'One', '1.23' => 'Float')); $this->assertSame(array('', '0', '1', '1.23'), $list->getValues()); $this->assertSame(array('' => '', 0 => 0, 1 => 1, '1.23' => '1.23'), $list->getChoices()); $this->assertSame(array('' => 'Empty', 0 => 'Zero', 1 => 'One', '1.23' => 'Float'), $list->getOriginalKeys()); } public function testNoChoices() { $list = new ArrayKeyChoiceList(array()); $this->assertSame(array(), $list->getValues()); } public function testGetChoicesForValuesConvertsValuesToStrings() { $this->assertSame(array(0), $this->list->getChoicesForValues(array(0))); $this->assertSame(array(0), $this->list->getChoicesForValues(array('0'))); $this->assertSame(array(1), $this->list->getChoicesForValues(array(1))); $this->assertSame(array(1), $this->list->getChoicesForValues(array('1'))); $this->assertSame(array('a'), $this->list->getChoicesForValues(array('a'))); $this->assertSame(array('b'), $this->list->getChoicesForValues(array('b'))); $this->assertSame(array(''), $this->list->getChoicesForValues(array(''))); // "1" === (string) true $this->assertSame(array(1), $this->list->getChoicesForValues(array(true))); // "" === (string) false $this->assertSame(array(''), $this->list->getChoicesForValues(array(false))); // "" === (string) null $this->assertSame(array(''), $this->list->getChoicesForValues(array(null))); $this->assertSame(array(), $this->list->getChoicesForValues(array(1.23))); } public function testGetValuesForChoicesConvertsChoicesToArrayKeys() { $this->assertSame(array('0'), $this->list->getValuesForChoices(array(0))); $this->assertSame(array('0'), $this->list->getValuesForChoices(array('0'))); $this->assertSame(array('1'), $this->list->getValuesForChoices(array(1))); $this->assertSame(array('1'), $this->list->getValuesForChoices(array('1'))); $this->assertSame(array('a'), $this->list->getValuesForChoices(array('a'))); $this->assertSame(array('b'), $this->list->getValuesForChoices(array('b'))); // Always cast booleans to 0 and 1, because: // array(true => 'Yes', false => 'No') === array(1 => 'Yes', 0 => 'No') // see ChoiceTypeTest::testSetDataSingleNonExpandedAcceptsBoolean $this->assertSame(array('0'), $this->list->getValuesForChoices(array(false))); $this->assertSame(array('1'), $this->list->getValuesForChoices(array(true))); } /** * @dataProvider provideConvertibleChoices */ public function testConvertChoicesIfNecessary(array $choices, array $converted) { $list = new ArrayKeyChoiceList($choices); $this->assertSame($converted, $list->getChoices()); } public function provideConvertibleChoices() { return array( array(array(0 => 'Label'), array(0 => 0)), array(array(1 => 'Label'), array(1 => 1)), array(array('1.23' => 'Label'), array('1.23' => '1.23')), array(array('foobar' => 'Label'), array('foobar' => 'foobar')), // The default value of choice fields is NULL. It should be treated // like the empty value for this choice list type array(array(null => 'Label'), array('' => '')), array(array('1.23' => 'Label'), array('1.23' => '1.23')), // Always cast booleans to 0 and 1, because: // array(true => 'Yes', false => 'No') === array(1 => 'Yes', 0 => 'No') // see ChoiceTypeTest::testSetDataSingleNonExpandedAcceptsBoolean array(array(true => 'Label'), array(1 => 1)), array(array(false => 'Label'), array(0 => 0)), ); } /** * @dataProvider provideInvalidChoices * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException */ public function testGetValuesForChoicesFailsIfInvalidChoices(array $choices) { $this->list->getValuesForChoices($choices); } public function provideInvalidChoices() { return array( array(array(new \stdClass())), array(array(array(1, 2))), ); } /** * @dataProvider provideConvertibleValues */ public function testConvertValuesToStrings($value, $converted) { $callback = function () use ($value) { return $value; }; $list = new ArrayKeyChoiceList(array('choice' => 'Label'), $callback); $this->assertSame(array($converted), $list->getValues()); } public function provideConvertibleValues() { return array( array(0, '0'), array(1, '1'), array('0', '0'), array('1', '1'), array('1.23', '1.23'), array('foobar', 'foobar'), array('', ''), ); } public function testCreateChoiceListWithValueCallback() { $callback = function ($choice) { return ':'.$choice; }; $choiceList = new ArrayKeyChoiceList(array('foo' => 'Foo', 'bar' => 'Bar', 'baz' => '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' => 'Foo', ':bar' => 'Bar', ':baz' => 'Baz'), $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'))); } } src/Symfony/Component/Form/Tests/ChoiceList/Factory/000077500000000000000000000000001266465517700227405ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php000066400000000000000000000601721266465517700310460ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; /** * @author Bernhard Schussek */ class CachingFactoryDecoratorTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $decoratedFactory; /** * @var CachingFactoryDecorator */ private $factory; protected function setUp() { $this->decoratedFactory = $this->getMock('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface'); $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)); } /** * @group legacy */ public function testCreateFromFlippedChoicesEmpty() { $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) ->method('createListFromFlippedChoices') ->with(array()) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices(array())); $this->assertSame($list, $this->factory->createListFromFlippedChoices(array())); } /** * @group legacy */ public function testCreateFromFlippedChoicesComparesTraversableChoicesAsArray() { // 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('createListFromFlippedChoices') ->with($choices2) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices1)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices2)); } /** * @group legacy */ public function testCreateFromFlippedChoicesFlattensChoices() { $choices1 = array('key' => array('a' => 'A')); $choices2 = array('a' => 'A'); $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) ->method('createListFromFlippedChoices') ->with($choices1) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices1)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices2)); } /** * @dataProvider provideSameKeyChoices * @group legacy */ public function testCreateFromFlippedChoicesSameChoices($choice1, $choice2) { $choices1 = array($choice1 => 'A'); $choices2 = array($choice2 => 'A'); $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) ->method('createListFromFlippedChoices') ->with($choices1) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices1)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices2)); } /** * @dataProvider provideDistinguishedKeyChoices * @group legacy */ public function testCreateFromFlippedChoicesDifferentChoices($choice1, $choice2) { $choices1 = array($choice1 => 'A'); $choices2 = array($choice2 => 'A'); $list1 = new \stdClass(); $list2 = new \stdClass(); $this->decoratedFactory->expects($this->at(0)) ->method('createListFromFlippedChoices') ->with($choices1) ->will($this->returnValue($list1)); $this->decoratedFactory->expects($this->at(1)) ->method('createListFromFlippedChoices') ->with($choices2) ->will($this->returnValue($list2)); $this->assertSame($list1, $this->factory->createListFromFlippedChoices($choices1)); $this->assertSame($list2, $this->factory->createListFromFlippedChoices($choices2)); } /** * @group legacy */ public function testCreateFromFlippedChoicesSameValueClosure() { $choices = array(1); $list = new \stdClass(); $closure = function () {}; $this->decoratedFactory->expects($this->once()) ->method('createListFromFlippedChoices') ->with($choices, $closure) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices, $closure)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices, $closure)); } /** * @group legacy */ public function testCreateFromFlippedChoicesDifferentValueClosure() { $choices = array(1); $list1 = new \stdClass(); $list2 = new \stdClass(); $closure1 = function () {}; $closure2 = function () {}; $this->decoratedFactory->expects($this->at(0)) ->method('createListFromFlippedChoices') ->with($choices, $closure1) ->will($this->returnValue($list1)); $this->decoratedFactory->expects($this->at(1)) ->method('createListFromFlippedChoices') ->with($choices, $closure2) ->will($this->returnValue($list2)); $this->assertSame($list1, $this->factory->createListFromFlippedChoices($choices, $closure1)); $this->assertSame($list2, $this->factory->createListFromFlippedChoices($choices, $closure2)); } public function testCreateFromLoaderSameLoader() { $loader = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $loader2 = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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'), ); } } src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php000066400000000000000000000707311266465517700312040ustar00rootroot00000000000000 * * 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 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\LegacyChoiceListAdapter; use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; use Symfony\Component\Form\ChoiceList\View\ChoiceListView; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\Extension\Core\View\ChoiceView as LegacyChoiceView; class DefaultChoiceListFactoryTest extends \PHPUnit_Framework_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); } /** * @group legacy */ public function testCreateFromFlippedChoicesEmpty() { $list = $this->factory->createListFromFlippedChoices(array()); $this->assertSame(array(), $list->getChoices()); $this->assertSame(array(), $list->getValues()); } /** * @group legacy */ public function testCreateFromFlippedChoicesFlat() { $list = $this->factory->createListFromFlippedChoices( array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D') ); $this->assertScalarListWithChoiceValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesFlatTraversable() { $list = $this->factory->createListFromFlippedChoices( new \ArrayIterator(array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D')) ); $this->assertScalarListWithChoiceValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesFlatValuesAsCallable() { $list = $this->factory->createListFromFlippedChoices( array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'), array($this, 'getScalarValue') ); $this->assertScalarListWithCustomValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesFlatValuesAsClosure() { $list = $this->factory->createListFromFlippedChoices( array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D'), function ($choice) { switch ($choice) { case 'a': return 'a'; case 'b': return 'b'; case 'c': return '1'; case 'd': return '2'; } } ); $this->assertScalarListWithCustomValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesGrouped() { $list = $this->factory->createListFromFlippedChoices( array( 'Group 1' => array('a' => 'A', 'b' => 'B'), 'Group 2' => array('c' => 'C', 'd' => 'D'), ) ); $this->assertScalarListWithChoiceValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesGroupedTraversable() { $list = $this->factory->createListFromFlippedChoices( new \ArrayIterator(array( 'Group 1' => array('a' => 'A', 'b' => 'B'), 'Group 2' => array('c' => 'C', 'd' => 'D'), )) ); $this->assertScalarListWithChoiceValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesGroupedValuesAsCallable() { $list = $this->factory->createListFromFlippedChoices( array( 'Group 1' => array('a' => 'A', 'b' => 'B'), 'Group 2' => array('c' => 'C', 'd' => 'D'), ), array($this, 'getScalarValue') ); $this->assertScalarListWithCustomValues($list); } /** * @group legacy */ public function testCreateFromFlippedChoicesGroupedValuesAsClosure() { $list = $this->factory->createListFromFlippedChoices( array( 'Group 1' => array('a' => 'A', 'b' => 'B'), 'Group 2' => array('c' => 'C', 'd' => 'D'), ), function ($choice) { switch ($choice) { case 'a': return 'a'; case 'b': return 'b'; case 'c': return '1'; case 'd': return '2'; } } ); $this->assertScalarListWithCustomValues($list); } public function testCreateFromLoader() { $loader = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $list = $this->factory->createListFromLoader($loader); $this->assertEquals(new LazyChoiceList($loader), $list); } public function testCreateFromLoaderWithValues() { $loader = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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); } /** * @group legacy */ public function testCreateViewForFlatLegacyChoiceList() { // legacy ChoiceList instances provide legacy ChoiceView objects $preferred = array(new LegacyChoiceView('x', 'x', 'Preferred')); $other = array(new LegacyChoiceView('y', 'y', 'Other')); $list = $this->getMock('Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface'); $list->expects($this->once()) ->method('getPreferredViews') ->will($this->returnValue($preferred)); $list->expects($this->once()) ->method('getRemainingViews') ->will($this->returnValue($other)); $view = $this->factory->createView(new LegacyChoiceListAdapter($list)); $this->assertEquals(array(new ChoiceView('y', 'y', 'Other')), $view->choices); $this->assertEquals(array(new ChoiceView('x', 'x', 'Preferred')), $view->preferredChoices); } /** * @group legacy */ public function testCreateViewForNestedLegacyChoiceList() { // legacy ChoiceList instances provide legacy ChoiceView objects $preferred = array('Section 1' => array(new LegacyChoiceView('x', 'x', 'Preferred'))); $other = array( 'Section 2' => array(new LegacyChoiceView('y', 'y', 'Other')), new LegacyChoiceView('z', 'z', 'Other one'), ); $list = $this->getMock('Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface'); $list->expects($this->once()) ->method('getPreferredViews') ->will($this->returnValue($preferred)); $list->expects($this->once()) ->method('getRemainingViews') ->will($this->returnValue($other)); $view = $this->factory->createView(new LegacyChoiceListAdapter($list)); $this->assertEquals(array( 'Section 2' => array(new ChoiceView('y', 'y', 'Other')), new ChoiceView('z', 'z', 'Other one'), ), $view->choices); $this->assertEquals(array('Section 1' => array(new ChoiceView('x', 'x', 'Preferred'))), $view->preferredChoices); } 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; } } src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php000066400000000000000000000323211266465517700311230ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; use Symfony\Component\PropertyAccess\PropertyPath; /** * @author Bernhard Schussek */ class PropertyAccessDecoratorTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $decoratedFactory; /** * @var PropertyAccessDecorator */ private $factory; protected function setUp() { $this->decoratedFactory = $this->getMock('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface'); $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 testCreateFromFlippedChoices() { // Property paths are not supported here, because array keys can never // be objects anyway $choices = array('a' => 'A'); $value = 'foobar'; $list = new \stdClass(); $this->decoratedFactory->expects($this->once()) ->method('createListFromFlippedChoices') ->with($choices, $value) ->will($this->returnValue($list)); $this->assertSame($list, $this->factory->createListFromFlippedChoices($choices, $value)); } public function testCreateFromLoaderPropertyPath() { $loader = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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')); } // 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->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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' )); } public function testCreateViewPreferredChoicesAsPropertyPathInstance() { $list = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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' )); } public function testCreateViewLabelsAsPropertyPathInstance() { $list = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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' )); } public function testCreateViewIndicesAsPropertyPathInstance() { $list = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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' )); } public function testCreateViewGroupsAsPropertyPathInstance() { $list = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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' )); } public function testCreateViewAttrAsPropertyPathInstance() { $list = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $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') )); } } src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php000066400000000000000000000130211266465517700255650ustar00rootroot00000000000000 * * 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\LazyChoiceList; /** * @author Bernhard Schussek */ class LazyChoiceListTest extends \PHPUnit_Framework_TestCase { /** * @var LazyChoiceList */ private $list; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $innerList; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $loader; private $value; protected function setUp() { $this->innerList = $this->getMock('Symfony\Component\Form\ChoiceList\ChoiceListInterface'); $this->loader = $this->getMock('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface'); $this->value = function () {}; $this->list = new LazyChoiceList($this->loader, $this->value); } public function testGetChoicesLoadsInnerListOnFirstCall() { $this->loader->expects($this->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->innerList->expects($this->exactly(2)) ->method('getChoices') ->will($this->returnValue('RESULT')); $this->assertSame('RESULT', $this->list->getChoices()); $this->assertSame('RESULT', $this->list->getChoices()); } public function testGetValuesLoadsInnerListOnFirstCall() { $this->loader->expects($this->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->innerList->expects($this->exactly(2)) ->method('getValues') ->will($this->returnValue('RESULT')); $this->assertSame('RESULT', $this->list->getValues()); $this->assertSame('RESULT', $this->list->getValues()); } public function testGetStructuredValuesLoadsInnerListOnFirstCall() { $this->loader->expects($this->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->innerList->expects($this->exactly(2)) ->method('getStructuredValues') ->will($this->returnValue('RESULT')); $this->assertSame('RESULT', $this->list->getStructuredValues()); $this->assertSame('RESULT', $this->list->getStructuredValues()); } public function testGetOriginalKeysLoadsInnerListOnFirstCall() { $this->loader->expects($this->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->innerList->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->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->loader->expects($this->never()) ->method('loadChoicesForValues'); $this->innerList->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'))); } 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->once()) ->method('loadChoiceList') ->with($this->value) ->will($this->returnValue($this->innerList)); $this->loader->expects($this->never()) ->method('loadValuesForChoices'); $this->innerList->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'))); } } src/Symfony/Component/Form/Tests/ChoiceList/LegacyChoiceListAdapterTest.php000066400000000000000000000072541266465517700273660ustar00rootroot00000000000000 * * 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\LegacyChoiceListAdapter; use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface; /** * @author Bernhard Schussek * @group legacy */ class LegacyChoiceListAdapterTest extends \PHPUnit_Framework_TestCase { /** * @var LegacyChoiceListAdapter */ private $list; /** * @var \PHPUnit_Framework_MockObject_MockObject|ChoiceListInterface */ private $adaptedList; protected function setUp() { $this->adaptedList = $this->getMock('Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface'); $this->list = new LegacyChoiceListAdapter($this->adaptedList); } public function testGetChoices() { $this->adaptedList->expects($this->once()) ->method('getChoices') ->willReturn(array(1 => 'a', 4 => 'b', 7 => 'c')); $this->adaptedList->expects($this->once()) ->method('getValues') ->willReturn(array(1 => ':a', 4 => ':b', 7 => ':c')); $this->assertSame(array(':a' => 'a', ':b' => 'b', ':c' => 'c'), $this->list->getChoices()); } public function testGetValues() { $this->adaptedList->expects($this->once()) ->method('getChoices') ->willReturn(array(1 => 'a', 4 => 'b', 7 => 'c')); $this->adaptedList->expects($this->once()) ->method('getValues') ->willReturn(array(1 => ':a', 4 => ':b', 7 => ':c')); $this->assertSame(array(':a', ':b', ':c'), $this->list->getValues()); } public function testGetStructuredValues() { $this->adaptedList->expects($this->once()) ->method('getChoices') ->willReturn(array(1 => 'a', 4 => 'b', 7 => 'c')); $this->adaptedList->expects($this->once()) ->method('getValues') ->willReturn(array(1 => ':a', 4 => ':b', 7 => ':c')); $this->assertSame(array(1 => ':a', 4 => ':b', 7 => ':c'), $this->list->getStructuredValues()); } public function testGetOriginalKeys() { $this->adaptedList->expects($this->once()) ->method('getChoices') ->willReturn(array(1 => 'a', 4 => 'b', 7 => 'c')); $this->adaptedList->expects($this->once()) ->method('getValues') ->willReturn(array(1 => ':a', 4 => ':b', 7 => ':c')); $this->assertSame(array(':a' => 1, ':b' => 4, ':c' => 7), $this->list->getOriginalKeys()); } public function testGetChoicesForValues() { $this->adaptedList->expects($this->once()) ->method('getChoicesForValues') ->with(array(1 => ':a', 4 => ':b', 7 => ':c')) ->willReturn(array(1 => 'a', 4 => 'b', 7 => 'c')); $this->assertSame(array(1 => 'a', 4 => 'b', 7 => 'c'), $this->list->getChoicesForValues(array(1 => ':a', 4 => ':b', 7 => ':c'))); } public function testGetValuesForChoices() { $this->adaptedList->expects($this->once()) ->method('getValuesForChoices') ->with(array(1 => 'a', 4 => 'b', 7 => 'c')) ->willReturn(array(1 => ':a', 4 => ':b', 7 => ':c')); $this->assertSame(array(1 => ':a', 4 => ':b', 7 => ':c'), $this->list->getValuesForChoices(array(1 => 'a', 4 => 'b', 7 => 'c'))); } public function testGetAdaptedList() { $this->assertSame($this->adaptedList, $this->list->getAdaptedList()); } } src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php000066400000000000000000000025571266465517700254570ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests; /** * @author Bernhard Schussek */ class CompoundFormPerformanceTest extends \Symfony\Component\Form\Test\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('form') ->add('firstName', 'text') ->add('lastName', 'text') ->add('gender', 'choice', array( 'choices' => array('male' => 'Male', 'female' => 'Female'), 'required' => false, )) ->add('age', 'number') ->add('birthDate', 'birthday') ->add('city', 'choice', array( // simulate 300 different cities 'choices' => range(1, 300), )) ->getForm(); // load the form into a view $form->createView(); } } } src/Symfony/Component/Form/Tests/CompoundFormTest.php000066400000000000000000001026271266465517700232740ustar00rootroot00000000000000 * * 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\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->create('file', 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', 'text', null, array( 'bar' => 'baz', 'auto_initialize' => false, )) ->will($this->returnValue($child)); $this->form->add('foo', 'text', 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', 'text', null, array( 'bar' => 'baz', 'auto_initialize' => false, )) ->will($this->returnValue($child)); // in order to make casting unnecessary $this->form->add(0, 'text', 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', 'text') ->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() { $test = $this; $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, $test) { $test->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); $test->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() { $test = $this; $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, $test) { $test->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); $test->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() { $test = $this; $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, $test) { $test->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); $test->assertSame(array('firstName' => $child1, 'lastName' => $child2), iterator_to_array($iterator)); $test->assertEquals('Bernhard', $child1->getData()); $test->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() { $test = $this; $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, $test) { $test->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator()); $test->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()); } /** * @group legacy */ public function testGetErrorsAsStringDeep() { $parent = $this->getBuilder() ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $this->form->addError(new FormError('Error!')); $parent->add($this->form); $parent->add($this->getBuilder('foo')->getForm()); $this->assertSame( "name:\n". " ERROR: Error!\n", $parent->getErrorsAsString() ); } /** * @group legacy */ public function testGetErrorsAsStringDeepWithIndentation() { $parent = $this->getBuilder() ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $this->form->addError(new FormError('Error!')); $parent->add($this->form); $parent->add($this->getBuilder('foo')->getForm()); $this->assertSame( " name:\n". " ERROR: Error!\n", $parent->getErrorsAsString(4) ); } 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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $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); $test = $this; $assertChildViewsEqual = function (array $childViews) use ($test) { return function (FormView $view) use ($test, $childViews) { /* @var \PHPUnit_Framework_TestCase $test */ $test->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(); } } src/Symfony/Component/Form/Tests/Extension/000077500000000000000000000000001266465517700212575ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/000077500000000000000000000000001266465517700221475ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/000077500000000000000000000000001266465517700241755ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/AbstractChoiceListTest.php000066400000000000000000000173531266465517700312710ustar00rootroot00000000000000 * * 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\ChoiceList; /** * @author Bernhard Schussek * * @group legacy */ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase { /** * @var \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ protected $list; /** * @var array */ protected $choices; /** * @var array */ protected $values; /** * @var array */ protected $indices; /** * @var array */ protected $labels; /** * @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 int|string */ protected $index1; /** * @var int|string */ protected $index2; /** * @var int|string */ protected $index3; /** * @var int|string */ protected $index4; /** * @var string */ protected $label1; /** * @var string */ protected $label2; /** * @var string */ protected $label3; /** * @var string */ protected $label4; protected function setUp() { parent::setUp(); $this->list = $this->createChoiceList(); $this->choices = $this->getChoices(); $this->indices = $this->getIndices(); $this->values = $this->getValues(); $this->labels = $this->getLabels(); // allow access to the individual entries without relying on their indices reset($this->choices); reset($this->indices); reset($this->values); reset($this->labels); for ($i = 1; $i <= 4; ++$i) { $this->{'choice'.$i} = current($this->choices); $this->{'index'.$i} = current($this->indices); $this->{'value'.$i} = current($this->values); $this->{'label'.$i} = current($this->labels); next($this->choices); next($this->indices); next($this->values); next($this->labels); } } public function testGetChoices() { $this->assertSame($this->choices, $this->list->getChoices()); } public function testGetValues() { $this->assertSame($this->values, $this->list->getValues()); } public function testGetIndicesForChoices() { $choices = array($this->choice1, $this->choice2); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesPreservesKeys() { $choices = array(5 => $this->choice1, 8 => $this->choice2); $this->assertSame(array(5 => $this->index1, 8 => $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesPreservesOrder() { $choices = array($this->choice2, $this->choice1); $this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesIgnoresNonExistingChoices() { $choices = array($this->choice1, $this->choice2, 'foobar'); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesEmpty() { $this->assertSame(array(), $this->list->getIndicesForChoices(array())); } public function testGetIndicesForValues() { // values and indices are always the same $values = array($this->value1, $this->value2); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForValues($values)); } public function testGetIndicesForValuesPreservesKeys() { // values and indices are always the same $values = array(5 => $this->value1, 8 => $this->value2); $this->assertSame(array(5 => $this->index1, 8 => $this->index2), $this->list->getIndicesForValues($values)); } public function testGetIndicesForValuesPreservesOrder() { $values = array($this->value2, $this->value1); $this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForValues($values)); } public function testGetIndicesForValuesIgnoresNonExistingValues() { $values = array($this->value1, $this->value2, 'foobar'); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForValues($values)); } public function testGetIndicesForValuesEmpty() { $this->assertSame(array(), $this->list->getIndicesForValues(array())); } 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())); } /** * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ abstract protected function createChoiceList(); abstract protected function getChoices(); abstract protected function getLabels(); abstract protected function getValues(); abstract protected function getIndices(); } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/ChoiceListTest.php000066400000000000000000000121071266465517700275750ustar00rootroot00000000000000 * * 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\ChoiceList; use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList; use Symfony\Component\Form\Extension\Core\View\ChoiceView; /** * @group legacy */ class ChoiceListTest extends AbstractChoiceListTest { private $obj1; private $obj2; private $obj3; private $obj4; protected function setUp() { $this->obj1 = new \stdClass(); $this->obj2 = new \stdClass(); $this->obj3 = new \stdClass(); $this->obj4 = new \stdClass(); parent::setUp(); } public function testInitArray() { $this->list = new ChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), array('A', 'B', 'C', 'D'), array($this->obj2) ); $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3'), $this->list->getValues()); $this->assertEquals(array(1 => new ChoiceView($this->obj2, '1', 'B')), $this->list->getPreferredViews()); $this->assertEquals(array(0 => new ChoiceView($this->obj1, '0', 'A'), 2 => new ChoiceView($this->obj3, '2', 'C'), 3 => new ChoiceView($this->obj4, '3', 'D')), $this->list->getRemainingViews()); } /** * Necessary for interoperability with MongoDB cursors or ORM relations as * choices parameter. A choice itself that is an object implementing \Traversable * is not treated as hierarchical structure, but as-is. */ public function testInitNestedTraversable() { $traversableChoice = new \ArrayIterator(array($this->obj3, $this->obj4)); $this->list = new ChoiceList( new \ArrayIterator(array( 'Group' => array($this->obj1, $this->obj2), 'Not a Group' => $traversableChoice, )), array( 'Group' => array('A', 'B'), 'Not a Group' => 'C', ), array($this->obj2) ); $this->assertSame(array($this->obj1, $this->obj2, $traversableChoice), $this->list->getChoices()); $this->assertSame(array('0', '1', '2'), $this->list->getValues()); $this->assertEquals(array( 'Group' => array(1 => new ChoiceView($this->obj2, '1', 'B')), ), $this->list->getPreferredViews()); $this->assertEquals(array( 'Group' => array(0 => new ChoiceView($this->obj1, '0', 'A')), 2 => new ChoiceView($traversableChoice, '2', 'C'), ), $this->list->getRemainingViews()); } public function testInitNestedArray() { $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3'), $this->list->getValues()); $this->assertEquals(array( 'Group 1' => array(1 => new ChoiceView($this->obj2, '1', 'B')), 'Group 2' => array(2 => new ChoiceView($this->obj3, '2', 'C')), ), $this->list->getPreferredViews()); $this->assertEquals(array( 'Group 1' => array(0 => new ChoiceView($this->obj1, '0', 'A')), 'Group 2' => array(3 => new ChoiceView($this->obj4, '3', 'D')), ), $this->list->getRemainingViews()); } /** * @expectedException \InvalidArgumentException */ public function testInitWithInsufficientLabels() { $this->list = new ChoiceList( array($this->obj1, $this->obj2), array('A') ); } public function testInitWithLabelsContainingNull() { $this->list = new ChoiceList( array($this->obj1, $this->obj2), array('A', null) ); $this->assertEquals( array(0 => new ChoiceView($this->obj1, '0', 'A'), 1 => new ChoiceView($this->obj2, '1', null)), $this->list->getRemainingViews() ); } /** * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ protected function createChoiceList() { return new ChoiceList( array( 'Group 1' => array($this->obj1, $this->obj2), 'Group 2' => array($this->obj3, $this->obj4), ), array( 'Group 1' => array('A', 'B'), 'Group 2' => array('C', 'D'), ), array($this->obj2, $this->obj3) ); } protected function getChoices() { return array(0 => $this->obj1, 1 => $this->obj2, 2 => $this->obj3, 3 => $this->obj4); } protected function getLabels() { return array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D'); } protected function getValues() { return array(0 => '0', 1 => '1', 2 => '2', 3 => '3'); } protected function getIndices() { return array(0, 1, 2, 3); } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/Fixtures/000077500000000000000000000000001266465517700260065ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/Fixtures/LazyChoiceListImpl.php000066400000000000000000000012071266465517700322270ustar00rootroot00000000000000 * * 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\ChoiceList\Fixtures; use Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList; class LazyChoiceListImpl extends LazyChoiceList { private $choiceList; public function __construct($choiceList) { $this->choiceList = $choiceList; } protected function loadChoiceList() { return $this->choiceList; } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/Fixtures/LazyChoiceListInvalidImpl.php000066400000000000000000000010171266465517700335350ustar00rootroot00000000000000 * * 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\ChoiceList\Fixtures; use Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList; class LazyChoiceListInvalidImpl extends LazyChoiceList { protected function loadChoiceList() { return new \stdClass(); } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php000066400000000000000000000052631266465517700304420ustar00rootroot00000000000000 * * 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\ChoiceList; use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; use Symfony\Component\Form\Extension\Core\View\ChoiceView; use Symfony\Component\Form\Tests\Extension\Core\ChoiceList\Fixtures\LazyChoiceListImpl; use Symfony\Component\Form\Tests\Extension\Core\ChoiceList\Fixtures\LazyChoiceListInvalidImpl; /** * @group legacy */ class LazyChoiceListTest extends \PHPUnit_Framework_TestCase { /** * @var LazyChoiceListImpl */ private $list; protected function setUp() { parent::setUp(); $this->list = new LazyChoiceListImpl(new SimpleChoiceList(array( 'a' => 'A', 'b' => 'B', 'c' => 'C', ), array('b'))); } protected function tearDown() { parent::tearDown(); $this->list = null; } public function testGetChoices() { $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getChoices()); } public function testGetValues() { $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getValues()); } public function testGetPreferredViews() { $this->assertEquals(array(1 => new ChoiceView('b', 'b', 'B')), $this->list->getPreferredViews()); } public function testGetRemainingViews() { $this->assertEquals(array(0 => new ChoiceView('a', 'a', 'A'), 2 => new ChoiceView('c', 'c', 'C')), $this->list->getRemainingViews()); } public function testGetIndicesForChoices() { $choices = array('b', 'c'); $this->assertSame(array(1, 2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForValues() { $values = array('b', 'c'); $this->assertSame(array(1, 2), $this->list->getIndicesForValues($values)); } public function testGetChoicesForValues() { $values = array('b', 'c'); $this->assertSame(array('b', 'c'), $this->list->getChoicesForValues($values)); } public function testGetValuesForChoices() { $choices = array('b', 'c'); $this->assertSame(array('b', 'c'), $this->list->getValuesForChoices($choices)); } /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException */ public function testLoadChoiceListShouldReturnChoiceList() { $list = new LazyChoiceListInvalidImpl(); $list->getChoices(); } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/ObjectChoiceListTest.php000066400000000000000000000276511266465517700307360ustar00rootroot00000000000000 * * 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\ChoiceList; use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList; use Symfony\Component\Form\Extension\Core\View\ChoiceView; class ObjectChoiceListTest_EntityWithToString { private $property; public function __construct($property) { $this->property = $property; } public function __toString() { return $this->property; } } /** * @group legacy */ class ObjectChoiceListTest extends AbstractChoiceListTest { private $obj1; private $obj2; private $obj3; private $obj4; protected function setUp() { $this->obj1 = (object) array('name' => 'A'); $this->obj2 = (object) array('name' => 'B'); $this->obj3 = (object) array('name' => 'C'); $this->obj4 = (object) array('name' => 'D'); parent::setUp(); } public function testInitArray() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array($this->obj2) ); $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3'), $this->list->getValues()); $this->assertEquals(array(1 => new ChoiceView($this->obj2, '1', 'B')), $this->list->getPreferredViews()); $this->assertEquals(array(0 => new ChoiceView($this->obj1, '0', 'A'), 2 => new ChoiceView($this->obj3, '2', 'C'), 3 => new ChoiceView($this->obj4, '3', 'D')), $this->list->getRemainingViews()); } public function testInitNestedArray() { $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3'), $this->list->getValues()); $this->assertEquals(array( 'Group 1' => array(1 => new ChoiceView($this->obj2, '1', 'B')), 'Group 2' => array(2 => new ChoiceView($this->obj3, '2', 'C')), ), $this->list->getPreferredViews()); $this->assertEquals(array( 'Group 1' => array(0 => new ChoiceView($this->obj1, '0', 'A')), 'Group 2' => array(3 => new ChoiceView($this->obj4, '3', 'D')), ), $this->list->getRemainingViews()); } public function testInitArrayWithGroupPath() { $this->obj1 = (object) array('name' => 'A', 'category' => 'Group 1'); $this->obj2 = (object) array('name' => 'B', 'category' => 'Group 1'); $this->obj3 = (object) array('name' => 'C', 'category' => 'Group 2'); $this->obj4 = (object) array('name' => 'D', 'category' => 'Group 2'); // Objects with NULL groups are not grouped $obj5 = (object) array('name' => 'E', 'category' => null); // Objects without the group property are not grouped either // see https://github.com/symfony/symfony/commit/d9b7abb7c7a0f28e0ce970afc5e305dce5dccddf $obj6 = (object) array('name' => 'F'); $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4, $obj5, $obj6), 'name', array($this->obj2, $this->obj3), 'category' ); $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4, $obj5, $obj6), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3', '4', '5'), $this->list->getValues()); $this->assertEquals(array( 'Group 1' => array(1 => new ChoiceView($this->obj2, '1', 'B')), 'Group 2' => array(2 => new ChoiceView($this->obj3, '2', 'C')), ), $this->list->getPreferredViews()); $this->assertEquals(array( 'Group 1' => array(0 => new ChoiceView($this->obj1, '0', 'A')), 'Group 2' => array(3 => new ChoiceView($this->obj4, '3', 'D')), 4 => new ChoiceView($obj5, '4', 'E'), 5 => new ChoiceView($obj6, '5', 'F'), ), $this->list->getRemainingViews()); } /** * @expectedException \InvalidArgumentException */ public function testInitArrayWithGroupPathThrowsExceptionIfNestedArray() { $this->obj1 = (object) array('name' => 'A', 'category' => 'Group 1'); $this->obj2 = (object) array('name' => 'B', 'category' => 'Group 1'); $this->obj3 = (object) array('name' => 'C', 'category' => 'Group 2'); $this->obj4 = (object) array('name' => 'D', 'category' => 'Group 2'); new ObjectChoiceList( array( 'Group 1' => array($this->obj1, $this->obj2), 'Group 2' => array($this->obj3, $this->obj4), ), 'name', array($this->obj2, $this->obj3), 'category' ); } public function testInitArrayWithValuePath() { $this->obj1 = (object) array('name' => 'A', 'id' => 10); $this->obj2 = (object) array('name' => 'B', 'id' => 20); $this->obj3 = (object) array('name' => 'C', 'id' => 30); $this->obj4 = (object) array('name' => 'D', 'id' => 40); $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array($this->obj2, $this->obj3), null, 'id' ); $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('10', '20', '30', '40'), $this->list->getValues()); $this->assertEquals(array(1 => new ChoiceView($this->obj2, '20', 'B'), 2 => new ChoiceView($this->obj3, '30', 'C')), $this->list->getPreferredViews()); $this->assertEquals(array(0 => new ChoiceView($this->obj1, '10', 'A'), 3 => new ChoiceView($this->obj4, '40', 'D')), $this->list->getRemainingViews()); } public function testInitArrayUsesToString() { $this->obj1 = new ObjectChoiceListTest_EntityWithToString('A'); $this->obj2 = new ObjectChoiceListTest_EntityWithToString('B'); $this->obj3 = new ObjectChoiceListTest_EntityWithToString('C'); $this->obj4 = new ObjectChoiceListTest_EntityWithToString('D'); $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4) ); $this->assertSame(array($this->obj1, $this->obj2, $this->obj3, $this->obj4), $this->list->getChoices()); $this->assertSame(array('0', '1', '2', '3'), $this->list->getValues()); $this->assertEquals(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')), $this->list->getRemainingViews()); } /** * @expectedException \Symfony\Component\Form\Exception\StringCastException */ public function testInitArrayThrowsExceptionIfToStringNotFound() { $this->obj1 = new ObjectChoiceListTest_EntityWithToString('A'); $this->obj2 = new ObjectChoiceListTest_EntityWithToString('B'); $this->obj3 = (object) array('name' => 'C'); $this->obj4 = new ObjectChoiceListTest_EntityWithToString('D'); new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4) ); } public function testGetIndicesForChoicesWithValuePath() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); // Compare by value, not by identity $choices = array(clone $this->obj1, clone $this->obj2); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesWithValuePathPreservesKeys() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(5 => clone $this->obj1, 8 => clone $this->obj2); $this->assertSame(array(5 => $this->index1, 8 => $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesWithValuePathPreservesOrder() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(clone $this->obj2, clone $this->obj1); $this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForChoicesWithValuePathIgnoresNonExistingChoices() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(clone $this->obj1, clone $this->obj2, 'foobar'); $this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices)); } public function testGetValuesForChoicesWithValuePath() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(clone $this->obj1, clone $this->obj2); $this->assertSame(array('A', 'B'), $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesWithValuePathPreservesKeys() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(5 => clone $this->obj1, 8 => clone $this->obj2); $this->assertSame(array(5 => 'A', 8 => 'B'), $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesWithValuePathPreservesOrder() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(clone $this->obj2, clone $this->obj1); $this->assertSame(array('B', 'A'), $this->list->getValuesForChoices($choices)); } public function testGetValuesForChoicesWithValuePathIgnoresNonExistingChoices() { $this->list = new ObjectChoiceList( array($this->obj1, $this->obj2, $this->obj3, $this->obj4), 'name', array(), null, 'name' ); $choices = array(clone $this->obj1, clone $this->obj2, 'foobar'); $this->assertSame(array('A', 'B'), $this->list->getValuesForChoices($choices)); } /** * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ protected function createChoiceList() { return new ObjectChoiceList( array( 'Group 1' => array($this->obj1, $this->obj2), 'Group 2' => array($this->obj3, $this->obj4), ), 'name', array($this->obj2, $this->obj3) ); } protected function getChoices() { return array(0 => $this->obj1, 1 => $this->obj2, 2 => $this->obj3, 3 => $this->obj4); } protected function getLabels() { return array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D'); } protected function getValues() { return array(0 => '0', 1 => '1', 2 => '2', 3 => '3'); } protected function getIndices() { return array(0, 1, 2, 3); } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/SimpleChoiceListTest.php000066400000000000000000000066351266465517700307600ustar00rootroot00000000000000 * * 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\ChoiceList; use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; use Symfony\Component\Form\Extension\Core\View\ChoiceView; /** * @group legacy */ class SimpleChoiceListTest extends AbstractChoiceListTest { public function testInitArray() { $choices = array('a' => 'A', 'b' => 'B', 'c' => 'C'); $this->list = new SimpleChoiceList($choices, array('b')); $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getChoices()); $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getValues()); $this->assertEquals(array(1 => new ChoiceView('b', 'b', 'B')), $this->list->getPreferredViews()); $this->assertEquals(array(0 => new ChoiceView('a', 'a', 'A'), 2 => new ChoiceView('c', 'c', 'C')), $this->list->getRemainingViews()); } public function testInitNestedArray() { $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd'), $this->list->getChoices()); $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd'), $this->list->getValues()); $this->assertEquals(array( 'Group 1' => array(1 => new ChoiceView('b', 'b', 'B')), 'Group 2' => array(2 => new ChoiceView('c', 'c', 'C')), ), $this->list->getPreferredViews()); $this->assertEquals(array( 'Group 1' => array(0 => new ChoiceView('a', 'a', 'A')), 'Group 2' => array(3 => new ChoiceView('d', 'd', 'D')), ), $this->list->getRemainingViews()); } /** * @dataProvider dirtyValuesProvider */ public function testGetValuesForChoicesDealsWithDirtyValues($choice, $value) { $choices = array( '0' => 'Zero', '1' => 'One', '' => 'Empty', '1.23' => 'Float', 'foo' => 'Foo', 'foo10' => 'Foo 10', ); $this->list = new SimpleChoiceList($choices, array()); $this->assertSame(array($value), $this->list->getValuesForChoices(array($choice))); } public function dirtyValuesProvider() { return array( array(0, '0'), array('0', '0'), array('1', '1'), array(false, '0'), array(true, '1'), array('', ''), array(null, ''), array('1.23', '1.23'), array('foo', 'foo'), array('foo10', 'foo10'), ); } /** * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ protected function createChoiceList() { return new SimpleChoiceList(array( 'Group 1' => array('a' => 'A', 'b' => 'B'), 'Group 2' => array('c' => 'C', 'd' => 'D'), ), array('b', 'c')); } protected function getChoices() { return array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd'); } protected function getLabels() { return array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D'); } protected function getValues() { return array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd'); } protected function getIndices() { return array(0, 1, 2, 3); } } src/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/SimpleNumericChoiceListTest.php000066400000000000000000000043171266465517700322760ustar00rootroot00000000000000 * * 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\ChoiceList; use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; /** * @group legacy */ class SimpleNumericChoiceListTest extends AbstractChoiceListTest { public function testGetIndicesForChoicesDealsWithNumericChoices() { // Pass choices as strings although they are integers $choices = array('0', '1'); $this->assertSame(array(0, 1), $this->list->getIndicesForChoices($choices)); } public function testGetIndicesForValuesDealsWithNumericValues() { // Pass values as strings although they are integers $values = array('0', '1'); $this->assertSame(array(0, 1), $this->list->getIndicesForValues($values)); } public function testGetChoicesForValuesDealsWithNumericValues() { // Pass values as strings although they are integers $values = array('0', '1'); $this->assertSame(array(0, 1), $this->list->getChoicesForValues($values)); } public function testGetValuesForChoicesDealsWithNumericValues() { // Pass values as strings although they are integers $values = array('0', '1'); $this->assertSame(array('0', '1'), $this->list->getValuesForChoices($values)); } /** * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface */ protected function createChoiceList() { return new SimpleChoiceList(array( 'Group 1' => array(0 => 'A', 1 => 'B'), 'Group 2' => array(2 => 'C', 3 => 'D'), ), array(1, 2)); } protected function getChoices() { return array(0 => 0, 1 => 1, 2 => 2, 3 => 3); } protected function getLabels() { return array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D'); } protected function getValues() { return array(0 => '0', 1 => '1', 2 => '2', 3 => '3'); } protected function getIndices() { return array(0, 1, 2, 3); } } src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/000077500000000000000000000000001266465517700241655ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php000066400000000000000000000270741266465517700313560ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormConfigInterface; use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; class PropertyPathMapperTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->propertyAccessor = $this->getMock('Symfony\Component\PropertyAccess\PropertyAccessorInterface'); $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); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/000077500000000000000000000000001266465517700252435ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php000066400000000000000000000067571266465517700334510ustar00rootroot00000000000000 * * 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\ArrayToPartsTransformer; class ArrayToPartsTransformerTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php000066400000000000000000000023661266465517700333350ustar00rootroot00000000000000 * * 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; class BaseDateTimeTransformerTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException * @expectedExceptionMessage this_timezone_does_not_exist */ public function testConstructFailsIfInputTimezoneIsInvalid() { $this->getMock( 'Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer', array(), array('this_timezone_does_not_exist') ); } /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException * @expectedExceptionMessage that_timezone_does_not_exist */ public function testConstructFailsIfOutputTimezoneIsInvalid() { $this->getMock( 'Symfony\Component\Form\Extension\Core\DataTransformer\BaseDateTimeTransformer', array(), array(null, 'that_timezone_does_not_exist') ); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php000066400000000000000000000036471266465517700341220ustar00rootroot00000000000000 * * 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\BooleanToStringTransformer; class BooleanToStringTransformerTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php000066400000000000000000000054571266465517700335440ustar00rootroot00000000000000 * * 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\ChoiceList\ArrayChoiceList; use Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer; class ChoiceToValueTransformerTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php000066400000000000000000000052221266465517700341000ustar00rootroot00000000000000 * * 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\ChoiceList\ArrayChoiceList; use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer; class ChoicesToValuesTransformerTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DataTransformerChainTest.php000066400000000000000000000042071266465517700326560ustar00rootroot00000000000000 * * 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\DataTransformerChain; class DataTransformerChainTest extends \PHPUnit_Framework_TestCase { public function testTransform() { $transformer1 = $this->getMock('Symfony\Component\Form\DataTransformerInterface'); $transformer1->expects($this->once()) ->method('transform') ->with($this->identicalTo('foo')) ->will($this->returnValue('bar')); $transformer2 = $this->getMock('Symfony\Component\Form\DataTransformerInterface'); $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->getMock('Symfony\Component\Form\DataTransformerInterface'); $transformer2->expects($this->once()) ->method('reverseTransform') ->with($this->identicalTo('foo')) ->will($this->returnValue('bar')); $transformer1 = $this->getMock('Symfony\Component\Form\DataTransformerInterface'); $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')); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeTestCase.php000066400000000000000000000010541266465517700311040ustar00rootroot00000000000000 * * 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; abstract class DateTimeTestCase extends \PHPUnit_Framework_TestCase { public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual) { self::assertEquals($expected->format('U'), $actual->format('U')); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php000066400000000000000000000413371266465517700340450ustar00rootroot00000000000000 * * 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)); } /** * @requires PHP 5.5 */ 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' => '', )); } } DateTimeToLocalizedStringTransformerTest.php000066400000000000000000000261521266465517700360030ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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); \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, '03. Februar 2010 04:05', '2010-02-03 04:05:00 UTC'), array(\IntlDateFormatter::FULL, null, null, 'Mittwoch, 03. Februar 2010 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, '03. Februar 2010', '2010-02-03 00:00:00 UTC'), array(\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 03. 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 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)); } /** * @requires PHP 5.5 */ 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->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 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 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'); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php000066400000000000000000000113631266465517700340170ustar00rootroot00000000000000 * * 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 * @requires PHP 5.5 */ 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'); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php000066400000000000000000000152601266465517700342310ustar00rootroot00000000000000 * * 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'), // 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)); } /** * @requires PHP 5.5 */ 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->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->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $reverseTransformer->reverseTransform(1234); } public function testReverseTransformExpectsValidDateString() { $reverseTransformer = new DateTimeToStringTransformer(); $this->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $reverseTransformer->reverseTransform('2010-2010-2010'); } public function testReverseTransformWithNonExistingDate() { $reverseTransformer = new DateTimeToStringTransformer(); $this->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $reverseTransformer->reverseTransform('2010-04-31'); } } DateTimeToTimestampTransformerTest.php000066400000000000000000000073711266465517700346530ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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)); } /** * @requires PHP 5.5 */ 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->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->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $reverseTransformer->reverseTransform('2010-2010-2010'); } } IntegerToLocalizedStringTransformerTest.php000066400000000000000000000275001266465517700357020ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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\IntegerToLocalizedStringTransformer; use Symfony\Component\Intl\Util\IntlTestHelper; class IntegerToLocalizedStringTransformerTest extends \PHPUnit_Framework_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); \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_AT", we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $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('-∞'); } } MoneyToLocalizedStringTransformerTest.php000066400000000000000000000043071266465517700353740ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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\MoneyToLocalizedStringTransformer; use Symfony\Component\Intl\Util\IntlTestHelper; class MoneyToLocalizedStringTransformerTest extends \PHPUnit_Framework_TestCase { public function testTransform() { // Since we test against "de_AT", we need the full implementation IntlTestHelper::requireFullIntl($this); \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->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); \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->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $transformer->reverseTransform(12345); } public function testReverseTransformEmpty() { $transformer = new MoneyToLocalizedStringTransformer(); $this->assertNull($transformer->reverseTransform('')); } } NumberToLocalizedStringTransformerTest.php000066400000000000000000000730511266465517700355370ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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\NumberToLocalizedStringTransformer; use Symfony\Component\Intl\Util\IntlTestHelper; class NumberToLocalizedStringTransformerTest extends \PHPUnit_Framework_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); \Locale::setDefault($locale); $transformer = new NumberToLocalizedStringTransformer(); $this->assertSame($to, $transformer->transform($from)); } public function provideTransformationsWithGrouping() { return array( array(1234.5, '1.234,5', 'de_AT'), array(12345.912, '12.345,912', 'de_AT'), 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); \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); \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); \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); \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); \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); \Locale::setDefault($locale); $transformer = new NumberToLocalizedStringTransformer(null, true); $this->assertEquals($to, $transformer->reverseTransform($from)); } /** * @see https://github.com/symfony/symfony/issues/7609 * * @requires extension mbstring */ public function testReverseTransformWithGroupingAndFixedSpaces() { // Since we test against other locales, we need the full implementation IntlTestHelper::requireFullIntl($this); \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); \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), // 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); \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_AT", we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $transformer = new NumberToLocalizedStringTransformer(null, true); $transformer->reverseTransform('1.234.5'); } /** * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException */ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep() { // Since we test against "de_AT", we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $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); \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); \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() { $transformer = new NumberToLocalizedStringTransformer(null, true); $transformer->reverseTransform('1,234,5'); } /** * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException */ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep() { $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 * * @link 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" * @requires extension mbstring */ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte() { // Since we test against other locales, we need the full implementation IntlTestHelper::requireFullIntl($this); \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" * @requires extension mbstring */ public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage() { // Since we test against other locales, we need the full implementation IntlTestHelper::requireFullIntl($this); \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" * @requires extension mbstring */ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte() { // Since we test against other locales, we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); $transformer = new NumberToLocalizedStringTransformer(null, true); $transformer->reverseTransform("12\xc2\xa0345,678foo"); } } PercentToLocalizedStringTransformerTest.php000066400000000000000000000075351266465517700357130ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer * * 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\PercentToLocalizedStringTransformer; use Symfony\Component\Intl\Util\IntlTestHelper; class PercentToLocalizedStringTransformerTest extends \PHPUnit_Framework_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); \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); \Locale::setDefault('de_AT'); $transformer = new PercentToLocalizedStringTransformer(2); $this->assertEquals(0.1234, $transformer->reverseTransform('12,34')); } public function testTransformExpectsNumeric() { $transformer = new PercentToLocalizedStringTransformer(); $this->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $transformer->transform('foo'); } public function testReverseTransformExpectsString() { $transformer = new PercentToLocalizedStringTransformer(); $this->setExpectedException('Symfony\Component\Form\Exception\TransformationFailedException'); $transformer->reverseTransform(1); } } src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php000066400000000000000000000064511266465517700344420ustar00rootroot00000000000000 * * 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\ValueToDuplicatesTransformer; class ValueToDuplicatesTransformerTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/000077500000000000000000000000001266465517700247365ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixRadioInputListenerTest.php000066400000000000000000000055411266465517700325470ustar00rootroot00000000000000 * * 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\ChoiceList\ArrayKeyChoiceList; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\Extension\Core\EventListener\FixRadioInputListener; /** * @group legacy */ class FixRadioInputListenerTest extends \PHPUnit_Framework_TestCase { private $choiceList; protected function setUp() { parent::setUp(); $this->choiceList = new ArrayKeyChoiceList(array('' => 'Empty', 0 => 'A', 1 => 'B')); } protected function tearDown() { parent::tearDown(); $listener = null; } public function testFixRadio() { $data = '1'; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $listener = new FixRadioInputListener($this->choiceList, true); $listener->preSubmit($event); $this->assertEquals(array(2 => '1'), $event->getData()); } public function testFixZero() { $data = '0'; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $listener = new FixRadioInputListener($this->choiceList, true); $listener->preSubmit($event); $this->assertEquals(array(1 => '0'), $event->getData()); } public function testFixEmptyString() { $data = ''; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $listener = new FixRadioInputListener($this->choiceList, true); $listener->preSubmit($event); $this->assertEquals(array(0 => ''), $event->getData()); } public function testConvertEmptyStringToPlaceholderIfNotFound() { $list = new ArrayKeyChoiceList(array(0 => 'A', 1 => 'B')); $data = ''; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $listener = new FixRadioInputListener($list, true); $listener->preSubmit($event); $this->assertEquals(array('placeholder' => ''), $event->getData()); } public function testDontConvertEmptyStringToPlaceholderIfNoPlaceholderUsed() { $list = new ArrayKeyChoiceList(array(0 => 'A', 1 => 'B')); $data = ''; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $listener = new FixRadioInputListener($list, false); $listener->preSubmit($event); $this->assertEquals(array(), $event->getData()); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php000066400000000000000000000031471266465517700327550ustar00rootroot00000000000000 * * 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\FormEvent; use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase { public function testFixHttpUrl() { $data = 'www.symfony.com'; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $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->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $filter = new FixUrlProtocolListener('http'); $filter->onSubmit($event); $this->assertEquals('http://www.symfony.com', $event->getData()); } public function testSkipOtherProtocol() { $data = 'ftp://www.symfony.com'; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $filter = new FixUrlProtocolListener('http'); $filter->onSubmit($event); $this->assertEquals('ftp://www.symfony.com', $event->getData()); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/Fixtures/000077500000000000000000000000001266465517700265475ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/EventListener/Fixtures/randomhash000066400000000000000000000000431266465517700306130ustar00rootroot00000000000000GIF87a,D;MergeCollectionListenerArrayObjectTest.php000066400000000000000000000012531266465517700351400ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/EventListener * * 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); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerArrayTest.php000066400000000000000000000012111266465517700340620ustar00rootroot00000000000000 * * 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); } } MergeCollectionListenerCustomArrayObjectTest.php000066400000000000000000000014361266465517700363360ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/EventListener * * 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); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php000066400000000000000000000170331266465517700330740ustar00rootroot00000000000000 * * 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\FormEvent; use Symfony\Component\Form\Extension\Core\EventListener\MergeCollectionListener; abstract class MergeCollectionListenerTest extends \PHPUnit_Framework_TestCase { protected $dispatcher; protected $factory; protected $form; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $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->getMock('Symfony\Component\Form\Test\FormInterface'); } 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()); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php000066400000000000000000000224111266465517700321020ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormEvent; class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase { private $dispatcher; private $factory; private $form; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $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->getMock('Symfony\Component\Form\DataMapperInterface'); } protected function getMockForm() { return $this->getMock('Symfony\Component\Form\Test\FormInterface'); } 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()); } } src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php000066400000000000000000000053311266465517700307320ustar00rootroot00000000000000 * * 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\FormEvent; use Symfony\Component\Form\Extension\Core\EventListener\TrimListener; class TrimListenerTest extends \PHPUnit_Framework_TestCase { public function testTrim() { $data = ' Foo! '; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $filter = new TrimListener(); $filter->preSubmit($event); $this->assertEquals('Foo!', $event->getData()); } public function testTrimSkipNonStrings() { $data = 1234; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $data); $filter = new TrimListener(); $filter->preSubmit($event); $this->assertSame(1234, $event->getData()); } /** * @dataProvider spaceProvider * @requires extension mbstring */ 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; $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $event = new FormEvent($form, $symbol); $filter = new TrimListener(); $filter->preSubmit($event); $this->assertSame("ab\ncd", $event->getData()); } 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'), ); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/000077500000000000000000000000001266465517700230705ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php000066400000000000000000000106321266465517700261570ustar00rootroot00000000000000 * * 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 */ abstract class BaseTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { 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', 'form') ->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', 'form') ->add('child', 'form'); $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() { $form = $this->factory->create($this->getTestedType(), null, array( 'translation_domain' => 'domain', )); $view = $form->createView(); $this->assertSame('domain', $view->vars['translation_domain']); } public function testInheritTranslationDomainFromParent() { $view = $this->factory ->createNamedBuilder('parent', 'form', 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', 'form', 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', 'form') ->add('child', $this->getTestedType()) ->getForm() ->createView(); $this->assertNull($view['child']->vars['translation_domain']); } public function testPassLabelToView() { $form = $this->factory->createNamed('__test___field', $this->getTestedType(), null, array('label' => 'My label')); $view = $form->createView(); $this->assertSame('My label', $view->vars['label']); } public function testPassMultipartFalseToView() { $form = $this->factory->create($this->getTestedType()); $view = $form->createView(); $this->assertFalse($view->vars['multipart']); } abstract protected function getTestedType(); } src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php000066400000000000000000000013631266465517700270540ustar00rootroot00000000000000 * * 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 BaseTypeTest { /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testSetInvalidYearsOption() { $this->factory->create('birthday', null, array( 'years' => 'bad value', )); } protected function getTestedType() { return 'birthday'; } } src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php000066400000000000000000000012011266465517700265500ustar00rootroot00000000000000 * * 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 { public function testCreateButtonInstances() { $this->assertInstanceOf('Symfony\Component\Form\Button', $this->factory->create('button')); } protected function getTestedType() { return 'button'; } } src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php000066400000000000000000000112751266465517700270370ustar00rootroot00000000000000 * * 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 \Symfony\Component\Form\Test\TypeTestCase { public function testDataIsFalseByDefault() { $form = $this->factory->create('checkbox'); $this->assertFalse($form->getData()); $this->assertFalse($form->getNormData()); $this->assertNull($form->getViewData()); } public function testPassValueToView() { $form = $this->factory->create('checkbox', null, array('value' => 'foobar')); $view = $form->createView(); $this->assertEquals('foobar', $view->vars['value']); } public function testCheckedIfDataTrue() { $form = $this->factory->create('checkbox'); $form->setData(true); $view = $form->createView(); $this->assertTrue($view->vars['checked']); } public function testCheckedIfDataTrueWithEmptyValue() { $form = $this->factory->create('checkbox', null, array('value' => '')); $form->setData(true); $view = $form->createView(); $this->assertTrue($view->vars['checked']); } public function testNotCheckedIfDataFalse() { $form = $this->factory->create('checkbox'); $form->setData(false); $view = $form->createView(); $this->assertFalse($view->vars['checked']); } public function testSubmitWithValueChecked() { $form = $this->factory->create('checkbox', null, array( 'value' => 'foobar', )); $form->submit('foobar'); $this->assertTrue($form->getData()); $this->assertEquals('foobar', $form->getViewData()); } public function testSubmitWithRandomValueChecked() { $form = $this->factory->create('checkbox', null, array( 'value' => 'foobar', )); $form->submit('krixikraxi'); $this->assertTrue($form->getData()); $this->assertEquals('foobar', $form->getViewData()); } public function testSubmitWithValueUnchecked() { $form = $this->factory->create('checkbox', null, array( 'value' => 'foobar', )); $form->submit(null); $this->assertFalse($form->getData()); $this->assertNull($form->getViewData()); } public function testSubmitWithEmptyValueChecked() { $form = $this->factory->create('checkbox', null, array( 'value' => '', )); $form->submit(''); $this->assertTrue($form->getData()); $this->assertSame('', $form->getViewData()); } public function testSubmitWithEmptyValueUnchecked() { $form = $this->factory->create('checkbox', null, array( 'value' => '', )); $form->submit(null); $this->assertFalse($form->getData()); $this->assertNull($form->getViewData()); } public function testSubmitWithEmptyValueAndFalseUnchecked() { $form = $this->factory->create('checkbox', null, array( 'value' => '', )); $form->submit(false); $this->assertFalse($form->getData()); $this->assertNull($form->getViewData()); } public function testSubmitWithEmptyValueAndTrueChecked() { $form = $this->factory->create('checkbox', 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('checkbox') ->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), ); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php000066400000000000000000000016771266465517700306720ustar00rootroot00000000000000 * * 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('choice', mt_rand(1, 400), array( 'choices' => $choices, )); } } } src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php000066400000000000000000002150721266465517700265040ustar00rootroot00000000000000 * * 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; use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList; use Symfony\Component\Form\Tests\Fixtures\ChoiceSubType; class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { private $choices = array( 'Bernhard' => 'a', 'Fabien' => 'b', 'Kris' => 'c', 'Jon' => 'd', 'Roman' => 'e', ); private $scalarChoices = array( 'Yes' => true, 'No' => false, 'n/a' => '', ); 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 $groupedChoicesFlipped = array( 'Symfony' => array( 'a' => 'Bernhard', 'b' => 'Fabien', 'c' => 'Kris', ), 'Doctrine' => array( 'd' => 'Jon', 'e' => 'Roman', ), ); 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('choice', null, array( 'choices' => new \stdClass(), )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testChoiceListOptionExpectsChoiceListInterface() { $this->factory->create('choice', null, array( 'choice_list' => array('foo' => 'foo'), )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testChoiceLoaderOptionExpectsChoiceLoaderInterface() { $this->factory->create('choice', null, array( 'choice_loader' => new \stdClass(), )); } public function testChoiceListAndChoicesCanBeEmpty() { $this->factory->create('choice'); } public function testExpandedChoicesOptionsTurnIntoChildren() { $form = $this->factory->create('choice', null, array( 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); } /** * @group legacy */ public function testExpandedFlippedChoicesOptionsTurnIntoChildren() { $form = $this->factory->create('choice', null, array( 'expanded' => true, 'choices' => array_flip($this->choices), )); $this->assertCount(count($this->choices), $form, 'Each choice should become a new field'); } public function testChoiceListWithScalarValues() { $view = $this->factory->create('choice', null, array( 'choices' => $this->scalarChoices, 'choices_as_values' => true, ))->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('choice', false, array( 'choices' => $this->scalarChoices, 'choices_as_values' => true, ))->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('choice', null, array( 'choices' => $this->scalarChoices, 'choices_as_values' => true, '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('choice', false, array( 'choices' => $this->scalarChoices, 'choices_as_values' => true, '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 testPlaceholderPresentOnNonRequiredExpandedSingleChoice() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array( 'Empty' => '', 'Not empty' => 1, ), 'choices_as_values' => true, )); $this->assertFalse(isset($form['placeholder'])); $this->assertCount(2, $form, 'Each choice should become a new field'); } public function testPlaceholderWithBooleanChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'required' => false, 'choices' => array( 'Yes' => true, 'No' => false, ), 'placeholder' => 'Select an option', 'choices_as_values' => true, )); $view = $form->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() { $form = $this->factory->create('choice', false, array( 'multiple' => false, 'expanded' => false, 'required' => false, 'choices' => array( 'Yes' => true, 'No' => false, ), 'placeholder' => 'Select an option', 'choices_as_values' => true, )); $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->vars['is_selected']($view->vars['choices'][1]->value, $view->vars['value']), 'Choice "false" should be selected'); } public function testPlaceholderWithExpandedBooleanChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array( 'Yes' => true, 'No' => false, ), 'placeholder' => 'Select an option', 'choices_as_values' => true, )); $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 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->children[1]->vars['checked'], 'Choice "false" should not be selected'); } public function testPlaceholderWithExpandedBooleanChoicesAndWithFalseAsPreSetData() { $form = $this->factory->create('choice', false, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array( 'Yes' => true, 'No' => false, ), 'placeholder' => 'Select an option', 'choices_as_values' => true, )); $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('choice', null, array( 'expanded' => true, 'choices' => $this->groupedChoices, 'choices_as_values' => true, )); $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'); } } /** * @group legacy */ public function testExpandedChoicesFlippedOptionsAreFlattened() { $form = $this->factory->create('choice', null, array( 'expanded' => true, 'choices' => $this->groupedChoicesFlipped, )); $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('choice', null, array( 'expanded' => true, 'choices' => array( 'Symfony' => array($obj1, $obj2, $obj3), 'Doctrine' => array($obj4, $obj5), ), 'choices_as_values' => true, '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('choice', null, array( 'multiple' => true, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); foreach ($form as $child) { $this->assertFalse($child->isRequired()); } } public function testExpandedRadiosAreRequiredIfChoiceChildIsRequired() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); foreach ($form as $child) { $this->assertTrue($child->isRequired()); } } public function testExpandedRadiosAreNotRequiredIfChoiceChildIsNotRequired() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); foreach ($form as $child) { $this->assertFalse($child->isRequired()); } } public function testSubmitSingleNonExpanded() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit('b'); $this->assertEquals('b', $form->getData()); $this->assertEquals('b', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleNonExpandedInvalidChoice() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit('foobar'); $this->assertNull($form->getData()); $this->assertEquals('foobar', $form->getViewData()); $this->assertFalse($form->isSynchronized()); } public function testSubmitSingleNonExpandedNull() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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 testSubmitSingleNonExpandedNullNoChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleNonExpandedEmpty() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleNonExpandedEmptyExplicitEmptyChoice() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => array( 'Empty' => 'EMPTY_CHOICE', ), 'choices_as_values' => true, '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('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleNonExpandedFalse() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(false); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleNonExpandedObjectChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->objectChoices, 'choices_as_values' => true, '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()); } /** * @group legacy */ public function testLegacyNullChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => null, )); $this->assertNull($form->getConfig()->getOption('choices')); $this->assertFalse($form->getConfig()->getOption('multiple')); $this->assertFalse($form->getConfig()->getOption('expanded')); } /** * @group legacy */ public function testLegacySubmitSingleNonExpandedObjectChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choice_list' => new ObjectChoiceList( $this->objectChoices, // label path 'name', array(), null, // value path '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 testSubmitMultipleNonExpanded() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(array()); $this->assertSame(array(), $form->getData()); $this->assertSame(array(), $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitMultipleNonExpandedInvalidScalarChoice() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit('foobar'); $this->assertNull($form->getData()); $this->assertEquals('foobar', $form->getViewData()); $this->assertFalse($form->isSynchronized()); } public function testSubmitMultipleNonExpandedInvalidArrayChoice() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->objectChoices, 'choices_as_values' => true, '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()); } /** * @group legacy */ public function testLegacySubmitMultipleNonExpandedObjectChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => false, 'choice_list' => new ObjectChoiceList( $this->objectChoices, // label path 'name', array(), null, // value path '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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(null); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(null); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedRequiredEmpty() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedRequiredFalse() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(false); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => true, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(false); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredNull() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(null); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(null); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredEmpty() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedNonRequiredFalse() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $form->submit(false); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $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('choice', null, array( 'multiple' => false, 'expanded' => true, 'required' => false, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(false); $this->assertNull($form->getData()); $this->assertNull($form->getViewData()); $this->assertEmpty($form->getExtraData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitSingleExpandedWithEmptyChild() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'choices' => array( 'Empty' => '', 'Not empty' => 1, ), 'choices_as_values' => true, )); $form->submit(''); $this->assertNull($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('choice', null, array( 'multiple' => false, 'expanded' => true, 'choices' => $this->objectChoices, 'choices_as_values' => true, '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()); } /** * @group legacy */ public function testLegacySubmitSingleExpandedObjectChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'choice_list' => new ObjectChoiceList( $this->objectChoices, // label path 'name', array(), null, // value path '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()); } /** * @group legacy */ public function testSubmitSingleExpandedNumericChoicesFlipped() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => true, 'choices' => $this->numericChoicesFlipped, )); $form->submit('1'); $this->assertSame(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('1', $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => array(), 'choices_as_values' => true, )); $form->submit(array()); $this->assertSame(array(), $form->getData()); $this->assertTrue($form->isSynchronized()); } public function testSubmitMultipleExpandedWithEmptyChild() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => array( 'Empty' => '', 'Not Empty' => 1, 'Not Empty 2' => 2, ), 'choices_as_values' => true, )); $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('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->objectChoices, 'choices_as_values' => true, '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()); } /** * @group legacy */ public function testLegacySubmitMultipleExpandedObjectChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => true, 'choice_list' => new ObjectChoiceList( $this->objectChoices, // label path 'name', array(), null, // value path '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()); } /** * @group legacy */ public function testSubmitMultipleExpandedNumericChoices() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => true, 'choices' => $this->numericChoicesFlipped, )); $form->submit(array('1', '2')); $this->assertSame(array(1, 2), $form->getData()); $this->assertTrue($form->isSynchronized()); $this->assertFalse($form[0]->getData()); $this->assertTrue($form[1]->getData()); $this->assertTrue($form[2]->getData()); $this->assertFalse($form[3]->getData()); $this->assertFalse($form[4]->getData()); $this->assertNull($form[0]->getViewData()); $this->assertSame('1', $form[1]->getViewData()); $this->assertSame('2', $form[2]->getViewData()); $this->assertNull($form[3]->getViewData()); $this->assertNull($form[4]->getViewData()); } public function testSingleSelectedObjectChoices() { $form = $this->factory->create('choice', $this->objectChoices[3], array( 'multiple' => false, 'expanded' => false, 'choices' => $this->objectChoices, 'choices_as_values' => true, 'choice_label' => 'name', 'choice_value' => 'id', )); $view = $form->createView(); $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() { $form = $this->factory->create('choice', array($this->objectChoices[3]), array( 'multiple' => true, 'expanded' => false, 'choices' => $this->objectChoices, 'choices_as_values' => true, 'choice_label' => 'name', 'choice_value' => 'id', )); $view = $form->createView(); $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'])); } /** * We need this functionality to create choice fields for Boolean types, * e.g. false => 'No', true => 'Yes'. * * @group legacy */ public function testSetDataSingleNonExpandedAcceptsBoolean() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'expanded' => false, 'choices' => $this->numericChoicesFlipped, )); $form->setData(false); $this->assertFalse($form->getData()); $this->assertEquals('0', $form->getViewData()); $this->assertTrue($form->isSynchronized()); } /** * @group legacy */ public function testSetDataMultipleNonExpandedAcceptsBoolean() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->numericChoicesFlipped, )); $form->setData(array(false, true)); $this->assertEquals(array(false, true), $form->getData()); $this->assertEquals(array('0', '1'), $form->getViewData()); $this->assertTrue($form->isSynchronized()); } public function testPassRequiredToView() { $form = $this->factory->create('choice', null, array( 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertTrue($view->vars['required']); } public function testPassNonRequiredToView() { $form = $this->factory->create('choice', null, array( 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertFalse($view->vars['required']); } public function testPassMultipleToView() { $form = $this->factory->create('choice', null, array( 'multiple' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertTrue($view->vars['multiple']); } public function testPassExpandedToView() { $form = $this->factory->create('choice', null, array( 'expanded' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertTrue($view->vars['expanded']); } public function testPassChoiceTranslationDomainToView() { $form = $this->factory->create('choice', null, array( 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertNull($view->vars['choice_translation_domain']); } public function testChoiceTranslationDomainWithTrueValueToView() { $form = $this->factory->create('choice', null, array( 'choices' => $this->choices, 'choices_as_values' => true, 'choice_translation_domain' => true, )); $view = $form->createView(); $this->assertNull($view->vars['choice_translation_domain']); } public function testDefaultChoiceTranslationDomainIsSameAsTranslationDomainToView() { $form = $this->factory->create('choice', null, array( 'choices' => $this->choices, 'choices_as_values' => true, 'translation_domain' => 'foo', )); $view = $form->createView(); $this->assertEquals('foo', $view->vars['choice_translation_domain']); } public function testInheritChoiceTranslationDomainFromParent() { $view = $this->factory ->createNamedBuilder('parent', 'form', null, array( 'translation_domain' => 'domain', )) ->add('child', 'choice') ->getForm() ->createView(); $this->assertEquals('domain', $view['child']->vars['choice_translation_domain']); } public function testPlaceholderIsNullByDefaultIfRequired() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'required' => true, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertNull($view->vars['placeholder']); } public function testPlaceholderIsEmptyStringByDefaultIfNotRequired() { $form = $this->factory->create('choice', null, array( 'multiple' => false, 'required' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertSame('', $view->vars['placeholder']); } /** * @dataProvider getOptionsWithPlaceholder */ public function testPassPlaceholderToView($multiple, $expanded, $required, $placeholder, $viewValue) { $form = $this->factory->create('choice', null, array( 'multiple' => $multiple, 'expanded' => $expanded, 'required' => $required, 'placeholder' => $placeholder, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertEquals($viewValue, $view->vars['placeholder']); $this->assertFalse($view->vars['placeholder_in_choices']); } /** * @dataProvider getOptionsWithPlaceholder * @group legacy */ public function testPassEmptyValueBC($multiple, $expanded, $required, $placeholder, $viewValue) { $form = $this->factory->create('choice', null, array( 'multiple' => $multiple, 'expanded' => $expanded, 'required' => $required, 'empty_value' => $placeholder, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertEquals($viewValue, $view->vars['placeholder']); $this->assertFalse($view->vars['placeholder_in_choices']); $this->assertEquals($viewValue, $view->vars['empty_value']); $this->assertFalse($view->vars['empty_value_in_choices']); } /** * @dataProvider getOptionsWithPlaceholder */ public function testDontPassPlaceholderIfContainedInChoices($multiple, $expanded, $required, $placeholder, $viewValue) { $form = $this->factory->create('choice', null, array( 'multiple' => $multiple, 'expanded' => $expanded, 'required' => $required, 'placeholder' => $placeholder, 'choices' => array('Empty' => '', 'A' => 'a'), 'choices_as_values' => true, )); $view = $form->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'); $form = $this->factory->create('choice', null, array( 'choices' => $choices, 'choices_as_values' => true, )); $view = $form->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'); $form = $this->factory->create('choice', null, array( 'choices' => $choices, 'choices_as_values' => true, 'preferred_choices' => array('b', 'd'), )); $view = $form->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() { $form = $this->factory->create('choice', null, array( 'choices' => $this->groupedChoices, 'choices_as_values' => true, 'preferred_choices' => array('b', 'd'), )); $view = $form->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'); $form = $this->factory->create('choice', null, array( 'choices' => array($obj1, $obj2, $obj3, $obj4), 'choices_as_values' => true, 'choice_label' => 'label', 'choice_value' => 'value', )); $view = $form->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']); } /** * @group legacy */ public function testDuplicateChoiceLabels() { $form = $this->factory->create('choice', null, array( 'choices' => array('a' => 'A', 'b' => 'B', 'c' => 'A'), )); $view = $form->createView(); $this->assertEquals(array( new ChoiceView('a', 'a', 'A'), new ChoiceView('b', 'b', 'B'), new ChoiceView('c', 'c', 'A'), ), $view->vars['choices']); } public function testAdjustFullNameForMultipleNonExpanded() { $form = $this->factory->createNamed('name', 'choice', null, array( 'multiple' => true, 'expanded' => false, 'choices' => $this->choices, 'choices_as_values' => true, )); $view = $form->createView(); $this->assertSame('name[]', $view->vars['full_name']); } // https://github.com/symfony/symfony/issues/3298 public function testInitializeWithEmptyChoices() { $this->factory->createNamed('name', 'choice', null, array( 'choices' => array(), 'choices_as_values' => true, )); } 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('choice', null, array( 'choices' => array($obj1, $obj2, $obj3, $obj4), 'choices_as_values' => true, '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 $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', 'choice', array( 'choices' => array( '1' => '1', '2' => '2', ), ) ); $builder->add('subChoice', new 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')); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php000066400000000000000000000242221266465517700274000ustar00rootroot00000000000000 * * 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; use Symfony\Component\Form\Tests\Fixtures\Author; use Symfony\Component\Form\Tests\Fixtures\AuthorType; class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { public function testContainsNoChildByDefault() { $form = $this->factory->create('collection', null, array( 'type' => 'text', )); $this->assertCount(0, $form); } public function testSetDataAdjustsSize() { $form = $this->factory->create('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => 'text', )); $this->setExpectedException('Symfony\Component\Form\Exception\UnexpectedTypeException'); $form->setData(new \stdClass()); } public function testNotResizedIfSubmittedWithMissingData() { $form = $this->factory->create('collection', null, array( 'type' => 'text', )); $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('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => new AuthorType(), // If the field is not required, no new Author will be created if the // form is completely empty '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('collection', null, array( 'type' => 'text', )); $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('collection', null, array( 'type' => 'text', '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('collection', null, array( 'type' => 'form', 'allow_add' => true, 'prototype' => false, )); $this->assertFalse($form->has('__name__')); } public function testPrototypeMultipartPropagation() { $form = $this->factory ->create('collection', null, array( 'type' => 'file', 'allow_add' => true, 'prototype' => true, )) ; $this->assertTrue($form->createView()->vars['multipart']); } public function testGetDataDoesNotContainsPrototypeNameBeforeDataAreSet() { $form = $this->factory->create('collection', array(), array( 'type' => 'file', 'prototype' => true, 'allow_add' => true, )); $data = $form->getData(); $this->assertFalse(isset($data['__name__'])); } public function testGetDataDoesNotContainsPrototypeNameAfterDataAreSet() { $form = $this->factory->create('collection', array(), array( 'type' => 'file', '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('collection', null, array( 'type' => 'form', 'prototype' => true, 'allow_add' => true, )); $this->assertSame('__name__', $form->getConfig()->getAttribute('prototype')->getName(), '__name__ is the default'); $form = $this->factory->create('collection', null, array( 'type' => 'form', 'prototype' => true, 'allow_add' => true, 'prototype_name' => '__test__', )); $this->assertSame('__test__', $form->getConfig()->getAttribute('prototype')->getName()); } public function testPrototypeDefaultLabel() { $form = $this->factory->create('collection', array(), array( 'type' => 'file', 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', )); $this->assertSame('__test__label__', $form->createView()->vars['prototype']->vars['label']); } public function testPrototypeDefaultRequired() { $form = $this->factory->create('collection', array(), array( 'type' => 'file', 'allow_add' => true, 'prototype' => true, 'prototype_name' => '__test__', )); $this->assertTrue($form->createView()->vars['prototype']->vars['required']); } public function testPrototypeSetNotRequired() { $form = $this->factory->create('collection', array(), array( 'type' => 'file', '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'); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php000066400000000000000000000033121266465517700267450ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Intl\Util\IntlTestHelper; class CountryTypeTest extends TestCase { protected function setUp() { IntlTestHelper::requireIntl($this); parent::setUp(); } public function testCountriesAreSelectable() { $form = $this->factory->create('country'); $view = $form->createView(); $choices = $view->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() { $form = $this->factory->create('country', 'country'); $view = $form->createView(); $choices = $view->vars['choices']; foreach ($choices as $choice) { if ('ZZ' === $choice->value) { $this->fail('Should not contain choice "ZZ"'); } } } } src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php000066400000000000000000000021411266465517700270730ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Intl\Util\IntlTestHelper; class CurrencyTypeTest extends TestCase { protected function setUp() { IntlTestHelper::requireIntl($this); parent::setUp(); } public function testCurrenciesAreSelectable() { $form = $this->factory->create('currency'); $view = $form->createView(); $choices = $view->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); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php000066400000000000000000000423011266465517700267770ustar00rootroot00000000000000 * * 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; use Symfony\Component\Form\Test\TypeTestCase as TestCase; class DateTimeTypeTest extends TestCase { protected function setUp() { \Locale::setDefault('en'); parent::setUp(); } public function testSubmitDateTime() { $form = $this->factory->create('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', 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('datetime', new \DateTime()); } public function testSingleTextWidgetShouldUseTheRightInputType() { $form = $this->factory->create('datetime', null, array( 'widget' => 'single_text', )); $view = $form->createView(); $this->assertEquals('datetime', $view->vars['type']); } public function testPassDefaultPlaceholderToViewIfNotRequired() { $form = $this->factory->create('datetime', null, array( 'required' => false, 'with_seconds' => true, )); $view = $form->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() { $form = $this->factory->create('datetime', null, array( 'required' => true, 'with_seconds' => true, )); $view = $form->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() { $form = $this->factory->create('datetime', null, array( 'placeholder' => 'Empty', 'with_seconds' => true, )); $view = $form->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']); } /** * @group legacy */ public function testPassEmptyValueBC() { $form = $this->factory->create('datetime', null, array( 'empty_value' => 'Empty', 'with_seconds' => true, )); $view = $form->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']); $this->assertSame('Empty', $view['date']['year']->vars['empty_value']); $this->assertSame('Empty', $view['date']['month']->vars['empty_value']); $this->assertSame('Empty', $view['date']['day']->vars['empty_value']); $this->assertSame('Empty', $view['time']['hour']->vars['empty_value']); $this->assertSame('Empty', $view['time']['minute']->vars['empty_value']); $this->assertSame('Empty', $view['time']['second']->vars['empty_value']); } public function testPassPlaceholderAsArray() { $form = $this->factory->create('datetime', 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, )); $view = $form->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() { $form = $this->factory->create('datetime', null, array( 'required' => false, 'placeholder' => array( 'year' => 'Empty year', 'day' => 'Empty day', 'hour' => 'Empty hour', 'second' => 'Empty second', ), 'with_seconds' => true, )); $view = $form->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() { $form = $this->factory->create('datetime', null, array( 'required' => true, 'placeholder' => array( 'year' => 'Empty year', 'day' => 'Empty day', 'hour' => 'Empty hour', 'second' => 'Empty second', ), 'with_seconds' => true, )); $view = $form->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() { $form = $this->factory->create('datetime', null, array( 'widget' => 'single_text', )); $view = $form->createView(); $this->assertSame('datetime', $view->vars['type']); } public function testDontPassHtml5TypeIfHtml5NotAllowed() { $form = $this->factory->create('datetime', null, array( 'widget' => 'single_text', 'html5' => false, )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testDontPassHtml5TypeIfNotHtml5Format() { $form = $this->factory->create('datetime', null, array( 'widget' => 'single_text', 'format' => 'yyyy-MM-dd HH:mm', )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testDontPassHtml5TypeIfNotSingleText() { $form = $this->factory->create('datetime', null, array( 'widget' => 'text', )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testDateTypeChoiceErrorsBubbleUp() { $error = new FormError('Invalid!'); $form = $this->factory->create('datetime', 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('datetime', 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('datetime', 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('datetime', 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())); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php000066400000000000000000000670111266465517700261650ustar00rootroot00000000000000 * * 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\Form\Test\TypeTestCase as TestCase; use Symfony\Component\Intl\Util\IntlTestHelper; class DateTypeTest extends TestCase { 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('date', null, array( 'widget' => 'fake_widget', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testInvalidInputOption() { $this->factory->create('date', null, array( 'input' => 'fake_input', )); } public function testSubmitFromSingleTextDateTimeWithDefaultFormat() { $form = $this->factory->create('date', 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 testSubmitFromSingleTextDateTime() { // we test against "de_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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('date', 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('date', 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('date', 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('date', 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('date', 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('date', 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('date', 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) { $form = $this->factory->create('date', null, array( 'format' => $format, )); $view = $form->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('date', null, array( 'format' => '0', 'widget' => 'single_text', 'input' => 'string', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfFormatDoesNotContainYearMonthAndDay() { $this->factory->create('date', null, array( 'months' => array(6, 7), 'format' => 'yy', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfFormatIsNoConstant() { $this->factory->create('date', null, array( 'format' => 105, )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfFormatIsInvalid() { $this->factory->create('date', null, array( 'format' => array(), )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfYearsIsInvalid() { $this->factory->create('date', null, array( 'years' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfMonthsIsInvalid() { $this->factory->create('date', null, array( 'months' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfDaysIsInvalid() { $this->factory->create('date', null, array( 'days' => 'bad value', )); } public function testSetDataWithNegativeTimezoneOffsetStringInput() { // we test against "de_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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('date', 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('date', 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); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', 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); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', null, array( 'months' => array(1, 4), 'format' => 'dd.MMMM.yy', )); $view = $form->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); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', null, array( 'months' => array(1, 4), 'format' => 'dd.MMMM.yy', )); $view = $form->createView(); $this->assertEquals(array( new ChoiceView(1, '1', 'Jänner'), new ChoiceView(4, '4', 'April'), ), $view['month']->vars['choices']); } public function testIsDayWithinRangeReturnsTrueIfWithin() { $form = $this->factory->create('date', null, array( 'days' => array(6, 7), )); $view = $form->createView(); $this->assertEquals(array( new ChoiceView(6, '6', '06'), new ChoiceView(7, '7', '07'), ), $view['day']->vars['choices']); } public function testIsPartiallyFilledReturnsFalseIfSingleText() { $this->markTestIncomplete('Needs to be reimplemented using validators'); $form = $this->factory->create('date', null, array( 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'single_text', )); $form->submit('7.6.2010'); $this->assertFalse($form->isPartiallyFilled()); } public function testIsPartiallyFilledReturnsFalseIfChoiceAndCompletelyEmpty() { $this->markTestIncomplete('Needs to be reimplemented using validators'); $form = $this->factory->create('date', null, array( 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', )); $form->submit(array( 'day' => '', 'month' => '', 'year' => '', )); $this->assertFalse($form->isPartiallyFilled()); } public function testIsPartiallyFilledReturnsFalseIfChoiceAndCompletelyFilled() { $this->markTestIncomplete('Needs to be reimplemented using validators'); $form = $this->factory->create('date', null, array( 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', )); $form->submit(array( 'day' => '2', 'month' => '6', 'year' => '2010', )); $this->assertFalse($form->isPartiallyFilled()); } public function testIsPartiallyFilledReturnsTrueIfChoiceAndDayEmpty() { $this->markTestIncomplete('Needs to be reimplemented using validators'); $form = $this->factory->create('date', null, array( 'model_timezone' => 'UTC', 'view_timezone' => 'UTC', 'widget' => 'choice', )); $form->submit(array( 'day' => '', 'month' => '6', 'year' => '2010', )); $this->assertTrue($form->isPartiallyFilled()); } public function testPassDatePatternToView() { // we test against "de_AT", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $form = $this->factory->create('date'); $view = $form->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); \Locale::setDefault('de_AT'); $form = $this->factory->create('date', null, array( 'format' => \IntlDateFormatter::LONG, )); $view = $form->createView(); $this->assertSame('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); } public function testPassDatePatternToViewDifferentPattern() { $form = $this->factory->create('date', null, array( 'format' => 'MMyyyydd', )); $view = $form->createView(); $this->assertSame('{{ month }}{{ year }}{{ day }}', $view->vars['date_pattern']); } public function testPassDatePatternToViewDifferentPatternWithSeparators() { $form = $this->factory->create('date', null, array( 'format' => 'MM*yyyy*dd', )); $view = $form->createView(); $this->assertSame('{{ month }}*{{ year }}*{{ day }}', $view->vars['date_pattern']); } public function testDontPassDatePatternIfText() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', )); $view = $form->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); \Locale::setDefault('es_ES'); $form = $this->factory->create('date', null, array( // EEEE, d 'de' MMMM 'de' y 'format' => \IntlDateFormatter::FULL, )); $view = $form->createView(); $this->assertEquals('{{ day }}{{ month }}{{ year }}', $view->vars['date_pattern']); } public function testPassWidgetToView() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', )); $view = $form->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('date', new \DateTime()); } public function testSingleTextWidgetShouldUseTheRightInputType() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', )); $view = $form->createView(); $this->assertEquals('date', $view->vars['type']); } public function testPassDefaultPlaceholderToViewIfNotRequired() { $form = $this->factory->create('date', null, array( 'required' => false, )); $view = $form->createView(); $this->assertSame('', $view['year']->vars['placeholder']); $this->assertSame('', $view['month']->vars['placeholder']); $this->assertSame('', $view['day']->vars['placeholder']); } public function testPassNoPlaceholderToViewIfRequired() { $form = $this->factory->create('date', null, array( 'required' => true, )); $view = $form->createView(); $this->assertNull($view['year']->vars['placeholder']); $this->assertNull($view['month']->vars['placeholder']); $this->assertNull($view['day']->vars['placeholder']); } public function testPassPlaceholderAsString() { $form = $this->factory->create('date', null, array( 'placeholder' => 'Empty', )); $view = $form->createView(); $this->assertSame('Empty', $view['year']->vars['placeholder']); $this->assertSame('Empty', $view['month']->vars['placeholder']); $this->assertSame('Empty', $view['day']->vars['placeholder']); } /** * @group legacy */ public function testPassEmptyValueBC() { $form = $this->factory->create('date', null, array( 'empty_value' => 'Empty', )); $view = $form->createView(); $this->assertSame('Empty', $view['year']->vars['placeholder']); $this->assertSame('Empty', $view['month']->vars['placeholder']); $this->assertSame('Empty', $view['day']->vars['placeholder']); $this->assertSame('Empty', $view['year']->vars['empty_value']); $this->assertSame('Empty', $view['month']->vars['empty_value']); $this->assertSame('Empty', $view['day']->vars['empty_value']); } public function testPassPlaceholderAsArray() { $form = $this->factory->create('date', null, array( 'placeholder' => array( 'year' => 'Empty year', 'month' => 'Empty month', 'day' => 'Empty day', ), )); $view = $form->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() { $form = $this->factory->create('date', null, array( 'required' => false, 'placeholder' => array( 'year' => 'Empty year', 'day' => 'Empty day', ), )); $view = $form->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() { $form = $this->factory->create('date', null, array( 'required' => true, 'placeholder' => array( 'year' => 'Empty year', 'day' => 'Empty day', ), )); $view = $form->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() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', )); $view = $form->createView(); $this->assertSame('date', $view->vars['type']); } public function testDontPassHtml5TypeIfHtml5NotAllowed() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', 'html5' => false, )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testDontPassHtml5TypeIfNotHtml5Format() { $form = $this->factory->create('date', null, array( 'widget' => 'single_text', 'format' => \IntlDateFormatter::MEDIUM, )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testDontPassHtml5TypeIfNotSingleText() { $form = $this->factory->create('date', null, array( 'widget' => 'text', )); $view = $form->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('date', 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('date', 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('date', 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.'); } $form = $this->factory->create('date', null, array( 'years' => range(1900, 2040), )); $view = $form->createView(); $listChoices = array(); foreach (range(1902, 2037) as $y) { $listChoices[] = new ChoiceView($y, $y, $y); } $this->assertEquals($listChoices, $view['year']->vars['choices']); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php000066400000000000000000000055561266465517700261750ustar00rootroot00000000000000 * * 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 \Symfony\Component\Form\Test\TypeTestCase { // https://github.com/symfony/symfony/pull/5028 public function testSetData() { $form = $this->factory->createBuilder('file')->getForm(); $data = $this->createUploadedFileMock('abcdef', 'original.jpg', true); $form->setData($data); $this->assertSame($data, $form->getData()); } public function testSubmit() { $form = $this->factory->createBuilder('file')->getForm(); $data = $this->createUploadedFileMock('abcdef', 'original.jpg', true); $form->submit($data); $this->assertSame($data, $form->getData()); } // https://github.com/symfony/symfony/issues/6134 public function testSubmitEmpty() { $form = $this->factory->createBuilder('file')->getForm(); $form->submit(null); $this->assertNull($form->getData()); } public function testSubmitMultiple() { $form = $this->factory->createBuilder('file', 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('file'); $form->submit(array( 'file' => $this->createUploadedFileMock('abcdef', 'original.jpg', true), )); $view = $form->createView(); $this->assertEquals('', $view->vars['value']); } 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; } } src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php000066400000000000000000000473751266465517700262260ustar00rootroot00000000000000 * * 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 { public function testCreateFormInstances() { $this->assertInstanceOf('Symfony\Component\Form\Form', $this->factory->create('form')); } public function testPassRequiredAsOption() { $form = $this->factory->create('form', null, array('required' => false)); $this->assertFalse($form->isRequired()); $form = $this->factory->create('form', null, array('required' => true)); $this->assertTrue($form->isRequired()); } public function testSubmittedDataIsTrimmedBeforeTransforming() { $form = $this->factory->createBuilder('form') ->addViewTransformer(new FixedDataTransformer(array( null => '', '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('form', null, array('trim' => false)) ->addViewTransformer(new FixedDataTransformer(array( null => '', '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', 'form', null, array('read_only' => true)) ->add('child', 'form') ->getForm() ->createView(); $this->assertTrue($view['child']->vars['read_only']); } public function testReadOnlyFormWithNonReadOnlyParentIsReadOnly() { $view = $this->factory->createNamedBuilder('parent', 'form') ->add('child', 'form', array('read_only' => true)) ->getForm() ->createView(); $this->assertTrue($view['child']->vars['read_only']); } public function testNonReadOnlyFormWithNonReadOnlyParentIsNotReadOnly() { $view = $this->factory->createNamedBuilder('parent', 'form') ->add('child', 'form') ->getForm() ->createView(); $this->assertFalse($view['child']->vars['read_only']); } public function testPassMaxLengthToView() { $form = $this->factory->create('form', null, array('attr' => array('maxlength' => 10))); $view = $form->createView(); $this->assertSame(10, $view->vars['attr']['maxlength']); } public function testPassMaxLengthBCToView() { $form = $this->factory->create('form', null, array('max_length' => 10)); $view = $form->createView(); $this->assertSame(10, $view->vars['attr']['maxlength']); } public function testDataClassMayBeNull() { $this->factory->createBuilder('form', null, array( 'data_class' => null, )); } public function testDataClassMayBeAbstractClass() { $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor', )); } public function testDataClassMayBeInterface() { $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface', )); } /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException */ public function testDataClassMustBeValidClassOrInterface() { $this->factory->createBuilder('form', null, array( 'data_class' => 'foobar', )); } public function testSubmitWithEmptyDataCreatesObjectIfClassAvailable() { $builder = $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => false, )); $builder->add('firstName', 'text'); $builder->add('lastName', 'text'); $form = $builder->getForm(); $form->setData(null); // 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 testSubmitWithEmptyDataCreatesObjectIfInitiallySubmittedWithObject() { $builder = $this->factory->createBuilder('form', null, array( // data class is inferred from the passed object 'data' => new Author(), 'required' => false, )); $builder->add('firstName', 'text'); $builder->add('lastName', 'text'); $form = $builder->getForm(); $form->setData(null); // 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 testSubmitWithEmptyDataCreatesArrayIfDataClassIsNull() { $builder = $this->factory->createBuilder('form', null, array( 'data_class' => null, 'required' => false, )); $builder->add('firstName', 'text'); $form = $builder->getForm(); $form->setData(null); $form->submit(array('firstName' => 'Bernhard')); $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); } public function testSubmitEmptyWithEmptyDataCreatesNoObjectIfNotRequired() { $builder = $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => false, )); $builder->add('firstName', 'text'); $builder->add('lastName', 'text'); $form = $builder->getForm(); $form->setData(null); $form->submit(array('firstName' => '', 'lastName' => '')); $this->assertNull($form->getData()); } public function testSubmitEmptyWithEmptyDataCreatesObjectIfRequired() { $builder = $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => true, )); $builder->add('firstName', 'text'); $builder->add('lastName', 'text'); $form = $builder->getForm(); $form->setData(null); $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('form') ->add('firstName', 'text') ->getForm(); $form->setData(null); $form->submit(array('firstName' => 'Bernhard')); $this->assertSame(array('firstName' => 'Bernhard'), $form->getData()); } public function testSubmitWithEmptyDataPassesEmptyStringToTransformerIfNotCompound() { $form = $this->factory->createBuilder('form') ->addViewTransformer(new FixedDataTransformer(array( // required for the initial, internal setData(null) null => 'null', // required to test that submit(null) is converted to '' 'empty' => '', ))) ->setCompound(false) ->getForm(); $form->submit(null); $this->assertSame('empty', $form->getData()); } public function testSubmitWithEmptyDataUsesEmptyDataOption() { $author = new Author(); $builder = $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'empty_data' => $author, )); $builder->add('firstName', 'text'); $form = $builder->getForm(); $form->submit(array('firstName' => 'Bernhard')); $this->assertSame($author, $form->getData()); $this->assertEquals('Bernhard', $author->firstName); } 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('form', null, array( 'data' => $data, 'compound' => false, )); $view = $form->createView(); $this->assertFalse($form->isEmpty()); $this->assertSame($dataAsString, $view->vars['value']); $this->assertSame($dataAsString, $form->getData()); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testAttributesException() { $this->factory->create('form', null, array('attr' => '')); } public function testNameCanBeEmptyString() { $form = $this->factory->createNamed('', 'form'); $this->assertEquals('', $form->getName()); } public function testSubformDoesntCallSetters() { $author = new FormTest_AuthorWithoutRefSetter(new Author()); $builder = $this->factory->createBuilder('form', $author); $builder->add('reference', 'form', array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', )); $builder->get('reference')->add('firstName', 'text'); $form = $builder->getForm(); $form->submit(array( // reference has a getter, but not 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('form', $author); $builder->add('referenceCopy', 'form', array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', )); $builder->get('referenceCopy')->add('firstName', 'text'); $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('form', $author); $builder->add('referenceCopy', 'form', array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'by_reference' => false, )); $builder->get('referenceCopy')->add('firstName', 'text'); $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('form', $author); $builder->add('referenceCopy', 'form'); $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('form'); $builder->setData($author); $builder->add('referenceCopy', 'form'); $builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer( function () {}, function ($value) use ($ref2) { // reverseTransform return $ref2; } )); $form = $builder->getForm(); $form->submit(array( 'referenceCopy' => array('a' => 'b'), // 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('form') ->add('foo', 'text') ->add('bar', 'file') ->getForm() ->createView(); $this->assertTrue($view->vars['multipart']); } public function testViewIsNotRenderedByDefault() { $view = $this->factory->createBuilder('form') ->add('foo', 'form') ->getForm() ->createView(); $this->assertFalse($view->isRendered()); } public function testErrorBubblingIfCompound() { $form = $this->factory->create('form', null, array( 'compound' => true, )); $this->assertTrue($form->getConfig()->getErrorBubbling()); } public function testNoErrorBubblingIfNotCompound() { $form = $this->factory->create('form', null, array( 'compound' => false, )); $this->assertFalse($form->getConfig()->getErrorBubbling()); } public function testOverrideErrorBubbling() { $form = $this->factory->create('form', null, array( 'compound' => false, 'error_bubbling' => true, )); $this->assertTrue($form->getConfig()->getErrorBubbling()); } public function testPropertyPath() { $form = $this->factory->create('form', 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', 'form', null, array( 'property_path' => null, )); $this->assertEquals(new PropertyPath('name'), $form->getPropertyPath()); $this->assertTrue($form->getConfig()->getMapped()); } public function testNotMapped() { $form = $this->factory->create('form', null, array( 'property_path' => 'foo', 'mapped' => false, )); $this->assertEquals(new PropertyPath('foo'), $form->getPropertyPath()); $this->assertFalse($form->getConfig()->getMapped()); } public function testViewValidNotSubmitted() { $form = $this->factory->create('form'); $view = $form->createView(); $this->assertTrue($view->vars['valid']); } public function testViewNotValidSubmitted() { $form = $this->factory->create('form'); $form->submit(array()); $form->addError(new FormError('An error')); $view = $form->createView(); $this->assertFalse($view->vars['valid']); } public function testViewSubmittedNotSubmitted() { $form = $this->factory->create('form'); $view = $form->createView(); $this->assertFalse($view->vars['submitted']); } public function testViewSubmittedSubmitted() { $form = $this->factory->create('form'); $form->submit(array()); $view = $form->createView(); $this->assertTrue($view->vars['submitted']); } public function testDataOptionSupersedesSetDataCalls() { $form = $this->factory->create('form', null, array( 'data' => 'default', 'compound' => false, )); $form->setData('foobar'); $this->assertSame('default', $form->getData()); } public function testDataOptionSupersedesSetDataCallsIfNull() { $form = $this->factory->create('form', null, array( 'data' => null, 'compound' => false, )); $form->setData('foobar'); $this->assertNull($form->getData()); } public function testNormDataIsPassedToView() { $view = $this->factory->createBuilder('form') ->addViewTransformer(new FixedDataTransformer(array( 'foo' => 'bar', ))) ->setData('foo') ->getForm() ->createView(); $this->assertSame('foo', $view->vars['data']); $this->assertSame('bar', $view->vars['value']); } // https://github.com/symfony/symfony/issues/6862 public function testPassZeroLabelToView() { $view = $this->factory->create('form', null, array( 'label' => '0', )) ->createView(); $this->assertSame('0', $view->vars['label']); } /** * @group legacy */ public function testCanGetErrorsWhenButtonInForm() { $builder = $this->factory->createBuilder('form', null, array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', 'required' => false, )); $builder->add('foo', 'text'); $builder->add('submit', 'submit'); $form = $builder->getForm(); //This method should not throw a Fatal Error Exception. $form->getErrorsAsString(); } protected function getTestedType() { return 'form'; } } src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php000066400000000000000000000014511266465517700267010ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Intl\Util\IntlTestHelper; class IntegerTypeTest extends TestCase { protected function setUp() { IntlTestHelper::requireIntl($this); parent::setUp(); } public function testSubmitCastsToInteger() { $form = $this->factory->create('integer'); $form->submit('1.678'); $this->assertSame(1, $form->getData()); $this->assertSame('1', $form->getViewData()); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php000066400000000000000000000031661266465517700270340ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Intl\Util\IntlTestHelper; class LanguageTypeTest extends TestCase { protected function setUp() { IntlTestHelper::requireIntl($this); parent::setUp(); } public function testCountriesAreSelectable() { $form = $this->factory->create('language'); $view = $form->createView(); $choices = $view->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() { $form = $this->factory->create('language', 'language'); $view = $form->createView(); $choices = $view->vars['choices']; $this->assertNotContains(new ChoiceView('mul', 'mul', 'Mehrsprachig'), $choices, '', false, false); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php000066400000000000000000000022231266465517700265010ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Intl\Util\IntlTestHelper; class LocaleTypeTest extends TestCase { protected function setUp() { IntlTestHelper::requireIntl($this); parent::setUp(); } public function testLocalesAreSelectable() { $form = $this->factory->create('locale'); $view = $form->createView(); $choices = $view->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); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php000066400000000000000000000034071266465517700263760ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Intl\Util\IntlTestHelper; class MoneyTypeTest extends TestCase { protected function setUp() { // we test against different locales, so we need the full // implementation IntlTestHelper::requireFullIntl($this); parent::setUp(); } public function testPassMoneyPatternToView() { \Locale::setDefault('de_DE'); $form = $this->factory->create('money'); $view = $form->createView(); $this->assertSame('{{ widget }} €', $view->vars['money_pattern']); } public function testMoneyPatternWorksForYen() { \Locale::setDefault('en_US'); $form = $this->factory->create('money', null, array('currency' => 'JPY')); $view = $form->createView(); $this->assertTrue((bool) strstr($view->vars['money_pattern'], '¥')); } // https://github.com/symfony/symfony/issues/5458 public function testPassDifferentPatternsForDifferentCurrencies() { \Locale::setDefault('de_DE'); $form1 = $this->factory->create('money', null, array('currency' => 'GBP')); $form2 = $this->factory->create('money', null, array('currency' => 'EUR')); $view1 = $form1->createView(); $view2 = $form2->createView(); $this->assertSame('{{ widget }} £', $view1->vars['money_pattern']); $this->assertSame('{{ widget }} €', $view2->vars['money_pattern']); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php000066400000000000000000000034361266465517700265410ustar00rootroot00000000000000 * * 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 as TestCase; use Symfony\Component\Intl\Util\IntlTestHelper; class NumberTypeTest extends TestCase { protected function setUp() { parent::setUp(); // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_DE'); } public function testDefaultFormatting() { $form = $this->factory->create('number'); $form->setData('12345.67890'); $view = $form->createView(); $this->assertSame('12345,679', $view->vars['value']); } public function testDefaultFormattingWithGrouping() { $form = $this->factory->create('number', null, array('grouping' => true)); $form->setData('12345.67890'); $view = $form->createView(); $this->assertSame('12.345,679', $view->vars['value']); } public function testDefaultFormattingWithScale() { $form = $this->factory->create('number', null, array('scale' => 2)); $form->setData('12345.67890'); $view = $form->createView(); $this->assertSame('12345,68', $view->vars['value']); } public function testDefaultFormattingWithRounding() { $form = $this->factory->create('number', null, array('scale' => 0, 'rounding_mode' => \NumberFormatter::ROUND_UP)); $form->setData('12345.54321'); $view = $form->createView(); $this->assertSame('12346', $view->vars['value']); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php000066400000000000000000000025371266465517700271140ustar00rootroot00000000000000 * * 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 \Symfony\Component\Form\Test\TypeTestCase { public function testEmptyIfNotSubmitted() { $form = $this->factory->create('password'); $form->setData('pAs5w0rd'); $view = $form->createView(); $this->assertSame('', $view->vars['value']); } public function testEmptyIfSubmitted() { $form = $this->factory->create('password'); $form->submit('pAs5w0rd'); $view = $form->createView(); $this->assertSame('', $view->vars['value']); } public function testNotEmptyIfSubmittedAndNotAlwaysEmpty() { $form = $this->factory->create('password', null, array('always_empty' => false)); $form->submit('pAs5w0rd'); $view = $form->createView(); $this->assertSame('pAs5w0rd', $view->vars['value']); } public function testNotTrimmed() { $form = $this->factory->create('password', null); $form->submit(' pAs5w0rd '); $data = $form->getData(); $this->assertSame(' pAs5w0rd ', $data); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php000066400000000000000000000140731266465517700270410ustar00rootroot00000000000000 * * 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 RepeatedTypeTest extends \Symfony\Component\Form\Test\TypeTestCase { protected $form; protected function setUp() { parent::setUp(); $this->form = $this->factory->create('repeated', null, array( 'type' => 'text', )); $this->form->setData(null); } public function testSetData() { $this->form->setData('foobar'); $this->assertEquals('foobar', $this->form['first']->getData()); $this->assertEquals('foobar', $this->form['second']->getData()); } public function testSetOptions() { $form = $this->factory->create('repeated', null, array( 'type' => 'text', 'options' => array('label' => 'Global'), )); $this->assertEquals('Global', $form['first']->getConfig()->getOption('label')); $this->assertEquals('Global', $form['second']->getConfig()->getOption('label')); $this->assertTrue($form['first']->isRequired()); $this->assertTrue($form['second']->isRequired()); } public function testSetOptionsPerChild() { $form = $this->factory->create('repeated', null, array( // the global required value cannot be overridden 'type' => 'text', 'first_options' => array('label' => 'Test', 'required' => false), 'second_options' => array('label' => 'Test2'), )); $this->assertEquals('Test', $form['first']->getConfig()->getOption('label')); $this->assertEquals('Test2', $form['second']->getConfig()->getOption('label')); $this->assertTrue($form['first']->isRequired()); $this->assertTrue($form['second']->isRequired()); } public function testSetRequired() { $form = $this->factory->create('repeated', null, array( 'required' => false, 'type' => 'text', )); $this->assertFalse($form['first']->isRequired()); $this->assertFalse($form['second']->isRequired()); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testSetInvalidOptions() { $this->factory->create('repeated', null, array( 'type' => 'text', 'options' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testSetInvalidFirstOptions() { $this->factory->create('repeated', null, array( 'type' => 'text', 'first_options' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testSetInvalidSecondOptions() { $this->factory->create('repeated', null, array( 'type' => 'text', 'second_options' => 'bad value', )); } public function testSetErrorBubblingToTrue() { $form = $this->factory->create('repeated', 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('repeated', 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('repeated', 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('repeated', null, array( 'type' => 'text', 'options' => array('label' => 'Label'), 'second_options' => array('label' => 'Second label'), )); $this->assertEquals('Label', $form['first']->getConfig()->getOption('label')); $this->assertEquals('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->assertEquals('foo', $this->form['first']->getViewData()); $this->assertEquals('bar', $this->form['second']->getViewData()); $this->assertFalse($this->form->isSynchronized()); $this->assertEquals($input, $this->form->getViewData()); $this->assertNull($this->form->getData()); } public function testSubmitEqual() { $input = array('first' => 'foo', 'second' => 'foo'); $this->form->submit($input); $this->assertEquals('foo', $this->form['first']->getViewData()); $this->assertEquals('foo', $this->form['second']->getViewData()); $this->assertTrue($this->form->isSynchronized()); $this->assertEquals($input, $this->form->getViewData()); $this->assertEquals('foo', $this->form->getData()); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php000066400000000000000000000031341266465517700265470ustar00rootroot00000000000000 * * 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 as TestCase; /** * @author Bernhard Schussek */ class SubmitTypeTest extends TestCase { public function testCreateSubmitButtonInstances() { $this->assertInstanceOf('Symfony\Component\Form\SubmitButton', $this->factory->create('submit')); } public function testNotClickedByDefault() { $button = $this->factory->create('submit'); $this->assertFalse($button->isClicked()); } public function testNotClickedIfSubmittedWithNull() { $button = $this->factory->create('submit'); $button->submit(null); $this->assertFalse($button->isClicked()); } public function testClickedIfSubmittedWithEmptyString() { $button = $this->factory->create('submit'); $button->submit(''); $this->assertTrue($button->isClicked()); } public function testClickedIfSubmittedWithUnemptyString() { $button = $this->factory->create('submit'); $button->submit('foo'); $this->assertTrue($button->isClicked()); } public function testSubmitCanBeAddedToForm() { $form = $this->factory ->createBuilder('form') ->getForm(); $this->assertSame($form, $form->add('send', 'submit')); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php000066400000000000000000000524301266465517700262050ustar00rootroot00000000000000 * * 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\Form\Test\TypeTestCase as TestCase; class TimeTypeTest extends TestCase { public function testSubmitDateTime() { $form = $this->factory->create('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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 testSetDataWithoutMinutes() { $form = $this->factory->create('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', new \DateTime()); } public function testSingleTextWidgetShouldUseTheRightInputType() { $form = $this->factory->create('time', null, array( 'widget' => 'single_text', )); $view = $form->createView(); $this->assertEquals('time', $view->vars['type']); } public function testSingleTextWidgetWithSecondsShouldHaveRightStepAttribute() { $form = $this->factory->create('time', 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('time', 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('time', null, array( 'widget' => 'single_text', 'html5' => false, )); $view = $form->createView(); $this->assertFalse(isset($view->vars['type'])); } public function testPassDefaultPlaceholderToViewIfNotRequired() { $form = $this->factory->create('time', 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('time', 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('time', 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']); } /** * @group legacy */ public function testPassEmptyValueBC() { $form = $this->factory->create('time', null, array( 'empty_value' => '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']); $this->assertSame('Empty', $view['hour']->vars['empty_value']); $this->assertSame('Empty', $view['minute']->vars['empty_value']); $this->assertSame('Empty', $view['second']->vars['empty_value']); } public function testPassPlaceholderAsArray() { $form = $this->factory->create('time', 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('time', 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('time', 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('time', 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('time', 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('time', 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('time', null, array( 'with_minutes' => false, 'with_seconds' => true, )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfHoursIsInvalid() { $this->factory->create('time', null, array( 'hours' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfMinutesIsInvalid() { $this->factory->create('time', null, array( 'minutes' => 'bad value', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testThrowExceptionIfSecondsIsInvalid() { $this->factory->create('time', null, array( 'seconds' => 'bad value', )); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php000066400000000000000000000017611266465517700271020ustar00rootroot00000000000000 * * 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 \Symfony\Component\Form\Test\TypeTestCase { public function testTimezonesAreSelectable() { $form = $this->factory->create('timezone'); $view = $form->createView(); $choices = $view->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); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php000066400000000000000000000015001266465517700261520ustar00rootroot00000000000000 * * 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 as BaseTypeTestCase; /** * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Form\Test\TypeTestCase} instead. */ abstract class TypeTestCase extends BaseTypeTestCase { protected function setUp() { @trigger_error('Abstract class '.__CLASS__.' is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\TypeTestCase class instead.', E_USER_DEPRECATED); parent::setUp(); } } src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php000066400000000000000000000045331266465517700260520ustar00rootroot00000000000000 * * 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 as TestCase; class UrlTypeTest extends TestCase { public function testSubmitAddsDefaultProtocolIfNoneIsIncluded() { $form = $this->factory->create('url', '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('url', 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('url', null, array( 'default_protocol' => 'http', )); $form->submit(''); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); } public function testSubmitAddsNoDefaultProtocolIfNull() { $form = $this->factory->create('url', null, array( 'default_protocol' => 'http', )); $form->submit(null); $this->assertNull($form->getData()); $this->assertSame('', $form->getViewData()); } public function testSubmitAddsNoDefaultProtocolIfSetToNull() { $form = $this->factory->create('url', 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('url', null, array( 'default_protocol' => array(), )); } } src/Symfony/Component/Form/Tests/Extension/Csrf/000077500000000000000000000000001266465517700221545ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/000077500000000000000000000000001266465517700245645ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacyDefaultCsrfProviderTest.php000066400000000000000000000037041266465517700332030ustar00rootroot00000000000000 * * 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\CsrfProvider; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\DefaultCsrfProvider; /** * @runTestsInSeparateProcesses * @preserveGlobalState disabled * @group legacy */ class LegacyDefaultCsrfProviderTest extends \PHPUnit_Framework_TestCase { protected $provider; public static function setUpBeforeClass() { ini_set('session.save_handler', 'files'); ini_set('session.save_path', sys_get_temp_dir()); } protected function setUp() { $this->provider = new DefaultCsrfProvider('SECRET'); } protected function tearDown() { $this->provider = null; } public function testGenerateCsrfToken() { session_start(); $token = $this->provider->generateCsrfToken('foo'); $this->assertEquals(sha1('SECRET'.'foo'.session_id()), $token); } /** * @requires PHP 5.4 */ public function testGenerateCsrfTokenOnUnstartedSession() { session_id('touti'); $this->assertSame(PHP_SESSION_NONE, session_status()); $token = $this->provider->generateCsrfToken('foo'); $this->assertEquals(sha1('SECRET'.'foo'.session_id()), $token); $this->assertSame(PHP_SESSION_ACTIVE, session_status()); } public function testIsCsrfTokenValidSucceeds() { session_start(); $token = sha1('SECRET'.'foo'.session_id()); $this->assertTrue($this->provider->isCsrfTokenValid('foo', $token)); } public function testIsCsrfTokenValidFails() { session_start(); $token = sha1('SECRET'.'bar'.session_id()); $this->assertFalse($this->provider->isCsrfTokenValid('foo', $token)); } } src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacySessionCsrfProviderTest.php000066400000000000000000000036431266465517700332440ustar00rootroot00000000000000 * * 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\CsrfProvider; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\SessionCsrfProvider; /** * @group legacy */ class LegacySessionCsrfProviderTest extends \PHPUnit_Framework_TestCase { protected $provider; protected $session; protected function setUp() { $this->session = $this->getMock( 'Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', false // don't call constructor ); $this->provider = new SessionCsrfProvider($this->session, 'SECRET'); } protected function tearDown() { $this->provider = null; $this->session = null; } public function testGenerateCsrfToken() { $this->session->expects($this->once()) ->method('getId') ->will($this->returnValue('ABCDEF')); $token = $this->provider->generateCsrfToken('foo'); $this->assertEquals(sha1('SECRET'.'foo'.'ABCDEF'), $token); } public function testIsCsrfTokenValidSucceeds() { $this->session->expects($this->once()) ->method('getId') ->will($this->returnValue('ABCDEF')); $token = sha1('SECRET'.'foo'.'ABCDEF'); $this->assertTrue($this->provider->isCsrfTokenValid('foo', $token)); } public function testIsCsrfTokenValidFails() { $this->session->expects($this->once()) ->method('getId') ->will($this->returnValue('ABCDEF')); $token = sha1('SECRET'.'bar'.'ABCDEF'); $this->assertFalse($this->provider->isCsrfTokenValid('foo', $token)); } } src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/000077500000000000000000000000001266465517700247435ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php000066400000000000000000000043011266465517700327300ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener; class CsrfValidationListenerTest extends \PHPUnit_Framework_TestCase { protected $dispatcher; protected $factory; protected $tokenManager; protected $form; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->tokenManager = $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface'); $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->getMock('Symfony\Component\Form\DataMapperInterface'); } protected function getMockForm() { return $this->getMock('Symfony\Component\Form\Test\FormInterface'); } // 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()); } } src/Symfony/Component/Form/Tests/Extension/Csrf/Type/000077500000000000000000000000001266465517700230755ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php000066400000000000000000000274531266465517700307410ustar00rootroot00000000000000 * * 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', 'text'); } public function getName() { return 'csrf_collection_test'; } } class FormTypeCsrfExtensionTest extends TypeTestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $tokenManager; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $translator; protected function setUp() { $this->tokenManager = $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface'); $this->translator = $this->getMock('Symfony\Component\Translation\TranslatorInterface'); 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('form', null, array( 'csrf_field_name' => 'csrf', 'compound' => true, )) ->createView(); $this->assertTrue(isset($view['csrf'])); } public function testNoCsrfProtectionByDefaultIfCompoundButNotRoot() { $view = $this->factory ->createNamedBuilder('root', 'form') ->add($this->factory ->createNamedBuilder('form', 'form', null, array( 'csrf_field_name' => 'csrf', 'compound' => true, )) ) ->getForm() ->get('form') ->createView(); $this->assertFalse(isset($view['csrf'])); } public function testNoCsrfProtectionByDefaultIfRootButNotCompound() { $view = $this->factory ->create('form', null, array( 'csrf_field_name' => 'csrf', 'compound' => false, )) ->createView(); $this->assertFalse(isset($view['csrf'])); } public function testCsrfProtectionCanBeDisabled() { $view = $this->factory ->create('form', 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('form', 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', 'form', 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('', 'form', 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('form', null, array( 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, )) ->add('child', 'text') ->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', 'form', null, array( 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, )) ->add('child', 'text') ->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('', 'form', null, array( 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'compound' => true, )) ->add('child', 'text') ->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('form', null, array( 'csrf_field_name' => 'csrf', 'csrf_token_manager' => $this->tokenManager, 'csrf_token_id' => 'TOKEN_ID', 'compound' => true, )) ->add('child', 'text') ->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', 'form') ->add($this->factory ->createNamedBuilder('form', 'form', 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('form', 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('collection', null, array( 'type' => new FormTypeCsrfExtensionTest_ChildType(), '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('form', 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]); } } src/Symfony/Component/Form/Tests/Extension/DataCollector/000077500000000000000000000000001266465517700237775ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php000066400000000000000000000023461266465517700317720ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\DataCollector\DataCollectorExtension; class DataCollectorExtensionTest extends \PHPUnit_Framework_TestCase { /** * @var DataCollectorExtension */ private $extension; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $dataCollector; protected function setUp() { $this->dataCollector = $this->getMock('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface'); $this->extension = new DataCollectorExtension($this->dataCollector); } public function testLoadTypeExtensions() { $typeExtensions = $this->extension->getTypeExtensions('form'); $this->assertInternalType('array', $typeExtensions); $this->assertCount(1, $typeExtensions); $this->assertInstanceOf('Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension', array_shift($typeExtensions)); } } src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php000066400000000000000000000426341266465517700307250ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\DataCollector\FormDataCollector; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormView; class FormDataCollectorTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Form\Extension\DataCollector\FormDataExtractorInterface'); $this->dataCollector = new FormDataCollector($this->dataExtractor); $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->dataMapper = $this->getMock('Symfony\Component\Form\DataMapperInterface'); $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', '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', '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 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']); } private function createForm($name) { $builder = new FormBuilder($name, null, $this->dispatcher, $this->factory); $builder->setCompound(true); $builder->setDataMapper($this->dataMapper); return $builder->getForm(); } } src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php000066400000000000000000000320321266465517700307410ustar00rootroot00000000000000 * * 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 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\HttpKernel\DataCollector\Util\ValueExporter; class FormDataExtractorTest_SimpleValueExporter extends ValueExporter { /** * {@inheritdoc} */ public function exportValue($value, $depth = 1, $deep = false) { return is_object($value) ? sprintf('object(%s)', get_class($value)) : var_export($value, true); } } /** * @author Bernhard Schussek */ class FormDataExtractorTest extends \PHPUnit_Framework_TestCase { /** * @var FormDataExtractorTest_SimpleValueExporter */ private $valueExporter; /** * @var FormDataExtractor */ private $dataExtractor; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $dispatcher; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $factory; protected function setUp() { $this->valueExporter = new FormDataExtractorTest_SimpleValueExporter(); $this->dataExtractor = new FormDataExtractor($this->valueExporter); $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); } public function testExtractConfiguration() { $type = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $type->expects($this->any()) ->method('getName') ->will($this->returnValue('type_name')); $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' => 'type_name', 'type_class' => 'stdClass', 'synchronized' => 'true', 'passed_options' => array(), 'resolved_options' => array(), ), $this->dataExtractor->extractConfiguration($form)); } public function testExtractConfigurationSortsPassedOptions() { $type = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $type->expects($this->any()) ->method('getName') ->will($this->returnValue('type_name')); $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' => 'type_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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $type->expects($this->any()) ->method('getName') ->will($this->returnValue('type_name')); $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' => 'type_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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $type->expects($this->any()) ->method('getName') ->will($this->returnValue('type_name')); $type->expects($this->any()) ->method('getInnerType') ->will($this->returnValue(new \stdClass())); $grandParent = $this->createBuilder('grandParent') ->setCompound(true) ->setDataMapper($this->getMock('Symfony\Component\Form\DataMapperInterface')) ->getForm(); $parent = $this->createBuilder('parent') ->setCompound(true) ->setDataMapper($this->getMock('Symfony\Component\Form\DataMapperInterface')) ->getForm(); $form = $this->createBuilder('name') ->setType($type) ->getForm(); $grandParent->add($parent); $parent->add($form); $this->assertSame(array( 'id' => 'grandParent_parent_name', 'name' => 'name', 'type' => 'type_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(); $form->submit('Foobar'); $form->addError(new FormError('Invalid!', null, array(), null, $exception)); $this->assertSame(array( 'submitted_data' => array( 'norm' => "'Foobar'", ), 'errors' => array( array('message' => 'Invalid!', 'origin' => spl_object_hash($form), 'trace' => array( array( 'class' => "'Exception'", 'message' => "''", ), )), ), 'synchronized' => 'true', ), $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); } } src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/000077500000000000000000000000001266465517700247205ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php000066400000000000000000000026341266465517700335550ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension; class DataCollectorTypeExtensionTest extends \PHPUnit_Framework_TestCase { /** * @var DataCollectorTypeExtension */ private $extension; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $dataCollector; protected function setUp() { $this->dataCollector = $this->getMock('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface'); $this->extension = new DataCollectorTypeExtension($this->dataCollector); } public function testGetExtendedType() { $this->assertEquals('form', $this->extension->getExtendedType()); } public function testBuildForm() { $builder = $this->getMock('Symfony\Component\Form\Test\FormBuilderInterface'); $builder->expects($this->atLeastOnce()) ->method('addEventSubscriber') ->with($this->isInstanceOf('Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener')); $this->extension->buildForm($builder, array()); } } src/Symfony/Component/Form/Tests/Extension/HttpFoundation/000077500000000000000000000000001266465517700242255ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener/000077500000000000000000000000001266465517700270145ustar00rootroot00000000000000LegacyBindRequestListenerTest.php000066400000000000000000000177071266465517700354020ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener * * 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\EventListener; use Symfony\Component\Form\Extension\HttpFoundation\EventListener\BindRequestListener; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormEvent; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\File\UploadedFile; /** * @author Bernhard Schussek * @group legacy */ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase { private $values; private $filesPlain; private $filesNested; /** * @var UploadedFile */ private $uploadedFile; protected function setUp() { $path = tempnam(sys_get_temp_dir(), 'sf2'); touch($path); $this->values = array( 'name' => 'Bernhard', 'image' => array('filename' => 'foobar.png'), ); $this->filesPlain = array( 'image' => array( 'error' => UPLOAD_ERR_OK, 'name' => 'upload.png', 'size' => 123, 'tmp_name' => $path, 'type' => 'image/png', ), ); $this->filesNested = 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'), ); $this->uploadedFile = new UploadedFile($path, 'upload.png', 'image/png', 123, UPLOAD_ERR_OK); } protected function tearDown() { unlink($this->uploadedFile->getRealPath()); } public function requestMethodProvider() { return array( array('POST'), array('PUT'), array('DELETE'), array('PATCH'), ); } /** * @dataProvider requestMethodProvider */ public function testSubmitRequest($method) { $values = array('author' => $this->values); $files = array('author' => $this->filesNested); $request = new Request(array(), $values, array(), array(), $files, array( 'REQUEST_METHOD' => $method, )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertEquals(array( 'name' => 'Bernhard', 'image' => $this->uploadedFile, ), $event->getData()); } /** * @dataProvider requestMethodProvider */ public function testSubmitRequestWithEmptyName($method) { $request = new Request(array(), $this->values, array(), array(), $this->filesPlain, array( 'REQUEST_METHOD' => $method, )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('', null, $dispatcher); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertEquals(array( 'name' => 'Bernhard', 'image' => $this->uploadedFile, ), $event->getData()); } /** * @dataProvider requestMethodProvider */ public function testSubmitEmptyRequestToCompoundForm($method) { $request = new Request(array(), array(), array(), array(), array(), array( 'REQUEST_METHOD' => $method, )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $config->setCompound(true); $config->setDataMapper($this->getMock('Symfony\Component\Form\DataMapperInterface')); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); // Default to empty array $this->assertEquals(array(), $event->getData()); } /** * @dataProvider requestMethodProvider */ public function testSubmitEmptyRequestToSimpleForm($method) { $request = new Request(array(), array(), array(), array(), array(), array( 'REQUEST_METHOD' => $method, )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $config->setCompound(false); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); // Default to null $this->assertNull($event->getData()); } public function testSubmitGetRequest() { $values = array('author' => $this->values); $request = new Request($values, array(), array(), array(), array(), array( 'REQUEST_METHOD' => 'GET', )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertEquals(array( 'name' => 'Bernhard', 'image' => array('filename' => 'foobar.png'), ), $event->getData()); } public function testSubmitGetRequestWithEmptyName() { $request = new Request($this->values, array(), array(), array(), array(), array( 'REQUEST_METHOD' => 'GET', )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('', null, $dispatcher); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertEquals(array( 'name' => 'Bernhard', 'image' => array('filename' => 'foobar.png'), ), $event->getData()); } public function testSubmitEmptyGetRequestToCompoundForm() { $request = new Request(array(), array(), array(), array(), array(), array( 'REQUEST_METHOD' => 'GET', )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $config->setCompound(true); $config->setDataMapper($this->getMock('Symfony\Component\Form\DataMapperInterface')); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertEquals(array(), $event->getData()); } public function testSubmitEmptyGetRequestToSimpleForm() { $request = new Request(array(), array(), array(), array(), array(), array( 'REQUEST_METHOD' => 'GET', )); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $config = new FormConfigBuilder('author', null, $dispatcher); $config->setCompound(false); $form = new Form($config); $event = new FormEvent($form, $request); $listener = new BindRequestListener(); $listener->preBind($event); $this->assertNull($event->getData()); } } src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php000066400000000000000000000031661266465517700334210ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Form/Tests/Extension/Validator/000077500000000000000000000000001266465517700232045ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/000077500000000000000000000000001266465517700255135ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php000066400000000000000000000024321266465517700340200ustar00rootroot00000000000000 * * 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('form'); for ($i = 0; $i < 40; ++$i) { $builder->add($i, 'form'); $builder->get($i) ->add('a') ->add('b') ->add('c'); } $form = $builder->getForm(); $form->submit(null); } } src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php000066400000000000000000000516671266465517700316540ustar00rootroot00000000000000 * * 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\NotNull; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest; use Symfony\Component\Validator\Validation; /** * @author Bernhard Schussek */ 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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->serverParams = $this->getMock( 'Symfony\Component\Form\Extension\Validator\Util\ServerParams', array('getNormalizedIniPostMaxSize', 'getContentLength') ); parent::setUp(); } protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new FormValidator($this->serverParams); } public function testValidate() { $object = $this->getMock('\stdClass'); $options = array('validation_groups' => array('group1', 'group2')); $form = $this->getBuilder('name', '\stdClass', $options) ->setData($object) ->getForm(); $this->expectValidateAt(0, 'data', $object, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testValidateConstraints() { $object = $this->getMock('\stdClass'); $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, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); // Then custom constraints $this->expectValidateValueAt(2, 'data', $object, $constraint1, 'group1'); $this->expectValidateValueAt(3, 'data', $object, $constraint2, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testDontValidateIfParentWithoutCascadeValidation() { $object = $this->getMock('\stdClass'); $parent = $this->getBuilder('parent', null, array('cascade_validation' => false)) ->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, 'Default'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testValidateConstraintsEvenIfNoCascadeValidation() { $object = $this->getMock('\stdClass'); $constraint1 = new NotNull(array('groups' => array('group1', 'group2'))); $constraint2 = new NotBlank(array('groups' => 'group2')); $parent = $this->getBuilder('parent', null, array('cascade_validation' => false)) ->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->getMock('\stdClass'); $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->getMock('\stdClass'); $constraint1 = $this->getMock('Symfony\Component\Validator\Constraint'); $constraint2 = $this->getMock('Symfony\Component\Validator\Constraint'); $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->getMock('\stdClass'); $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->getMock('\stdClass'); $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->getMock('\stdClass'); $constraint1 = $this->getMock('Symfony\Component\Validator\Constraint'); $constraint2 = $this->getMock('Symfony\Component\Validator\Constraint'); $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->getMock('\stdClass'); $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 testHandleCallbackValidationGroups() { $object = $this->getMock('\stdClass'); $options = array('validation_groups' => array($this, 'getValidationGroups')); $form = $this->getBuilder('name', '\stdClass', $options) ->setData($object) ->getForm(); $this->expectValidateAt(0, 'data', $object, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testDontExecuteFunctionNames() { $object = $this->getMock('\stdClass'); $options = array('validation_groups' => 'header'); $form = $this->getBuilder('name', '\stdClass', $options) ->setData($object) ->getForm(); $this->expectValidateAt(0, 'data', $object, 'header'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testHandleClosureValidationGroups() { $object = $this->getMock('\stdClass'); $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, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testUseValidationGroupOfClickedButton() { $object = $this->getMock('\stdClass'); $parent = $this->getBuilder('parent', null, array('cascade_validation' => true)) ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $form = $this->getForm('name', '\stdClass', array( 'validation_groups' => 'form_group', )); $parent->add($form); $parent->add($this->getSubmitButton('submit', array( 'validation_groups' => 'button_group', ))); $parent->submit(array('name' => $object, 'submit' => '')); $this->expectValidateAt(0, 'data', $object, 'button_group'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testDontUseValidationGroupOfUnclickedButton() { $object = $this->getMock('\stdClass'); $parent = $this->getBuilder('parent', null, array('cascade_validation' => true)) ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $form = $this->getForm('name', '\stdClass', array( 'validation_groups' => 'form_group', )); $parent->add($form); $parent->add($this->getSubmitButton('submit', array( 'validation_groups' => 'button_group', ))); $form->setData($object); $this->expectValidateAt(0, 'data', $object, 'form_group'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testUseInheritedValidationGroup() { $object = $this->getMock('\stdClass'); $parentOptions = array( 'validation_groups' => 'group', 'cascade_validation' => true, ); $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $form = $this->getBuilder('name', '\stdClass')->getForm(); $parent->add($form); $form->setData($object); $this->expectValidateAt(0, 'data', $object, 'group'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testUseInheritedCallbackValidationGroup() { $object = $this->getMock('\stdClass'); $parentOptions = array( 'validation_groups' => array($this, 'getValidationGroups'), 'cascade_validation' => true, ); $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $form = $this->getBuilder('name', '\stdClass')->getForm(); $parent->add($form); $form->setData($object); $this->expectValidateAt(0, 'data', $object, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testUseInheritedClosureValidationGroup() { $object = $this->getMock('\stdClass'); $parentOptions = array( 'validation_groups' => function (FormInterface $form) { return array('group1', 'group2'); }, 'cascade_validation' => true, ); $parent = $this->getBuilder('parent', null, $parentOptions) ->setCompound(true) ->setDataMapper($this->getDataMapper()) ->getForm(); $form = $this->getBuilder('name', '\stdClass')->getForm(); $parent->add($form); $form->setData($object); $this->expectValidateAt(0, 'data', $object, 'group1'); $this->expectValidateAt(1, 'data', $object, 'group2'); $this->validator->validate($form, new Form()); $this->assertNoViolation(); } public function testAppendPropertyPath() { $object = $this->getMock('\stdClass'); $form = $this->getBuilder('name', '\stdClass') ->setData($object) ->getForm(); $this->expectValidateAt(0, 'data', $object, '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'); $context->expects($this->never()) ->method('addViolationAt'); $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->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface'); $validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $contextualValidator = $this->getMock('Symfony\Component\Validator\Validator\ContextualValidatorInterface'); $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->getMock('Symfony\Component\Form\DataMapperInterface'); } } LegacyFormValidatorLegacyApiTest.php000066400000000000000000000011541266465517700344630ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/Constraints * * 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\Validator\Validation; /** * @since 2.5.3 * * @author Bernhard Schussek * @group legacy */ class LegacyFormValidatorLegacyApiTest extends FormValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5_BC; } } src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/000077500000000000000000000000001266465517700257735ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php000066400000000000000000000154761266465517700331610ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); $this->violationMapper = $this->getMock('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface'); $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, $constraint = null) { return new ConstraintViolation($this->message, $this->messageTemplate, $this->params, null, 'prop.path', null, null, $code, $constraint); } 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->getMock('Symfony\Component\Form\Test\FormInterface'); } // More specific mapping tests can be found in ViolationMapperTest public function testMapViolation() { $violation = $this->getConstraintViolation(null, new Form()); $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, new Form()); $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 testMapViolationAllowsNonSyncIfInvalidWithoutConstraintReference() { // constraint violations have no reference to the constraint if they are created by // Symfony\Component\Validator\ExecutionContext // which is deprecated in favor of // Symfony\Component\Validator\Context\ExecutionContext $violation = $this->getConstraintViolation(Form::NOT_SYNCHRONIZED_ERROR, null); $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 testValidatorInterfaceSinceSymfony25() { // Mock of ValidatorInterface since apiVersion 2.5 $validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $listener = new ValidationListener($validator, $this->violationMapper); $this->assertAttributeSame($validator, 'validator', $listener); } public function testValidatorInterfaceUntilSymfony24() { // Mock of ValidatorInterface until apiVersion 2.4 $validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); $listener = new ValidationListener($validator, $this->violationMapper); $this->assertAttributeSame($validator, 'validator', $listener); } /** * @expectedException \InvalidArgumentException */ public function testInvalidValidatorInterface() { new ValidationListener(null, $this->violationMapper); } } src/Symfony/Component/Form/Tests/Extension/Validator/Type/000077500000000000000000000000001266465517700241255ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php000066400000000000000000000041531266465517700321160ustar00rootroot00000000000000 * * 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; /** * @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->assertTrue(is_callable($form->getConfig()->getOption('validation_groups'))); } public function testValidationGroupsCanBeSetToClosure() { $form = $this->createForm(array( 'validation_groups' => function (FormInterface $form) { }, )); $this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups'))); } abstract protected function createForm(array $options = array()); } src/Symfony/Component/Form/Tests/Extension/Validator/Type/FormTypeValidatorExtensionTest.php000066400000000000000000000042441266465517700330120ustar00rootroot00000000000000 * * 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\ConstraintViolationList; class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTest { public function testSubmitValidatesData() { $builder = $this->factory->createBuilder( 'form', null, array( 'validation_groups' => 'group', ) ); $builder->add('firstName', 'form'); $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 testValidatorInterfaceSinceSymfony25() { // Mock of ValidatorInterface since apiVersion 2.5 $validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $formTypeValidatorExtension = new FormTypeValidatorExtension($validator); $this->assertAttributeSame($validator, 'validator', $formTypeValidatorExtension); } public function testValidatorInterfaceUntilSymfony24() { // Mock of ValidatorInterface until apiVersion 2.4 $validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); $formTypeValidatorExtension = new FormTypeValidatorExtension($validator); $this->assertAttributeSame($validator, 'validator', $formTypeValidatorExtension); } /** * @expectedException \InvalidArgumentException */ public function testInvalidValidatorInterface() { new FormTypeValidatorExtension(null); } protected function createForm(array $options = array()) { return $this->factory->create('form', null, $options); } } src/Symfony/Component/Form/Tests/Extension/Validator/Type/SubmitTypeValidatorExtensionTest.php000066400000000000000000000010071266465517700333440ustar00rootroot00000000000000 * * 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('submit', null, $options); } } src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php000066400000000000000000000026431266465517700272200ustar00rootroot00000000000000 * * 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->getMock('Symfony\Component\Validator\ValidatorInterface'); $metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); $this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory)); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); $metadataFactory->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata)); parent::setUp(); } protected function tearDown() { $this->validator = null; parent::tearDown(); } protected function getExtensions() { return array_merge(parent::getExtensions(), array( new ValidatorExtension($this->validator), )); } } src/Symfony/Component/Form/Tests/Extension/Validator/Util/000077500000000000000000000000001266465517700241215ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/Util/ServerParamsTest.php000066400000000000000000000046241266465517700301120ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\Validator\Util\ServerParams; use Symfony\Component\HttpFoundation\Request; class ServerParamsTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\HttpFoundation\RequestStack', array('getCurrentRequest')); $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->getMock('Symfony\Component\Form\Extension\Validator\Util\ServerParams', array('getNormalizedIniPostMaxSize')); $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' ); } } src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php000066400000000000000000000065331266465517700304060ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\Validator\ValidatorExtension; class ValidatorExtensionTest extends \PHPUnit_Framework_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')); $validator ->expects($this->never()) ->method('getMetadataFactory'); $extension = new ValidatorExtension($validator); $guesser = $extension->loadTypeGuesser(); $this->assertInstanceOf('Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser', $guesser); } /** * @group legacy */ public function test2Dot4ValidationApi() { $factory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); $validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata') ->disableOriginalConstructor() ->getMock(); $validator->expects($this->any()) ->method('getMetadataFactory') ->will($this->returnValue($factory)); $factory->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); } /** * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException * @group legacy */ public function testInvalidValidatorInterface() { new ValidatorExtension(null); } } src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php000066400000000000000000000115141266465517700307040ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); $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)); } /** * @group legacy */ public function testLegacyGuessRequired() { if (PHP_VERSION_ID >= 70000) { $this->markTestSkipped('Cannot use a class called True on PHP 7 or higher.'); } $true = 'Symfony\Component\Validator\Constraints\True'; $this->testGuessRequired(new $true(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)); } 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; } src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/000077500000000000000000000000001266465517700263155ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php000066400000000000000000004363341266465517700330140ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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->getMock('Symfony\Component\Form\DataMapperInterface'); } /** * @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() { $violation = $this->getConstraintViolation('data.address[street]'); $parent = $this->getForm('parent'); $child1 = $this->getForm('subform1', 'address'); $child2 = $this->getForm('subform2', 'address'); $grandChild = $this->getForm('street'); $parent->add($child1); $parent->add($child2); $child2->add($grandChild); $parent->submit(array()); $this->mapper->mapViolation($violation, $parent); // The error occurred on the child of the second form with the same path $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->assertEquals(array($this->getFormError($violation, $grandChild)), iterator_to_array($grandChild->getErrors()), $grandChild->getName().' should have an error, but has none'); } } src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php000066400000000000000000000167621266465517700324630ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationPath; /** * @author Bernhard Schussek */ class ViolationPathTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Form/Tests/Fixtures/000077500000000000000000000000001266465517700211145ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Fixtures/AbstractAuthor.php000066400000000000000000000005021266465517700245500ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php000066400000000000000000000013741266465517700254340ustar00rootroot00000000000000getFormFactory(); $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($formFactory) { $form = $event->getForm(); $type = $form->getName() % 2 === 0 ? 'text' : 'textarea'; $form->add('title', $type); }); } public function getName() { return 'alternating_row'; } } src/Symfony/Component/Form/Tests/Fixtures/Author.php000066400000000000000000000026151266465517700230730ustar00rootroot00000000000000 * * 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) { } } src/Symfony/Component/Form/Tests/Fixtures/AuthorInterface.php000066400000000000000000000004761266465517700247170ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Form/Tests/Fixtures/AuthorType.php000066400000000000000000000012651266465517700237350ustar00rootroot00000000000000add('firstName') ->add('lastName') ; } public function getName() { return 'author'; } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author', )); } } src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php000066400000000000000000000020611266465517700243320ustar00rootroot00000000000000 * * 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 getName() { return 'sub_choice'; } /** * {@inheritdoc} */ public function getParent() { return 'choice'; } } src/Symfony/Component/Form/Tests/Fixtures/CustomArrayObject.php000066400000000000000000000030271266465517700252270ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Form/Tests/Fixtures/CustomOptionsResolver.php000066400000000000000000000022341266465517700261760ustar00rootroot00000000000000 * * 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\OptionsResolver\OptionsResolverInterface; class CustomOptionsResolver implements OptionsResolverInterface { public function setDefaults(array $defaultValues) { } public function replaceDefaults(array $defaultValues) { } public function setOptional(array $optionNames) { } public function setRequired($optionNames) { } public function setAllowedValues($allowedValues) { } public function addAllowedValues($allowedValues) { } public function setAllowedTypes($allowedTypes) { } public function addAllowedTypes($allowedTypes) { } public function setNormalizers(array $normalizers) { } public function isKnown($option) { } public function isRequired($option) { } public function resolve(array $options = array()) { } } src/Symfony/Component/Form/Tests/Fixtures/FixedDataTransformer.php000066400000000000000000000021741266465517700257050ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Form/Tests/Fixtures/FixedFilterListener.php000066400000000000000000000032261266465517700255430ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/Form/Tests/Fixtures/FooSubType.php000066400000000000000000000010001266465517700236530ustar00rootroot00000000000000 * * 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 getName() { return 'foo_sub_type'; } public function getParent() { return 'foo'; } } src/Symfony/Component/Form/Tests/Fixtures/FooSubTypeWithParentInstance.php000066400000000000000000000010521266465517700273550ustar00rootroot00000000000000 * * 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 FooSubTypeWithParentInstance extends AbstractType { public function getName() { return 'foo_sub_type_parent_instance'; } public function getParent() { return new FooType(); } } src/Symfony/Component/Form/Tests/Fixtures/FooType.php000066400000000000000000000007361266465517700232200ustar00rootroot00000000000000 * * 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 getName() { return 'foo'; } public function getParent() { } } src/Symfony/Component/Form/Tests/Fixtures/FooTypeBarExtension.php000066400000000000000000000014151266465517700255350ustar00rootroot00000000000000 * * 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 'foo'; } } src/Symfony/Component/Form/Tests/Fixtures/FooTypeBazExtension.php000066400000000000000000000012161266465517700255440ustar00rootroot00000000000000 * * 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 'foo'; } } src/Symfony/Component/Form/Tests/Fixtures/TestExtension.php000066400000000000000000000032501266465517700244410ustar00rootroot00000000000000 * * 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[$type->getName()] = $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; } } src/Symfony/Component/Form/Tests/Fixtures/foo000066400000000000000000000000001266465517700216100ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Fixtures/foo2000066400000000000000000000000001266465517700216720ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Fixtures/foo3000066400000000000000000000000001266465517700216730ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/FormBuilderTest.php000066400000000000000000000163301266465517700230710ustar00rootroot00000000000000 * * 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\ButtonBuilder; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\SubmitButtonBuilder; class FormBuilderTest extends \PHPUnit_Framework_TestCase { private $dispatcher; private $factory; private $builder; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $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->setExpectedException('Symfony\Component\Form\Exception\UnexpectedTypeException'); $this->builder->add(true); } public function testAddTypeNoString() { $this->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', 'text', array('bar' => 'baz')); $this->assertSame($builder, $this->builder); } public function testAdd() { $this->assertFalse($this->builder->has('foo')); $this->builder->add('foo', 'text'); $this->assertTrue($this->builder->has('foo')); } public function testAddIntegerName() { $this->assertFalse($this->builder->has(0)); $this->builder->add(0, 'text'); $this->assertTrue($this->builder->has(0)); } public function testAll() { $this->factory->expects($this->once()) ->method('createNamedBuilder') ->with('foo', 'text') ->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', 'text'); $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', 'text'); $this->builder->add($this->getFormBuilder('bar')); $this->builder->add('baz', 'text'); $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->getMock('Symfony\Component\Form\FormTypeInterface')); $this->assertTrue($this->builder->has('foo')); } public function testRemove() { $this->builder->add('foo', 'text'); $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', 'text'); $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', 'text', null, array()) ; $this->builder->create('foo'); } public function testAddButton() { $this->builder->add(new ButtonBuilder('reset')); $this->builder->add(new SubmitButtonBuilder('submit')); } public function testGetUnknown() { $this->setExpectedException('Symfony\Component\Form\Exception\InvalidArgumentException', 'The child with the name "foo" does not exist.'); $this->builder->get('foo'); } public function testGetExplicitType() { $expectedType = 'text'; $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; } } src/Symfony/Component/Form/Tests/FormConfigTest.php000066400000000000000000000111741266465517700227110ustar00rootroot00000000000000 * * 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\Exception\UnexpectedTypeException; use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\Exception\InvalidArgumentException; /** * @author Bernhard Schussek */ class FormConfigTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); 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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); return new FormConfigBuilder($name, null, $dispatcher); } } src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php000066400000000000000000000034031266465517700244160ustar00rootroot00000000000000 * * 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\FormFactoryBuilder; use Symfony\Component\Form\Tests\Fixtures\FooType; class FormFactoryBuilderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Form\FormTypeGuesserInterface'); $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($this->type->getName())); $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()); } } src/Symfony/Component/Form/Tests/FormFactoryTest.php000066400000000000000000000535241266465517700231200ustar00rootroot00000000000000 * * 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\FormTypeGuesserChain; use Symfony\Component\Form\FormFactory; use Symfony\Component\Form\Guess\Guess; use Symfony\Component\Form\Guess\ValueGuess; use Symfony\Component\Form\Guess\TypeGuess; use Symfony\Component\Form\Tests\Fixtures\FooType; use Symfony\Component\Form\Tests\Fixtures\FooSubType; use Symfony\Component\Form\Tests\Fixtures\FooSubTypeWithParentInstance; /** * @author Bernhard Schussek */ class FormFactoryTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Form\ResolvedFormTypeFactoryInterface'); $this->guesser1 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface'); $this->guesser2 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface'); $this->registry = $this->getMock('Symfony\Component\Form\FormRegistryInterface'); $this->builder = $this->getMock('Symfony\Component\Form\Test\FormBuilderInterface'); $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 testCreateNamedBuilderWithTypeInstance() { $options = array('a' => '1', 'b' => '2'); $resolvedOptions = array('a' => '2', 'b' => '3'); $type = new FooType(); $resolvedType = $this->getMockResolvedType(); $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') ->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 testCreateNamedBuilderWithTypeInstanceWithParentType() { $options = array('a' => '1', 'b' => '2'); $resolvedOptions = array('a' => '2', 'b' => '3'); $type = new FooSubType(); $resolvedType = $this->getMockResolvedType(); $parentResolvedType = $this->getMockResolvedType(); $this->registry->expects($this->once()) ->method('getType') ->with('foo') ->will($this->returnValue($parentResolvedType)); $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') ->with($type, array(), $parentResolvedType) ->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 testCreateNamedBuilderWithTypeInstanceWithParentTypeInstance() { $options = array('a' => '1', 'b' => '2'); $resolvedOptions = array('a' => '2', 'b' => '3'); $type = new FooSubTypeWithParentInstance(); $resolvedType = $this->getMockResolvedType(); $parentResolvedType = $this->getMockResolvedType(); $this->resolvedTypeFactory->expects($this->at(0)) ->method('createResolvedType') ->with($type->getParent()) ->will($this->returnValue($parentResolvedType)); $this->resolvedTypeFactory->expects($this->at(1)) ->method('createResolvedType') ->with($type, array(), $parentResolvedType) ->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 testCreateNamedBuilderWithResolvedTypeInstance() { $options = array('a' => '1', 'b' => '2'); $resolvedOptions = array('a' => '2', 'b' => '3'); $resolvedType = $this->getMockResolvedType(); $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', $resolvedType, 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, Symfony\Component\Form\ResolvedFormTypeInterface or Symfony\Component\Form\FormTypeInterface", "stdClass" given */ public function testCreateNamedBuilderThrowsUnderstandableException() { $this->factory->createNamedBuilder('name', new \stdClass()); } public function testCreateUsesTypeNameIfTypeGivenAsString() { $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, 'TYPE', $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 testCreateUsesTypeNameIfTypeGivenAsObject() { $options = array('a' => '1', 'b' => '2'); $resolvedOptions = array('a' => '2', 'b' => '3'); $resolvedType = $this->getMockResolvedType(); $resolvedType->expects($this->once()) ->method('getName') ->will($this->returnValue('TYPE')); $resolvedType->expects($this->once()) ->method('createBuilder') ->with($this->factory, 'TYPE', $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($resolvedType, 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->getMock('Symfony\Component\Form\FormRegistryInterface'); $factory = $this->getMockBuilder('Symfony\Component\Form\FormFactory') ->setMethods(array('createNamedBuilder')) ->setConstructorArgs(array($registry, $this->resolvedTypeFactory)) ->getMock(); $factory->expects($this->once()) ->method('createNamedBuilder') ->with('firstName', 'text', 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( 'text', array('attr' => array('maxlength' => 10)), Guess::MEDIUM_CONFIDENCE ))); $this->guesser2->expects($this->once()) ->method('guessType') ->with('Application\Author', 'firstName') ->will($this->returnValue(new TypeGuess( 'password', array('attr' => array('maxlength' => 7)), Guess::HIGH_CONFIDENCE ))); $factory = $this->getMockFactory(array('createNamedBuilder')); $factory->expects($this->once()) ->method('createNamedBuilder') ->with('firstName', 'password', 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', 'text') ->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( 'text', array('attr' => array('maxlength' => 10)), Guess::MEDIUM_CONFIDENCE ))); $factory = $this->getMockFactory(array('createNamedBuilder')); $factory->expects($this->once()) ->method('createNamedBuilder') ->with('firstName', 'text', 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', 'text', 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', 'text', 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', 'text', 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', 'text', 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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); } } src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php000066400000000000000000000016161266465517700245630ustar00rootroot00000000000000 * * 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\FormIntegrationTestCase as BaseFormIntegrationTestCase; /** * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Form\Test\FormIntegrationTestCase} instead. */ abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase { /** * {@inheritdoc} */ protected function setUp() { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED); parent::setUp(); } } src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php000066400000000000000000000016161266465517700245410ustar00rootroot00000000000000 * * 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 as BaseFormPerformanceTestCase; /** * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Form\Test\FormPerformanceTestCase} instead. */ abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase { /** * {@inheritdoc} */ protected function setUp() { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED); parent::setUp(); } } src/Symfony/Component/Form/Tests/FormRegistryTest.php000066400000000000000000000163501266465517700233150ustar00rootroot00000000000000 * * 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\FormRegistry; use Symfony\Component\Form\FormTypeGuesserChain; use Symfony\Component\Form\Tests\Fixtures\TestExtension; use Symfony\Component\Form\Tests\Fixtures\FooSubTypeWithParentInstance; use Symfony\Component\Form\Tests\Fixtures\FooSubType; use Symfony\Component\Form\Tests\Fixtures\FooTypeBazExtension; use Symfony\Component\Form\Tests\Fixtures\FooTypeBarExtension; use Symfony\Component\Form\Tests\Fixtures\FooType; /** * @author Bernhard Schussek */ class FormRegistryTest extends \PHPUnit_Framework_TestCase { /** * @var FormRegistry */ private $registry; /** * @var \PHPUnit_Framework_MockObject_MockObject */ 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->getMock('Symfony\Component\Form\ResolvedFormTypeFactory'); $this->guesser1 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface'); $this->guesser2 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface'); $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 = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $this->extension2->addType($type); $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') ->with($type) ->will($this->returnValue($resolvedType)); $resolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo')); $resolvedType = $this->registry->getType('foo'); $this->assertSame($resolvedType, $this->registry->getType('foo')); } public function testGetTypeWithTypeExtensions() { $type = new FooType(); $ext1 = new FooTypeBarExtension(); $ext2 = new FooTypeBazExtension(); $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $this->extension2->addType($type); $this->extension1->addTypeExtension($ext1); $this->extension2->addTypeExtension($ext2); $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') ->with($type, array($ext1, $ext2)) ->will($this->returnValue($resolvedType)); $resolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo')); $this->assertSame($resolvedType, $this->registry->getType('foo')); } public function testGetTypeConnectsParent() { $parentType = new FooType(); $type = new FooSubType(); $parentResolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $this->extension1->addType($parentType); $this->extension2->addType($type); $this->resolvedTypeFactory->expects($this->at(0)) ->method('createResolvedType') ->with($parentType) ->will($this->returnValue($parentResolvedType)); $this->resolvedTypeFactory->expects($this->at(1)) ->method('createResolvedType') ->with($type, array(), $parentResolvedType) ->will($this->returnValue($resolvedType)); $parentResolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo')); $resolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo_sub_type')); $this->assertSame($resolvedType, $this->registry->getType('foo_sub_type')); } public function testGetTypeConnectsParentIfGetParentReturnsInstance() { $type = new FooSubTypeWithParentInstance(); $parentResolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $this->extension1->addType($type); $this->resolvedTypeFactory->expects($this->at(0)) ->method('createResolvedType') ->with($this->isInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType')) ->will($this->returnValue($parentResolvedType)); $this->resolvedTypeFactory->expects($this->at(1)) ->method('createResolvedType') ->with($type, array(), $parentResolvedType) ->will($this->returnValue($resolvedType)); $parentResolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo')); $resolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo_sub_type_parent_instance')); $this->assertSame($resolvedType, $this->registry->getType('foo_sub_type_parent_instance')); } /** * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException */ public function testGetTypeThrowsExceptionIfTypeNotFound() { $this->registry->getType('bar'); } public function testHasTypeAfterLoadingFromExtension() { $type = new FooType(); $resolvedType = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $this->resolvedTypeFactory->expects($this->once()) ->method('createResolvedType') ->with($type) ->will($this->returnValue($resolvedType)); $resolvedType->expects($this->any()) ->method('getName') ->will($this->returnValue('foo')); $this->assertFalse($this->registry->hasType('foo')); $this->extension2->addType($type); $this->assertTrue($this->registry->hasType('foo')); } public function testGetTypeGuesser() { $expectedGuesser = new FormTypeGuesserChain(array($this->guesser1, $this->guesser2)); $this->assertEquals($expectedGuesser, $this->registry->getTypeGuesser()); $registry = new FormRegistry( array($this->getMock('Symfony\Component\Form\FormExtensionInterface')), $this->resolvedTypeFactory); $this->assertNull($registry->getTypeGuesser()); } public function testGetExtensions() { $expectedExtensions = array($this->extension1, $this->extension2); $this->assertEquals($expectedExtensions, $this->registry->getExtensions()); } } src/Symfony/Component/Form/Tests/FormRendererTest.php000066400000000000000000000013321266465517700232450ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests; class FormRendererTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Form/Tests/Guess/000077500000000000000000000000001266465517700203715ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Guess/GuessTest.php000066400000000000000000000016361266465517700230360ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Guess\Guess; class TestGuess extends Guess { } class GuessTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php000066400000000000000000000135241266465517700247560ustar00rootroot00000000000000 * * 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, ); } } src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php000066400000000000000000000277431266465517700241420ustar00rootroot00000000000000 * * 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\ResolvedFormType; use Symfony\Component\Form\FormBuilder; use Symfony\Component\OptionsResolver\OptionsResolver; /** * @author Bernhard Schussek */ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $dispatcher; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $factory; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $dataMapper; private $parentType; private $type; private $extension1; private $extension2; private $parentResolvedType; private $resolvedType; protected function setUp() { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->dataMapper = $this->getMock('Symfony\Component\Form\DataMapperInterface'); $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() { $test = $this; $i = 0; $assertIndexAndAddOption = function ($index, $option, $default) use (&$i, $test) { return function (OptionsResolver $resolver) use (&$i, $test, $index, $option, $default) { /* @var \PHPUnit_Framework_TestCase $test */ $test->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->getMock('Symfony\Component\OptionsResolver\OptionsResolverInterface'); $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->getMock('Symfony\Component\OptionsResolver\OptionsResolverInterface'); $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() { $test = $this; $i = 0; $assertIndex = function ($index) use (&$i, $test) { return function () use (&$i, $test, $index) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals($index, $i, 'Executed at index '.$index); ++$i; }; }; $options = array('a' => 'Foo', 'b' => 'Bar'); $builder = $this->getMock('Symfony\Component\Form\Test\FormBuilderInterface'); // 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->getMock('Symfony\Component\Form\Test\FormInterface'); $view = $this->resolvedType->createView($form); $this->assertInstanceOf('Symfony\Component\Form\FormView', $view); $this->assertNull($view->parent); } public function testCreateViewWithParent() { $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $parentView = $this->getMock('Symfony\Component\Form\FormView'); $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->getMock('Symfony\Component\Form\Test\FormInterface'); $view = $this->getMock('Symfony\Component\Form\FormView'); $test = $this; $i = 0; $assertIndex = function ($index) use (&$i, $test) { return function () use (&$i, $test, $index) { /* @var \PHPUnit_Framework_TestCase $test */ $test->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->getMock('Symfony\Component\Form\Test\FormInterface'); $view = $this->getMock('Symfony\Component\Form\FormView'); $test = $this; $i = 0; $assertIndex = function ($index) use (&$i, $test) { return function () use (&$i, $test, $index) { /* @var \PHPUnit_Framework_TestCase $test */ $test->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); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ private function getMockFormType() { return $this->getMock('Symfony\Component\Form\AbstractType', array('getName', 'configureOptions', 'finishView', 'buildView', 'buildForm')); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ private function getMockFormTypeExtension() { return $this->getMock('Symfony\Component\Form\AbstractTypeExtension', array('getExtendedType', 'configureOptions', 'finishView', 'buildView', 'buildForm')); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ private function getMockFormFactory() { return $this->getMock('Symfony\Component\Form\FormFactoryInterface'); } /** * @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); } } src/Symfony/Component/Form/Tests/Resources/000077500000000000000000000000001266465517700212555ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php000066400000000000000000000014271266465517700261130ustar00rootroot00000000000000 * * 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; class TranslationFilesTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideTranslationFiles */ public function testTranslationFileIsValid($filePath) { \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') ); } } src/Symfony/Component/Form/Tests/SimpleFormTest.php000066400000000000000000000777201266465517700227460ustar00rootroot00000000000000 * * 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()); } 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 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() { $test = $this; $form = $this->getBuilder() ->setEmptyData(function ($form) use ($test) { // the form instance is passed to the closure to allow use // of form data when creating the empty value $test->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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $view = $this->getMock('Symfony\Component\Form\FormView'); $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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $view = $this->getMock('Symfony\Component\Form\FormView'); $parentForm = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $parentView = $this->getMock('Symfony\Component\Form\FormView'); $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->getMock('Symfony\Component\Form\ResolvedFormTypeInterface'); $view = $this->getMock('Symfony\Component\Form\FormView'); $parentView = $this->getMock('Symfony\Component\Form\FormView'); $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)); } /** * @group legacy */ public function testGetErrorsAsString() { $this->form->addError(new FormError('Error!')); $this->assertEquals("ERROR: Error!\n", $this->form->getErrorsAsString()); } 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->getMock('\ArrayAccess'); $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() { $test = $this; $child = $this->getBuilder('child', $this->dispatcher); $child->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($test) { // child form doesn't receive the wrong data that is submitted on parent $test->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->getMock('Symfony\Component\Form\RequestHandlerInterface'); $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() { $test = $this; $form = $this->getBuilder() ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($test) { $test->assertNull($event->getData()); }) ->setInheritData(true) ->getForm(); $form->submit('foo'); } public function testSubmitIsNeverFiredIfInheritData() { $test = $this; $form = $this->getBuilder() ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($test) { $test->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->getMock('Symfony\Component\Form\Form', array('setData'), array($config)); $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(); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Custom resolver "Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver" must extend "Symfony\Component\OptionsResolver\OptionsResolver". */ public function testCustomOptionsResolver() { $fooType = new Fixtures\FooType(); $resolver = new Fixtures\CustomOptionsResolver(); $fooType->setDefaultOptions($resolver); } protected function createForm() { return $this->getBuilder()->getForm(); } } src/Symfony/Component/Form/Tests/Util/000077500000000000000000000000001266465517700202205ustar00rootroot00000000000000src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php000066400000000000000000000330731266465517700244250ustar00rootroot00000000000000 * * 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 Symfony\Component\Form\Util\OrderedHashMap; /** * @author Bernhard Schussek */ class OrderedHashMapTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Form/Util/000077500000000000000000000000001266465517700171165ustar00rootroot00000000000000src/Symfony/Component/Form/Util/FormUtil.php000066400000000000000000000020521266465517700213670ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Form/Util/InheritDataAwareIterator.php000066400000000000000000000013541266465517700245200ustar00rootroot00000000000000 * * 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 VirtualFormAwareIterator { } src/Symfony/Component/Form/Util/OrderedHashMap.php000066400000000000000000000110621266465517700224550ustar00rootroot00000000000000 * * 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 * * @since 2.2.6 */ 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. * * @since 2.2.6 */ public function __construct(array $elements = array()) { $this->elements = $elements; $this->orderedKeys = array_keys($elements); } /** * {@inheritdoc} * * @since 2.2.6 */ public function offsetExists($key) { return isset($this->elements[$key]); } /** * {@inheritdoc} * * @since 2.2.6 */ public function offsetGet($key) { if (!isset($this->elements[$key])) { throw new \OutOfBoundsException('The offset "'.$key.'" does not exist.'); } return $this->elements[$key]; } /** * {@inheritdoc} * * @since 2.2.6 */ 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 : max($this->orderedKeys) + 1; } $this->orderedKeys[] = $key; } $this->elements[$key] = $value; } /** * {@inheritdoc} * * @since 2.2.6 */ 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} * * @since 2.2.6 */ public function getIterator() { return new OrderedHashMapIterator($this->elements, $this->orderedKeys, $this->managedCursors); } /** * {@inheritdoc} * * @since 2.2.6 */ public function count() { return count($this->elements); } } src/Symfony/Component/Form/Util/OrderedHashMapIterator.php000066400000000000000000000070331266465517700241720ustar00rootroot00000000000000 * * 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. * * This class is internal and should not be used. * * @author Bernhard Schussek * * @since 2.2.6 */ 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. * * @since 2.2.6 */ 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. * * @since 2.2.6 */ 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} * * @since 2.2.6 */ public function current() { return $this->current; } /** * {@inheritdoc} * * @since 2.2.6 */ 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} * * @since 2.2.6 */ public function key() { return $this->key; } /** *{@inheritdoc} * * @since 2.2.6 */ public function valid() { return null !== $this->key; } /** *{@inheritdoc} * * @since 2.2.6 */ 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; } } } src/Symfony/Component/Form/Util/ServerParams.php000066400000000000000000000037541266465517700222520ustar00rootroot00000000000000 * * 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 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; } } src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php000066400000000000000000000033241266465517700245750ustar00rootroot00000000000000 * * 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. * * 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 * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link InheritDataAwareIterator} instead. */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { public function __construct(\Traversable $iterator) { /* * Prevent to trigger deprecation notice when already using the * InheritDataAwareIterator class that extends this deprecated one. * The {@link Symfony\Component\Form\Util\InheritDataAwareIterator::__construct} method * forces this argument to false. */ if (__CLASS__ === get_class($this)) { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Util\InheritDataAwareIterator class instead.', E_USER_DEPRECATED); } parent::__construct($iterator); } /** * {@inheritdoc} */ public function getChildren() { return new static($this->current()); } /** *{@inheritdoc} */ public function hasChildren() { return (bool) $this->current()->getConfig()->getInheritData(); } } src/Symfony/Component/Form/composer.json000066400000000000000000000031271266465517700207260ustar00rootroot00000000000000{ "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.3.9", "symfony/event-dispatcher": "~2.1", "symfony/intl": "~2.4", "symfony/options-resolver": "~2.6", "symfony/property-access": "~2.3" }, "require-dev": { "doctrine/collections": "~1.0", "symfony/validator": "~2.6,>=2.6.8", "symfony/http-foundation": "~2.2", "symfony/http-kernel": "~2.4", "symfony/security-csrf": "~2.4", "symfony/translation": "~2.0,>=2.0.5" }, "conflict": { "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": "2.7-dev" } } } src/Symfony/Component/Form/phpunit.xml.dist000066400000000000000000000014701266465517700213560ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/HttpFoundation/000077500000000000000000000000001266465517700202445ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/.gitignore000066400000000000000000000000421266465517700222300ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/HttpFoundation/AcceptHeader.php000066400000000000000000000070301266465517700232650ustar00rootroot00000000000000 * * 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 AcceptHeader */ 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 AcceptHeader */ 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 AcceptHeader */ 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; } } } src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php000066400000000000000000000114601266465517700241060ustar00rootroot00000000000000 * * 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 AcceptHeaderItem */ 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 AcceptHeaderItem */ 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 AcceptHeaderItem */ 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 AcceptHeaderItem */ 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 AcceptHeaderItem */ public function setAttribute($name, $value) { if ('q' === $name) { $this->quality = (float) $value; } else { $this->attributes[$name] = (string) $value; } return $this; } } src/Symfony/Component/HttpFoundation/ApacheRequest.php000066400000000000000000000016421266465517700235120ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/BinaryFileResponse.php000066400000000000000000000257471266465517700245370ustar00rootroot00000000000000 * * 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 BinaryFileResponse The created response */ 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 BinaryFileResponse * * @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 BinaryFileResponse */ public function setContentDisposition($disposition, $filename = '', $filenameFallback = '') { if ($filename === '') { $filename = $this->file->getFilename(); } $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() ? '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); } 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 BinaryFileResponse */ public function deleteFileAfterSend($shouldDelete) { $this->deleteFileAfterSend = $shouldDelete; return $this; } } src/Symfony/Component/HttpFoundation/CHANGELOG.md000066400000000000000000000153021266465517700220560ustar00rootroot00000000000000CHANGELOG ========= 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. src/Symfony/Component/HttpFoundation/Cookie.php000066400000000000000000000116241266465517700221720ustar00rootroot00000000000000 * * 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; /** * Constructor. * * @param string $name The name of the cookie * @param string $value The value of the cookie * @param int|string|\DateTime|\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 * * @throws \InvalidArgumentException */ public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true) { // 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 \DateTime || $expire instanceof \DateTimeInterface) { $expire = $expire->format('U'); } elseif (!is_numeric($expire)) { $expire = strtotime($expire); if (false === $expire || -1 === $expire) { throw new \InvalidArgumentException('The cookie expiration time is not valid.'); } } $this->name = $name; $this->value = $value; $this->domain = $domain; $this->expire = $expire; $this->path = empty($path) ? '/' : $path; $this->secure = (bool) $secure; $this->httpOnly = (bool) $httpOnly; } /** * Returns the cookie as a string. * * @return string The cookie */ public function __toString() { $str = urlencode($this->getName()).'='; if ('' === (string) $this->getValue()) { $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001); } else { $str .= urlencode($this->getValue()); if ($this->getExpiresTime() !== 0) { $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()); } } if ($this->path) { $str .= '; path='.$this->path; } if ($this->getDomain()) { $str .= '; domain='.$this->getDomain(); } if (true === $this->isSecure()) { $str .= '; secure'; } if (true === $this->isHttpOnly()) { $str .= '; httponly'; } return $str; } /** * Gets the name of the cookie. * * @return string */ public function getName() { return $this->name; } /** * Gets the value of the cookie. * * @return string */ public function getValue() { return $this->value; } /** * Gets the domain that the cookie is available to. * * @return string */ 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(); } } src/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php000066400000000000000000000025171266465517700257760ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpFoundation/File/000077500000000000000000000000001266465517700211235ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/File/Exception/000077500000000000000000000000001266465517700230615ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php000066400000000000000000000012671266465517700277710ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/HttpFoundation/File/Exception/FileException.php000066400000000000000000000007221266465517700263310ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php000066400000000000000000000012611266465517700300050ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php000066400000000000000000000010751266465517700304220ustar00rootroot00000000000000 * * 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))); } } src/Symfony/Component/HttpFoundation/File/Exception/UploadException.php000066400000000000000000000007151266465517700267000ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpFoundation/File/File.php000066400000000000000000000100331266465517700225100ustar00rootroot00000000000000 * * 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 (i.e. "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 File 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; } } src/Symfony/Component/HttpFoundation/File/MimeType/000077500000000000000000000000001266465517700226545ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php000066400000000000000000000046461266465517700267110ustar00rootroot00000000000000 * * 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 ExtensionGuesser */ 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; } } } } src/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php000066400000000000000000000012351266465517700305210ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php000066400000000000000000000042011266465517700304160ustar00rootroot00000000000000 * * 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]; } } src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php000066400000000000000000000031771266465517700301400ustar00rootroot00000000000000 * * 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 * * @link 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); } } src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php000066400000000000000000001072151266465517700303570ustar00rootroot00000000000000 * * 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/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; } } src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php000066400000000000000000000077451266465517700264710ustar00rootroot00000000000000 * * 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 MimeTypeGuesser */ 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; } } } } src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php000066400000000000000000000017071266465517700303020ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpFoundation/File/UploadedFile.php000066400000000000000000000214701266465517700241750ustar00rootroot00000000000000 * * 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 string */ 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 $mimeType The type of the file as provided by PHP * @param int $size The file size * @param int $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants) * @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); } } src/Symfony/Component/HttpFoundation/FileBag.php000066400000000000000000000075131266465517700222540ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/HeaderBag.php000066400000000000000000000207301266465517700225610ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/IpUtils.php000066400000000000000000000074011266465517700223500ustar00rootroot00000000000000 * * 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 (false !== strpos($ip, '/')) { list($address, $netmask) = explode('/', $ip, 2); if ($netmask === '0') { // Ensure IP is valid - using ip2long below implicitly validates, but we need to do it manually here 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)); 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; } } src/Symfony/Component/HttpFoundation/JsonResponse.php000066400000000000000000000163561266465517700234200ustar00rootroot00000000000000 * * 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 " for RFC4627-compliant JSON, which may also be embedded into HTML. // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT protected $encodingOptions = 15; /** * Constructor. * * @param mixed $data The response data * @param int $status The response status code * @param array $headers An array of response headers */ public function __construct($data = null, $status = 200, $headers = array()) { parent::__construct('', $status, $headers); if (null === $data) { $data = new \ArrayObject(); } $this->setData($data); } /** * {@inheritdoc} */ public static function create($data = null, $status = 200, $headers = array()) { return new static($data, $status, $headers); } /** * Sets the JSONP callback. * * @param string|null $callback The JSONP callback or null to use none * * @return JsonResponse * * @throws \InvalidArgumentException When the callback name is not valid */ public function setCallback($callback = null) { if (null !== $callback) { // taken from http://www.geekality.net/2011/08/03/valid-javascript-identifier/ $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*+$/u'; $parts = explode('.', $callback); foreach ($parts as $part) { if (!preg_match($pattern, $part)) { throw new \InvalidArgumentException('The callback name is not valid.'); } } } $this->callback = $callback; return $this->update(); } /** * Sets the data to be sent as JSON. * * @param mixed $data * * @return JsonResponse * * @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 { if (PHP_VERSION_ID < 50400) { // PHP 5.3 triggers annoying warnings for some // types that can't be serialized as JSON (INF, resources, etc.) // but doesn't provide the JsonSerializable interface. set_error_handler(function () { return false; }); $data = @json_encode($data, $this->encodingOptions); } else { // 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. if (PHP_VERSION_ID < 50500) { // Clear json_last_error() json_encode(null); $errorHandler = set_error_handler('var_dump'); restore_error_handler(); set_error_handler(function () use ($errorHandler) { if (JSON_ERROR_NONE === json_last_error()) { return $errorHandler && false !== call_user_func_array($errorHandler, func_get_args()); } }); } $data = json_encode($data, $this->encodingOptions); } if (PHP_VERSION_ID < 50500) { restore_error_handler(); } } catch (\Exception $e) { if (PHP_VERSION_ID < 50500) { restore_error_handler(); } if (PHP_VERSION_ID >= 50400 && '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($this->transformJsonError()); } $this->data = $data; return $this->update(); } /** * 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 JsonResponse */ 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 JsonResponse */ 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); } private function transformJsonError() { if (function_exists('json_last_error_msg')) { return json_last_error_msg(); } switch (json_last_error()) { 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.'; } } } src/Symfony/Component/HttpFoundation/LICENSE000066400000000000000000000020511266465517700212470ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/HttpFoundation/ParameterBag.php000066400000000000000000000201741266465517700233130ustar00rootroot00000000000000 * * 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 $path The key * @param mixed $default The default value if the parameter key does not exist * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return mixed * * @throws \InvalidArgumentException */ public function get($path, $default = null, $deep = false) { if (!$deep || false === $pos = strpos($path, '[')) { return array_key_exists($path, $this->parameters) ? $this->parameters[$path] : $default; } $root = substr($path, 0, $pos); if (!array_key_exists($root, $this->parameters)) { return $default; } $value = $this->parameters[$root]; $currentKey = null; for ($i = $pos, $c = strlen($path); $i < $c; ++$i) { $char = $path[$i]; if ('[' === $char) { if (null !== $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "[" at position %d.', $i)); } $currentKey = ''; } elseif (']' === $char) { if (null === $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "]" at position %d.', $i)); } if (!is_array($value) || !array_key_exists($currentKey, $value)) { return $default; } $value = $value[$currentKey]; $currentKey = null; } else { if (null === $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "%s" at position %d.', $char, $i)); } $currentKey .= $char; } } if (null !== $currentKey) { throw new \InvalidArgumentException(sprintf('Malformed path. Path must end with "]".')); } return $value; } /** * 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 * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value */ public function getAlpha($key, $default = '', $deep = false) { return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default, $deep)); } /** * 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 * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value */ public function getAlnum($key, $default = '', $deep = false) { return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default, $deep)); } /** * 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 * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value */ public function getDigits($key, $default = '', $deep = false) { // we need to remove - and + because they're allowed in the filter return str_replace(array('-', '+'), '', $this->filter($key, $default, $deep, 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 * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return int The filtered value */ public function getInt($key, $default = 0, $deep = false) { return (int) $this->get($key, $default, $deep); } /** * 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 * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return bool The filtered value */ public function getBoolean($key, $default = false, $deep = false) { return $this->filter($key, $default, $deep, FILTER_VALIDATE_BOOLEAN); } /** * Filter key. * * @param string $key Key. * @param mixed $default Default = null. * @param bool $deep Default = false. * @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, $deep = false, $filter = FILTER_DEFAULT, $options = array()) { $value = $this->get($key, $default, $deep); // 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); } } src/Symfony/Component/HttpFoundation/README.md000066400000000000000000000026011266465517700215220ustar00rootroot00000000000000HttpFoundation Component ======================== HttpFoundation defines an object-oriented layer for the HTTP specification. It provides an abstraction for requests, responses, uploaded files, cookies, sessions, ... In this example, we get a Request object from the current PHP global variables: ```php use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; $request = Request::createFromGlobals(); echo $request->getPathInfo(); ``` You can also create a Request directly -- that's interesting for unit testing: ```php $request = Request::create('/?foo=bar', 'GET'); echo $request->getPathInfo(); ``` And here is how to create and send a Response: ```php $response = new Response('Not Found', 404, array('Content-Type' => 'text/plain')); $response->send(); ``` The Request and the Response classes have many other methods that implement the HTTP specification. Loading ------- If you are not using Composer but are using PHP 5.3.x, you must add the following to your autoloader: ```php // SessionHandlerInterface if (!interface_exists('SessionHandlerInterface')) { $loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs'); } ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/HttpFoundation/ $ composer install $ phpunit src/Symfony/Component/HttpFoundation/RedirectResponse.php000066400000000000000000000051011266465517700242320ustar00rootroot00000000000000 * * 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)); } } /** * {@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 RedirectResponse The current response. * * @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; } } src/Symfony/Component/HttpFoundation/Request.php000066400000000000000000001700221266465517700224070ustar00rootroot00000000000000 * * 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\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 Request A new request */ 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_name()) { 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 Request A Request instance */ 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/2.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 Request The duplicated request */ 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()) * * 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. * * This method is mainly useful for libraries that want to provide some flexibility. * * Order of precedence: GET, PATH, POST * * Avoid using this method in controllers: * * * slow * * prefer to get from a "named" source * * It is better to explicitly get request parameters from the appropriate * public property instead (query, attributes, request). * * @param string $key the key * @param mixed $default the default value * @param bool $deep is parameter deep in multidimensional array * * @return mixed */ public function get($key, $default = null, $deep = false) { if ($this !== $result = $this->query->get($key, $this, $deep)) { return $result; } if ($this !== $result = $this->attributes->get($key, $this, $deep)) { return $result; } if ($this !== $result = $this->request->get($key, $this, $deep)) { 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); } if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) { $forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches); $clientIps = $matches[3]; } elseif (self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) { $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_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]); } 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); } /** * 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 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) { if (false !== $pos = strpos($mimeType, ';')) { $mimeType = substr($mimeType, 0, $pos); } if (null === static::$formats) { static::initializeFormats(); } foreach (static::$formats as $format => $mimeTypes) { if (in_array($mimeType, (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 parameter * * $default * * @param string $default The default format * * @return string The request format */ public function getRequestFormat($default = 'html') { if (null === $this->format) { $this->format = $this->get('_format', $default); } return $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 the method is safe or not. * * @return bool */ public function isMethodSafe() { 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) { $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: * * @link 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); } private function isFromTrustedProxy() { return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies); } } src/Symfony/Component/HttpFoundation/RequestMatcher.php000066400000000000000000000103461266465517700237150ustar00rootroot00000000000000 * * 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 */ private $path; /** * @var string */ private $host; /** * @var array */ 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 = array_map('strtolower', (array) $scheme); } /** * Adds a check for the URL host name. * * @param string $regexp A Regexp */ public function matchHost($regexp) { $this->host = $regexp; } /** * Adds a check for the URL path info. * * @param string $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[] $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 */ public function matchIps($ips) { $this->ips = (array) $ips; } /** * Adds a check for the HTTP method. * * @param string|string[] $method An HTTP method or an array of HTTP methods */ public function matchMethod($method) { $this->methods = array_map('strtoupper', (array) $method); } /** * 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)) { return false; } if ($this->methods && !in_array($request->getMethod(), $this->methods)) { 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; } } src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php000066400000000000000000000013661266465517700255400ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpFoundation/RequestStack.php000066400000000000000000000044661266465517700234050ustar00rootroot00000000000000 * * 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]; } } src/Symfony/Component/HttpFoundation/Resources/000077500000000000000000000000001266465517700222165ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Resources/stubs/000077500000000000000000000000001266465517700233565ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php000066400000000000000000000060731266465517700306370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * SessionHandlerInterface for PHP < 5.4. * * The order in which these methods are invoked by PHP are: * 1. open [session_start] * 2. read * 3. gc [optional depending on probability settings: gc_probability / gc_divisor] * 4. destroy [optional when session_regenerate_id(true) is used] * 5. write [session_write_close] or destroy [session_destroy] * 6. close * * Extensive documentation can be found at php.net, see links: * * @see http://php.net/sessionhandlerinterface * @see http://php.net/session.customhandler * @see http://php.net/session-set-save-handler * * @author Drak * @author Tobias Schultze */ interface SessionHandlerInterface { /** * Re-initializes existing session, or creates a new one. * * @see http://php.net/sessionhandlerinterface.open * * @param string $savePath Save path * @param string $sessionName Session name, see http://php.net/function.session-name.php * * @return bool true on success, false on failure */ public function open($savePath, $sessionName); /** * Closes the current session. * * @see http://php.net/sessionhandlerinterface.close * * @return bool true on success, false on failure */ public function close(); /** * Reads the session data. * * @see http://php.net/sessionhandlerinterface.read * * @param string $sessionId Session ID, see http://php.net/function.session-id * * @return string Same session data as passed in write() or empty string when non-existent or on failure */ public function read($sessionId); /** * Writes the session data to the storage. * * Care, the session ID passed to write() can be different from the one previously * received in read() when the session ID changed due to session_regenerate_id(). * * @see http://php.net/sessionhandlerinterface.write * * @param string $sessionId Session ID , see http://php.net/function.session-id * @param string $data Serialized session data to save * * @return bool true on success, false on failure */ public function write($sessionId, $data); /** * Destroys a session. * * @see http://php.net/sessionhandlerinterface.destroy * * @param string $sessionId Session ID, see http://php.net/function.session-id * * @return bool true on success, false on failure */ public function destroy($sessionId); /** * Cleans up expired sessions (garbage collection). * * @see http://php.net/sessionhandlerinterface.gc * * @param string|int $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed * * @return bool true on success, false on failure */ public function gc($maxlifetime); } src/Symfony/Component/HttpFoundation/Response.php000066400000000000000000001044521266465517700225610ustar00rootroot00000000000000 * * 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_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 2012-02-13). * * 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', 306 => 'Reserved', 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 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', // RFC2324 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', 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 ); /** * 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'); if (!$this->headers->has('Date')) { $this->setDate(\DateTime::createFromFormat('U', time(), new \DateTimeZone('UTC'))); } } /** * 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 Response */ 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 Response The current response. */ 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() && 'no-cache' == $this->headers->get('Cache-Control')) { $this->headers->set('pragma', 'no-cache'); $this->headers->set('expires', -1); } $this->ensureIEOverSSLCompatibility($request); return $this; } /** * Sends HTTP headers. * * @return Response */ public function sendHeaders() { // headers have already been sent by the developer if (headers_sent()) { return $this; } // headers foreach ($this->headers->allPreserveCase() as $name => $values) { foreach ($values as $value) { header($name.': '.$value, false); } } // status header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); // cookies foreach ($this->headers->getCookies() as $cookie) { 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 Response */ public function sendContent() { echo $this->content; return $this; } /** * Sends HTTP headers and content. * * @return Response */ 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 Response * * @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 Response */ 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 Response * * @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 Response */ 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 Response */ 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 Response */ 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() { return $this->headers->getDate('Date', new \DateTime()); } /** * Sets the Date header. * * @param \DateTime $date A \DateTime instance * * @return Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response */ 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 Response * * @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 Response * * @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 Response */ 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->isMethodSafe()) { 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); $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. * * @link 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'); } } } } src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php000066400000000000000000000211121266465517700242730ustar00rootroot00000000000000 * * 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 * * @throws \InvalidArgumentException When the $format is invalid * * @return array */ 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'; } 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; } } src/Symfony/Component/HttpFoundation/ServerBag.php000066400000000000000000000102161266465517700226350ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/000077500000000000000000000000001266465517700216675ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Attribute/000077500000000000000000000000001266465517700236325ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php000066400000000000000000000056711266465517700267310ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php000066400000000000000000000030101266465517700305330ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php000066400000000000000000000077501266465517700307120ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Flash/000077500000000000000000000000001266465517700227245ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php000066400000000000000000000071301266465517700271130ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php000066400000000000000000000065231266465517700251120ustar00rootroot00000000000000 * * 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. * * \IteratorAggregate implementation is deprecated and will be removed in 3.0. * * @author Drak */ class FlashBag implements FlashBagInterface, \IteratorAggregate { 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(); } /** * Returns an iterator for flashes. * * @deprecated since version 2.4, to be removed in 3.0. * * @return \ArrayIterator An \ArrayIterator instance */ public function getIterator() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); return new \ArrayIterator($this->all()); } } src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php000066400000000000000000000036401266465517700267300ustar00rootroot00000000000000 * * 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. */ 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(); } src/Symfony/Component/HttpFoundation/Session/Session.php000066400000000000000000000124541266465517700240310ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php000066400000000000000000000015641266465517700262640ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpFoundation/Session/SessionInterface.php000066400000000000000000000104701266465517700256460ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpFoundation/Session/Storage/000077500000000000000000000000001266465517700232735ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Storage/Handler/000077500000000000000000000000001266465517700246505ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php000066400000000000000000000240151266465517700320740ustar00rootroot00000000000000 * * 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; @trigger_error('The '.__NAMESPACE__.'\LegacyPdoSessionHandler class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler class instead.', E_USER_DEPRECATED); /** * Session handler using a PDO connection to read and write data. * * Session data is a binary string that can contain non-printable characters like the null byte. * For this reason this handler base64 encodes the data to be able to save it in a character column. * * This version of the PdoSessionHandler does NOT implement locking. So concurrent requests to the * same session can result in data loss due to race conditions. * * @author Fabien Potencier * @author Michael Williams * @author Tobias Schultze * * @deprecated since version 2.6, to be removed in 3.0. Use * {@link PdoSessionHandler} instead. */ class LegacyPdoSessionHandler implements \SessionHandlerInterface { /** * @var \PDO PDO instance */ private $pdo; /** * @var string Table name */ private $table; /** * @var string Column for session id */ private $idCol; /** * @var string Column for session data */ private $dataCol; /** * @var string Column for timestamp */ private $timeCol; /** * Constructor. * * List of available options: * * db_table: The name of the table [required] * * 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_time_col: The column where to store the timestamp [default: sess_time] * * @param \PDO $pdo A \PDO instance * @param array $dbOptions An associative array of DB options * * @throws \InvalidArgumentException When "db_table" option is not provided */ public function __construct(\PDO $pdo, array $dbOptions = array()) { if (!array_key_exists('db_table', $dbOptions)) { throw new \InvalidArgumentException('You must provide the "db_table" option for a PdoSessionStorage.'); } if (\PDO::ERRMODE_EXCEPTION !== $pdo->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 = $pdo; $dbOptions = array_merge(array( 'db_id_col' => 'sess_id', 'db_data_col' => 'sess_data', 'db_time_col' => 'sess_time', ), $dbOptions); $this->table = $dbOptions['db_table']; $this->idCol = $dbOptions['db_id_col']; $this->dataCol = $dbOptions['db_data_col']; $this->timeCol = $dbOptions['db_time_col']; } /** * {@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->pdo->prepare($sql); $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); $stmt->execute(); } catch (\PDOException $e) { throw new \RuntimeException(sprintf('PDOException 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->pdo->prepare($sql); $stmt->bindValue(':time', time() - $maxlifetime, \PDO::PARAM_INT); $stmt->execute(); } catch (\PDOException $e) { throw new \RuntimeException(sprintf('PDOException 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->pdo->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 (\PDOException $e) { throw new \RuntimeException(sprintf('PDOException 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->pdo->prepare($mergeSql); $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); $mergeStmt->bindParam(':data', $encoded, \PDO::PARAM_STR); $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); $mergeStmt->execute(); return true; } $updateStmt = $this->pdo->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, 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->pdo->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 (\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) { throw new \RuntimeException(sprintf('PDOException 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() { $driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); switch ($driver) { case 'mysql': 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 'oci': // 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 = :data, $this->timeCol = :time"; case 'sqlsrv' === $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 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': return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)"; } } /** * Return a PDO instance. * * @return \PDO */ protected function getConnection() { return $this->pdo; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php000066400000000000000000000053361266465517700317340ustar00rootroot00000000000000 * * 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 $this->memcache->close(); } /** * {@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; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php000066400000000000000000000055731266465517700321030ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php000066400000000000000000000121311266465517700315460ustar00rootroot00000000000000 * * 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 */ 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 $mongo A 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 \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) { $this->getCollection()->remove(array( $this->options['id_field'] => $sessionId, )); return true; } /** * {@inheritdoc} */ public function gc($maxlifetime) { $this->getCollection()->remove(array( $this->options['expiry_field'] => array('$lt' => new \MongoDate()), )); return true; } /** * {@inheritdoc} */ public function write($sessionId, $data) { $expiry = new \MongoDate(time() + (int) ini_get('session.gc_maxlifetime')); $fields = array( $this->options['data_field'] => new \MongoBinData($data, \MongoBinData::BYTE_ARRAY), $this->options['time_field'] => new \MongoDate(), $this->options['expiry_field'] => $expiry, ); $this->getCollection()->update( array($this->options['id_field'] => $sessionId), array('$set' => $fields), array('upsert' => true, 'multiple' => false) ); return true; } /** * {@inheritdoc} */ public function read($sessionId) { $dbData = $this->getCollection()->findOne(array( $this->options['id_field'] => $sessionId, $this->options['expiry_field'] => array('$gte' => new \MongoDate()), )); return null === $dbData ? '' : $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 */ protected function getMongo() { return $this->mongo; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php000066400000000000000000000034131266465517700322520ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php000066400000000000000000000010441266465517700314500ustar00rootroot00000000000000 * * 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 if (PHP_VERSION_ID >= 50400) { class NativeSessionHandler extends \SessionHandler { } } else { class NativeSessionHandler { } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php000066400000000000000000000022531266465517700311370ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php000066400000000000000000000672021266465517700307540ustar00rootroot00000000000000 * * 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. $mergeSql = $this->getMergeSql(); if (null !== $mergeSql) { $mergeStmt = $this->pdo->prepare($mergeSql); $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); $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, 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); $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. SELECT // FOR UPDATE is necessary to avoid deadlock of connection that starts reading // before we write (transform intention to real lock). $selectStmt->execute(); $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); if ($sessionRows) { return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; } return ''; } throw $e; } } return ''; } /** * 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) SQL query when supported by the database for writing session data. * * @return string|null The SQL string or null when not supported */ private function getMergeSql() { switch ($this->driver) { case 'mysql': return "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)"; case 'oci': // 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->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time"; 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 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->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time;"; case 'sqlite': return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; } } /** * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php000066400000000000000000000037331266465517700322610ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php000066400000000000000000000071441266465517700261440ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php000066400000000000000000000124131266465517700305660ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php000066400000000000000000000066341266465517700303770ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php000066400000000000000000000313511266465517700301260ustar00rootroot00000000000000 * * 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\NativeProxy; 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); if (PHP_VERSION_ID >= 50400) { session_register_shutdown(); } else { register_shutdown_function('session_write_close'); } $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_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE === session_status()) { throw new \RuntimeException('Failed to start the session: already started by PHP.'); } if (PHP_VERSION_ID < 50400 && !$this->closed && isset($_SESSION) && session_id()) { // not 100% fool-proof, but is the most reliable way to determine if a session is active in PHP 5.3 throw new \RuntimeException('Failed to start the session: already started by PHP ($_SESSION is set).'); } 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(); if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) { // This condition matches only PHP 5.3 with internal save handlers $this->saveHandler->setActive(true); } 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_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE !== session_status()) { return false; } // Check if session ID exists in PHP 5.3 if (PHP_VERSION_ID < 50400 && '' === session_id()) { 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(); if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) { // This condition matches only PHP 5.3 with internal save handlers $this->saveHandler->setActive(false); } $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) { $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 = PHP_VERSION_ID >= 50400 ? new SessionHandlerProxy(new \SessionHandler()) : new NativeProxy(); } $this->saveHandler = $saveHandler; if ($this->saveHandler instanceof \SessionHandlerInterface) { if (PHP_VERSION_ID >= 50400) { session_set_save_handler($this->saveHandler, false); } else { session_set_save_handler( array($this->saveHandler, 'open'), array($this->saveHandler, 'close'), array($this->saveHandler, 'read'), array($this->saveHandler, 'write'), array($this->saveHandler, 'destroy'), array($this->saveHandler, 'gc') ); } } } /** * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php000066400000000000000000000034361266465517700305470ustar00rootroot00000000000000 * * 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(); if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) { // This condition matches only PHP 5.3 + internal save handlers $this->saveHandler->setActive(true); } 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(); } } src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/000077500000000000000000000000001266465517700244145ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php000066400000000000000000000056521266465517700277420ustar00rootroot00000000000000 * * 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 bool */ protected $active = 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() { if (PHP_VERSION_ID >= 50400) { return $this->active = \PHP_SESSION_ACTIVE === session_status(); } return $this->active; } /** * Sets the active flag. * * Has no effect under PHP 5.4+ as status is detected * automatically in isActive() * * @internal * * @param bool $flag * * @throws \LogicException */ public function setActive($flag) { if (PHP_VERSION_ID >= 50400) { throw new \LogicException('This method is disabled in PHP 5.4.0+'); } $this->active = (bool) $flag; } /** * 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); } } src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php000066400000000000000000000016461266465517700274240ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php000066400000000000000000000036521266465517700311160ustar00rootroot00000000000000 * * 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); if (true === $return) { $this->active = true; } return $return; } /** * {@inheritdoc} */ public function close() { $this->active = false; 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); } } src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php000066400000000000000000000100411266465517700305710ustar00rootroot00000000000000 * * 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. * * @throws \RuntimeException If something goes wrong starting the session. * * @return bool True if started. */ 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 PHPs * 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. Symfonys 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 * 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(); } src/Symfony/Component/HttpFoundation/StreamedResponse.php000066400000000000000000000056541266465517700242520ustar00rootroot00000000000000 * * 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; /** * 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($callback = null, $status = 200, $headers = array()) { parent::__construct(null, $status, $headers); if (null !== $callback) { $this->setCallback($callback); } $this->streamed = 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 StreamedResponse */ 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 * * @throws \LogicException */ public function setCallback($callback) { if (!is_callable($callback)) { throw new \LogicException('The Response callback must be a valid PHP callable.'); } $this->callback = $callback; } /** * {@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; } } src/Symfony/Component/HttpFoundation/Tests/000077500000000000000000000000001266465517700213465ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php000066400000000000000000000067621266465517700260610ustar00rootroot00000000000000 * * 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\AcceptHeaderItem; class AcceptHeaderItemTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php000066400000000000000000000066141266465517700252360ustar00rootroot00000000000000 * * 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\AcceptHeader; use Symfony\Component\HttpFoundation\AcceptHeaderItem; class AcceptHeaderTest extends \PHPUnit_Framework_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', '*')), ); } } src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php000066400000000000000000000052701266465517700254550ustar00rootroot00000000000000 * * 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\ApacheRequest; class ApacheRequestTest extends \PHPUnit_Framework_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', ), '/', '', '/', ), ); } } src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php000066400000000000000000000252561266465517700264740ustar00rootroot00000000000000 * * 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')); } /** * @expectedException \LogicException */ public function testSetContent() { $response = new BinaryFileResponse(__FILE__); $response->setContent('foo'); } public function testGetContent() { $response = new BinaryFileResponse(__FILE__); $this->assertFalse($response->getContent()); } /** * @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('', $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); } } } src/Symfony/Component/HttpFoundation/Tests/CookieTest.php000066400000000000000000000115041266465517700241310ustar00rootroot00000000000000 * * 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\Cookie; /** * CookieTest. * * @author John Kary * @author Hugo Hamon * * @group time-sensitive */ class CookieTest extends \PHPUnit_Framework_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() { $cookie = new Cookie('MyCookie', 'foo', 'bar'); } 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 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', $cookie->__toString(), '->__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', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL'); $cookie = new Cookie('foo', 'bar', 0, '/', ''); $this->assertEquals('foo=bar; path=/; httponly', $cookie->__toString()); } } src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php000066400000000000000000000050121266465517700277310ustar00rootroot00000000000000 * * 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\ExpressionLanguage\ExpressionLanguage; use Symfony\Component\HttpFoundation\ExpressionRequestMatcher; use Symfony\Component\HttpFoundation\Request; class ExpressionRequestMatcherTest extends \PHPUnit_Framework_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), ); } } src/Symfony/Component/HttpFoundation/Tests/File/000077500000000000000000000000001266465517700222255ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/FakeFile.php000066400000000000000000000015001266465517700244000ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php000066400000000000000000000130601266465517700244550ustar00rootroot00000000000000 * * 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; use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; class FileTest extends \PHPUnit_Framework_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->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->getMock('Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface'); $guesser ->expects($this->once()) ->method('guess') ->with($this->equalTo($path)) ->will($this->returnValue($mimeType)) ; return $guesser; } } src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/000077500000000000000000000000001266465517700240365ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension000066400000000000000000000000011266465517700274620ustar00rootroot00000000000000fsrc/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/000077500000000000000000000000001266465517700260425ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty000066400000000000000000000000001266465517700271670ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/other-file.example000066400000000000000000000000001266465517700274370ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test000066400000000000000000000000431266465517700247350ustar00rootroot00000000000000GIF87a,D;src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif000066400000000000000000000000431266465517700255010ustar00rootroot00000000000000GIF87a,D;src/Symfony/Component/HttpFoundation/Tests/File/MimeType/000077500000000000000000000000001266465517700237565ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php000066400000000000000000000056551266465517700270730ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; use Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser; /** * @requires extension fileinfo */ class MimeTypeTest extends \PHPUnit_Framework_TestCase { protected $path; public function testGuessImageWithoutExtension() { $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test')); } public function testGuessImageWithDirectory() { $this->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->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->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); } } } src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php000066400000000000000000000160651266465517700261430ustar00rootroot00000000000000 * * 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\UploadedFile; class UploadedFileTest extends \PHPUnit_Framework_TestCase { protected function setUp() { if (!ini_get('file_uploads')) { $this->markTestSkipped('file_uploads is disabled in php.ini'); } } public function testConstructWhenFileNotExists() { $this->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()); } } src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php000066400000000000000000000101251266465517700242070ustar00rootroot00000000000000 * * 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\File\UploadedFile; use Symfony\Component\HttpFoundation\FileBag; /** * FileBagTest. * * @author Fabien Potencier * @author Bulat Shakirzyanov */ class FileBagTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php000066400000000000000000000163211266465517700245240ustar00rootroot00000000000000 * * 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\HeaderBag; class HeaderBagTest extends \PHPUnit_Framework_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 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)); } } src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php000066400000000000000000000055131266465517700243140ustar00rootroot00000000000000 * * 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\IpUtils; class IpUtilsTest extends \PHPUnit_Framework_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 ); } /** * @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')), ); } /** * @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'); } } src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php000066400000000000000000000165701266465517700253600ustar00rootroot00000000000000 * * 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\JsonResponse; class JsonResponseTest extends \PHPUnit_Framework_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 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()); } /** * @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 * @requires PHP 5.4 */ public function testSetContentJsonSerializeError() { $serializable = new JsonSerializableObject(); JsonResponse::create($serializable); } } if (interface_exists('JsonSerializable')) { class JsonSerializableObject implements \JsonSerializable { public function jsonSerialize() { throw new \Exception('This error is expected'); } } } src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php000066400000000000000000000203541266465517700252550ustar00rootroot00000000000000 * * 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\ParameterBag; class ParameterBagTest extends \PHPUnit_Framework_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]')); } /** * @dataProvider getInvalidPaths * @expectedException \InvalidArgumentException */ public function testGetDeepWithInvalidPaths($path) { $bag = new ParameterBag(array('foo' => array('bar' => 'moo'))); $bag->get($path, null, true); } public function getInvalidPaths() { return array( array('foo[['), array('foo[d'), array('foo[bar]]'), array('foo[bar]d'), ); } public function testGetDeep() { $bag = new ParameterBag(array('foo' => array('bar' => array('moo' => 'boo')))); $this->assertEquals(array('moo' => 'boo'), $bag->get('foo[bar]', null, true)); $this->assertEquals('boo', $bag->get('foo[bar][moo]', null, true)); $this->assertEquals('default', $bag->get('foo[bar][foo]', 'default', true)); $this->assertEquals('default', $bag->get('bar[moo][foo]', 'default', true)); } 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', '', false, FILTER_SANITIZE_NUMBER_INT), '->filter() gets a value of parameter as integer filtering out invalid characters'); $this->assertEquals('example@example.com', $bag->filter('email', '', false, FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email'); $this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, 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', '', false, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path'); $this->assertFalse($bag->filter('dec', '', false, 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', '', false, 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', '', false), '->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'); } } src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php000066400000000000000000000043401266465517700262000ustar00rootroot00000000000000 * * 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\RedirectResponse; class RedirectResponseTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php000066400000000000000000000112611266465517700256540ustar00rootroot00000000000000 * * 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\RequestMatcher; use Symfony\Component\HttpFoundation\Request; class RequestMatcherTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php000066400000000000000000000040061266465517700253350ustar00rootroot00000000000000 * * 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\RequestStack; class RequestStackTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/RequestTest.php000066400000000000000000002321501266465517700243520ustar00rootroot00000000000000 * * 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\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Request; class RequestTest extends \PHPUnit_Framework_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)); } } 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')), ); } 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); } /** * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider * @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->assertEquals($a, $b); } public function getContentCantBeCalledTwiceWithResourcesProvider() { return array( '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 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()); $request = new Request(); $this->assertNull($request->getRequestFormat(null)); $request = new Request(); $this->assertNull($request->setRequestFormat('foo')); $this->assertEquals('foo', $request->getRequestFormat(null)); } 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()); // 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(3, 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 { $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)), ); } } 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'; } } src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php000066400000000000000000000267611266465517700262540ustar00rootroot00000000000000 * * 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\ResponseHeaderBag; use Symfony\Component\HttpFoundation\Cookie; /** * @group time-sensitive */ class ResponseHeaderBagTest extends \PHPUnit_Framework_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')), ), 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')), ), array( array('P3P' => 'CP="CAO PSA OUR"'), array('P3P' => array('CP="CAO PSA OUR"'), 'Cache-Control' => array('no-cache')), ), array( array('WWW-Authenticate' => 'Basic realm="WallyWorld"'), array('WWW-Authenticate' => array('Basic realm="WallyWorld"'), 'Cache-Control' => array('no-cache')), ), array( array('X-UA-Compatible' => 'IE=edge,chrome=1'), array('X-UA-Compatible' => array('IE=edge,chrome=1'), 'Cache-Control' => array('no-cache')), ), array( array('X-XSS-Protection' => '1; mode=block'), array('X-XSS-Protection' => array('1; mode=block'), 'Cache-Control' => array('no-cache')), ), ); } public function testCacheControlHeader() { $bag = new ResponseHeaderBag(array()); $this->assertEquals('no-cache', $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 testToStringIncludesCookieHeaders() { $bag = new ResponseHeaderBag(array()); $bag->setCookie(new Cookie('foo', 'bar')); $this->assertContains('Set-Cookie: foo=bar; path=/; httponly', explode("\r\n", $bag->__toString())); $bag->clearCookie('foo'); $this->assertRegExp('#^Set-Cookie: foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/; httponly#m', $bag->__toString()); } public function testClearCookieSecureNotHttpOnly() { $bag = new ResponseHeaderBag(array()); $bag->clearCookie('foo', '/', null, true, false); $this->assertRegExp('#^Set-Cookie: foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; path=/; secure#m', $bag->__toString()); } public function testReplace() { $bag = new ResponseHeaderBag(array()); $this->assertEquals('no-cache', $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', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); $bag->remove('Cache-Control'); $bag->replace(array()); $this->assertEquals('no-cache', $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()); $headers = explode("\r\n", $bag->__toString()); $this->assertContains('Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly', $headers); $this->assertContains('Set-Cookie: foo=bar; path=/path/foo; domain=foo.bar; httponly', $headers); $this->assertContains('Set-Cookie: foo=bar; path=/path/bar; domain=bar.foo; httponly', $headers); $this->assertContains('Set-Cookie: foo=bar; path=/; httponly', $headers); $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(); $cookies = $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'), ); } } src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php000066400000000000000000000771131266465517700245260ustar00rootroot00000000000000 * * 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', $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->getMock('Symfony\Component\HttpFoundation\ResponseHeaderBag', array('set')); $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 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'; } } src/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php000066400000000000000000000065041266465517700253160ustar00rootroot00000000000000 * * 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; abstract class ResponseTestCase extends \PHPUnit_Framework_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(); } src/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php000066400000000000000000000130451266465517700246020ustar00rootroot00000000000000 * * 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\ServerBag; /** * ServerBagTest. * * @author Bulat Shakirzyanov */ class ServerBagTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/Session/000077500000000000000000000000001266465517700227715ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/000077500000000000000000000000001266465517700247345ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php000066400000000000000000000120001266465517700306530ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; /** * Tests AttributeBag. * * @author Drak */ class AttributeBagTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php000066400000000000000000000124371266465517700326520ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag; /** * Tests NamespacedAttributeBag. * * @author Drak */ class NamespacedAttributeBagTest extends \PHPUnit_Framework_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), ); } } src/Symfony/Component/HttpFoundation/Tests/Session/Flash/000077500000000000000000000000001266465517700240265ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php000066400000000000000000000106601266465517700310570ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag as FlashBag; /** * AutoExpireFlashBagTest. * * @author Drak */ class AutoExpireFlashBagTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php000066400000000000000000000104641266465517700270530ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Flash\FlashBag; /** * FlashBagTest. * * @author Drak */ class FlashBagTest extends \PHPUnit_Framework_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() ); } /** * @group legacy */ public function testLegacyGetIterator() { $flashes = array('hello' => 'world', 'beep' => 'boop', 'notice' => 'nope'); foreach ($flashes as $key => $val) { $this->bag->set($key, $val); } $i = 0; foreach ($this->bag as $key => $val) { $this->assertEquals(array($flashes[$key]), $val); ++$i; } $this->assertEquals(count($flashes), $i); $this->assertCount(0, $this->bag->all()); } } src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php000066400000000000000000000142701266465517700257710ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/000077500000000000000000000000001266465517700243755ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/000077500000000000000000000000001266465517700257525ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php000066400000000000000000000074301266465517700340400ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\LegacyPdoSessionHandler; /** * @group legacy * @group time-sensitive * @requires extension pdo_sqlite */ class LegacyPdoSessionHandlerTest extends \PHPUnit_Framework_TestCase { private $pdo; protected function setUp() { parent::setUp(); $this->pdo = new \PDO('sqlite::memory:'); $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $sql = 'CREATE TABLE sessions (sess_id VARCHAR(128) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)'; $this->pdo->exec($sql); } public function testIncompleteOptions() { $this->setExpectedException('InvalidArgumentException'); $storage = new LegacyPdoSessionHandler($this->pdo, array()); } public function testWrongPdoErrMode() { $pdo = new \PDO('sqlite::memory:'); $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_SILENT); $pdo->exec('CREATE TABLE sessions (sess_id VARCHAR(128) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)'); $this->setExpectedException('InvalidArgumentException'); $storage = new LegacyPdoSessionHandler($pdo, array('db_table' => 'sessions')); } public function testWrongTableOptionsWrite() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'bad_name')); $this->setExpectedException('RuntimeException'); $storage->write('foo', 'bar'); } public function testWrongTableOptionsRead() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'bad_name')); $this->setExpectedException('RuntimeException'); $storage->read('foo', 'bar'); } public function testWriteRead() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions')); $storage->write('foo', 'bar'); $this->assertEquals('bar', $storage->read('foo'), 'written value can be read back correctly'); } public function testMultipleInstances() { $storage1 = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions')); $storage1->write('foo', 'bar'); $storage2 = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions')); $this->assertEquals('bar', $storage2->read('foo'), 'values persist between instances'); } public function testSessionDestroy() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions')); $storage->write('foo', 'bar'); $this->assertCount(1, $this->pdo->query('SELECT * FROM sessions')->fetchAll()); $storage->destroy('foo'); $this->assertCount(0, $this->pdo->query('SELECT * FROM sessions')->fetchAll()); } public function testSessionGC() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions')); $storage->write('foo', 'bar'); $storage->write('baz', 'bar'); $this->assertCount(2, $this->pdo->query('SELECT * FROM sessions')->fetchAll()); $storage->gc(-1); $this->assertCount(0, $this->pdo->query('SELECT * FROM sessions')->fetchAll()); } public function testGetConnection() { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array()); $method = new \ReflectionMethod($storage, 'getConnection'); $method->setAccessible(true); $this->assertInstanceOf('\PDO', $method->invoke($storage)); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php000066400000000000000000000065251266465517700336770ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler; /** * @requires extension memcache * @group time-sensitive */ class MemcacheSessionHandlerTest extends \PHPUnit_Framework_TestCase { const PREFIX = 'prefix_'; const TTL = 1000; /** * @var MemcacheSessionHandler */ protected $storage; protected $memcache; protected function setUp() { parent::setUp(); $this->memcache = $this->getMock('Memcache'); $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->memcache ->expects($this->once()) ->method('close') ->will($this->returnValue(true)) ; $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)); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php000066400000000000000000000066111266465517700340370ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler; /** * @requires extension memcached * @group time-sensitive */ class MemcachedSessionHandlerTest extends \PHPUnit_Framework_TestCase { const PREFIX = 'prefix_'; const TTL = 1000; /** * @var MemcachedSessionHandler */ protected $storage; protected $memcached; protected function setUp() { parent::setUp(); if (version_compare(phpversion('memcached'), '2.2.0', '>=')) { $this->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower'); } $this->memcached = $this->getMock('Memcached'); $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)); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php000066400000000000000000000212141266465517700335120ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler; /** * @author Markus Bachmann * @requires extension mongo * @group time-sensitive */ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $mongo; private $storage; public $options; protected function setUp() { parent::setUp(); $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)); $that = $this; // 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 ($that, $testTimeout) { $that->assertArrayHasKey($that->options['id_field'], $criteria); $that->assertEquals($criteria[$that->options['id_field']], 'foo'); $that->assertArrayHasKey($that->options['expiry_field'], $criteria); $that->assertArrayHasKey('$gte', $criteria[$that->options['expiry_field']]); $that->assertInstanceOf('MongoDate', $criteria[$that->options['expiry_field']]['$gte']); $that->assertGreaterThanOrEqual($criteria[$that->options['expiry_field']]['$gte']->sec, $testTimeout); return array( $that->options['id_field'] => 'foo', $that->options['data_field'] => new \MongoBinData('bar', \MongoBinData::BYTE_ARRAY), $that->options['id_field'] => new \MongoDate(), ); })); $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)); $that = $this; $data = array(); $collection->expects($this->once()) ->method('update') ->will($this->returnCallback(function ($criteria, $updateData, $options) use ($that, &$data) { $that->assertEquals(array($that->options['id_field'] => 'foo'), $criteria); $that->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')); $this->assertEquals('bar', $data[$this->options['data_field']]->bin); $that->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)); $that = $this; $data = array(); $collection->expects($this->once()) ->method('update') ->will($this->returnCallback(function ($criteria, $updateData, $options) use ($that, &$data) { $that->assertEquals(array($that->options['id_field'] => 'foo'), $criteria); $that->assertEquals(array('upsert' => true, 'multiple' => false), $options); $data = $updateData['$set']; })); $this->assertTrue($this->storage->write('foo', 'bar')); $this->assertEquals('bar', $data[$this->options['data_field']]->bin); $that->assertInstanceOf('MongoDate', $data[$this->options['time_field']]); $that->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(); $collection->expects($this->exactly(2)) ->method('update') ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { $data = $updateData; })); $this->storage->write('foo', 'bar'); $this->storage->write('foo', 'foobar'); $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)); $collection->expects($this->once()) ->method('remove') ->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)); $that = $this; $collection->expects($this->once()) ->method('remove') ->will($this->returnCallback(function ($criteria) use ($that) { $that->assertInstanceOf('MongoDate', $criteria[$that->options['expiry_field']]['$lt']); $that->assertGreaterThanOrEqual(time() - 1, $criteria[$that->options['expiry_field']]['$lt']->sec); })); $this->assertTrue($this->storage->gc(1)); } private function createMongoCollectionMock() { $collection = $this->getMockBuilder('MongoCollection') ->disableOriginalConstructor() ->getMock(); return $collection; } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php000066400000000000000000000050411266465517700342130ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testConstruct() { $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler(sys_get_temp_dir())); if (PHP_VERSION_ID < 50400) { $this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName()); $this->assertEquals('files', ini_get('session.save_handler')); } else { $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')); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php000066400000000000000000000023071266465517700334150ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; /** * Test class for NativeSessionHandler. * * @author Drak * * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ class NativeSessionHandlerTest extends \PHPUnit_Framework_TestCase { public function testConstruct() { $handler = new NativeSessionHandler(); // note for PHPUnit optimisers - the use of assertTrue/False // here is deliberate since the tests do not require the classes to exist - drak if (PHP_VERSION_ID < 50400) { $this->assertFalse($handler instanceof \SessionHandler); $this->assertTrue($handler instanceof NativeSessionHandler); } else { $this->assertTrue($handler instanceof \SessionHandler); $this->assertTrue($handler instanceof NativeSessionHandler); } } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php000066400000000000000000000032441266465517700331020ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php000066400000000000000000000264631266465517700327220ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; /** * @requires extension pdo_sqlite * @group time-sensitive */ class PdoSessionHandlerTest extends \PHPUnit_Framework_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() { $pdo = new MockPdo('pgsql'); $pdo->prepareResult = $this->getMock('PDOStatement'); $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() { $pdo = new MockPdo('pgsql'); $selectStmt = $this->getMock('PDOStatement'); $insertStmt = $this->getMock('PDOStatement'); $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() { } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php000066400000000000000000000055411266465517700342220ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler; /** * @author Adrien Brault */ class WriteCheckSessionHandlerTest extends \PHPUnit_Framework_TestCase { public function test() { $wrappedSessionHandlerMock = $this->getMock('SessionHandlerInterface'); $writeCheckSessionHandler = new WriteCheckSessionHandler($wrappedSessionHandlerMock); $wrappedSessionHandlerMock ->expects($this->once()) ->method('close') ->with() ->will($this->returnValue(true)) ; $this->assertTrue($writeCheckSessionHandler->close()); } public function testWrite() { $wrappedSessionHandlerMock = $this->getMock('SessionHandlerInterface'); $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->getMock('SessionHandlerInterface'); $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->getMock('SessionHandlerInterface'); $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')); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php000066400000000000000000000074461266465517700301130ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; /** * Test class for MetadataBag. * * @group time-sensitive */ class MetadataBagTest extends \PHPUnit_Framework_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]); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php000066400000000000000000000057251266465517700325400ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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(); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php000066400000000000000000000074221266465517700323350ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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; } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php000066400000000000000000000225201266465517700320660ustar00rootroot00000000000000 * * 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 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\NativeProxy; 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 \PHPUnit_Framework_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'); } 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 testSetSaveHandler53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $this->iniSet('session.save_handler', 'files'); $storage = $this->getStorage(); $storage->setSaveHandler(); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $storage->getSaveHandler()); $storage->setSaveHandler(null); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $storage->getSaveHandler()); $storage->setSaveHandler(new NativeSessionHandler()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $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()); $storage->setSaveHandler(new NativeProxy()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $storage->getSaveHandler()); } /** * @requires PHP 5.4 */ public function testSetSaveHandler54() { $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 testStartedOutside() { $storage = $this->getStorage(); $this->assertFalse($storage->getSaveHandler()->isActive()); $this->assertFalse($storage->isStarted()); session_start(); $this->assertTrue(isset($_SESSION)); if (PHP_VERSION_ID >= 50400) { // this only works in PHP >= 5.4 where session_status is available $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'); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php000066400000000000000000000072641266465517700325140ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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 testPhpSession53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $storage = $this->getStorage(); $this->assertFalse(isset($_SESSION)); $this->assertFalse($storage->getSaveHandler()->isActive()); session_start(); $this->assertTrue(isset($_SESSION)); // in PHP 5.3 we cannot reliably tell if a session has started $this->assertFalse($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])); } /** * @requires PHP 5.4 */ public function testPhpSession54() { $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'); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/000077500000000000000000000000001266465517700255165ustar00rootroot00000000000000src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php000066400000000000000000000113441266465517700316770ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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()); } public function testIsActivePhp53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $this->assertFalse($this->proxy->isActive()); } /** * @runInSeparateProcess * @preserveGlobalState disabled * @requires PHP 5.4 */ public function testIsActivePhp54() { $this->assertFalse($this->proxy->isActive()); session_start(); $this->assertTrue($this->proxy->isActive()); } public function testSetActivePhp53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $this->proxy->setActive(true); $this->assertTrue($this->proxy->isActive()); $this->proxy->setActive(false); $this->assertFalse($this->proxy->isActive()); } /** * @runInSeparateProcess * @preserveGlobalState disabled * @expectedException \LogicException * @requires PHP 5.4 */ public function testSetActivePhp54() { $this->proxy->setActive(true); } /** * @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()); } /** * @expectedException \LogicException */ public function testNameExceptionPhp53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $this->proxy->setActive(true); $this->proxy->setName('foo'); } /** * @runInSeparateProcess * @preserveGlobalState disabled * @expectedException \LogicException * @requires PHP 5.4 */ public function testNameExceptionPhp54() { 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()); } /** * @expectedException \LogicException */ public function testIdExceptionPhp53() { if (PHP_VERSION_ID >= 50400) { $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } $this->proxy->setActive(true); $this->proxy->setId('foo'); } /** * @runInSeparateProcess * @preserveGlobalState disabled * @expectedException \LogicException * @requires PHP 5.4 */ public function testIdExceptionPhp54() { session_start(); $this->proxy->setId('foo'); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php000066400000000000000000000015401266465517700313570ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; /** * Test class for NativeProxy. * * @author Drak */ class NativeProxyTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php000066400000000000000000000057461266465517700330660ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; /** * Tests for SessionHandlerProxy class. * * @author Drak * * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ class SessionHandlerProxyTest extends \PHPUnit_Framework_TestCase { /** * @var \PHPUnit_Framework_MockObject_Matcher */ private $mock; /** * @var SessionHandlerProxy */ private $proxy; protected function setUp() { $this->mock = $this->getMock('SessionHandlerInterface'); $this->proxy = new SessionHandlerProxy($this->mock); } protected function tearDown() { $this->mock = null; $this->proxy = null; } public function testOpen() { $this->mock->expects($this->once()) ->method('open') ->will($this->returnValue(true)); $this->assertFalse($this->proxy->isActive()); $this->proxy->open('name', 'id'); if (PHP_VERSION_ID < 50400) { $this->assertTrue($this->proxy->isActive()); } else { $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); } } src/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php000066400000000000000000000071561266465517700262130ustar00rootroot00000000000000 * * 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\StreamedResponse; class StreamedResponseTest extends \PHPUnit_Framework_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 testSetCallbackNonCallable() { $response = new StreamedResponse(null); $response->setCallback(null); } /** * @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()); } } src/Symfony/Component/HttpFoundation/composer.json000066400000000000000000000016011266465517700227640ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/expression-language": "~2.4" }, "autoload": { "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, "classmap": [ "Resources/stubs" ], "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/HttpFoundation/phpunit.xml.dist000066400000000000000000000015021266465517700234150ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/HttpKernel/000077500000000000000000000000001266465517700173565ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/.gitignore000066400000000000000000000001151266465517700213430ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml Tests/Fixtures/cache/ Tests/Fixtures/logs/ src/Symfony/Component/HttpKernel/Bundle/000077500000000000000000000000001266465517700205675ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Bundle/Bundle.php000066400000000000000000000137411266465517700225170ustar00rootroot00000000000000 * * 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\ContainerAware; 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 extends ContainerAware implements BundleInterface { protected $name; protected $extension; protected $path; /** * 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) { $class = $this->getContainerExtensionClass(); if (class_exists($class)) { $extension = new $class(); if (!$extension instanceof ExtensionInterface) { throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', $class)); } // 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() { $class = get_class($this); return substr($class, 0, strrpos($class, '\\')); } /** * 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) { return $this->name; } $name = get_class($this); $pos = strrpos($name, '\\'); return $this->name = false === $pos ? $name : substr($name, $pos + 1); } /** * 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'; } } src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php000066400000000000000000000041001266465517700243250ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/CHANGELOG.md000066400000000000000000000064731266465517700212010ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/HttpKernel/CacheClearer/000077500000000000000000000000001266465517700216575ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php000066400000000000000000000010651266465517700265140ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php000066400000000000000000000021651266465517700256400ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/CacheWarmer/000077500000000000000000000000001266465517700215375ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php000066400000000000000000000015451266465517700244360ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php000066400000000000000000000031131266465517700262360ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php000066400000000000000000000014641266465517700262570ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php000066400000000000000000000011061266465517700256210ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/Client.php000066400000000000000000000155501266465517700213130ustar00rootroot00000000000000 * * 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 */ 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); } /** * {@inheritdoc} * * @return Request|null A Request instance */ public function getRequest() { return parent::getRequest(); } /** * {@inheritdoc} * * @return Response|null A Response instance */ public function getResponse() { return parent::getResponse(); } /** * 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); } } src/Symfony/Component/HttpKernel/Config/000077500000000000000000000000001266465517700205635ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php000066400000000000000000000037231266465517700255650ustar00rootroot00000000000000 * * 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\ResourceInterface; /** * EnvParametersResource represents resources stored in prefixed environment variables. * * @author Chris Wilkinson */ class EnvParametersResource implements ResourceInterface, \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()); } /** * {@inheritdoc} */ 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; } } src/Symfony/Component/HttpKernel/Config/FileLocator.php000066400000000000000000000027171266465517700235060ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Controller/000077500000000000000000000000001266465517700215015ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Controller/ControllerReference.php000066400000000000000000000025021266465517700261530ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php000066400000000000000000000121361266465517700260620ustar00rootroot00000000000000 * * 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 ControllerResolverInterface { private $logger; /** * Constructor. * * @param LoggerInterface $logger A LoggerInterface instance */ public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; } /** * {@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('Controller "%s" for URI "%s" is not callable.', $controller, $request->getPathInfo())); } return $callable; } /** * {@inheritdoc} */ public function getArguments(Request $request, $controller) { 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()); } protected function doGetArguments(Request $request, $controller, array $parameters) { $attributes = $request->attributes->all(); $arguments = array(); foreach ($parameters as $param) { if (array_key_exists($param->name, $attributes)) { $arguments[] = $attributes[$param->name]; } elseif ($param->getClass() && $param->getClass()->isInstance($request)) { $arguments[] = $request; } elseif ($param->isDefaultValueAvailable()) { $arguments[] = $param->getDefaultValue(); } 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(); } } src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php000066400000000000000000000034761266465517700277120ustar00rootroot00000000000000 * * 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 */ public function getArguments(Request $request, $controller); } src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php000066400000000000000000000030141266465517700276600ustar00rootroot00000000000000 * * 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 { private $resolver; private $stopwatch; /** * Constructor. * * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance * @param Stopwatch $stopwatch A Stopwatch instance */ public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch) { $this->resolver = $resolver; $this->stopwatch = $stopwatch; } /** * {@inheritdoc} */ public function getController(Request $request) { $e = $this->stopwatch->start('controller.get_callable'); $ret = $this->resolver->getController($request); $e->stop(); return $ret; } /** * {@inheritdoc} */ public function getArguments(Request $request, $controller) { $e = $this->stopwatch->start('controller.get_arguments'); $ret = $this->resolver->getArguments($request, $controller); $e->stop(); return $ret; } } src/Symfony/Component/HttpKernel/DataCollector/000077500000000000000000000000001266465517700220765ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php000066400000000000000000000164011266465517700264570ustar00rootroot00000000000000 * * 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; private $cacheVersionInfo = true; /** * 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_name(), ); 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']; } public function setCacheVersionInfo($cacheVersionInfo) { $this->cacheVersionInfo = $cacheVersionInfo; } /** * 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; } } src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php000066400000000000000000000024671266465517700253400ustar00rootroot00000000000000 * * 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; /** * 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; public function serialize() { return serialize($this->data); } public function unserialize($data) { $this->data = unserialize($data); } /** * Converts a PHP variable to a string. * * @param mixed $var A PHP variable * * @return string The string representation of the variable */ protected function varToString($var) { if (null === $this->valueExporter) { $this->valueExporter = new ValueExporter(); } return $this->valueExporter->exportValue($var); } } src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php000066400000000000000000000017431266465517700271550ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php000066400000000000000000000257311266465517700261650ustar00rootroot00000000000000 * * 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_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS; if (PHP_VERSION_ID >= 50400) { $trace = debug_backtrace($trace, 7); } else { $trace = debug_backtrace($trace); } $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) { $info = $trace[$i]['object']; $name = $info->getTemplateName(); $src = method_exists($info, 'getSource') ? $info->getSource() : $info->getEnvironment()->getLoader()->getSource($name); $info = $info->getDebugInfo(); if (null !== $src && isset($info[$trace[$i - 1]['line']])) { $file = false; $line = $info[$trace[$i - 1]['line']]; $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); } 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:{}'; } $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); $this->dataCount = count($this->data); self::__construct($this->stopwatch); } 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); } else { throw new \InvalidArgumentException(sprintf('Invalid dump format: %s', $format)); } $dumps = array(); foreach ($this->data as $dump) { if (method_exists($dump['data'], 'withMaxDepth')) { $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); } else { // getLimitedClone is @deprecated, to be removed in 3.0 $dumper->dump($dump['data']->getLimitedClone($maxDepthLimit, $maxItemsPerDepth)); } rewind($data); $dump['data'] = stream_get_contents($data); 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); } 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 (PHP_VERSION_ID >= 50400 && $this->dumper instanceof CliDumper) { $contextDumper = function ($name, $file, $line, $fileLinkFormat) { if ($this instanceof HtmlDumper) { if ('' !== $file) { $s = $this->style('meta', '%s'); $name = strip_tags($this->style('', $name)); $file = strip_tags($this->style('', $file)); if ($fileLinkFormat) { $link = strtr(strip_tags($this->style('', $fileLinkFormat)), array('%f' => $file, '%l' => (int) $line)); $name = sprintf(''.$s.'', $link, $file, $name); } else { $name = sprintf(''.$s.'', $file, $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); } } src/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php000066400000000000000000000051741266465517700263400ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php000066400000000000000000000042201266465517700272040ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php000066400000000000000000000010061266465517700277530ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php000066400000000000000000000125421266465517700264730ustar00rootroot00000000000000 * * 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\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 called events. * * @return array An array of called events * * @see TraceableEventDispatcherInterface */ public function countErrors() { return isset($this->data['error_count']) ? $this->data['error_count'] : 0; } /** * 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 countDeprecations() { return isset($this->data['deprecation_count']) ? $this->data['deprecation_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) { $errorContextById = array(); $sanitizedLogs = array(); foreach ($logs as $log) { $context = $this->sanitizeContext($log['context']); if (isset($context['type'], $context['file'], $context['line'], $context['level'])) { $errorId = md5("{$context['type']}/{$context['line']}/{$context['file']}\x00{$log['message']}", true); $silenced = !($context['type'] & $context['level']); if (isset($errorContextById[$errorId])) { if (isset($errorContextById[$errorId]['errorCount'])) { ++$errorContextById[$errorId]['errorCount']; } else { $errorContextById[$errorId]['errorCount'] = 2; } if (!$silenced && isset($errorContextById[$errorId]['scream'])) { unset($errorContextById[$errorId]['scream']); $errorContextById[$errorId]['level'] = $context['level']; } continue; } $errorContextById[$errorId] = &$context; if ($silenced) { $context['scream'] = true; } $log['context'] = &$context; unset($context); } else { $log['context'] = $context; } $sanitizedLogs[] = $log; } return $sanitizedLogs; } private function sanitizeContext($context) { if (is_array($context)) { foreach ($context as $key => $value) { $context[$key] = $this->sanitizeContext($value); } return $context; } if (is_resource($context)) { return sprintf('Resource(%s)', get_resource_type($context)); } if (is_object($context)) { return sprintf('Object(%s)', get_class($context)); } return $context; } private function computeErrorsCount() { $count = array( 'error_count' => $this->logger->countErrors(), 'deprecation_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 (isset($log['context']['type'], $log['context']['level'])) { if (E_DEPRECATED === $log['context']['type'] || E_USER_DEPRECATED === $log['context']['type']) { ++$count['deprecation_count']; } elseif (!($log['context']['type'] & $log['context']['level'])) { ++$count['scream_count']; } } } ksort($count['priorities']); return $count; } } src/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php000066400000000000000000000044531266465517700265260ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php000066400000000000000000000254401266465517700267050ustar00rootroot00000000000000 * * 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\HeaderBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; 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 { protected $controllers; public function __construct() { $this->controllers = new \SplObjectStorage(); } /** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { $responseHeaders = $response->headers->all(); $cookies = array(); foreach ($response->headers->getCookies() as $cookie) { $cookies[] = $this->getCookieHeader($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); } if (count($cookies) > 0) { $responseHeaders['Set-Cookie'] = $cookies; } // attributes are serialized and as they can be anything, they need to be converted to strings. $attributes = array(); foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key && is_object($value)) { $attributes[$key] = $this->varToString($value->getPath()); } elseif ('_route_params' === $key) { // we need to keep route params as an array (see getRouteParams()) foreach ($value as $k => $v) { $value[$k] = $this->varToString($v); } $attributes[$key] = $value; } else { $attributes[$key] = $this->varToString($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(); $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( '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, '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'] = '******'; } if (isset($this->controllers[$request])) { $controller = $this->controllers[$request]; if (is_array($controller)) { try { $r = new \ReflectionMethod($controller[0], $controller[1]); $this->data['controller'] = 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 $this->data['controller'] = array( 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => 'n/a', 'line' => 'n/a', ); } } } elseif ($controller instanceof \Closure) { $r = new \ReflectionFunction($controller); $this->data['controller'] = array( 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), ); } elseif (is_object($controller)) { $r = new \ReflectionClass($controller); $this->data['controller'] = array( 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), ); } else { $this->data['controller'] = (string) $controller ?: 'n/a'; } unset($this->controllers[$request]); } } 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 HeaderBag($this->data['request_headers']); } public function getRequestServer() { return new ParameterBag($this->data['request_server']); } public function getRequestCookies() { return new ParameterBag($this->data['request_cookies']); } public function getRequestAttributes() { return new ParameterBag($this->data['request_attributes']); } public function getResponseHeaders() { return new ResponseHeaderBag($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 isset($this->data['request_attributes']['_route']) ? $this->data['request_attributes']['_route'] : ''; } /** * Gets the route parameters. * * The _route_params request attributes is automatically set by the RouterListener. * * @return array The parameters */ public function getRouteParams() { return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params'] : array(); } /** * Gets the controller. * * @return string The controller as a string */ public function getController() { return $this->data['controller']; } public function onKernelController(FilterControllerEvent $event) { $this->controllers[$event->getRequest()] = $event->getController(); } public static function getSubscribedEvents() { return array(KernelEvents::CONTROLLER => 'onKernelController'); } /** * {@inheritdoc} */ public function getName() { return 'request'; } private function getCookieHeader($name, $value, $expires, $path, $domain, $secure, $httponly) { $cookie = sprintf('%s=%s', $name, urlencode($value)); if (0 !== $expires) { if (is_numeric($expires)) { $expires = (int) $expires; } elseif ($expires instanceof \DateTime) { $expires = $expires->getTimestamp(); } else { $tmp = strtotime($expires); if (false === $tmp || -1 == $tmp) { throw new \InvalidArgumentException(sprintf('The "expires" cookie parameter is not valid (%s).', $expires)); } $expires = $tmp; } $cookie .= '; expires='.str_replace('+0000', '', \DateTime::createFromFormat('U', $expires, new \DateTimeZone('GMT'))->format('D, d-M-Y H:i:s T')); } if ($domain) { $cookie .= '; domain='.$domain; } $cookie .= '; path='.$path; if ($secure) { $cookie .= '; secure'; } if ($httponly) { $cookie .= '; httponly'; } return $cookie; } } src/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php000066400000000000000000000045441266465517700265370ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php000066400000000000000000000062211266465517700261470ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/DataCollector/Util/000077500000000000000000000000001266465517700230135ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php000066400000000000000000000046061266465517700263370ustar00rootroot00000000000000 * * 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; /** * @author Bernhard Schussek */ 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 (is_object($value)) { if ($value instanceof \DateTime || $value instanceof \DateTimeInterface) { return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ISO8601)); } return sprintf('Object(%s)', get_class($value)); } if ($value instanceof \__PHP_Incomplete_Class) { return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($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)); } return sprintf('[%s]', implode(', ', $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']; } } src/Symfony/Component/HttpKernel/Debug/000077500000000000000000000000001266465517700204045ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php000066400000000000000000000014231266465517700235040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Debug; @trigger_error('The '.__NAMESPACE__.'\ErrorHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ErrorHandler class instead.', E_USER_DEPRECATED); use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; /** * ErrorHandler. * * @author Fabien Potencier * * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class ErrorHandler extends DebugErrorHandler { } src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php000066400000000000000000000015321266465517700243520ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Debug; @trigger_error('The '.__NAMESPACE__.'\ExceptionHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ExceptionHandler class instead.', E_USER_DEPRECATED); use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler; /** * ExceptionHandler converts an exception to a Response object. * * @author Fabien Potencier * * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class ExceptionHandler extends DebugExceptionHandler { } src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php000066400000000000000000000071121266465517700260110ustar00rootroot00000000000000 * * 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\Profiler\Profiler; 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 { /** * Sets the profiler. * * The traceable event dispatcher does not use the profiler anymore. * The job is now done directly by the Profiler listener and the * data collectors themselves. * * @param Profiler|null $profiler A Profiler instance * * @deprecated since version 2.4, to be removed in 3.0. */ public function setProfiler(Profiler $profiler = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); } /** * {@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: $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; } } } src/Symfony/Component/HttpKernel/DependencyInjection/000077500000000000000000000000001266465517700232775ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php000066400000000000000000000023331266465517700300750ustar00rootroot00000000000000 * * 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\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(); foreach ($container->getExtensions() as $extension) { if ($extension instanceof Extension) { $classes = array_merge($classes, $extension->getClassesToCompile()); } } $this->kernel->setClassCache(array_unique($container->getParameterBag()->resolveValue($classes))); } } src/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php000066400000000000000000000025421266465517700303100ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php000066400000000000000000000057561266465517700307300ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Scope; /** * Adds a managed request scope. * * @author Fabien Potencier * @author Johannes M. Schmitt * * @deprecated since version 2.7, to be removed in 3.0. */ class ContainerAwareHttpKernel extends HttpKernel { protected $container; /** * Constructor. * * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance * @param ContainerInterface $container A ContainerInterface instance * @param ControllerResolverInterface $controllerResolver A ControllerResolverInterface instance * @param RequestStack $requestStack A stack for master/sub requests * @param bool $triggerDeprecation Whether or not to trigger the deprecation warning for the ContainerAwareHttpKernel */ public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controllerResolver, RequestStack $requestStack = null, $triggerDeprecation = true) { parent::__construct($dispatcher, $controllerResolver, $requestStack); if ($triggerDeprecation) { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpKernel class instead.', E_USER_DEPRECATED); } $this->container = $container; // the request scope might have been created before (see FrameworkBundle) if (!$container->hasScope('request')) { $container->addScope(new Scope('request')); } } /** * {@inheritdoc} */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { $this->container->enterScope('request'); $this->container->set('request', $request, 'request'); try { $response = parent::handle($request, $type, $catch); } catch (\Exception $e) { $this->container->set('request', null, 'request'); $this->container->leaveScope('request'); throw $e; } $this->container->set('request', null, 'request'); $this->container->leaveScope('request'); return $response; } } src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php000066400000000000000000000017441266465517700257720ustar00rootroot00000000000000 * * 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(); /** * Gets the classes to cache. * * @return array An array of classes */ public function getClassesToCompile() { return $this->classes; } /** * Adds classes to the class cache. * * @param array $classes An array of classes */ public function addClassesToCompile(array $classes) { $this->classes = array_merge($this->classes, $classes); } } src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php000066400000000000000000000055321266465517700300760ustar00rootroot00000000000000 * * 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\Reference; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * 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)); } $refClass = new \ReflectionClass($container->getParameterBag()->resolveValue($def->getClass())); $interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'; if (!$refClass->implementsInterface($interface)) { throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); } foreach ($tags as $tag) { if (!isset($tag['alias'])) { @trigger_error(sprintf('Service "%s" will have to define the "alias" attribute on the "%s" tag as of Symfony 3.0.', $id, $this->rendererTag), E_USER_DEPRECATED); // register the handler as a non-lazy-loaded one $definition->addMethodCall('addRenderer', array(new Reference($id))); } else { $definition->addMethodCall('addRendererService', array($tag['alias'], $id)); } } } } } src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php000066400000000000000000000030611266465517700312070ustar00rootroot00000000000000 * * 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(); public function __construct(ContainerInterface $container, $debug = false, RequestStack $requestStack = null) { $this->container = $container; parent::__construct(array(), $debug, $requestStack); } /** * Adds a service as a fragment renderer. * * @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); } } src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php000066400000000000000000000021461266465517700323260ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php000066400000000000000000000016721266465517700303220ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\DependencyInjection; @trigger_error('The '.__NAMESPACE__.'\RegisterListenersPass is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead.', E_USER_DEPRECATED); use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass; /** * Compiler pass to register tagged services for an event dispatcher. * * @deprecated since version 2.5, to be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead. */ class RegisterListenersPass extends BaseRegisterListenersPass { } src/Symfony/Component/HttpKernel/Event/000077500000000000000000000000001266465517700204375ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php000066400000000000000000000045751266465517700254560ustar00rootroot00000000000000 * * 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, $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 * * @throws \LogicException */ public function setController($controller) { // controller must be a callable if (!is_callable($controller)) { throw new \LogicException(sprintf('The controller must be a callable (%s given).', $this->varToString($controller))); } $this->controller = $controller; } 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; } } src/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php000066400000000000000000000026331266465517700251220ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php000066400000000000000000000006771266465517700247550ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php000066400000000000000000000025201266465517700244070ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php000066400000000000000000000030741266465517700303260ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php000066400000000000000000000032551266465517700267430ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Event/KernelEvent.php000066400000000000000000000042201266465517700233700ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Event/PostResponseEvent.php000066400000000000000000000030571266465517700246230ustar00rootroot00000000000000 * * 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\EventDispatcher\Event; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * Allows to execute logic after a response was sent. * * @author Jordi Boggiano */ class PostResponseEvent extends Event { /** * The kernel in which this event was thrown. * * @var HttpKernelInterface */ private $kernel; private $request; private $response; public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) { $this->kernel = $kernel; $this->request = $request; $this->response = $response; } /** * Returns the kernel in which this event was thrown. * * @return HttpKernelInterface */ public function getKernel() { return $this->kernel; } /** * Returns the request for which this event was thrown. * * @return Request */ public function getRequest() { return $this->request; } /** * Returns the response for which this event was thrown. * * @return Response */ public function getResponse() { return $this->response; } } src/Symfony/Component/HttpKernel/EventListener/000077500000000000000000000000001266465517700221455ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php000066400000000000000000000024341266465517700277640ustar00rootroot00000000000000 * * 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 => 'onKernelRequest'); } } src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php000066400000000000000000000127271266465517700271040ustar00rootroot00000000000000 * * 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 $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 $fileLinkFormat The format for links to source files */ public function __construct($exceptionHandler, LoggerInterface $logger = null, $levels = null, $throwAt = -1, $scream = true, $fileLinkFormat = null) { $this->exceptionHandler = $exceptionHandler; $this->logger = $logger; $this->levels = $levels; $this->throwAt = is_numeric($throwAt) ? (int) $throwAt : (null === $throwAt ? null : ($throwAt ? -1 : null)); $this->scream = (bool) $scream; $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); } /** * 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)) { $scream = 0; foreach ($this->levels as $type => $log) { $scream |= $type; } } else { $scream = null === $this->levels ? E_ALL | E_STRICT : $this->levels; } if ($this->scream) { $handler->screamAt($scream); } $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 (defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { $events[ConsoleEvents::COMMAND] = array('configure', 2048); } return $events; } } src/Symfony/Component/HttpKernel/EventListener/DumpListener.php000066400000000000000000000027331266465517700252760ustar00rootroot00000000000000 * * 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\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() { // Register early to have a working dump() as early as possible return array(KernelEvents::REQUEST => array('configure', 1024)); } } src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php000066400000000000000000000031021266465517700267740ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\EventListener; @trigger_error('The '.__NAMESPACE__.'\ErrorsLoggerListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\DebugHandlersListener class instead.', E_USER_DEPRECATED); use Psr\Log\LoggerInterface; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; /** * Injects the logger into the ErrorHandler, so that it can log various errors. * * @author Colin Frei * @author Konstantin Myakshin * * @deprecated since version 2.6, to be removed in 3.0. Use the DebugHandlersListener class instead. */ class ErrorsLoggerListener implements EventSubscriberInterface { private $channel; private $logger; public function __construct($channel, LoggerInterface $logger = null) { $this->channel = $channel; $this->logger = $logger; } public function injectLogger() { if (null !== $this->logger) { ErrorHandler::setLogger($this->logger, $this->channel); $this->logger = null; } } public static function getSubscribedEvents() { return array(KernelEvents::REQUEST => array('injectLogger', 2048)); } } src/Symfony/Component/HttpKernel/EventListener/EsiListener.php000066400000000000000000000014531266465517700251070ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\EventListener; @trigger_error('The '.__NAMESPACE__.'\EsiListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\SurrogateListener class instead.', E_USER_DEPRECATED); /** * EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI. * * @author Fabien Potencier * * @deprecated since version 2.6, to be removed in 3.0. Use SurrogateListener instead */ class EsiListener extends SurrogateListener { } src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php000066400000000000000000000100441266465517700263210ustar00rootroot00000000000000 * * 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()), false); $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, // keep for BC -- as $format can be an argument of the controller callable // see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php // @deprecated since version 2.4, to be removed in 3.0 'format' => $request->getRequestFormat(), ); $request = $request->duplicate(null, null, $attributes); $request->setMethod('GET'); return $request; } } src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php000066400000000000000000000066321266465517700261360ustar00rootroot00000000000000 * * 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 ($request->attributes->has('_controller') || $this->fragmentPath !== rawurldecode($request->getPathInfo())) { 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()) { 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(); } /** * @deprecated since version 2.3.19, to be removed in 3.0. * * @return string[] */ protected function getLocalIpAddresses() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3.19 and will be removed in 3.0.', E_USER_DEPRECATED); return array('127.0.0.1', 'fe80::1', '::1'); } public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => array(array('onKernelRequest', 48)), ); } } src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php000066400000000000000000000067121266465517700255710ustar00rootroot00000000000000 * * 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. * * This listener works in 2 modes: * * * 2.3 compatibility mode where you must call setRequest whenever the Request changes. * * 2.4+ mode where you must pass a RequestStack instance in the constructor. * * @author Fabien Potencier */ class LocaleListener implements EventSubscriberInterface { private $router; private $defaultLocale; private $requestStack; /** * RequestStack will become required in 3.0. */ public function __construct($defaultLocale = 'en', RequestContextAwareInterface $router = null, RequestStack $requestStack = null) { $this->defaultLocale = $defaultLocale; $this->requestStack = $requestStack; $this->router = $router; } /** * Sets the current Request. * * This method was used to synchronize the Request, but as the HttpKernel * is doing that automatically now, you should never call it directly. * It is kept public for BC with the 2.3 version. * * @param Request|null $request A Request instance * * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); if (null === $request) { return; } $this->setLocale($request); $this->setRouterContext($request); } 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 === $this->requestStack) { return; // removed when requestStack is required } 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)), ); } } src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php000066400000000000000000000137261266465517700261570ustar00rootroot00000000000000 * * 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\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 $requests = array(); protected $profiles; protected $requestStack; protected $parents; /** * Constructor. * * @param Profiler $profiler A Profiler 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 * @param RequestStack|null $requestStack A RequestStack instance */ public function __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null) { if (null === $requestStack) { // Prevent the deprecation notice to be triggered all the time. // The onKernelRequest() method fires some logic only when the // RequestStack instance is not provided as a dependency. @trigger_error('Since version 2.4, the '.__METHOD__.' method must accept a RequestStack instance to get the request instead of using the '.__CLASS__.'::onKernelRequest method that will be removed in 3.0.', E_USER_DEPRECATED); } $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(); } /** * @deprecated since version 2.4, to be removed in 3.0. */ public function onKernelRequest(GetResponseEvent $event) { if (null === $this->requestStack) { $this->requests[] = $event->getRequest(); } } /** * 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; if (null !== $this->requestStack) { $this->parents[$request] = $this->requestStack->getParentRequest(); } elseif (!$master) { // to be removed when requestStack is required array_pop($this->requests); $this->parents[$request] = end($this->requests); } } 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(); $this->requests = array(); } public static function getSubscribedEvents() { return array( // kernel.request must be registered as early as possible to not break // when an exception is thrown in any other kernel.request listener KernelEvents::REQUEST => array('onKernelRequest', 1024), KernelEvents::RESPONSE => array('onKernelResponse', -100), KernelEvents::EXCEPTION => 'onKernelException', KernelEvents::TERMINATE => array('onKernelTerminate', -1024), ); } } src/Symfony/Component/HttpKernel/EventListener/ResponseListener.php000066400000000000000000000025711266465517700261670ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/HttpKernel/EventListener/RouterListener.php000066400000000000000000000157201266465517700256510ustar00rootroot00000000000000 * * 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. * * This listener works in 2 modes: * * * 2.3 compatibility mode where you must call setRequest whenever the Request changes. * * 2.4+ mode where you must pass a RequestStack instance in the constructor. * * @author Fabien Potencier */ class RouterListener implements EventSubscriberInterface { private $matcher; private $context; private $logger; private $request; private $requestStack; /** * Constructor. * * RequestStack will become required in 3.0. * * @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher * @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface) * @param LoggerInterface|null $logger The logger * @param RequestStack|null $requestStack A RequestStack instance * * @throws \InvalidArgumentException */ public function __construct($matcher, RequestContext $context = null, LoggerInterface $logger = null, RequestStack $requestStack = 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.'); } if (!$requestStack instanceof RequestStack) { @trigger_error('The '.__METHOD__.' method now requires a RequestStack instance as '.__CLASS__.'::setRequest method will not be supported anymore in 3.0.', E_USER_DEPRECATED); } $this->matcher = $matcher; $this->context = $context ?: $matcher->getContext(); $this->requestStack = $requestStack; $this->logger = $logger; } /** * Sets the current Request. * * This method was used to synchronize the Request, but as the HttpKernel * is doing that automatically now, you should never call it directly. * It is kept public for BC with the 2.3 version. * * @param Request|null $request A Request instance * * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be made private in 3.0.', E_USER_DEPRECATED); $this->setCurrentRequest($request); } private function setCurrentRequest(Request $request = null) { if (null !== $request && $this->request !== $request) { $this->context->fromRequest($request); } $this->request = $request; } public function onKernelFinishRequest(FinishRequestEvent $event) { if (null === $this->requestStack) { return; // removed when requestStack is required } $this->setCurrentRequest($this->requestStack->getParentRequest()); } public function onKernelRequest(GetResponseEvent $event) { $request = $event->getRequest(); // initialize the context that is also used by the generator (assuming matcher and generator share the same context instance) // we call setCurrentRequest even if most of the time, it has already been done to keep compatibility // with frameworks which do not use the Symfony service container // when we have a RequestStack, no need to do it if (null !== $this->requestStack) { $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(sprintf('Matched route "%s".', isset($parameters['_route']) ? $parameters['_route'] : 'n/a'), array( 'route_parameters' => $parameters, 'request_uri' => $request->getUri(), )); } $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)), ); } } src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php000066400000000000000000000053211266465517700266270ustar00rootroot00000000000000 * * 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)), ); } } src/Symfony/Component/HttpKernel/EventListener/SessionListener.php000066400000000000000000000025141266465517700260110ustar00rootroot00000000000000 * * 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\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(); } src/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php000066400000000000000000000024441266465517700276530ustar00rootroot00000000000000 * * 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), ); } } src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php000066400000000000000000000030221266465517700263340ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php000066400000000000000000000047001266465517700266500ustar00rootroot00000000000000 * * 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\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(); } src/Symfony/Component/HttpKernel/EventListener/TranslatorListener.php000066400000000000000000000040061266465517700265150ustar00rootroot00000000000000 * * 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()); } } } src/Symfony/Component/HttpKernel/Exception/000077500000000000000000000000001266465517700213145ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php000066400000000000000000000015651266465517700270650ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php000066400000000000000000000014741266465517700266110ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php000066400000000000000000000014701266465517700263070ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php000066400000000000000000000014161266465517700257470ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Exception; @trigger_error('The '.__NAMESPACE__.'\FatalErrorException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\Exception\FatalErrorException class instead.', E_USER_DEPRECATED); /* * Fatal Error Exception. * * @author Konstanton Myakshin * * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class_exists('Symfony\Component\Debug\Exception\FatalErrorException'); src/Symfony/Component/HttpKernel/Exception/FlattenException.php000066400000000000000000000015601266465517700253030ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Exception; @trigger_error('The '.__NAMESPACE__.'\FlattenException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\Exception\FlattenException class instead.', E_USER_DEPRECATED); /* * FlattenException wraps a PHP Exception to be able to serialize it. * * Basically, this class removes all objects from the trace. * * @author Fabien Potencier * * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class_exists('Symfony\Component\Debug\Exception\FlattenException'); src/Symfony/Component/HttpKernel/Exception/GoneHttpException.php000066400000000000000000000014601266465517700254350ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/HttpException.php000066400000000000000000000016411266465517700246250ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php000066400000000000000000000012631266465517700264460ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php000066400000000000000000000015041266465517700274660ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php000066400000000000000000000017421266465517700277610ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php000066400000000000000000000015021266465517700272460ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php000066400000000000000000000014771266465517700263110ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php000066400000000000000000000015141266465517700303070ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php000066400000000000000000000015761266465517700307130ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php000066400000000000000000000021241266465517700303070ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php000066400000000000000000000021741266465517700276720ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php000066400000000000000000000017231266465517700272300ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php000066400000000000000000000015271266465517700305530ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php000066400000000000000000000015201266465517700306740ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/HttpKernel/Fragment/000077500000000000000000000000001266465517700211215ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php000066400000000000000000000065241266465517700304530ustar00rootroot00000000000000 * * 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)) { 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())); } } src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php000066400000000000000000000010631266465517700255250ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php000066400000000000000000000120131266465517700246700ustar00rootroot00000000000000 * * 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\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. * * This listener works in 2 modes: * * * 2.3 compatibility mode where you must call setRequest whenever the Request changes. * * 2.4+ mode where you must pass a RequestStack instance in the constructor. * * @author Fabien Potencier * * @see FragmentRendererInterface */ class FragmentHandler { private $debug; private $renderers = array(); private $request; private $requestStack; /** * Constructor. * * RequestStack will become required in 3.0. * * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances * @param bool $debug Whether the debug mode is enabled or not * @param RequestStack|null $requestStack The Request stack that controls the lifecycle of requests */ public function __construct(array $renderers = array(), $debug = false, RequestStack $requestStack = null) { $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; } /** * Sets the current Request. * * This method was used to synchronize the Request, but as the HttpKernel * is doing that automatically now, you should never call it directly. * It is kept public for BC with the 2.3 version. * * @param Request|null $request A Request instance * * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); $this->request = $request; } /** * 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->getRequest()) { 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->getRequest()->getUri(), $response->getStatusCode())); } if (!$response instanceof StreamedResponse) { return $response->getContent(); } $response->sendContent(); } private function getRequest() { return $this->requestStack ? $this->requestStack->getCurrentRequest() : $this->request; } } src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php000066400000000000000000000022361266465517700267100ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php000066400000000000000000000127501266465517700265050ustar00rootroot00000000000000 * * 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) { if (PHP_VERSION_ID >= 50400) { $flags = ENT_QUOTES | ENT_SUBSTITUTE; } else { $flags = ENT_QUOTES; } 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) { return $loader->exists($template); } try { $loader->getSource($template); return true; } catch (\Twig_Error_Loader $e) { } return false; } /** * {@inheritdoc} */ public function getName() { return 'hinclude'; } } src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php000066400000000000000000000124001266465517700262200ustar00rootroot00000000000000 * * 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'; $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'; } } src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php000066400000000000000000000060571266465517700265720ustar00rootroot00000000000000 * * 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)); } } } } src/Symfony/Component/HttpKernel/Fragment/SsiFragmentRenderer.php000066400000000000000000000010631266465517700255430ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/HttpKernel/HttpCache/000077500000000000000000000000001266465517700212215ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/HttpCache/Esi.php000066400000000000000000000240321266465517700224530ustar00rootroot00000000000000 * * 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; /** * 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 implements SurrogateInterface { private $contentTypes; private $phpEscapeMap = array( array('', '', '', ''), ); /** * Constructor. * * @param array $contentTypes An array of content-type that should be parsed for ESI 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; } public function getName() { return 'esi'; } /** * Returns a new cache strategy instance. * * @return ResponseCacheStrategyInterface A ResponseCacheStrategyInterface instance */ public function createCacheStrategy() { return new ResponseCacheStrategy(); } /** * Checks that at least one surrogate has ESI/1.0 capability. * * @param Request $request A Request instance * * @return bool true if one surrogate has ESI/1.0 capability, false otherwise */ public function hasSurrogateCapability(Request $request) { if (null === $value = $request->headers->get('Surrogate-Capability')) { return false; } return false !== strpos($value, 'ESI/1.0'); } /** * Checks that at least one surrogate has ESI/1.0 capability. * * @param Request $request A Request instance * * @return bool true if one surrogate has ESI/1.0 capability, false otherwise * * @deprecated since version 2.6, to be removed in 3.0. Use hasSurrogateCapability() instead */ public function hasSurrogateEsiCapability(Request $request) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasSurrogateCapability() method instead.', E_USER_DEPRECATED); return $this->hasSurrogateCapability($request); } /** * Adds ESI/1.0 capability to the given Request. * * @param Request $request A Request instance */ public function addSurrogateCapability(Request $request) { $current = $request->headers->get('Surrogate-Capability'); $new = 'symfony2="ESI/1.0"'; $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); } /** * Adds ESI/1.0 capability to the given Request. * * @param Request $request A Request instance * * @deprecated since version 2.6, to be removed in 3.0. Use addSurrogateCapability() instead */ public function addSurrogateEsiCapability(Request $request) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addSurrogateCapability() method instead.', E_USER_DEPRECATED); $this->addSurrogateCapability($request); } /** * Adds HTTP headers to specify that the Response needs to be parsed for ESI. * * This method only adds an ESI HTTP header if the Response has some ESI tags. * * @param Response $response A Response instance */ public function addSurrogateControl(Response $response) { if (false !== strpos($response->getContent(), 'headers->set('Surrogate-Control', 'content="ESI/1.0"'); } } /** * Checks that the Response needs to be parsed for ESI tags. * * @param Response $response A Response instance * * @return bool true if the Response needs to be parsed, false otherwise */ public function needsParsing(Response $response) { if (!$control = $response->headers->get('Surrogate-Control')) { return false; } return (bool) preg_match('#content="[^"]*ESI/1.0[^"]*"#', $control); } /** * Checks that the Response needs to be parsed for ESI tags. * * @param Response $response A Response instance * * @return bool true if the Response needs to be parsed, false otherwise * * @deprecated since version 2.6, to be removed in 3.0. Use needsParsing() instead */ public function needsEsiParsing(Response $response) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the needsParsing() method instead.', E_USER_DEPRECATED); return $this->needsParsing($response); } /** * Renders an ESI 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 = '') { $html = sprintf('', $uri, $ignoreErrors ? ' onerror="continue"' : '', $alt ? sprintf(' alt="%s"', $alt) : '' ); if (!empty($comment)) { return sprintf("\n%s", $comment, $html); } return $html; } /** * Replaces a Response ESI 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) { $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 if ($response->headers->has('Surrogate-Control')) { $value = $response->headers->get('Surrogate-Control'); if ('content="ESI/1.0"' == $value) { $response->headers->remove('Surrogate-Control'); } elseif (preg_match('#,\s*content="ESI/1.0"#', $value)) { $response->headers->set('Surrogate-Control', preg_replace('#,\s*content="ESI/1.0"#', '', $value)); } elseif (preg_match('#content="ESI/1.0",\s*#', $value)) { $response->headers->set('Surrogate-Control', preg_replace('#content="ESI/1.0",\s*#', '', $value)); } } } /** * Handles an ESI 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) { $subRequest = Request::create($uri, '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; } } } } src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php000066400000000000000000000023611266465517700266420ustar00rootroot00000000000000 * * 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; @trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategy class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategy class instead.', E_USER_DEPRECATED); /** * EsiResponseCacheStrategy knows how to compute the Response cache HTTP header * based on the different ESI response cache headers. * * This implementation changes the master response TTL to the smallest TTL received * or force validation if one of the ESI has validation cache strategy. * * @author Fabien Potencier * * @deprecated since version 2.6, to be removed in 3.0. Use ResponseCacheStrategy instead */ class EsiResponseCacheStrategy extends ResponseCacheStrategy implements EsiResponseCacheStrategyInterface { } src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php000066400000000000000000000015521266465517700304640ustar00rootroot00000000000000 * * 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; /** * ResponseCacheStrategyInterface implementations know how to compute the * Response cache HTTP header based on the different response cache headers. * * @author Fabien Potencier * * @deprecated since version 2.6, to be removed in 3.0. Use ResponseCacheStrategyInterface instead. */ interface EsiResponseCacheStrategyInterface extends ResponseCacheStrategyInterface { } src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php000066400000000000000000000576761266465517700236220ustar00rootroot00000000000000 * * 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. * * @throws \LogicException * * @return SurrogateInterface A Surrogate instance */ public function getSurrogate() { if (!$this->surrogate instanceof Esi) { throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate'); } return $this->surrogate; } /** * Gets the Esi instance. * * @throws \LogicException * * @return Esi An Esi instance * * @deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead */ public function getEsi() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getSurrogate() method instead.', E_USER_DEPRECATED); return $this->getSurrogate(); } /** * {@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()) { $response = $this->invalidate($request, $catch); } elseif ($request->headers->has('expect')) { $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 $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 $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) { 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; } } src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php000066400000000000000000000047441266465517700262100ustar00rootroot00000000000000 * * 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(); /** * {@inheritdoc} */ public function add(Response $response) { if ($response->isValidateable()) { $this->cacheable = false; } else { $this->ttls[] = $response->getTtl(); $this->maxAges[] = $response->getMaxAge(); } ++$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 (null !== $maxAge = min($this->maxAges)) { $response->setSharedMaxAge($maxAge); $response->headers->set('Age', $maxAge - min($this->ttls)); } $response->setMaxAge(0); } } src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php000066400000000000000000000020711266465517700300200ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/HttpCache/Ssi.php000066400000000000000000000136521266465517700224770ustar00rootroot00000000000000 * * 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; /** * Ssi implements the SSI capabilities to Request and Response instances. * * @author Sebastian Krebs */ class Ssi implements SurrogateInterface { private $contentTypes; private $phpEscapeMap = array( array('', '', '', ''), ); /** * Constructor. * * @param array $contentTypes An array of content-type that should be parsed for SSI 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; } /** * {@inheritdoc} */ public function getName() { return 'ssi'; } /** * {@inheritdoc} */ 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, 'SSI/1.0'); } /** * {@inheritdoc} */ public function addSurrogateCapability(Request $request) { $current = $request->headers->get('Surrogate-Capability'); $new = 'symfony2="SSI/1.0"'; $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); } /** * {@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 if ($response->headers->has('Surrogate-Control')) { $value = $response->headers->get('Surrogate-Control'); if ('content="SSI/1.0"' == $value) { $response->headers->remove('Surrogate-Control'); } elseif (preg_match('#,\s*content="SSI/1.0"#', $value)) { $response->headers->set('Surrogate-Control', preg_replace('#,\s*content="SSI/1.0"#', '', $value)); } elseif (preg_match('#content="SSI/1.0",\s*#', $value)) { $response->headers->set('Surrogate-Control', preg_replace('#content="SSI/1.0",\s*#', '', $value)); } } } /** * {@inheritdoc} */ public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors) { $subRequest = Request::create($uri, '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; } } } } src/Symfony/Component/HttpKernel/HttpCache/Store.php000066400000000000000000000312301266465517700230250ustar00rootroot00000000000000 * * 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 (!is_dir($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) { if (file_exists($lock)) { @unlink($lock); } } $error = error_get_last(); if (1 === $error['type'] && false === headers_sent()) { // send a 503 header('HTTP/1.0 503 Service Unavailable'); header('Retry-After: 10'); echo '503 Service Unavailable'; } } /** * 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) { $path = $this->getPath($this->getCacheKey($request).'.lck'); if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { return false; } $lock = @fopen($path, 'x'); if (false !== $lock) { fclose($lock); $this->locks[] = $path; return true; } return !file_exists($path) ?: $path; } /** * 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) { $file = $this->getPath($this->getCacheKey($request).'.lck'); return is_file($file) ? @unlink($file) : false; } public function isLocked(Request $request) { $path = $this->getPath($this->getCacheKey($request).'.lck'); clearstatcache(true, $path); return is_file($path); } /** * 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 (is_file($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 (false === $entries = $this->load($key)) { return array(); } return unserialize($entries); } /** * 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) { if (is_file($path = $this->getPath($this->getCacheKey(Request::create($url))))) { 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 is_file($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 (!is_dir(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); } } src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php000066400000000000000000000051261266465517700246530ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php000066400000000000000000000057071266465517700255370ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/HttpKernel.php000066400000000000000000000230031266465517700221450ustar00rootroot00000000000000 * * 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\ControllerResolverInterface; 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\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; /** * Constructor. * * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance * @param RequestStack $requestStack A stack for master/sub requests */ public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null) { $this->dispatcher = $dispatcher; $this->resolver = $resolver; $this->requestStack = $requestStack ?: new RequestStack(); } /** * {@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 (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->resolver->getArguments($request, $controller); // 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; } } src/Symfony/Component/HttpKernel/HttpKernelInterface.php000066400000000000000000000024441266465517700237740ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/Kernel.php000066400000000000000000000563501266465517700213200ustar00rootroot00000000000000 * * 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\ParameterBag\ParameterBag; 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\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 = '2.7.10'; const VERSION_ID = 20710; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; const RELEASE_VERSION = 10; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; /** * 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); } $defClass = new \ReflectionMethod($this, 'init'); $defClass = $defClass->getDeclaringClass()->name; if (__CLASS__ !== $defClass) { @trigger_error(sprintf('Calling the %s::init() method is deprecated since version 2.3 and will be removed in 3.0. Move your logic to the constructor method instead.', $defClass), E_USER_DEPRECATED); $this->init(); } } /** * @deprecated since version 2.3, to be removed in 3.0. Move your logic in the constructor instead. */ public function init() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Move your logic to the constructor method instead.', E_USER_DEPRECATED); } 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} * * @deprecated since version 2.6, to be removed in 3.0. */ public function isClassInActiveBundle($class) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in version 3.0.', E_USER_DEPRECATED); foreach ($this->getBundles() as $bundle) { if (0 === strpos($class, $bundle->getNamespace())) { return true; } } return false; } /** * {@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)); } 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); } /** * Used internally. */ public function setClassCache(array $classes) { file_put_contents($this->getCacheDir().'/classes.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 $bundle) { $this->bundleMap[$bundle] = $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(); foreach ($this->bundles as $name => $bundle) { $bundles[$name] = get_class($bundle); } 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.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(new ParameterBag($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())); if (!$this->debug) { $content = static::stripComments($content); } $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 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); } } src/Symfony/Component/HttpKernel/KernelEvents.php000066400000000000000000000062141266465517700224770ustar00rootroot00000000000000 * * 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. The event listener method * receives a Symfony\Component\HttpKernel\Event\GetResponseEvent * instance. * * @Event * * @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. The event listener method receives * a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent * instance. * * @Event * * @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. The event listener method receives a * Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent * instance. * * @Event * * @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. The event listener method receives a * Symfony\Component\HttpKernel\Event\FilterControllerEvent instance. * * @Event * * @var string */ const CONTROLLER = 'kernel.controller'; /** * 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. The event listener method receives a * Symfony\Component\HttpKernel\Event\FilterResponseEvent instance. * * @Event * * @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. * The event listener method receives a * Symfony\Component\HttpKernel\Event\PostResponseEvent instance. * * @Event * * @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. * * @var string */ const FINISH_REQUEST = 'kernel.finish_request'; } src/Symfony/Component/HttpKernel/KernelInterface.php000066400000000000000000000113451266465517700231340ustar00rootroot00000000000000 * * 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(); /** * Checks if a given class name belongs to an active bundle. * * @param string $class A class name * * @return bool true if the class belongs to an active bundle, false otherwise * * @deprecated since version 2.6, to be removed in 3.0. */ public function isClassInActiveBundle($class); /** * 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(); } src/Symfony/Component/HttpKernel/LICENSE000066400000000000000000000020511266465517700203610ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/HttpKernel/Log/000077500000000000000000000000001266465517700200775ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php000066400000000000000000000015271266465517700246240ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/Log/LoggerInterface.php000066400000000000000000000023751266465517700236570ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Log; use Psr\Log\LoggerInterface as PsrLogger; /** * LoggerInterface. * * @author Fabien Potencier * * @deprecated since version 2.2, to be removed in 3.0. Type-hint \Psr\Log\LoggerInterface instead. */ interface LoggerInterface extends PsrLogger { /** * @deprecated since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. */ public function emerg($message, array $context = array()); /** * @deprecated since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. */ public function crit($message, array $context = array()); /** * @deprecated since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. */ public function err($message, array $context = array()); /** * @deprecated since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. */ public function warn($message, array $context = array()); } src/Symfony/Component/HttpKernel/Log/NullLogger.php000066400000000000000000000034241266465517700226650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Log; @trigger_error('The '.__NAMESPACE__.'\NullLogger class is deprecated since version 2.2 and will be removed in 3.0. Use the Psr\Log\NullLogger class instead from the psr/log Composer package.', E_USER_DEPRECATED); use Psr\Log\NullLogger as PsrNullLogger; /** * NullLogger. * * @author Fabien Potencier */ class NullLogger extends PsrNullLogger implements LoggerInterface { public function emerg($message, array $context = array()) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } public function crit($message, array $context = array()) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } public function err($message, array $context = array()) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } public function warn($message, array $context = array()) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } } src/Symfony/Component/HttpKernel/Profiler/000077500000000000000000000000001266465517700211405ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php000066400000000000000000000172301266465517700272010ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * Base Memcache storage for profiling information in a Memcache. * * @author Andrej Hudec */ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface { const TOKEN_PREFIX = 'sf_profiler_'; protected $dsn; protected $lifetime; /** * Constructor. * * @param string $dsn A data source name * @param string $username * @param string $password * @param int $lifetime The lifetime to use for the purge */ public function __construct($dsn, $username = '', $password = '', $lifetime = 86400) { $this->dsn = $dsn; $this->lifetime = (int) $lifetime; } /** * {@inheritdoc} */ public function find($ip, $url, $limit, $method, $start = null, $end = null) { $indexName = $this->getIndexName(); $indexContent = $this->getValue($indexName); if (!$indexContent) { return array(); } $profileList = explode("\n", $indexContent); $result = array(); foreach ($profileList as $item) { if ($limit === 0) { break; } if ($item == '') { continue; } $values = explode("\t", $item, 7); list($itemToken, $itemIp, $itemMethod, $itemUrl, $itemTime, $itemParent) = $values; $statusCode = isset($values[6]) ? $values[6] : null; $itemTime = (int) $itemTime; if ($ip && false === strpos($itemIp, $ip) || $url && false === strpos($itemUrl, $url) || $method && false === strpos($itemMethod, $method)) { continue; } if (!empty($start) && $itemTime < $start) { continue; } if (!empty($end) && $itemTime > $end) { continue; } $result[$itemToken] = array( 'token' => $itemToken, 'ip' => $itemIp, 'method' => $itemMethod, 'url' => $itemUrl, 'time' => $itemTime, 'parent' => $itemParent, 'status_code' => $statusCode, ); --$limit; } usort($result, function ($a, $b) { if ($a['time'] === $b['time']) { return 0; } return $a['time'] > $b['time'] ? -1 : 1; }); return $result; } /** * {@inheritdoc} */ public function purge() { // delete only items from index $indexName = $this->getIndexName(); $indexContent = $this->getValue($indexName); if (!$indexContent) { return false; } $profileList = explode("\n", $indexContent); foreach ($profileList as $item) { if ($item == '') { continue; } if (false !== $pos = strpos($item, "\t")) { $this->delete($this->getItemName(substr($item, 0, $pos))); } } return $this->delete($indexName); } /** * {@inheritdoc} */ public function read($token) { if (empty($token)) { return false; } $profile = $this->getValue($this->getItemName($token)); if (false !== $profile) { $profile = $this->createProfileFromData($token, $profile); } return $profile; } /** * {@inheritdoc} */ public function write(Profile $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(), ); $profileIndexed = false !== $this->getValue($this->getItemName($profile->getToken())); if ($this->setValue($this->getItemName($profile->getToken()), $data, $this->lifetime)) { if (!$profileIndexed) { // Add to index $indexName = $this->getIndexName(); $indexRow = implode("\t", array( $profile->getToken(), $profile->getIp(), $profile->getMethod(), $profile->getUrl(), $profile->getTime(), $profile->getParentToken(), $profile->getStatusCode(), ))."\n"; return $this->appendValue($indexName, $indexRow, $this->lifetime); } return true; } return false; } /** * Retrieve item from the memcache server. * * @param string $key * * @return mixed */ abstract protected function getValue($key); /** * Store an item on the memcache server under the specified key. * * @param string $key * @param mixed $value * @param int $expiration * * @return bool */ abstract protected function setValue($key, $value, $expiration = 0); /** * Delete item from the memcache server. * * @param string $key * * @return bool */ abstract protected function delete($key); /** * Append data to an existing item on the memcache server. * * @param string $key * @param string $value * @param int $expiration * * @return bool */ abstract protected function appendValue($key, $value, $expiration = 0); private 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->setCollectors($data['data']); if (!$parent && $data['parent']) { $parent = $this->read($data['parent']); } if ($parent) { $profile->setParent($parent); } foreach ($data['children'] as $token) { if (!$token) { continue; } if (!$childProfileData = $this->getValue($this->getItemName($token))) { continue; } $profile->addChild($this->createProfileFromData($token, $childProfileData, $profile)); } return $profile; } /** * Get item name. * * @param string $token * * @return string */ private function getItemName($token) { $name = self::TOKEN_PREFIX.$token; if ($this->isItemNameValid($name)) { return $name; } return false; } /** * Get name of index. * * @return string */ private function getIndexName() { $name = self::TOKEN_PREFIX.'index'; if ($this->isItemNameValid($name)) { return $name; } return false; } private function isItemNameValid($name) { $length = strlen($name); if ($length > 250) { throw new \RuntimeException(sprintf('The memcache item key "%s" is too long (%s bytes). Allowed maximum size is 250 bytes.', $name, $length)); } return true; } } src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php000066400000000000000000000175541266465517700255740ustar00rootroot00000000000000 * * 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) { $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) = $values; $csvStatusCode = isset($values[6]) ? $values[6] : null; $csvTime = (int) $csvTime; if ($ip && false === strpos($csvIp, $ip) || $url && false === strpos($csvUrl, $url) || $method && false === strpos($csvMethod, $method)) { 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(), ); 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->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; } } src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php000066400000000000000000000050641266465517700264100ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * Memcache Profiler Storage. * * @author Andrej Hudec */ class MemcacheProfilerStorage extends BaseMemcacheProfilerStorage { /** * @var \Memcache */ private $memcache; /** * Internal convenience method that returns the instance of the Memcache. * * @return \Memcache * * @throws \RuntimeException */ protected function getMemcache() { if (null === $this->memcache) { if (!preg_match('#^memcache://(?(?=\[.*\])\[(.*)\]|(.*)):(.*)$#', $this->dsn, $matches)) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Memcache with an invalid dsn "%s". The expected format is "memcache://[host]:port".', $this->dsn)); } $host = $matches[1] ?: $matches[2]; $port = $matches[3]; $memcache = new \Memcache(); $memcache->addserver($host, $port); $this->memcache = $memcache; } return $this->memcache; } /** * Set instance of the Memcache. * * @param \Memcache $memcache */ public function setMemcache($memcache) { $this->memcache = $memcache; } /** * {@inheritdoc} */ protected function getValue($key) { return $this->getMemcache()->get($key); } /** * {@inheritdoc} */ protected function setValue($key, $value, $expiration = 0) { return $this->getMemcache()->set($key, $value, false, time() + $expiration); } /** * {@inheritdoc} */ protected function delete($key) { return $this->getMemcache()->delete($key); } /** * {@inheritdoc} */ protected function appendValue($key, $value, $expiration = 0) { $memcache = $this->getMemcache(); if (method_exists($memcache, 'append')) { // Memcache v3.0 if (!$result = $memcache->append($key, $value, false, $expiration)) { return $memcache->set($key, $value, false, $expiration); } return $result; } // simulate append in Memcache <3.0 $content = $memcache->get($key); return $memcache->set($key, $content.$value, false, $expiration); } } src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php000066400000000000000000000046461266465517700265610ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * Memcached Profiler Storage. * * @author Andrej Hudec */ class MemcachedProfilerStorage extends BaseMemcacheProfilerStorage { /** * @var \Memcached */ private $memcached; /** * Internal convenience method that returns the instance of the Memcached. * * @return \Memcached * * @throws \RuntimeException */ protected function getMemcached() { if (null === $this->memcached) { if (!preg_match('#^memcached://(?(?=\[.*\])\[(.*)\]|(.*)):(.*)$#', $this->dsn, $matches)) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Memcached with an invalid dsn "%s". The expected format is "memcached://[host]:port".', $this->dsn)); } $host = $matches[1] ?: $matches[2]; $port = $matches[3]; $memcached = new \Memcached(); // disable compression to allow appending $memcached->setOption(\Memcached::OPT_COMPRESSION, false); $memcached->addServer($host, $port); $this->memcached = $memcached; } return $this->memcached; } /** * Set instance of the Memcached. * * @param \Memcached $memcached */ public function setMemcached($memcached) { $this->memcached = $memcached; } /** * {@inheritdoc} */ protected function getValue($key) { return $this->getMemcached()->get($key); } /** * {@inheritdoc} */ protected function setValue($key, $value, $expiration = 0) { return $this->getMemcached()->set($key, $value, time() + $expiration); } /** * {@inheritdoc} */ protected function delete($key) { return $this->getMemcached()->delete($key); } /** * {@inheritdoc} */ protected function appendValue($key, $value, $expiration = 0) { $memcached = $this->getMemcached(); if (!$result = $memcached->append($key, $value)) { return $memcached->set($key, $value, $expiration); } return $result; } } src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php000066400000000000000000000160061266465517700262310ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; class MongoDbProfilerStorage implements ProfilerStorageInterface { protected $dsn; protected $lifetime; private $mongo; /** * Constructor. * * @param string $dsn A data source name * @param string $username Not used * @param string $password Not used * @param int $lifetime The lifetime to use for the purge */ public function __construct($dsn, $username = '', $password = '', $lifetime = 86400) { $this->dsn = $dsn; $this->lifetime = (int) $lifetime; } /** * {@inheritdoc} */ public function find($ip, $url, $limit, $method, $start = null, $end = null) { $cursor = $this->getMongo()->find($this->buildQuery($ip, $url, $method, $start, $end), array('_id', 'parent', 'ip', 'method', 'url', 'time', 'status_code'))->sort(array('time' => -1))->limit($limit); $tokens = array(); foreach ($cursor as $profile) { $tokens[] = $this->getData($profile); } return $tokens; } /** * {@inheritdoc} */ public function purge() { $this->getMongo()->remove(array()); } /** * {@inheritdoc} */ public function read($token) { $profile = $this->getMongo()->findOne(array('_id' => $token, 'data' => array('$exists' => true))); if (null !== $profile) { $profile = $this->createProfileFromData($this->getData($profile)); } return $profile; } /** * {@inheritdoc} */ public function write(Profile $profile) { $this->cleanup(); $record = array( '_id' => $profile->getToken(), 'parent' => $profile->getParentToken(), 'data' => base64_encode(serialize($profile->getCollectors())), 'ip' => $profile->getIp(), 'method' => $profile->getMethod(), 'url' => $profile->getUrl(), 'time' => $profile->getTime(), 'status_code' => $profile->getStatusCode(), ); $result = $this->getMongo()->update(array('_id' => $profile->getToken()), array_filter($record, function ($v) { return !empty($v); }), array('upsert' => true)); return (bool) (isset($result['ok']) ? $result['ok'] : $result); } /** * Internal convenience method that returns the instance of the MongoDB Collection. * * @return \MongoCollection * * @throws \RuntimeException */ protected function getMongo() { if (null !== $this->mongo) { return $this->mongo; } if (!$parsedDsn = $this->parseDsn($this->dsn)) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use MongoDB with an invalid dsn "%s". The expected format is "mongodb://[user:pass@]host/database/collection"', $this->dsn)); } list($server, $database, $collection) = $parsedDsn; $mongoClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? '\Mongo' : '\MongoClient'; $mongo = new $mongoClass($server); return $this->mongo = $mongo->selectCollection($database, $collection); } /** * @param array $data * * @return Profile */ protected function createProfileFromData(array $data) { $profile = $this->getProfile($data); if ($data['parent']) { $parent = $this->getMongo()->findOne(array('_id' => $data['parent'], 'data' => array('$exists' => true))); if ($parent) { $profile->setParent($this->getProfile($this->getData($parent))); } } $profile->setChildren($this->readChildren($data['token'])); return $profile; } /** * @param string $token * * @return Profile[] An array of Profile instances */ protected function readChildren($token) { $profiles = array(); $cursor = $this->getMongo()->find(array('parent' => $token, 'data' => array('$exists' => true))); foreach ($cursor as $d) { $profiles[] = $this->getProfile($this->getData($d)); } return $profiles; } protected function cleanup() { $this->getMongo()->remove(array('time' => array('$lt' => time() - $this->lifetime))); } /** * @param string $ip * @param string $url * @param string $method * @param int $start * @param int $end * * @return array */ private function buildQuery($ip, $url, $method, $start, $end) { $query = array(); if (!empty($ip)) { $query['ip'] = $ip; } if (!empty($url)) { $query['url'] = $url; } if (!empty($method)) { $query['method'] = $method; } if (!empty($start) || !empty($end)) { $query['time'] = array(); } if (!empty($start)) { $query['time']['$gte'] = $start; } if (!empty($end)) { $query['time']['$lte'] = $end; } return $query; } /** * @param array $data * * @return array */ private function getData(array $data) { return array( 'token' => $data['_id'], 'parent' => isset($data['parent']) ? $data['parent'] : null, 'ip' => isset($data['ip']) ? $data['ip'] : null, 'method' => isset($data['method']) ? $data['method'] : null, 'url' => isset($data['url']) ? $data['url'] : null, 'time' => isset($data['time']) ? $data['time'] : null, 'data' => isset($data['data']) ? $data['data'] : null, 'status_code' => isset($data['status_code']) ? $data['status_code'] : null, ); } /** * @param array $data * * @return Profile */ private function getProfile(array $data) { $profile = new Profile($data['token']); $profile->setIp($data['ip']); $profile->setMethod($data['method']); $profile->setUrl($data['url']); $profile->setTime($data['time']); $profile->setCollectors(unserialize(base64_decode($data['data']))); return $profile; } /** * @param string $dsn * * @return null|array Array($server, $database, $collection) */ private function parseDsn($dsn) { if (!preg_match('#^(mongodb://.*)/(.*)/(.*)$#', $dsn, $matches)) { return; } $server = $matches[1]; $database = $matches[2]; $collection = $matches[3]; preg_match('#^mongodb://(([^:]+):?(.*)(?=@))?@?([^/]*)(.*)$#', $server, $matchesServer); if ('' == $matchesServer[5] && '' != $matches[2]) { $server .= '/'.$matches[2]; } return array($server, $database, $collection); } } src/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php000066400000000000000000000045701266465517700260140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * A ProfilerStorage for Mysql. * * @author Jan Schumann */ class MysqlProfilerStorage extends PdoProfilerStorage { /** * {@inheritdoc} */ protected function initDb() { if (null === $this->db) { if (0 !== strpos($this->dsn, 'mysql')) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Mysql with an invalid dsn "%s". The expected format is "mysql:dbname=database_name;host=host_name".', $this->dsn)); } if (!class_exists('PDO') || !in_array('mysql', \PDO::getAvailableDrivers(), true)) { throw new \RuntimeException('You need to enable PDO_Mysql extension for the profiler to run properly.'); } $db = new \PDO($this->dsn, $this->username, $this->password); $db->exec('CREATE TABLE IF NOT EXISTS sf_profiler_data (token VARCHAR(255) PRIMARY KEY, data LONGTEXT, ip VARCHAR(64), method VARCHAR(6), url VARCHAR(255), time INTEGER UNSIGNED, parent VARCHAR(255), created_at INTEGER UNSIGNED, status_code SMALLINT UNSIGNED, KEY (created_at), KEY (ip), KEY (method), KEY (url), KEY (parent))'); $this->db = $db; } return $this->db; } /** * {@inheritdoc} */ protected function buildCriteria($ip, $url, $start, $end, $limit, $method) { $criteria = array(); $args = array(); if ($ip = preg_replace('/[^\d\.]/', '', $ip)) { $criteria[] = 'ip LIKE :ip'; $args[':ip'] = '%'.$ip.'%'; } if ($url) { $criteria[] = 'url LIKE :url'; $args[':url'] = '%'.addcslashes($url, '%_\\').'%'; } if ($method) { $criteria[] = 'method = :method'; $args[':method'] = $method; } if (!empty($start)) { $criteria[] = 'time >= :start'; $args[':start'] = $start; } if (!empty($end)) { $criteria[] = 'time <= :end'; $args[':end'] = $end; } return array($criteria, $args); } } src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php000066400000000000000000000172631266465517700254340ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * Base PDO storage for profiling information in a PDO database. * * @author Fabien Potencier * @author Jan Schumann */ abstract class PdoProfilerStorage implements ProfilerStorageInterface { protected $dsn; protected $username; protected $password; protected $lifetime; protected $db; /** * Constructor. * * @param string $dsn A data source name * @param string $username The username for the database * @param string $password The password for the database * @param int $lifetime The lifetime to use for the purge */ public function __construct($dsn, $username = '', $password = '', $lifetime = 86400) { $this->dsn = $dsn; $this->username = $username; $this->password = $password; $this->lifetime = (int) $lifetime; } /** * {@inheritdoc} */ public function find($ip, $url, $limit, $method, $start = null, $end = null) { if (null === $start) { $start = 0; } if (null === $end) { $end = time(); } list($criteria, $args) = $this->buildCriteria($ip, $url, $start, $end, $limit, $method); $criteria = $criteria ? 'WHERE '.implode(' AND ', $criteria) : ''; $db = $this->initDb(); $tokens = $this->fetch($db, 'SELECT token, ip, method, url, time, parent, status_code FROM sf_profiler_data '.$criteria.' ORDER BY time DESC LIMIT '.((int) $limit), $args); $this->close($db); return $tokens; } /** * {@inheritdoc} */ public function read($token) { $db = $this->initDb(); $args = array(':token' => $token); $data = $this->fetch($db, 'SELECT data, parent, ip, method, url, time FROM sf_profiler_data WHERE token = :token LIMIT 1', $args); $this->close($db); if (isset($data[0]['data'])) { return $this->createProfileFromData($token, $data[0]); } } /** * {@inheritdoc} */ public function write(Profile $profile) { $db = $this->initDb(); $args = array( ':token' => $profile->getToken(), ':parent' => $profile->getParentToken(), ':data' => base64_encode(serialize($profile->getCollectors())), ':ip' => $profile->getIp(), ':method' => $profile->getMethod(), ':url' => $profile->getUrl(), ':time' => $profile->getTime(), ':created_at' => time(), ':status_code' => $profile->getStatusCode(), ); try { if ($this->has($profile->getToken())) { $this->exec($db, 'UPDATE sf_profiler_data SET parent = :parent, data = :data, ip = :ip, method = :method, url = :url, time = :time, created_at = :created_at, status_code = :status_code WHERE token = :token', $args); } else { $this->exec($db, 'INSERT INTO sf_profiler_data (token, parent, data, ip, method, url, time, created_at, status_code) VALUES (:token, :parent, :data, :ip, :method, :url, :time, :created_at, :status_code)', $args); } $this->cleanup(); $status = true; } catch (\Exception $e) { $status = false; } $this->close($db); return $status; } /** * {@inheritdoc} */ public function purge() { $db = $this->initDb(); $this->exec($db, 'DELETE FROM sf_profiler_data'); $this->close($db); } /** * Build SQL criteria to fetch records by ip and url. * * @param string $ip The IP * @param string $url The URL * @param string $start The start period to search from * @param string $end The end period to search to * @param string $limit The maximum number of tokens to return * @param string $method The request method * * @return array An array with (criteria, args) */ abstract protected function buildCriteria($ip, $url, $start, $end, $limit, $method); /** * Initializes the database. * * @throws \RuntimeException When the requested database driver is not installed */ abstract protected function initDb(); protected function cleanup() { $db = $this->initDb(); $this->exec($db, 'DELETE FROM sf_profiler_data WHERE created_at < :time', array(':time' => time() - $this->lifetime)); $this->close($db); } protected function exec($db, $query, array $args = array()) { $stmt = $this->prepareStatement($db, $query); foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \PDO::PARAM_INT : \PDO::PARAM_STR); } $success = $stmt->execute(); if (!$success) { throw new \RuntimeException(sprintf('Error executing query "%s"', $query)); } } protected function prepareStatement($db, $query) { try { $stmt = $db->prepare($query); } catch (\Exception $e) { $stmt = false; } if (false === $stmt) { throw new \RuntimeException('The database cannot successfully prepare the statement'); } return $stmt; } protected function fetch($db, $query, array $args = array()) { $stmt = $this->prepareStatement($db, $query); foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \PDO::PARAM_INT : \PDO::PARAM_STR); } $stmt->execute(); return $stmt->fetchAll(\PDO::FETCH_ASSOC); } protected function close($db) { } 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->setCollectors(unserialize(base64_decode($data['data']))); if (!$parent && !empty($data['parent'])) { $parent = $this->read($data['parent']); } if ($parent) { $profile->setParent($parent); } $profile->setChildren($this->readChildren($token, $profile)); return $profile; } /** * Reads the child profiles for the given token. * * @param string $token The parent token * @param string $parent The parent instance * * @return Profile[] An array of Profile instance */ protected function readChildren($token, $parent) { $db = $this->initDb(); $data = $this->fetch($db, 'SELECT token, data, ip, method, url, time FROM sf_profiler_data WHERE parent = :token', array(':token' => $token)); $this->close($db); if (!$data) { return array(); } $profiles = array(); foreach ($data as $d) { $profiles[] = $this->createProfileFromData($d['token'], $d, $parent); } return $profiles; } /** * Returns whether data for the given token already exists in storage. * * @param string $token The profile token * * @return string */ protected function has($token) { $db = $this->initDb(); $tokenExists = $this->fetch($db, 'SELECT 1 FROM sf_profiler_data WHERE token = :token LIMIT 1', array(':token' => $token)); $this->close($db); return !empty($tokenExists); } } src/Symfony/Component/HttpKernel/Profiler/Profile.php000066400000000000000000000127321266465517700232560ustar00rootroot00000000000000 * * 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 The parent Profile */ public function setParent(Profile $parent) { $this->parent = $parent; } /** * Returns the parent profile. * * @return Profile The parent profile */ 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 Profile[] An array of Profile */ public function getChildren() { return $this->children; } /** * Sets children profiler. * * @param Profile[] $children An array of Profile */ public function setChildren(array $children) { $this->children = array(); foreach ($children as $child) { $this->addChild($child); } } /** * Adds the child token. * * @param Profile $child The child Profile */ 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'); } } src/Symfony/Component/HttpKernel/Profiler/Profiler.php000066400000000000000000000165721266465517700234460ustar00rootroot00000000000000 * * 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\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 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(); } /** * Exports the current profiler data. * * @param Profile $profile A Profile instance * * @return string The exported data */ public function export(Profile $profile) { return base64_encode(serialize($profile)); } /** * Imports data into the profiler storage. * * @param string $data A data string as exported by the export() method * * @return Profile A Profile instance */ public function import($data) { $profile = unserialize(base64_decode($data)); if ($this->storage->read($profile->getToken())) { return false; } $this->saveProfile($profile); return $profile; } /** * 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 * * @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) { return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end)); } /** * 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->setIp($request->getClientIp()); $profile->setMethod($request->getMethod()); $profile->setStatusCode($response->getStatusCode()); $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(); } } src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php000066400000000000000000000027511266465517700266060ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php000066400000000000000000000241231266465517700257510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * RedisProfilerStorage stores profiling information in Redis. * * @author Andrej Hudec * @author Stephane PY */ class RedisProfilerStorage implements ProfilerStorageInterface { const TOKEN_PREFIX = 'sf_profiler_'; const REDIS_OPT_SERIALIZER = 1; const REDIS_OPT_PREFIX = 2; const REDIS_SERIALIZER_NONE = 0; const REDIS_SERIALIZER_PHP = 1; protected $dsn; protected $lifetime; /** * @var \Redis */ private $redis; /** * Constructor. * * @param string $dsn A data source name * @param string $username Not used * @param string $password Not used * @param int $lifetime The lifetime to use for the purge */ public function __construct($dsn, $username = '', $password = '', $lifetime = 86400) { $this->dsn = $dsn; $this->lifetime = (int) $lifetime; } /** * {@inheritdoc} */ public function find($ip, $url, $limit, $method, $start = null, $end = null) { $indexName = $this->getIndexName(); if (!$indexContent = $this->getValue($indexName, self::REDIS_SERIALIZER_NONE)) { return array(); } $profileList = array_reverse(explode("\n", $indexContent)); $result = array(); foreach ($profileList as $item) { if ($limit === 0) { break; } if ($item == '') { continue; } $values = explode("\t", $item, 7); list($itemToken, $itemIp, $itemMethod, $itemUrl, $itemTime, $itemParent) = $values; $statusCode = isset($values[6]) ? $values[6] : null; $itemTime = (int) $itemTime; if ($ip && false === strpos($itemIp, $ip) || $url && false === strpos($itemUrl, $url) || $method && false === strpos($itemMethod, $method)) { continue; } if (!empty($start) && $itemTime < $start) { continue; } if (!empty($end) && $itemTime > $end) { continue; } $result[] = array( 'token' => $itemToken, 'ip' => $itemIp, 'method' => $itemMethod, 'url' => $itemUrl, 'time' => $itemTime, 'parent' => $itemParent, 'status_code' => $statusCode, ); --$limit; } return $result; } /** * {@inheritdoc} */ public function purge() { // delete only items from index $indexName = $this->getIndexName(); $indexContent = $this->getValue($indexName, self::REDIS_SERIALIZER_NONE); if (!$indexContent) { return false; } $profileList = explode("\n", $indexContent); $result = array(); foreach ($profileList as $item) { if ($item == '') { continue; } if (false !== $pos = strpos($item, "\t")) { $result[] = $this->getItemName(substr($item, 0, $pos)); } } $result[] = $indexName; return $this->delete($result); } /** * {@inheritdoc} */ public function read($token) { if (empty($token)) { return false; } $profile = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP); if (false !== $profile) { $profile = $this->createProfileFromData($token, $profile); } return $profile; } /** * {@inheritdoc} */ public function write(Profile $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(), ); $profileIndexed = false !== $this->getValue($this->getItemName($profile->getToken())); if ($this->setValue($this->getItemName($profile->getToken()), $data, $this->lifetime, self::REDIS_SERIALIZER_PHP)) { if (!$profileIndexed) { // Add to index $indexName = $this->getIndexName(); $indexRow = implode("\t", array( $profile->getToken(), $profile->getIp(), $profile->getMethod(), $profile->getUrl(), $profile->getTime(), $profile->getParentToken(), $profile->getStatusCode(), ))."\n"; return $this->appendValue($indexName, $indexRow, $this->lifetime); } return true; } return false; } /** * Internal convenience method that returns the instance of Redis. * * @return \Redis * * @throws \RuntimeException */ protected function getRedis() { if (null === $this->redis) { $data = parse_url($this->dsn); if (false === $data || !isset($data['scheme']) || $data['scheme'] !== 'redis' || !isset($data['host']) || !isset($data['port'])) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Redis with an invalid dsn "%s". The minimal expected format is "redis://[host]:port".', $this->dsn)); } if (!extension_loaded('redis')) { throw new \RuntimeException('RedisProfilerStorage requires that the redis extension is loaded.'); } $redis = new \Redis(); $redis->connect($data['host'], $data['port']); if (isset($data['path'])) { $redis->select(substr($data['path'], 1)); } if (isset($data['pass'])) { $redis->auth($data['pass']); } $redis->setOption(self::REDIS_OPT_PREFIX, self::TOKEN_PREFIX); $this->redis = $redis; } return $this->redis; } /** * Set instance of the Redis. * * @param \Redis $redis */ public function setRedis($redis) { $this->redis = $redis; } private 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->setCollectors($data['data']); if (!$parent && $data['parent']) { $parent = $this->read($data['parent']); } if ($parent) { $profile->setParent($parent); } foreach ($data['children'] as $token) { if (!$token) { continue; } if (!$childProfileData = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP)) { continue; } $profile->addChild($this->createProfileFromData($token, $childProfileData, $profile)); } return $profile; } /** * Gets the item name. * * @param string $token * * @return string */ private function getItemName($token) { $name = $token; if ($this->isItemNameValid($name)) { return $name; } return false; } /** * Gets the name of the index. * * @return string */ private function getIndexName() { $name = 'index'; if ($this->isItemNameValid($name)) { return $name; } return false; } private function isItemNameValid($name) { $length = strlen($name); if ($length > 2147483648) { throw new \RuntimeException(sprintf('The Redis item key "%s" is too long (%s bytes). Allowed maximum size is 2^31 bytes.', $name, $length)); } return true; } /** * Retrieves an item from the Redis server. * * @param string $key * @param int $serializer * * @return mixed */ private function getValue($key, $serializer = self::REDIS_SERIALIZER_NONE) { $redis = $this->getRedis(); $redis->setOption(self::REDIS_OPT_SERIALIZER, $serializer); return $redis->get($key); } /** * Stores an item on the Redis server under the specified key. * * @param string $key * @param mixed $value * @param int $expiration * @param int $serializer * * @return bool */ private function setValue($key, $value, $expiration = 0, $serializer = self::REDIS_SERIALIZER_NONE) { $redis = $this->getRedis(); $redis->setOption(self::REDIS_OPT_SERIALIZER, $serializer); return $redis->setex($key, $expiration, $value); } /** * Appends data to an existing item on the Redis server. * * @param string $key * @param string $value * @param int $expiration * * @return bool */ private function appendValue($key, $value, $expiration = 0) { $redis = $this->getRedis(); $redis->setOption(self::REDIS_OPT_SERIALIZER, self::REDIS_SERIALIZER_NONE); if ($redis->exists($key)) { $redis->append($key, $value); return $redis->setTimeout($key, $expiration); } return $redis->setex($key, $expiration, $value); } /** * Removes the specified keys. * * @param array $keys * * @return bool */ private function delete(array $keys) { return (bool) $this->getRedis()->delete($keys); } } src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php000066400000000000000000000114011266465517700261370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; /** * SqliteProfilerStorage stores profiling information in a SQLite database. * * @author Fabien Potencier */ class SqliteProfilerStorage extends PdoProfilerStorage { /** * @throws \RuntimeException When neither of SQLite3 or PDO_SQLite extension is enabled */ protected function initDb() { if (null === $this->db || $this->db instanceof \SQLite3) { if (0 !== strpos($this->dsn, 'sqlite')) { throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Sqlite with an invalid dsn "%s". The expected format is "sqlite:/path/to/the/db/file".', $this->dsn)); } if (class_exists('SQLite3')) { $db = new \SQLite3(substr($this->dsn, 7, strlen($this->dsn)), \SQLITE3_OPEN_READWRITE | \SQLITE3_OPEN_CREATE); if (method_exists($db, 'busyTimeout')) { // busyTimeout only exists for PHP >= 5.3.3 $db->busyTimeout(1000); } } elseif (class_exists('PDO') && in_array('sqlite', \PDO::getAvailableDrivers(), true)) { $db = new \PDO($this->dsn); } else { throw new \RuntimeException('You need to enable either the SQLite3 or PDO_SQLite extension for the profiler to run properly.'); } $db->exec('PRAGMA temp_store=MEMORY; PRAGMA journal_mode=MEMORY;'); $db->exec('CREATE TABLE IF NOT EXISTS sf_profiler_data (token STRING, data STRING, ip STRING, method STRING, url STRING, time INTEGER, parent STRING, created_at INTEGER, status_code INTEGER)'); $db->exec('CREATE INDEX IF NOT EXISTS data_created_at ON sf_profiler_data (created_at)'); $db->exec('CREATE INDEX IF NOT EXISTS data_ip ON sf_profiler_data (ip)'); $db->exec('CREATE INDEX IF NOT EXISTS data_method ON sf_profiler_data (method)'); $db->exec('CREATE INDEX IF NOT EXISTS data_url ON sf_profiler_data (url)'); $db->exec('CREATE INDEX IF NOT EXISTS data_parent ON sf_profiler_data (parent)'); $db->exec('CREATE UNIQUE INDEX IF NOT EXISTS data_token ON sf_profiler_data (token)'); $this->db = $db; } return $this->db; } protected function exec($db, $query, array $args = array()) { if ($db instanceof \SQLite3) { $stmt = $this->prepareStatement($db, $query); foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT); } $res = $stmt->execute(); if (false === $res) { throw new \RuntimeException(sprintf('Error executing SQLite query "%s"', $query)); } $res->finalize(); } else { parent::exec($db, $query, $args); } } protected function fetch($db, $query, array $args = array()) { $return = array(); if ($db instanceof \SQLite3) { $stmt = $this->prepareStatement($db, $query); foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT); } $res = $stmt->execute(); while ($row = $res->fetchArray(\SQLITE3_ASSOC)) { $return[] = $row; } $res->finalize(); $stmt->close(); } else { $return = parent::fetch($db, $query, $args); } return $return; } /** * {@inheritdoc} */ protected function buildCriteria($ip, $url, $start, $end, $limit, $method) { $criteria = array(); $args = array(); if ($ip = preg_replace('/[^\d\.]/', '', $ip)) { $criteria[] = 'ip LIKE :ip'; $args[':ip'] = '%'.$ip.'%'; } if ($url) { $criteria[] = 'url LIKE :url ESCAPE "\"'; $args[':url'] = '%'.addcslashes($url, '%_\\').'%'; } if ($method) { $criteria[] = 'method = :method'; $args[':method'] = $method; } if (!empty($start)) { $criteria[] = 'time >= :start'; $args[':start'] = $start; } if (!empty($end)) { $criteria[] = 'time <= :end'; $args[':end'] = $end; } return array($criteria, $args); } protected function close($db) { if ($db instanceof \SQLite3) { $db->close(); } } } src/Symfony/Component/HttpKernel/README.md000066400000000000000000000051131266465517700206350ustar00rootroot00000000000000HttpKernel Component ==================== HttpKernel provides the building blocks to create flexible and fast HTTP-based frameworks. ``HttpKernelInterface`` is the core interface of the Symfony full-stack framework: ```php interface HttpKernelInterface { /** * Handles a Request to convert it to a Response. * * @param Request $request A Request instance * * @return Response A Response instance */ function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); } ``` It takes a ``Request`` as an input and should return a ``Response`` as an output. Using this interface makes your code compatible with all frameworks using the Symfony components. And this will give you many cool features for free. Creating a framework based on the Symfony components is really easy. Here is a very simple, but fully-featured framework based on the Symfony components: ```php $routes = new RouteCollection(); $routes->add('hello', new Route('/hello', array('_controller' => function (Request $request) { return new Response(sprintf("Hello %s", $request->get('name'))); } ))); $request = Request::createFromGlobals(); $context = new RequestContext(); $context->fromRequest($request); $matcher = new UrlMatcher($routes, $context); $dispatcher = new EventDispatcher(); $dispatcher->addSubscriber(new RouterListener($matcher)); $resolver = new ControllerResolver(); $kernel = new HttpKernel($dispatcher, $resolver); $kernel->handle($request)->send(); ``` This is all you need to create a flexible framework with the Symfony components. Want to add an HTTP reverse proxy and benefit from HTTP caching and Edge Side Includes? ```php $kernel = new HttpKernel($dispatcher, $resolver); $kernel = new HttpCache($kernel, new Store(__DIR__.'/cache')); ``` Want to functional test this small framework? ```php $client = new Client($kernel); $crawler = $client->request('GET', '/hello/Fabien'); $this->assertEquals('Fabien', $crawler->filter('p > span')->text()); ``` Want nice error pages instead of ugly PHP exceptions? ```php $dispatcher->addSubscriber(new ExceptionListener(function (Request $request) { $msg = 'Something went wrong! ('.$request->get('exception')->getMessage().')'; return new Response($msg, 500); })); ``` And that's why the simple looking ``HttpKernelInterface`` is so powerful. It gives you access to a lot of cool features, ready to be used out of the box, with no efforts. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/HttpKernel/ $ composer install $ phpunit src/Symfony/Component/HttpKernel/TerminableInterface.php000066400000000000000000000017761266465517700240050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/HttpKernel/Tests/000077500000000000000000000000001266465517700204605ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Bundle/000077500000000000000000000000001266465517700216715ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php000066400000000000000000000027451266465517700244630ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testRegisterCommands() { $cmd = new FooCommand(); $app = $this->getMock('Symfony\Component\Console\Application'); $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(); } } src/Symfony/Component/HttpKernel/Tests/CacheClearer/000077500000000000000000000000001266465517700227615ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php000066400000000000000000000027121266465517700276000ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer; class ChainCacheClearerTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface'); } } src/Symfony/Component/HttpKernel/Tests/CacheWarmer/000077500000000000000000000000001266465517700226415ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php000066400000000000000000000055341266465517700302110ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; class CacheWarmerAggregateTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php000066400000000000000000000030361266465517700263750ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmer; class CacheWarmerTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/HttpKernel/Tests/ClientTest.php000066400000000000000000000157751266465517700232660ustar00rootroot00000000000000 * * 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\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; class ClientTest extends \PHPUnit_Framework_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); $expected = 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', ); $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); $this->assertEquals($expected[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); $this->assertEquals($expected[0], $domResponse->getHeader('Set-Cookie')); $this->assertEquals($expected, $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); } } src/Symfony/Component/HttpKernel/Tests/Config/000077500000000000000000000000001266465517700216655ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Config/EnvParametersResourceTest.php000066400000000000000000000053141266465517700275250ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Config\EnvParametersResource; class EnvParametersResourceTest extends \PHPUnit_Framework_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))); } } src/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php000066400000000000000000000030161266465517700254410ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Config\FileLocator; class FileLocatorTest extends \PHPUnit_Framework_TestCase { public function testLocate() { $kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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->setExpectedException('LogicException'); $locator->locate('/some/path'); } public function testLocateWithGlobalResourcePath() { $kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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); } } src/Symfony/Component/HttpKernel/Tests/Controller/000077500000000000000000000000001266465517700226035ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php000066400000000000000000000227141266465517700300270ustar00rootroot00000000000000 * * 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 Psr\Log\LoggerInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\HttpFoundation\Request; class ControllerResolverTest extends \PHPUnit_Framework_TestCase { public function testGetControllerWithoutControllerParameter() { $logger = $this->getMock('Psr\Log\LoggerInterface'); $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 * @expectedException \InvalidArgumentException */ public function testGetControllerOnNonUndefinedFunction($controller) { $resolver = $this->createControllerResolver(); $request = Request::create('/'); $request->attributes->set('_controller', $controller); $resolver->getController($request); } public function getUndefinedControllers() { return array( array('foo'), array('foo::bar'), array('stdClass'), array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar'), ); } 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'); if (PHP_VERSION_ID === 50316) { $this->markTestSkipped('PHP 5.3.16 has a major bug in the Reflection sub-system'); } else { 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'); } public function testCreateControllerCanReturnAnyCallable() { $mock = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolver', array('createController')); $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); } 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) { } src/Symfony/Component/HttpKernel/Tests/DataCollector/000077500000000000000000000000001266465517700232005ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php000066400000000000000000000046221266465517700304230ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testCollect() { $kernel = new KernelForTest('test', true); $c = new ConfigDataCollector(); $c->setCacheVersionInfo(false); $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) { } } src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php000066400000000000000000000115431266465517700301230ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->assertSame($xDump, $dump); $this->assertStringMatchesFormat( 'a:1:{i:0;a:5:{s:4:"data";O:39:"Symfony\Component\VarDumper\Cloner\Data":4:{s:45:"Symfony\Component\VarDumper\Cloner\Datadata";a:1:{i:0;a:1:{i:0;i:123;}}s:49:"Symfony\Component\VarDumper\Cloner\DatamaxDepth";i:%i;s:57:"Symfony\Component\VarDumper\Cloner\DatamaxItemsPerDepth";i:%i;s:54:"Symfony\Component\VarDumper\Cloner\DatauseRefHandles";i:%i;}s:4:"name";s:25:"DumpDataCollectorTest.php";s:4:"file";s:%a', str_replace("\0", '', $collector->serialize()) ); $this->assertSame(0, $collector->getDumpsCount()); $this->assertSame('a:0:{}', $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(); if (PHP_VERSION_ID >= 50400) { $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n123\n", $output); } else { $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__; if (PHP_VERSION_ID >= 50400) { $xOutput = <<DumpDataCollectorTest.php on line {$line}: 123
    EOTXT; } else { $len = strlen("DumpDataCollectorTest.php on line {$line}:"); $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, $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 = null; if (PHP_VERSION_ID >= 50400) { $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", ob_get_clean()); } else { $this->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n456\n", ob_get_clean()); } } } src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php000066400000000000000000000023231266465517700311500ustar00rootroot00000000000000 * * 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 Symfony\Component\Debug\Exception\FlattenException; use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class ExceptionDataCollectorTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php000066400000000000000000000102711266465517700304320ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector; class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getCollectTestData */ public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount, $expectedScreamCount, $expectedPriorities = null) { $logger = $this->getMock('Symfony\Component\HttpKernel\Log\DebugLoggerInterface'); $logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb)); $logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue($logs)); $c = new LoggerDataCollector($logger); $c->lateCollect(); $this->assertSame('logger', $c->getName()); $this->assertSame($nb, $c->countErrors()); $this->assertSame($expectedLogs ?: $logs, $c->getLogs()); $this->assertSame($expectedDeprecationCount, $c->countDeprecations()); $this->assertSame($expectedScreamCount, $c->countScreams()); if (isset($expectedPriorities)) { $this->assertSame($expectedPriorities, $c->getPriorities()); } } public function getCollectTestData() { return array( array( 1, array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), null, 0, 0, ), array( 1, array(array('message' => 'foo', 'context' => array('foo' => fopen(__FILE__, 'r')), 'priority' => 100, 'priorityName' => 'DEBUG')), array(array('message' => 'foo', 'context' => array('foo' => 'Resource(stream)'), 'priority' => 100, 'priorityName' => 'DEBUG')), 0, 0, ), array( 1, array(array('message' => 'foo', 'context' => array('foo' => new \stdClass()), 'priority' => 100, 'priorityName' => 'DEBUG')), array(array('message' => 'foo', 'context' => array('foo' => 'Object(stdClass)'), 'priority' => 100, 'priorityName' => 'DEBUG')), 0, 0, ), array( 1, array( array('message' => 'foo', 'context' => array('type' => E_DEPRECATED, 'level' => E_ALL), 'priority' => 100, 'priorityName' => 'DEBUG'), array('message' => 'foo2', 'context' => array('type' => E_USER_DEPRECATED, 'level' => E_ALL), 'priority' => 100, 'priorityName' => 'DEBUG'), ), null, 2, 0, array(100 => array('count' => 2, 'name' => 'DEBUG')), ), array( 1, array(array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'level' => 0, 'file' => __FILE__, 'line' => 123), 'priority' => 100, 'priorityName' => 'DEBUG')), array(array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'level' => 0, 'file' => __FILE__, 'line' => 123, 'scream' => true), 'priority' => 100, 'priorityName' => 'DEBUG')), 0, 1, ), array( 1, array( array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'level' => 0, 'file' => __FILE__, 'line' => 123), 'priority' => 100, 'priorityName' => 'DEBUG'), array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'level' => -1, 'file' => __FILE__, 'line' => 123), 'priority' => 100, 'priorityName' => 'DEBUG'), ), array(array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'level' => -1, 'file' => __FILE__, 'line' => 123, 'errorCount' => 2), 'priority' => 100, 'priorityName' => 'DEBUG')), 0, 1, ), ); } } src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php000066400000000000000000000035361266465517700304710ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class MemoryDataCollectorTest extends \PHPUnit_Framework_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' ); } } src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php000066400000000000000000000211601266465517700306420ustar00rootroot00000000000000 * * 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 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; class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase { public function testCollect() { $c = new RequestDataCollector(); $c->collect($this->createRequest(), $this->createResponse()); $attributes = $c->getRequestAttributes(); $this->assertSame('request', $c->getName()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $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->assertSame('foobar', $c->getRoute()); $this->assertSame(array('name' => 'foo'), $c->getRouteParams()); $this->assertSame(array(), $c->getSessionAttributes()); $this->assertSame('en', $c->getLocale()); $this->assertRegExp('/Resource\(stream#\d+\)/', $attributes->get('resource')); $this->assertSame('Object(stdClass)', $attributes->get('object')); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getResponseHeaders()); $this->assertSame('OK', $c->getStatusText()); $this->assertSame(200, $c->getStatusCode()); $this->assertSame('application/json', $c->getContentType()); } /** * Test various types of controller callables. */ public function testControllerInspection() { // 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 $controllerTests = array( array( '"Regular" callable', array($this, 'testControllerInspection'), array( 'class' => 'Symfony\Component\HttpKernel\Tests\DataCollector\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', 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest::staticControllerMethod', 'Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest::staticControllerMethod', ), 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(), ), ), ); $c = new RequestDataCollector(); $request = $this->createRequest(); $response = $this->createResponse(); foreach ($controllerTests as $controllerTest) { $this->injectController($c, $controllerTest[1], $request); $c->collect($request, $response); $this->assertSame($controllerTest[2], $c->getController(), sprintf('Testing: %s', $controllerTest[0])); } } protected function createRequest() { $request = Request::create('http://test.com/foo?bar=baz'); $request->attributes->set('foo', 'bar'); $request->attributes->set('_route', 'foobar'); $request->attributes->set('_route_params', array('name' => 'foo')); $request->attributes->set('resource', fopen(__FILE__, 'r')); $request->attributes->set('object', new \stdClass()); return $request; } protected function createResponse() { $response = new Response(); $response->setStatusCode(200); $response->headers->set('Content-Type', 'application/json'); $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->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $httpKernel = new HttpKernel(new EventDispatcher(), $resolver); $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'); } } src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php000066400000000000000000000030141266465517700301060ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * @group time-sensitive */ class TimeDataCollectorTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\KernelInterface'); $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()); } } src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/000077500000000000000000000000001266465517700241155ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/DataCollector/Util/ValueExporterTest.php000066400000000000000000000027221266465517700302760ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; class ValueExporterTest extends \PHPUnit_Framework_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+0000', $this->valueExporter->exportValue($dateTime)); } /** * @requires PHP 5.5 */ public function testDateTimeImmutable() { $dateTime = new \DateTimeImmutable('2014-06-10 07:35:40', new \DateTimeZone('UTC')); $this->assertSame('Object(DateTimeImmutable) - 2014-06-10T07:35:40+0000', $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)); } } src/Symfony/Component/HttpKernel/Tests/Debug/000077500000000000000000000000001266465517700215065ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php000066400000000000000000000106271266465517700277600ustar00rootroot00000000000000 * * 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 Symfony\Component\EventDispatcher\EventDispatcher; 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 \PHPUnit_Framework_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', '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) { $resolver = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface'); $resolver->expects($this->once())->method('getController')->will($this->returnValue($controller)); $resolver->expects($this->once())->method('getArguments')->will($this->returnValue(array())); return new HttpKernel($dispatcher, $resolver); } } src/Symfony/Component/HttpKernel/Tests/DependencyInjection/000077500000000000000000000000001266465517700244015ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php000066400000000000000000000125471266465517700326660ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\EventDispatcher\EventDispatcher; /** * @group legacy */ class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getProviderTypes */ public function testHandle($type) { $request = new Request(); $expected = new Response(); $controller = function () use ($expected) { return $expected; }; $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $this ->expectsEnterScopeOnce($container) ->expectsLeaveScopeOnce($container) ->expectsSetRequestWithAt($container, $request, 3) ->expectsSetRequestWithAt($container, null, 4) ; $dispatcher = new EventDispatcher(); $resolver = $this->getResolverMockFor($controller, $request); $stack = new RequestStack(); $kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver, $stack); $actual = $kernel->handle($request, $type); $this->assertSame($expected, $actual, '->handle() returns the response'); } /** * @dataProvider getProviderTypes */ public function testVerifyRequestStackPushPopDuringHandle($type) { $request = new Request(); $expected = new Response(); $controller = function () use ($expected) { return $expected; }; $stack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack', array('push', 'pop')); $stack->expects($this->at(0))->method('push')->with($this->equalTo($request)); $stack->expects($this->at(1))->method('pop'); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $dispatcher = new EventDispatcher(); $resolver = $this->getResolverMockFor($controller, $request); $kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver, $stack); $kernel->handle($request, $type); } /** * @dataProvider getProviderTypes */ public function testHandleRestoresThePreviousRequestOnException($type) { $request = new Request(); $expected = new \Exception(); $controller = function () use ($expected) { throw $expected; }; $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $this ->expectsEnterScopeOnce($container) ->expectsLeaveScopeOnce($container) ->expectsSetRequestWithAt($container, $request, 3) ->expectsSetRequestWithAt($container, null, 4) ; $dispatcher = new EventDispatcher(); $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver = $this->getResolverMockFor($controller, $request); $stack = new RequestStack(); $kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver, $stack); try { $kernel->handle($request, $type); $this->fail('->handle() suppresses the controller exception'); } catch (\PHPUnit_Framework_Exception $e) { throw $e; } catch (\Exception $e) { $this->assertSame($expected, $e, '->handle() throws the controller exception'); } } public function getProviderTypes() { return array( array(HttpKernelInterface::MASTER_REQUEST), array(HttpKernelInterface::SUB_REQUEST), ); } private function getResolverMockFor($controller, $request) { $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver->expects($this->once()) ->method('getController') ->with($request) ->will($this->returnValue($controller)); $resolver->expects($this->once()) ->method('getArguments') ->with($request, $controller) ->will($this->returnValue(array())); return $resolver; } private function expectsSetRequestWithAt($container, $with, $at) { $container ->expects($this->at($at)) ->method('set') ->with($this->equalTo('request'), $this->equalTo($with), $this->equalTo('request')) ; return $this; } private function expectsEnterScopeOnce($container) { $container ->expects($this->once()) ->method('enterScope') ->with($this->equalTo('request')) ; return $this; } private function expectsLeaveScopeOnce($container) { $container ->expects($this->once()) ->method('leaveScope') ->with($this->equalTo('request')) ; return $this; } } src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php000066400000000000000000000124211266465517700320330ustar00rootroot00000000000000 * * 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 Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass; use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; class FragmentRendererPassTest extends \PHPUnit_Framework_TestCase { /** * @group legacy */ public function testLegacyFragmentRedererWithoutAlias() { // no alias $services = array( 'my_content_renderer' => array(array()), ); $renderer = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $renderer ->expects($this->once()) ->method('addMethodCall') ->with('addRenderer', array(new Reference('my_content_renderer'))) ; $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $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->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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); } /** * 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->getMock('Symfony\Component\DependencyInjection\Definition'); $builder = $this->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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->getMock('Symfony\Component\DependencyInjection\Definition'); $renderer ->expects($this->once()) ->method('addMethodCall') ->with('addRendererService', array('foo', 'my_content_renderer')) ; $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); $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->getMock( 'Symfony\Component\DependencyInjection\ContainerBuilder', array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') ); $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'; } } src/Symfony/Component/HttpKernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php000066400000000000000000000031201266465517700331450ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class LazyLoadingFragmentHandlerTest extends \PHPUnit_Framework_TestCase { public function test() { $renderer = $this->getMock('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'); $renderer->expects($this->once())->method('getName')->will($this->returnValue('foo')); $renderer->expects($this->any())->method('render')->will($this->returnValue(new Response())); $requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $requestStack->expects($this->any())->method('getCurrentRequest')->will($this->returnValue(Request::create('/'))); $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); $container->expects($this->once())->method('get')->will($this->returnValue($renderer)); $handler = new LazyLoadingFragmentHandler($container, false, $requestStack); $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'); } } src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php000066400000000000000000000040251266465517700342660ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase { public function testAutoloadMainExtension() { $container = $this->getMock( 'Symfony\\Component\\DependencyInjection\\ContainerBuilder', array('getExtensionConfig', 'loadFromExtension', 'getParameterBag') ); $params = $this->getMock('Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag'); $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); } } src/Symfony/Component/HttpKernel/Tests/EventListener/000077500000000000000000000000001266465517700232475ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php000066400000000000000000000042611266465517700317260ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\KernelEvents; /** * Test AddRequestFormatsListener class. * * @author Gildas Quemener */ class AddRequestFormatsListenerTest extends \PHPUnit_Framework_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 => 'onKernelRequest'), 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->getMock('Symfony\Component\HttpFoundation\Request'); } 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; } } src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php000066400000000000000000000106041266465517700310360ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testConfigure() { $logger = $this->getMock('Psr\Log\LoggerInterface'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), 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->getMock('Symfony\Component\Console\Application'); $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()); } } src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php000066400000000000000000000036451266465517700272430ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\EventListener\DumpListener; use Symfony\Component\HttpKernel\KernelEvents; 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 \PHPUnit_Framework_TestCase { public function testSubscribedEvents() { $this->assertSame( array(KernelEvents::REQUEST => 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]; } } src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php000066400000000000000000000110111266465517700302560ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Psr\Log\LoggerInterface')); $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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'); } } src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php000066400000000000000000000066371266465517700301050ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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')); } private function createGetResponseEvent(Request $request, $requestType = HttpKernelInterface::MASTER_REQUEST) { return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, $requestType); } } src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php000066400000000000000000000074321266465517700275330ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\RequestStack; 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 \PHPUnit_Framework_TestCase { private $requestStack; protected function setUp() { $this->requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack', array(), array(), '', false); } public function testDefaultLocaleWithoutSession() { $listener = new LocaleListener('fr', null, $this->requestStack); $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('fr', null, $this->requestStack); $event = $this->getEvent($request); $listener->onKernelRequest($event); $this->assertEquals('es', $request->getLocale()); } public function testLocaleSetForRoutingContext() { // the request context is updated $context = $this->getMock('Symfony\Component\Routing\RequestContext'); $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); $router = $this->getMock('Symfony\Component\Routing\Router', array('getContext'), array(), '', false); $router->expects($this->once())->method('getContext')->will($this->returnValue($context)); $request = Request::create('/'); $request->attributes->set('_locale', 'es'); $listener = new LocaleListener('fr', $router, $this->requestStack); $listener->onKernelRequest($this->getEvent($request)); } public function testRouterResetWithParentRequestOnKernelFinishRequest() { // the request context is updated $context = $this->getMock('Symfony\Component\Routing\RequestContext'); $context->expects($this->once())->method('setParameter')->with('_locale', 'es'); $router = $this->getMock('Symfony\Component\Routing\Router', array('getContext'), array(), '', false); $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->getMock('Symfony\Component\HttpKernel\Event\FinishRequestEvent', array(), array(), '', false); $listener = new LocaleListener('fr', $router, $this->requestStack); $listener->onKernelFinishRequest($event); } public function testRequestLocaleIsNotOverridden() { $request = Request::create('/'); $request->setLocale('de'); $listener = new LocaleListener('fr', null, $this->requestStack); $event = $this->getEvent($request); $listener->onKernelRequest($event); $this->assertEquals('de', $request->getLocale()); } private function getEvent(Request $request) { return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST); } } src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php000066400000000000000000000100151266465517700301050ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\EventListener\ProfilerListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; 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 \PHPUnit_Framework_TestCase { /** * Test to ensure BC without RequestStack. * * @group legacy */ public function testLegacyEventsWithoutRequestStack() { $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') ->disableOriginalConstructor() ->getMock(); $response = $this->getMockBuilder('Symfony\Component\HttpFoundation\Response') ->disableOriginalConstructor() ->getMock(); $listener = new ProfilerListener($profiler); $listener->onKernelRequest(new GetResponseEvent($kernel, $request, Kernel::MASTER_REQUEST)); $listener->onKernelResponse(new FilterResponseEvent($kernel, $request, Kernel::MASTER_REQUEST, $response)); $listener->onKernelTerminate(new PostResponseEvent($kernel, $request, $response)); } /** * 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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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, null, $onlyException, false, $requestStack); // 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)); } } src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php000066400000000000000000000065471266465517700301400ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); } 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()); } } src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php000066400000000000000000000142301266465517700276060ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\RequestStack; 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 \PHPUnit_Framework_TestCase { private $requestStack; protected function setUp() { $this->requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack', array(), array(), '', false); } /** * @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, null, null, $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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(), null, null, $this->requestStack); } public function testRequestMatcher() { $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $request = Request::create('http://localhost/'); $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); $requestMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $requestMatcher->expects($this->once()) ->method('matchRequest') ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) ->will($this->returnValue(array())); $listener = new RouterListener($requestMatcher, new RequestContext(), null, $this->requestStack); $listener->onKernelRequest($event); } public function testSubRequestWithDifferentMethod() { $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $request = Request::create('http://localhost/', 'post'); $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); $requestMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $requestMatcher->expects($this->any()) ->method('matchRequest') ->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) ->will($this->returnValue(array())); $context = new RequestContext(); $requestMatcher->expects($this->any()) ->method('getContext') ->will($this->returnValue($context)); $listener = new RouterListener($requestMatcher, new RequestContext(), null, $this->requestStack); $listener->onKernelRequest($event); // sub-request with another HTTP method $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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) { $requestMatcher = $this->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $requestMatcher->expects($this->once()) ->method('matchRequest') ->will($this->returnValue($parameter)); $logger = $this->getMock('Psr\Log\LoggerInterface'); $logger->expects($this->once()) ->method('info') ->with($this->equalTo($log)); $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $request = Request::create('http://localhost/'); $listener = new RouterListener($requestMatcher, new RequestContext(), $logger, $this->requestStack); $listener->onKernelRequest(new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST)); } public function getLoggingParameterData() { return array( array(array('_route' => 'foo'), 'Matched route "foo".'), array(array(), 'Matched route "n/a".'), ); } } src/Symfony/Component/HttpKernel/Tests/EventListener/SurrogateListenerTest.php000066400000000000000000000054271266465517700303110ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testFilterDoesNothingForSubRequests() { $dispatcher = new EventDispatcher(); $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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')); } } src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php000066400000000000000000000071641266465517700306210ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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; } } src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php000066400000000000000000000077311266465517700304670ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { private $listener; private $translator; private $requestStack; protected function setUp() { $this->translator = $this->getMock('Symfony\Component\Translation\TranslatorInterface'); $this->requestStack = $this->getMock('Symfony\Component\HttpFoundation\RequestStack'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); } 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)); } } src/Symfony/Component/HttpKernel/Tests/Fixtures/000077500000000000000000000000001266465517700222715ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/000077500000000000000000000000001266465517700242755ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/000077500000000000000000000000001266465517700262475ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt000066400000000000000000000000001266465517700275610ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt000066400000000000000000000000001266465517700277070ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/000077500000000000000000000000001266465517700247155ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/000077500000000000000000000000001266465517700266675ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt000066400000000000000000000000001266465517700302010ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt000066400000000000000000000000001266465517700262100ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt000066400000000000000000000000001266465517700262270ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/000077500000000000000000000000001266465517700247165ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt000066400000000000000000000000001266465517700262300ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/000077500000000000000000000000001266465517700244465ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/000077500000000000000000000000001266465517700264205ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt000066400000000000000000000000001266465517700277320ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt000066400000000000000000000000001266465517700300600ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/000077500000000000000000000000001266465517700265345ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php000066400000000000000000000006341266465517700335130ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/000077500000000000000000000000001266465517700265105ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/000077500000000000000000000000001266465517700324315ustar00rootroot00000000000000ExtensionLoadedExtension.php000066400000000000000000000011231266465517700400420ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection * * 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) { } } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php000066400000000000000000000006341266465517700334430ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/000077500000000000000000000000001266465517700270405ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/000077500000000000000000000000001266465517700327615ustar00rootroot00000000000000ExtensionNotValidExtension.php000066400000000000000000000007101266465517700407230ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection * * 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'; } } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php000066400000000000000000000006401266465517700343200ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/000077500000000000000000000000001266465517700267405ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/000077500000000000000000000000001266465517700303165ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php000066400000000000000000000007051266465517700330340ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/000077500000000000000000000000001266465517700326615ustar00rootroot00000000000000ExtensionPresentExtension.php000066400000000000000000000011251266465517700405240ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection * * 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) { } } src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php000066400000000000000000000006361266465517700341250ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php000066400000000000000000000007141266465517700253060ustar00rootroot00000000000000 * * 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\Bundle\Bundle; class FooBarBundle extends Bundle { // We need a full namespaced bundle instance to test isClassInActiveBundle } src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php000066400000000000000000000011441266465517700271720ustar00rootroot00000000000000 * * 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) { } } src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php000066400000000000000000000013521266465517700255320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/000077500000000000000000000000001266465517700242435ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/000077500000000000000000000000001266465517700262475ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt000066400000000000000000000000001266465517700277070ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/000077500000000000000000000000001266465517700266675ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt000066400000000000000000000000001266465517700302010ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/000077500000000000000000000000001266465517700264205ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt000066400000000000000000000000001266465517700277320ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/000077500000000000000000000000001266465517700261205ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt000066400000000000000000000000001266465517700274320ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php000066400000000000000000000014331266465517700250610ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php000066400000000000000000000012701266465517700267320ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/HttpKernel/Tests/Fragment/000077500000000000000000000000001266465517700222235ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php000066400000000000000000000073351266465517700274770ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testRenderFallbackToInlineStrategyIfEsiNotSupported() { $strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true)); $strategy->render('/', Request::create('/')); } 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; } } src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php000066400000000000000000000054211266465517700266370ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Fragment\FragmentHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * @group time-sensitive */ class FragmentHandlerTest extends \PHPUnit_Framework_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(array(), null, $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->getMock('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'); $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(array(), null, $this->requestStack); $handler->addRenderer($renderer); return $handler; } } src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php000066400000000000000000000102211266465517700304360ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; use Symfony\Component\HttpKernel\UriSigner; use Symfony\Component\HttpFoundation\Request; class HIncludeFragmentRendererTest extends \PHPUnit_Framework_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->getMock('Symfony\\Component\\Templating\\EngineInterface'); $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()); } } src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php000066400000000000000000000173561266465517700302010ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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('/')); } public function testRenderWithObjectsAsAttributesPassedAsObjectsInTheController() { $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver', array('getController')); $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); $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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $kernel ->expects($this->any()) ->method('handle') ->with($this->equalTo($request, 1)) ; return $kernel; } public function testExceptionInSubRequestsDoesNotMangleOutputBuffers() { $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver ->expects($this->once()) ->method('getController') ->will($this->returnValue(function () { ob_start(); echo 'bar'; throw new \RuntimeException(); })) ; $resolver ->expects($this->once()) ->method('getArguments') ->will($this->returnValue(array())) ; $kernel = new HttpKernel(new EventDispatcher(), $resolver); $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); } } class Bar { public $bar = 'bar'; public function getBar() { return $this->bar; } } src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php000066400000000000000000000074511266465517700305330ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ControllerReference; class RoutableFragmentRendererTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/HttpKernel/Tests/HttpCache/000077500000000000000000000000001266465517700223235ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php000066400000000000000000000216701266465517700244220ustar00rootroot00000000000000 * * 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\Esi; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class EsiTest extends \PHPUnit_Framework_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('symfony2="ESI/1.0"', $request->headers->get('Surrogate-Capability')); $esi->addSurrogateCapability($request); $this->assertEquals('symfony2="ESI/1.0", symfony2="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->getMock('Symfony\Component\HttpKernel\HttpCache\HttpCache', array('getRequest', 'handle'), array(), '', false); $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; } } src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php000066400000000000000000001505161266465517700255470ustar00rootroot00000000000000 * * 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; /** * @group time-sensitive */ class HttpCacheTest extends HttpCacheTestCase { public function testTerminateDelegatesTerminationOnlyForTerminableInterface() { $storeMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface') ->disableOriginalConstructor() ->getMock(); // does not implement TerminableInterface $kernelMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpKernelInterface') ->disableOriginalConstructor() ->getMock(); $kernelMock->expects($this->never()) ->method('terminate'); $kernel = new HttpCache($kernelMock, $storeMock); $kernel->terminate(Request::create('/'), new Response()); // 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 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 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() { $that = $this; $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($that) { $response->setContent(''); $response->setStatusCode(200); $that->assertEquals('HEAD', $request->getMethod()); }); $this->request('HEAD', '/', array('HTTP_EXPECT' => 'something ...')); $this->assertHttpKernelIsCalled(); $this->assertEquals('', $this->response->getContent()); } public function testUsesCacheToRespondToHeadRequestsWhenFresh() { $that = $this; $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($that) { $response->headers->set('Cache-Control', 'public, max-age=10'); $response->setContent('Hello World'); $response->setStatusCode(200); $that->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()); $that = $this; $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($that, $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()); } } src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php000066400000000000000000000120331266465517700263320ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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() { $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); } } src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php000066400000000000000000000165171266465517700244440ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpCache\Ssi; class SsiTest extends \PHPUnit_Framework_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('symfony2="SSI/1.0"', $request->headers->get('Surrogate-Capability')); $ssi->addSurrogateCapability($request); $this->assertEquals('symfony2="SSI/1.0", symfony2="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->getMock('Symfony\Component\HttpKernel\HttpCache\HttpCache', array('getRequest', 'handle'), array(), '', false); $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; } } src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php000066400000000000000000000241341266465517700247740ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpCache\Store; class StoreTest extends \PHPUnit_Framework_TestCase { protected $request; protected $response; 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); } } src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php000066400000000000000000000043701266465517700257600ustar00rootroot00000000000000 * * 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\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 { 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); } 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; } } src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php000066400000000000000000000041131266465517700274670ustar00rootroot00000000000000 * * 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\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 { 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); } 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; } } src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php000066400000000000000000000265231266465517700241210ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_TestCase { /** * @expectedException \RuntimeException */ public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrue() { $kernel = new HttpKernel(new EventDispatcher(), $this->getResolver(function () { throw new \RuntimeException(); })); $kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true); } /** * @expectedException \RuntimeException */ public function testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered() { $kernel = new HttpKernel(new EventDispatcher(), $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver()); $this->assertEquals('hello', $kernel->handle(new Request())->getContent()); } /** * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public function testHandleWhenNoControllerIsFound() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(false)); $kernel->handle(new Request()); } /** * @expectedException \LogicException */ public function testHandleWhenTheControllerIsNotACallable() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver('foobar')); $kernel->handle(new Request()); } public function testHandleWhenTheControllerIsAClosure() { $response = new Response('foo'); $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(function () use ($response) { return $response; })); $this->assertSame($response, $kernel->handle(new Request())); } public function testHandleWhenTheControllerIsAnObjectWithInvoke() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(new Controller())); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } public function testHandleWhenTheControllerIsAFunction() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver('Symfony\Component\HttpKernel\Tests\controller_func')); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } public function testHandleWhenTheControllerIsAnArray() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(array(new Controller(), 'controller'))); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } public function testHandleWhenTheControllerIsAStaticArray() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver(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 = new HttpKernel($dispatcher, $this->getResolver()); $this->assertEquals('foo', $kernel->handle(new Request())->getContent()); } public function testTerminate() { $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver()); $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->getMock('Symfony\Component\HttpFoundation\RequestStack', array('push', 'pop')); $stack->expects($this->at(0))->method('push')->with($this->equalTo($request)); $stack->expects($this->at(1))->method('pop'); $dispatcher = new EventDispatcher(); $kernel = new HttpKernel($dispatcher, $this->getResolver(), $stack); $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST); } protected function getResolver($controller = null) { if (null === $controller) { $controller = function () { return new Response('Hello'); }; } $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver->expects($this->any()) ->method('getController') ->will($this->returnValue($controller)); $resolver->expects($this->any()) ->method('getArguments') ->will($this->returnValue(array())); return $resolver; } protected 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'); } src/Symfony/Component/HttpKernel/Tests/KernelTest.php000066400000000000000000000662751266465517700232710ustar00rootroot00000000000000 * * 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\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; use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle; class KernelTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $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')); $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->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $bundle->expects($this->once()) ->method('shutdown'); $kernel = $this->getKernel(array(), array($bundle)); $kernel->boot(); $kernel->shutdown(); } public function testShutdownGivesNullContainerToAllBundles() { $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\Bundle'); $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); } /** * @group legacy */ public function testLegacyIsClassInActiveBundleFalse() { $kernel = $this->getKernelMockForIsClassInActiveBundleTest(); $this->assertFalse($kernel->isClassInActiveBundle('Not\In\Active\Bundle')); } /** * @group legacy */ public function testLegacyIsClassInActiveBundleFalseNoNamespace() { $kernel = $this->getKernelMockForIsClassInActiveBundleTest(); $this->assertFalse($kernel->isClassInActiveBundle('NotNamespacedClass')); } /** * @group legacy */ public function testLegacyIsClassInActiveBundleTrue() { $kernel = $this->getKernelMockForIsClassInActiveBundleTest(); $this->assertTrue($kernel->isClassInActiveBundle(__NAMESPACE__.'\Fixtures\FooBarBundle\SomeClass')); } protected function getKernelMockForIsClassInActiveBundleTest() { $bundle = new FooBarBundle(); $kernel = $this->getKernel(array('getBundles')); $kernel->expects($this->once()) ->method('getBundles') ->will($this->returnValue(array($bundle))); return $kernel; } 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 $httpKernelMock = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface') ->disableOriginalConstructor() ->getMock(); $httpKernelMock ->expects($this->never()) ->method('terminate'); $kernel = $this->getKernel(array('getHttpKernel')); $kernel->expects($this->once()) ->method('getHttpKernel') ->will($this->returnValue($httpKernelMock)); $kernel->boot(); $kernel->terminate(Request::create('/'), new Response()); // 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()); } /** * 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; } } src/Symfony/Component/HttpKernel/Tests/Logger.php000066400000000000000000000057461266465517700224240ustar00rootroot00000000000000 * * 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); } /** * @deprecated */ public function emerg($message, array $context = array()) { @trigger_error('Use emergency() which is PSR-3 compatible', E_USER_DEPRECATED); $this->log('emergency', $message, $context); } /** * @deprecated */ public function crit($message, array $context = array()) { @trigger_error('Use critical() which is PSR-3 compatible', E_USER_DEPRECATED); $this->log('critical', $message, $context); } /** * @deprecated */ public function err($message, array $context = array()) { @trigger_error('Use error() which is PSR-3 compatible', E_USER_DEPRECATED); $this->log('error', $message, $context); } /** * @deprecated */ public function warn($message, array $context = array()) { @trigger_error('Use warning() which is PSR-3 compatible', E_USER_DEPRECATED); $this->log('warning', $message, $context); } } src/Symfony/Component/HttpKernel/Tests/Profiler/000077500000000000000000000000001266465517700222425ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php000066400000000000000000000260101266465517700304050ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\Profile; abstract class AbstractProfilerStorageTest extends \PHPUnit_Framework_TestCase { 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->getStorage()->write($profile); } $this->assertCount(10, $this->getStorage()->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->getStorage()->write($parentProfile); $this->getStorage()->write($childProfile); // Load them from storage $parentProfile = $this->getStorage()->read('token_parent'); $childProfile = $this->getStorage()->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->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('simple_quote'), '->write() accepts single quotes in URL'); $profile = new Profile('double_quote'); $profile->setUrl('http://foo.bar/"'); $this->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('double_quote'), '->write() accepts double quotes in URL'); $profile = new Profile('backslash'); $profile->setUrl('http://foo.bar/\\'); $this->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('backslash'), '->write() accepts backslash in URL'); $profile = new Profile('comma'); $profile->setUrl('http://foo.bar/,'); $this->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('comma'), '->write() accepts comma in URL'); } public function testStoreDuplicateToken() { $profile = new Profile('token'); $profile->setUrl('http://example.com/'); $this->assertTrue($this->getStorage()->write($profile), '->write() returns true when the token is unique'); $profile->setUrl('http://example.net/'); $this->assertTrue($this->getStorage()->write($profile), '->write() returns true when the token is already present in the storage'); $this->assertEquals('http://example.net/', $this->getStorage()->read('token')->getUrl(), '->write() overwrites the current profile data'); $this->assertCount(1, $this->getStorage()->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->getStorage()->write($profile); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', '', 10, 'GET'), '->find() retrieve a record by IP'); $this->assertCount(0, $this->getStorage()->find('127.0.%.1', '', 10, 'GET'), '->find() does not interpret a "%" as a wildcard in the IP'); $this->assertCount(0, $this->getStorage()->find('127.0._.1', '', 10, 'GET'), '->find() does not interpret a "_" as a wildcard in the IP'); } public function testRetrieveByUrl() { $profile = new Profile('simple_quote'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo.bar/\''); $profile->setMethod('GET'); $this->getStorage()->write($profile); $profile = new Profile('double_quote'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo.bar/"'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $profile = new Profile('backslash'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo\\bar/'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $profile = new Profile('percent'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo.bar/%'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $profile = new Profile('underscore'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo.bar/_'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $profile = new Profile('semicolon'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://foo.bar/;'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', 'http://foo.bar/\'', 10, 'GET'), '->find() accepts single quotes in URLs'); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', 'http://foo.bar/"', 10, 'GET'), '->find() accepts double quotes in URLs'); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', 'http://foo\\bar/', 10, 'GET'), '->find() accepts backslash in URLs'); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', 'http://foo.bar/;', 10, 'GET'), '->find() accepts semicolon in URLs'); $this->assertCount(1, $this->getStorage()->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->getStorage()->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->getStorage()->write($profile); } $records = $this->getStorage()->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->getStorage()->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->getStorage()->write($profile); } $this->assertCount(5, $this->getStorage()->find('', '', 10, 'GET'), '->find() returns all previously added records'); $this->getStorage()->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->getStorage()->write($profile); } } $this->assertCount(5, $this->getStorage()->find('', '', 5, 'POST')); $this->getStorage()->purge(); } public function testPurge() { $profile = new Profile('token1'); $profile->setIp('127.0.0.1'); $profile->setUrl('http://example.com/'); $profile->setMethod('GET'); $this->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('token1')); $this->assertCount(1, $this->getStorage()->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->getStorage()->write($profile); $this->assertTrue(false !== $this->getStorage()->read('token2')); $this->assertCount(2, $this->getStorage()->find('127.0.0.1', '', 10, 'GET')); $this->getStorage()->purge(); $this->assertEmpty($this->getStorage()->read('token'), '->purge() removes all data stored by profiler'); $this->assertCount(0, $this->getStorage()->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->getStorage()->write($profile); $this->getStorage()->write($profile); $this->getStorage()->write($profile); } $this->assertCount(3, $this->getStorage()->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->getStorage()->write($profile); $profile = new Profile('token2'); $profile->setStatusCode(404); $this->getStorage()->write($profile); $tokens = $this->getStorage()->find('', '', 10, ''); $this->assertCount(2, $tokens); $this->assertContains($tokens[0]['status_code'], array(200, 404)); $this->assertContains($tokens[1]['status_code'], array(200, 404)); } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ abstract protected function getStorage(); } src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php000066400000000000000000000053471266465517700275330ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; use Symfony\Component\HttpKernel\Profiler\Profile; class FileProfilerStorageTest extends AbstractProfilerStorageTest { protected static $tmpDir; protected static $storage; protected static function cleanDir() { $flags = \FilesystemIterator::SKIP_DOTS; $iterator = new \RecursiveDirectoryIterator(self::$tmpDir, $flags); $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); foreach ($iterator as $file) { if (is_file($file)) { unlink($file); } } } public static function setUpBeforeClass() { self::$tmpDir = sys_get_temp_dir().'/sf2_profiler_file_storage'; if (is_dir(self::$tmpDir)) { self::cleanDir(); } self::$storage = new FileProfilerStorage('file:'.self::$tmpDir); } public static function tearDownAfterClass() { self::cleanDir(); } protected function setUp() { self::$storage->purge(); } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } 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); $storage = $this->getStorage(); $storage->write($profile); $storage->write($profile); $storage->write($profile); } $handle = fopen(self::$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(self::$storage, 'readLineFromFile'); $r->setAccessible(true); $h = tmpfile(); fwrite($h, "line1\n\n\nline2\n"); fseek($h, 0, SEEK_END); $this->assertEquals('line2', $r->invoke(self::$storage, $h)); $this->assertEquals('line1', $r->invoke(self::$storage, $h)); } } src/Symfony/Component/HttpKernel/Tests/Profiler/MemcacheProfilerStorageTest.php000066400000000000000000000023311266465517700303440ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage; use Symfony\Component\HttpKernel\Tests\Profiler\Mock\MemcacheMock; class MemcacheProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; protected function setUp() { $memcacheMock = new MemcacheMock(); $memcacheMock->addServer('127.0.0.1', 11211); self::$storage = new MemcacheProfilerStorage('memcache://127.0.0.1:11211', '', '', 86400); self::$storage->setMemcache($memcacheMock); if (self::$storage) { self::$storage->purge(); } } protected function tearDown() { if (self::$storage) { self::$storage->purge(); self::$storage = false; } } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } } src/Symfony/Component/HttpKernel/Tests/Profiler/MemcachedProfilerStorageTest.php000066400000000000000000000023431266465517700305130ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage; use Symfony\Component\HttpKernel\Tests\Profiler\Mock\MemcachedMock; class MemcachedProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; protected function setUp() { $memcachedMock = new MemcachedMock(); $memcachedMock->addServer('127.0.0.1', 11211); self::$storage = new MemcachedProfilerStorage('memcached://127.0.0.1:11211', '', '', 86400); self::$storage->setMemcached($memcachedMock); if (self::$storage) { self::$storage->purge(); } } protected function tearDown() { if (self::$storage) { self::$storage->purge(); self::$storage = false; } } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } } src/Symfony/Component/HttpKernel/Tests/Profiler/Mock/000077500000000000000000000000001266465517700231335ustar00rootroot00000000000000src/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php000066400000000000000000000121451266465517700261630ustar00rootroot00000000000000 * * 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\Mock; /** * MemcacheMock for simulating Memcache extension in tests. * * @author Andrej Hudec */ class MemcacheMock { private $connected = false; private $storage = array(); /** * Open memcached server connection. * * @param string $host * @param int $port * @param int $timeout * * @return bool */ public function connect($host, $port = null, $timeout = null) { if ('127.0.0.1' == $host && 11211 == $port) { $this->connected = true; return true; } return false; } /** * Open memcached server persistent connection. * * @param string $host * @param int $port * @param int $timeout * * @return bool */ public function pconnect($host, $port = null, $timeout = null) { if ('127.0.0.1' == $host && 11211 == $port) { $this->connected = true; return true; } return false; } /** * Add a memcached server to connection pool. * * @param string $host * @param int $port * @param bool $persistent * @param int $weight * @param int $timeout * @param int $retry_interval * @param bool $status * @param callable $failure_callback * @param int $timeoutms * * @return bool */ public function addServer($host, $port = 11211, $persistent = null, $weight = null, $timeout = null, $retry_interval = null, $status = null, $failure_callback = null, $timeoutms = null) { if ('127.0.0.1' == $host && 11211 == $port) { $this->connected = true; return true; } return false; } /** * Add an item to the server only if such key doesn't exist at the server yet. * * @param string $key * @param mixed $var * @param int $flag * @param int $expire * * @return bool */ public function add($key, $var, $flag = null, $expire = null) { if (!$this->connected) { return false; } if (!isset($this->storage[$key])) { $this->storeData($key, $var); return true; } return false; } /** * Store data at the server. * * @param string $key * @param string $var * @param int $flag * @param int $expire * * @return bool */ public function set($key, $var, $flag = null, $expire = null) { if (!$this->connected) { return false; } $this->storeData($key, $var); return true; } /** * Replace value of the existing item. * * @param string $key * @param mixed $var * @param int $flag * @param int $expire * * @return bool */ public function replace($key, $var, $flag = null, $expire = null) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { $this->storeData($key, $var); return true; } return false; } /** * Retrieve item from the server. * * @param string|array $key * @param int|array $flags * * @return mixed */ public function get($key, &$flags = null) { if (!$this->connected) { return false; } if (is_array($key)) { $result = array(); foreach ($key as $k) { if (isset($this->storage[$k])) { $result[] = $this->getData($k); } } return $result; } return $this->getData($key); } /** * Delete item from the server. * * @param string $key * * @return bool */ public function delete($key) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { unset($this->storage[$key]); return true; } return false; } /** * Flush all existing items at the server. * * @return bool */ public function flush() { if (!$this->connected) { return false; } $this->storage = array(); return true; } /** * Close memcached server connection. * * @return bool */ public function close() { $this->connected = false; return true; } private function getData($key) { if (isset($this->storage[$key])) { return unserialize($this->storage[$key]); } return false; } private function storeData($key, $value) { $this->storage[$key] = serialize($value); return true; } } src/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcachedMock.php000066400000000000000000000102041266465517700263210ustar00rootroot00000000000000 * * 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\Mock; /** * MemcachedMock for simulating Memcached extension in tests. * * @author Andrej Hudec */ class MemcachedMock { private $connected = false; private $storage = array(); /** * Set a Memcached option. * * @param int $option * @param mixed $value * * @return bool */ public function setOption($option, $value) { return true; } /** * Add a memcached server to connection pool. * * @param string $host * @param int $port * @param int $weight * * @return bool */ public function addServer($host, $port = 11211, $weight = 0) { if ('127.0.0.1' == $host && 11211 == $port) { $this->connected = true; return true; } return false; } /** * Add an item to the server only if such key doesn't exist at the server yet. * * @param string $key * @param mixed $value * @param int $expiration * * @return bool */ public function add($key, $value, $expiration = 0) { if (!$this->connected) { return false; } if (!isset($this->storage[$key])) { $this->storeData($key, $value); return true; } return false; } /** * Store data at the server. * * @param string $key * @param mixed $value * @param int $expiration * * @return bool */ public function set($key, $value, $expiration = null) { if (!$this->connected) { return false; } $this->storeData($key, $value); return true; } /** * Replace value of the existing item. * * @param string $key * @param mixed $value * @param int $expiration * * @return bool */ public function replace($key, $value, $expiration = null) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { $this->storeData($key, $value); return true; } return false; } /** * Retrieve item from the server. * * @param string $key * @param callable $cache_cb * @param float $cas_token * * @return bool */ public function get($key, $cache_cb = null, &$cas_token = null) { if (!$this->connected) { return false; } return $this->getData($key); } /** * Append data to an existing item. * * @param string $key * @param string $value * * @return bool */ public function append($key, $value) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { $this->storeData($key, $this->getData($key).$value); return true; } return false; } /** * Delete item from the server. * * @param string $key * * @return bool */ public function delete($key) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { unset($this->storage[$key]); return true; } return false; } /** * Flush all existing items at the server. * * @return bool */ public function flush() { if (!$this->connected) { return false; } $this->storage = array(); return true; } private function getData($key) { if (isset($this->storage[$key])) { return unserialize($this->storage[$key]); } return false; } private function storeData($key, $value) { $this->storage[$key] = serialize($value); return true; } } src/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php000066400000000000000000000107351266465517700255320ustar00rootroot00000000000000 * * 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\Mock; /** * RedisMock for simulating Redis extension in tests. * * @author Andrej Hudec */ class RedisMock { private $connected = false; private $storage = array(); /** * Add a server to connection pool. * * @param string $host * @param int $port * @param float $timeout * * @return bool */ public function connect($host, $port = 6379, $timeout = 0) { if ('127.0.0.1' == $host && 6379 == $port) { $this->connected = true; return true; } return false; } /** * Set client option. * * @param int $name * @param int $value * * @return bool */ public function setOption($name, $value) { if (!$this->connected) { return false; } return true; } /** * Verify if the specified key exists. * * @param string $key * * @return bool */ public function exists($key) { if (!$this->connected) { return false; } return isset($this->storage[$key]); } /** * Store data at the server with expiration time. * * @param string $key * @param int $ttl * @param mixed $value * * @return bool */ public function setex($key, $ttl, $value) { if (!$this->connected) { return false; } $this->storeData($key, $value); return true; } /** * Sets an expiration time on an item. * * @param string $key * @param int $ttl * * @return bool */ public function setTimeout($key, $ttl) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { return true; } return false; } /** * Retrieve item from the server. * * @param string $key * * @return bool */ public function get($key) { if (!$this->connected) { return false; } return $this->getData($key); } /** * Append data to an existing item. * * @param string $key * @param string $value * * @return int Size of the value after the append. */ public function append($key, $value) { if (!$this->connected) { return false; } if (isset($this->storage[$key])) { $this->storeData($key, $this->getData($key).$value); return strlen($this->storage[$key]); } return false; } /** * Remove specified keys. * * @param string|array $key * * @return int */ public function delete($key) { if (!$this->connected) { return false; } if (is_array($key)) { $result = 0; foreach ($key as $k) { if (isset($this->storage[$k])) { unset($this->storage[$k]); ++$result; } } return $result; } if (isset($this->storage[$key])) { unset($this->storage[$key]); return 1; } return 0; } /** * Flush all existing items from all databases at the server. * * @return bool */ public function flushAll() { if (!$this->connected) { return false; } $this->storage = array(); return true; } /** * Close Redis server connection. * * @return bool */ public function close() { $this->connected = false; return true; } private function getData($key) { if (isset($this->storage[$key])) { return unserialize($this->storage[$key]); } return false; } private function storeData($key, $value) { $this->storage[$key] = serialize($value); return true; } public function select($dbnum) { if (!$this->connected) { return false; } if (0 > $dbnum) { return false; } return true; } } src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php000066400000000000000000000115311266465517700301710ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage; use Symfony\Component\HttpKernel\Profiler\Profile; use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class DummyMongoDbProfilerStorage extends MongoDbProfilerStorage { public function getMongo() { return parent::getMongo(); } } class MongoDbProfilerStorageTestDataCollector extends DataCollector { public function setData($data) { $this->data = $data; } public function getData() { return $this->data; } public function collect(Request $request, Response $response, \Exception $exception = null) { } public function getName() { return 'test_data_collector'; } } /** * @requires extension mongo */ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; public static function setUpBeforeClass() { self::$storage = new DummyMongoDbProfilerStorage('mongodb://localhost/symfony_tests/profiler_data', '', '', 86400); try { self::$storage->getMongo(); } catch (\MongoConnectionException $e) { self::$storage = null; } } public static function tearDownAfterClass() { if (self::$storage) { self::$storage->purge(); self::$storage = null; } } public function getDsns() { return array( array('mongodb://localhost/symfony_tests/profiler_data', array( 'mongodb://localhost/symfony_tests', 'symfony_tests', 'profiler_data', )), array('mongodb://user:password@localhost/symfony_tests/profiler_data', array( 'mongodb://user:password@localhost/symfony_tests', 'symfony_tests', 'profiler_data', )), array('mongodb://user:password@localhost/admin/symfony_tests/profiler_data', array( 'mongodb://user:password@localhost/admin', 'symfony_tests', 'profiler_data', )), array('mongodb://user:password@localhost:27009,localhost:27010/?replicaSet=rs-name&authSource=admin/symfony_tests/profiler_data', array( 'mongodb://user:password@localhost:27009,localhost:27010/?replicaSet=rs-name&authSource=admin', 'symfony_tests', 'profiler_data', )), ); } public function testCleanup() { $dt = new \DateTime('-2 day'); for ($i = 0; $i < 3; ++$i) { $dt->modify('-1 day'); $profile = new Profile('time_'.$i); $profile->setTime($dt->getTimestamp()); $profile->setMethod('GET'); self::$storage->write($profile); } $records = self::$storage->find('', '', 3, 'GET'); $this->assertCount(1, $records, '->find() returns only one record'); $this->assertEquals($records[0]['token'], 'time_2', '->find() returns the latest added record'); self::$storage->purge(); } /** * @dataProvider getDsns */ public function testDsnParser($dsn, $expected) { $m = new \ReflectionMethod(self::$storage, 'parseDsn'); $m->setAccessible(true); $this->assertEquals($expected, $m->invoke(self::$storage, $dsn)); } public function testUtf8() { $profile = new Profile('utf8_test_profile'); $data = 'HЁʃʃϿ, ϢorЃd!'; $nonUtf8Data = mb_convert_encoding($data, 'UCS-2'); $collector = new MongoDbProfilerStorageTestDataCollector(); $collector->setData($nonUtf8Data); $profile->setCollectors(array($collector)); self::$storage->write($profile); $readProfile = self::$storage->read('utf8_test_profile'); $collectors = $readProfile->getCollectors(); $this->assertCount(1, $collectors); $this->assertArrayHasKey('test_data_collector', $collectors); $this->assertEquals($nonUtf8Data, $collectors['test_data_collector']->getData(), 'Non-UTF8 data is properly encoded/decoded'); } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } protected function setUp() { if (self::$storage) { self::$storage->purge(); } else { $this->markTestSkipped('A MongoDB server on localhost is required.'); } } } src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php000066400000000000000000000045311266465517700254000ustar00rootroot00000000000000 * * 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 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; class ProfilerTest extends \PHPUnit_Framework_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->assertEquals(array('foo' => 'bar'), $profiler->get('request')->getRequestQuery()->all()); } 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', '')); } 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); } } } src/Symfony/Component/HttpKernel/Tests/Profiler/RedisProfilerStorageTest.php000066400000000000000000000022671266465517700277200ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage; use Symfony\Component\HttpKernel\Tests\Profiler\Mock\RedisMock; class RedisProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; protected function setUp() { $redisMock = new RedisMock(); $redisMock->connect('127.0.0.1', 6379); self::$storage = new RedisProfilerStorage('redis://127.0.0.1:6379', '', '', 86400); self::$storage->setRedis($redisMock); if (self::$storage) { self::$storage->purge(); } } protected function tearDown() { if (self::$storage) { self::$storage->purge(); self::$storage = false; } } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } } src/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php000066400000000000000000000022331266465517700301040ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage; /** * @requires extension pdo_sqlite */ class SqliteProfilerStorageTest extends AbstractProfilerStorageTest { protected static $dbFile; protected static $storage; public static function setUpBeforeClass() { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_storage'); if (file_exists(self::$dbFile)) { @unlink(self::$dbFile); } self::$storage = new SqliteProfilerStorage('sqlite:'.self::$dbFile); } public static function tearDownAfterClass() { @unlink(self::$dbFile); } protected function setUp() { self::$storage->purge(); } /** * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface */ protected function getStorage() { return self::$storage; } } src/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php000066400000000000000000000021071266465517700241110ustar00rootroot00000000000000 * * 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\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 { public function __construct() { parent::__construct(new EventDispatcher(), $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()); } } src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php000066400000000000000000000035771266465517700237540ustar00rootroot00000000000000 * * 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\UriSigner; class UriSignerTest extends \PHPUnit_Framework_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'))); } } src/Symfony/Component/HttpKernel/UriSigner.php000066400000000000000000000056111266465517700220010ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/HttpKernel/composer.json000066400000000000000000000035611266465517700221050ustar00rootroot00000000000000{ "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.3.9", "symfony/event-dispatcher": "~2.6,>=2.6.7", "symfony/http-foundation": "~2.5,>=2.5.4", "symfony/debug": "~2.6,>=2.6.2", "psr/log": "~1.0" }, "require-dev": { "symfony/browser-kit": "~2.3", "symfony/class-loader": "~2.1", "symfony/config": "~2.7", "symfony/console": "~2.3", "symfony/css-selector": "~2.0,>=2.0.5", "symfony/dependency-injection": "~2.2", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/expression-language": "~2.4", "symfony/finder": "~2.0,>=2.0.5", "symfony/process": "~2.0,>=2.0.5", "symfony/routing": "~2.2", "symfony/stopwatch": "~2.3", "symfony/templating": "~2.2", "symfony/translation": "~2.0,>=2.0.5", "symfony/var-dumper": "~2.6" }, "conflict": { "symfony/config": "<2.7" }, "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": "2.7-dev" } } } src/Symfony/Component/HttpKernel/phpunit.xml.dist000066400000000000000000000021031266465517700225250ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor Symfony\Component\HttpFoundation src/Symfony/Component/Intl/000077500000000000000000000000001266465517700162045ustar00rootroot00000000000000src/Symfony/Component/Intl/.gitignore000066400000000000000000000000421266465517700201700ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Intl/CONTRIBUTING.md000066400000000000000000000063121266465517700204370ustar00rootroot00000000000000Contributing 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. src/Symfony/Component/Intl/Collator/000077500000000000000000000000001266465517700177635ustar00rootroot00000000000000src/Symfony/Component/Intl/Collator/Collator.php000066400000000000000000000213571266465517700222630ustar00rootroot00000000000000 * * 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 */ 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 Collator * * @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__); } } src/Symfony/Component/Intl/Data/000077500000000000000000000000001266465517700170555ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Bundle/000077500000000000000000000000001266465517700202665ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Bundle/Compiler/000077500000000000000000000000001266465517700220405ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Bundle/Compiler/BundleCompilerInterface.php000066400000000000000000000012431266465517700272760ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/Data/Bundle/Compiler/GenrbCompiler.php000066400000000000000000000035611266465517700253060ustar00rootroot00000000000000 * * 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 )); } } } src/Symfony/Component/Intl/Data/Bundle/Reader/000077500000000000000000000000001266465517700214705ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php000066400000000000000000000024331266465517700262020ustar00rootroot00000000000000 * * 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]; } } src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php000066400000000000000000000136031266465517700255620ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php000066400000000000000000000035701266465517700274050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/Data/Bundle/Reader/BundleReaderInterface.php000066400000000000000000000014251266465517700263600ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php000066400000000000000000000032231266465517700253640ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php000066400000000000000000000047351266465517700254000ustar00rootroot00000000000000 * * 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, self::getLastJsonError() )); } return $data; } /** * @return string The last error message created by {@link json_decode()} * * @link http://de2.php.net/manual/en/function.json-last-error-msg.php#113243 */ private static function getLastJsonError() { if (function_exists('json_last_error_msg')) { return json_last_error_msg(); } static $errors = array( JSON_ERROR_NONE => null, JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', ); $error = json_last_error(); return array_key_exists($error, $errors) ? $errors[$error] : sprintf('Unknown error (%s)', $error); } } src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php000066400000000000000000000023101266465517700252010ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Bundle/Writer/000077500000000000000000000000001266465517700215425ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Bundle/Writer/BundleWriterInterface.php000066400000000000000000000013201266465517700264760ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php000066400000000000000000000023461266465517700255200ustar00rootroot00000000000000 * * 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); } }); if (PHP_VERSION_ID >= 50400) { // Use JSON_PRETTY_PRINT so that we can see what changed in Git diffs file_put_contents( $path.'/'.$locale.'.json', json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n" ); } else { file_put_contents($path.'/'.$locale.'.json', json_encode($data)."\n"); } } } src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php000066400000000000000000000023301266465517700253270ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Intl/Data/Generator/000077500000000000000000000000001266465517700210035ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Generator/AbstractDataGenerator.php000066400000000000000000000100051266465517700257140ustar00rootroot00000000000000 * * 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; } /** * {@inheritdoc} */ 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); } src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php000066400000000000000000000142711266465517700257540ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Generator/GeneratorConfig.php000066400000000000000000000036211266465517700245720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php000066400000000000000000000141241266465517700257020ustar00rootroot00000000000000 * * 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', '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', '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) { $aliases = $metadataBundle['languageAlias']; $alpha2ToAlpha3 = array(); foreach ($aliases as $alias => $language) { 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]; if ($language !== $aliases[$alpha3]) { throw new RuntimeException( 'The statically set three-letter mapping '.$alpha3.' '. 'for the language code '.$language.' seems to be '. 'an alias for '.$aliases[$alpha3].'. 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; } } src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php000066400000000000000000000210401266465517700253510ustar00rootroot00000000000000 * * 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; } /** * {@inheritdoc} */ 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; } } src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php000066400000000000000000000102521266465517700254000ustar00rootroot00000000000000 * * 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 * * @link 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; } } src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php000066400000000000000000000047261266465517700254320ustar00rootroot00000000000000 * * 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, ); } } src/Symfony/Component/Intl/Data/Provider/000077500000000000000000000000001266465517700206475ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php000066400000000000000000000110751266465517700254630ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php000066400000000000000000000045431266465517700254160ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Intl/Data/Provider/LocaleDataProvider.php000066400000000000000000000044601266465517700250700ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Provider/RegionDataProvider.php000066400000000000000000000040451266465517700251130ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Provider/ScriptDataProvider.php000066400000000000000000000040451266465517700251340ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Util/000077500000000000000000000000001266465517700177725ustar00rootroot00000000000000src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php000066400000000000000000000035261266465517700264070ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Data/Util/LocaleScanner.php000066400000000000000000000046541266465517700232250ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Data/Util/RecursiveArrayAccess.php000066400000000000000000000023261266465517700245760ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Intl/Data/Util/RingBuffer.php000066400000000000000000000036641266465517700225450ustar00rootroot00000000000000 * * 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]); } } } src/Symfony/Component/Intl/DateFormatter/000077500000000000000000000000001266465517700207455ustar00rootroot00000000000000src/Symfony/Component/Intl/DateFormatter/DateFormat/000077500000000000000000000000001266465517700227735ustar00rootroot00000000000000src/Symfony/Component/Intl/DateFormatter/DateFormat/AmPmTransformer.php000066400000000000000000000015771266465517700265730ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfWeekTransformer.php000066400000000000000000000026661266465517700275570ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/DayOfYearTransformer.php000066400000000000000000000016401266465517700275530ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/DayTransformer.php000066400000000000000000000016661266465517700264550ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php000066400000000000000000000273151266465517700266410ustar00rootroot00000000000000 * * 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 */ 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) { $that = $this; $formatted = preg_replace_callback($this->regExp, function ($matches) use ($that, $dateTime) { return $that->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) { $that = $this; $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) use ($that) { $length = strlen($matches[0]); $transformerIndex = $matches[0][0]; $dateChars = $matches[0]; if ($that->isQuoteMatch($dateChars)) { return $that->replaceQuoteMatch($dateChars); } $transformers = $that->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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1200Transformer.php000066400000000000000000000023571266465517700271560ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour1201Transformer.php000066400000000000000000000024521266465517700271530ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2400Transformer.php000066400000000000000000000023131266465517700271510ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/Hour2401Transformer.php000066400000000000000000000025211266465517700271530ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/HourTransformer.php000066400000000000000000000014141266465517700266440ustar00rootroot00000000000000 * * 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 */ 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); } src/Symfony/Component/Intl/DateFormatter/DateFormat/MinuteTransformer.php000066400000000000000000000017551266465517700272000ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php000066400000000000000000000064411266465517700270210ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/QuarterTransformer.php000066400000000000000000000027261266465517700273610ustar00rootroot00000000000000 * * 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 */ 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(); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/SecondTransformer.php000066400000000000000000000017651266465517700271530ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php000066400000000000000000000065331266465517700274700ustar00rootroot00000000000000 * * 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 */ 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('The GMT time zone \'%s\' does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.'); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php000066400000000000000000000034671266465517700260200ustar00rootroot00000000000000 * * 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 */ 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); } } src/Symfony/Component/Intl/DateFormatter/DateFormat/YearTransformer.php000066400000000000000000000020001266465517700266170ustar00rootroot00000000000000 * * 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 */ 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, ); } } src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php000066400000000000000000000521751266465517700250600ustar00rootroot00000000000000 * * 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 */ 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. * @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) { 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 IntlDateFormatter * * @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. \DateTime objects * are supported as of PHP 5.3.4. * * @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 = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object'; if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $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; } // In PHP 5.5 default timezone depends on `date_default_timezone_get()` method if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { 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) { // In PHP 5.5 if $timeZoneId is null it fallbacks to `date_default_timezone_get()` method if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $timeZoneId = date_default_timezone_get(); } else { // TODO: changes were made to ext/intl in PHP 5.4.4 release that need to be investigated since it will // use ini's date.timezone when the time zone is not provided. As a not well tested workaround, uses UTC. // See the first two items of the commit message for more information: // https://github.com/php/php-src/commit/eb346ef0f419b90739aadfb6cc7b7436c5b521d9 $timeZoneId = getenv('TZ') ?: 'UTC'; } $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) { $timeZoneId = $timeZone = $this->getTimeZoneId(); } } catch (\Exception $e) { if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $timeZoneId = $timeZone = $this->getTimeZoneId(); } else { $timeZoneId = 'UTC'; } $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); } } src/Symfony/Component/Intl/Exception/000077500000000000000000000000001266465517700201425ustar00rootroot00000000000000src/Symfony/Component/Intl/Exception/BadMethodCallException.php000066400000000000000000000007571266465517700251660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/ExceptionInterface.php000066400000000000000000000006551266465517700244400ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/InvalidArgumentException.php000066400000000000000000000007601266465517700256260ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/MethodArgumentNotImplementedException.php000066400000000000000000000015151266465517700303240ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Exception/MethodArgumentValueNotImplementedException.php000066400000000000000000000023261266465517700313220ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Exception/MethodNotImplementedException.php000066400000000000000000000012261266465517700266200ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Intl/Exception/MissingResourceException.php000066400000000000000000000007311266465517700256540ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/NotImplementedException.php000066400000000000000000000016131266465517700254570ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Exception/OutOfBoundsException.php000066400000000000000000000007511266465517700247440ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/ResourceBundleNotFoundException.php000066400000000000000000000006311266465517700271300ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/RuntimeException.php000066400000000000000000000007301266465517700241550ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Exception/UnexpectedTypeException.php000066400000000000000000000012641266465517700255030ustar00rootroot00000000000000 * * 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))); } } src/Symfony/Component/Intl/Globals/000077500000000000000000000000001266465517700175675ustar00rootroot00000000000000src/Symfony/Component/Intl/Globals/IntlGlobals.php000066400000000000000000000063361266465517700225220ustar00rootroot00000000000000 * * 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 */ 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; } } src/Symfony/Component/Intl/Intl.php000066400000000000000000000165021266465517700176270ustar00rootroot00000000000000 * * 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 '51.2'; } /** * Returns the absolute path to the data directory. * * @return string The absolute path to the data directory */ public static function getDataDirectory() { return realpath(__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() { } } src/Symfony/Component/Intl/LICENSE000066400000000000000000000020511266465517700172070ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Intl/Locale.php000066400000000000000000000043771266465517700201270ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Intl/Locale/000077500000000000000000000000001266465517700174035ustar00rootroot00000000000000src/Symfony/Component/Intl/Locale/Locale.php000066400000000000000000000240131266465517700213130ustar00rootroot00000000000000 * * 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 */ 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__); } } } src/Symfony/Component/Intl/NumberFormatter/000077500000000000000000000000001266465517700213205ustar00rootroot00000000000000src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php000066400000000000000000000773161266465517700251630ustar00rootroot00000000000000 * * 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 */ 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 values of the integer type in 32 bit platforms. * * @var array */ private static $int32Range = array( 'positive' => 2147483647, 'negative' => -2147483648, ); /** * The maximum values of the integer type in 64 bit platforms. * * @var array */ private static $int64Range = array( 'positive' => 9223372036854775807, 'negative' => -9223372036854775808, ); 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 NumberFormatter * * @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 http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm */ 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 bool|string 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::$int32Range['positive'] || $value < self::$int32Range['negative']) { 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 * * @see https://bugs.php.net/bug.php?id=59597 Bug #59597 */ private function getInt64Value($value) { if ($value > self::$int64Range['positive'] || $value < self::$int64Range['negative']) { return false; } if (PHP_INT_SIZE !== 8 && ($value > self::$int32Range['positive'] || $value <= self::$int32Range['negative'])) { // Bug #59597 was fixed on PHP 5.3.14 and 5.4.4 // The negative PHP_INT_MAX was being converted to float if ( $value == self::$int32Range['negative'] && ((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) ) { return (int) $value; } return (float) $value; } if (PHP_INT_SIZE === 8) { // Bug #59597 was fixed on PHP 5.3.14 and 5.4.4 // A 32 bit integer was being generated instead of a 64 bit integer if ( ($value > self::$int32Range['positive'] || $value < self::$int32Range['negative']) && (PHP_VERSION_ID < 50314 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404)) && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone')) ) { $value = (-2147483648 - ($value % -2147483648)) * ($value / abs($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; } } src/Symfony/Component/Intl/README.md000066400000000000000000000011611266465517700174620ustar00rootroot00000000000000Intl Component ============= A PHP replacement layer for the C intl extension that includes additional data from the ICU library. The replacement layer is limited to the locale "en". If you want to use other locales, you should [install the intl extension] [0] instead. Documentation ------------- The documentation for the component can be found [online] [1]. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Intl/ $ composer install $ phpunit [0]: http://www.php.net/manual/en/intl.setup.php [1]: https://symfony.com/doc/2.7/components/intl.html src/Symfony/Component/Intl/ResourceBundle/000077500000000000000000000000001266465517700211255ustar00rootroot00000000000000src/Symfony/Component/Intl/ResourceBundle/CurrencyBundle.php000066400000000000000000000054331266465517700245670ustar00rootroot00000000000000 * * 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(); } } } src/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php000066400000000000000000000046721266465517700264140ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php000066400000000000000000000062151266465517700245170ustar00rootroot00000000000000 * * 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 */ 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(); } } } src/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.php000066400000000000000000000043531266465517700263410ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php000066400000000000000000000025511266465517700241720ustar00rootroot00000000000000 * * 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(); } } } src/Symfony/Component/Intl/ResourceBundle/LocaleBundleInterface.php000066400000000000000000000024011266465517700260050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/ResourceBundle/RegionBundle.php000066400000000000000000000037771266465517700242310ustar00rootroot00000000000000 * * 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(); } } } src/Symfony/Component/Intl/ResourceBundle/RegionBundleInterface.php000066400000000000000000000023651266465517700260420ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Intl/ResourceBundle/ResourceBundleInterface.php000066400000000000000000000011101266465517700263710ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Intl/Resources/000077500000000000000000000000001266465517700201565ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/bin/000077500000000000000000000000001266465517700207265ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/bin/autoload.php000066400000000000000000000007001266465517700232440ustar00rootroot00000000000000 * * 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; src/Symfony/Component/Intl/Resources/bin/common.php000066400000000000000000000036631266465517700227370ustar00rootroot00000000000000 * * 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; } }); src/Symfony/Component/Intl/Resources/bin/icu.ini000066400000000000000000000016151266465517700222120ustar00rootroot00000000000000; 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-rc/source src/Symfony/Component/Intl/Resources/bin/update-data.php000066400000000000000000000177531266465517700236450ustar00rootroot00000000000000 * * 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"; src/Symfony/Component/Intl/Resources/data/000077500000000000000000000000001266465517700210675ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/currencies/000077500000000000000000000000001266465517700232315ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/currencies/af.json000066400000000000000000000314151266465517700245160ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" ], "BYR": [ "BYR", "Belo-Russiese roebel" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/af_NA.json000066400000000000000000000001771266465517700250750ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "NAD": [ "$", "Namibiese dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ak.json000066400000000000000000000101231266465517700245140ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/am.json000066400000000000000000000343061266465517700245270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "የቦትስዋና ፑላ" ], "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", "ቼክ ሪፐብሊክ ኮሩና" ], "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", "የዚምቧቡዌ ዶላር" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar.json000066400000000000000000000522701266465517700245340ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" ], "BYR": [ "BYR", "روبل بيلاروسي" ], "BZD": [ "BZD", "دولار بليزي" ], "CAD": [ "CA$", "دولار كندي" ], "CDF": [ "CDF", "فرنك كونغولي" ], "CHF": [ "CHF", "فرنك سويسري" ], "CLP": [ "CLP", "بيزو شيلي" ], "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": [ "د.ج.‏", "دينار جزائري" ], "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": [ "ر.إن.", "روبية إندونيسية" ], "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": [ "ر.ب.", "روبية باكستاني" ], "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": [ "ج.ج.س.", "جنيه جنوب السودان" ], "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": [ "ل.ت.", "ليرة تركية" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar_DJ.json000066400000000000000000000002061266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DJF": [ "Fdj", "فرنك جيبوتي" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar_ER.json000066400000000000000000000002101266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ERN": [ "Nfk", "ناكفا أريتري" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar_LB.json000066400000000000000000000002061266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "SDG": [ "SDG", "جنيه سوداني" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar_SO.json000066400000000000000000000002021266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SOS": [ "S", "شلن صومالي" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ar_SS.json000066400000000000000000000003501266465517700251310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GBP": [ "GB£", "جنيه إسترليني" ], "SSP": [ "£", "جنيه جنوب السودان" ] } } src/Symfony/Component/Intl/Resources/data/currencies/az.json000066400000000000000000000510641266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": [ "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)" ], "BYR": [ "BYR", "Belarus Rublu" ], "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 Sterlinqi" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/az_Cyrl.json000066400000000000000000000001701266465517700255250ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AZN": [ "ман.", "AZN" ] } } src/Symfony/Component/Intl/Resources/data/currencies/be.json000066400000000000000000000021311266465517700245070ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "AUD": [ "A$", "аўстралійскі даляр" ], "BRL": [ "R$", "бразільскі рэал" ], "BYR": [ "р.", "беларускі рубель" ], "CNY": [ "CN¥", "кітайскі юань" ], "ERN": [ "ERN", "эрытрэйская накфа" ], "EUR": [ "€", "еўра" ], "GBP": [ "£", "англійскі фунт" ], "INR": [ "₹", "індыйская рупія" ], "JPY": [ "¥", "японская іена" ], "NOK": [ "NOK", "нарвэская крона" ], "RUB": [ "рас. руб.", "рускі рубель" ], "USD": [ "$", "долар ЗША" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bg.json000066400000000000000000000575601266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Беларуска рубла" ], "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": [ "руб.", "Руска рубла" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bm.json000066400000000000000000000103211266465517700245170ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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 Siterlingi" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bn.json000066400000000000000000000726021266465517700245320ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "বেলারুশিয়ান নিউ রুবেল (১৯৯৪–১৯৯৯)" ], "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", "চেকোস্লোভাক হার্ড কোরুনা" ], "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", "সিএফএ ফ্র্যাঙ্ক বিইএসি" ], "XCD": [ "EC$", "পূর্ব ক্যারাবিয়ান ডলার" ], "XEU": [ "XEU", "ইউরোপীয় মুদ্রা একক" ], "XFO": [ "XFO", "ফরাসি গোল্ড ফ্রাঙ্ক" ], "XFU": [ "XFU", "ফরাসি ইউআইসি - ফ্রাঙ্ক" ], "XOF": [ "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", "জিম্বাবুয়ে ডলার (২০০৮)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bo.json000066400000000000000000000003551266465517700245270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CNY": [ "¥", "ཡུ་ཨན་" ], "INR": [ "₹", "རྒྱ་གར་སྒོར་མོ་" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bo_IN.json000066400000000000000000000002041266465517700251060ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CNY": [ "CN¥", "ཡུ་ཨན་" ] } } src/Symfony/Component/Intl/Resources/data/currencies/br.json000066400000000000000000000464501266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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)" ], "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" ], "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" ], "BRL": [ "R$", "real Brazil" ], "BSD": [ "BSD", "dollar Bahamas" ], "BTN": [ "BTN", "ngultrum Bhoutan" ], "BUK": [ "BUK", "kyat Birmania" ], "BWP": [ "BWP", "pula Botswana" ], "BYB": [ "BYB", "roubl nevez Belarus (1994–1999)" ], "BYR": [ "BYR", "roubl Belarus" ], "BZD": [ "BZD", "dollar Belize" ], "CAD": [ "$CA", "dollar Kanada" ], "CDF": [ "CDF", "lur Kongo" ], "CHF": [ "CHF", "lur Suis" ], "CLE": [ "CLE", "escudo Chile" ], "CLF": [ "CLF", "unanenn jediñ Chile" ], "CLP": [ "CLP", "peso Chile" ], "CNX": [ "CNX", "dollar Bank poblel Sina" ], "CNY": [ "CN¥", "yuan Sina" ], "COP": [ "COP", "peso Kolombia" ], "CRC": [ "CRC", "colón Costa Rica" ], "CSD": [ "CSD", "dinar Serbia (2002–2006)" ], "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" ], "EEK": [ "EEK", "kurunenn Estonia" ], "EGP": [ "EGP", "lur Egipt" ], "ERN": [ "ERN", "nakfa Eritrea" ], "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 sterling Breizh-Veur" ], "GEL": [ "GEL", "lari Jorjia" ], "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" ], "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": [ "₪", "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": [ "JP¥", "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": [ "₩", "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" ], "LVL": [ "LVL", "lats Latvia" ], "LVR": [ "LVR", "roubl Latvia" ], "LYD": [ "LYD", "dinar Libia" ], "MAD": [ "MAD", "dirham Maroko" ], "MAF": [ "MAF", "lur Maroko" ], "MCF": [ "MCF", "lur Monaco" ], "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)" ], "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á" ], "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": [ "NT$", "dollar nevez Taiwan" ], "TZS": [ "TZS", "shilling Tanzania" ], "UAH": [ "UAH", "hryvnia Ukraina" ], "UGS": [ "UGS", "shilling Ouganda (1966–1987)" ], "UGX": [ "UGX", "shilling Ouganda" ], "USD": [ "$ SU", "dollar SU" ], "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": [ "₫", "dong Viêt Nam" ], "VNN": [ "VNN", "dong Viêt Nam (1978–1985)" ], "VUV": [ "VUV", "vatu Vanuatu" ], "WST": [ "WST", "tala Samoa" ], "XAF": [ "FCFA", "lur CFA BEAC" ], "XCD": [ "EC$", "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 BCEAO" ], "XPF": [ "CFPF", "lur CFP" ], "YDD": [ "YDD", "dinar Yemen" ], "YER": [ "YER", "rial Yemen" ], "YUM": [ "YUM", "dinar nevez Yougoslavia (1994–2002)" ], "YUN": [ "YUN", "dinar kemmadus Yougoslavia (1990–1992)" ], "YUR": [ "YUR", "dinar adreizhet Yougoslavia (1992–1993)" ], "ZAR": [ "ZAR", "rand Suafrika" ], "ZMK": [ "ZMK", "kwacha Zambia (1968–2012)" ], "ZMW": [ "ZMW", "kwacha Zambia" ], "ZWD": [ "ZWD", "dollar Zimbabwe (1980–2008)" ], "ZWL": [ "ZWL", "dollar Zimbabwe (2009)" ], "ZWR": [ "ZWR", "dollar Zimbabwe (2008)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bs.json000066400000000000000000000535051266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Jermenski dram" ], "ANG": [ "ANG", "Gulden Holandskih Antila" ], "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", "Bosansko-Hercegovač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)" ], "BYR": [ "BYR", "Bjeloruska rublja" ], "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ži dolar" ], "FKP": [ "FKP", "Folklandska funta" ], "FRF": [ "FRF", "Francuski franak" ], "GBP": [ "GBP", "Britanska funta sterlinga" ], "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", "Honduraska 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", "Jamajski 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 lev" ], "MGA": [ "MGA", "Malagaski ariari" ], "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", "Malavska 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 lev" ], "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", "Tuniski 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", "Tanzanski šiling" ], "UAH": [ "UAH", "Ukrajinska grivna" ], "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", "CFA franak BEAC" ], "XCD": [ "XCD", "Istočnokaripski dolar" ], "XEU": [ "XEU", "Evropska valutna jedinica" ], "XFO": [ "XFO", "Francuski zlatni frank" ], "XFU": [ "XFU", "Francuski UIC-frank" ], "XOF": [ "CFA", "CFA franak BCEAO" ], "XPF": [ "XPF", "CFP franak" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/bs_Cyrl.json000066400000000000000000000617331266465517700255330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Белоруска рубља" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ca.json000066400000000000000000000543771266465517700245270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "ruble bielorús" ], "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": [ "XOF", "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ca_FR.json000066400000000000000000000001751266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "FRF": [ "F", "franc francès" ] } } src/Symfony/Component/Intl/Resources/data/currencies/cs.json000066400000000000000000000556141266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "běloruský rubl" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/cy.json000066400000000000000000000276201266465517700245460ustar00rootroot00000000000000{ "Version": "2.1.7.80", "Names": { "AED": [ "AED", "Dirham Yr Emiradau Arabaidd Unedig" ], "AFN": [ "AFN", "Afghani Afghanistan" ], "ALL": [ "ALL", "Lek Albania" ], "AMD": [ "AMD", "Dram Armenia" ], "ANG": [ "ANG", "Guilder Antilles yr Iseldiroedd" ], "AOA": [ "AOA", "Kwanza Angola" ], "ARS": [ "ARS", "Peso yr Ariannin" ], "AUD": [ "A$", "Doler Awstralia" ], "AWG": [ "AWG", "Fflorin Aruba" ], "AZN": [ "AZN", "Manat Azerbaijan" ], "BAM": [ "BAM", "Marc Trosadwy Bosnia a Hercegovina" ], "BBD": [ "BBD", "Doler Barbados" ], "BDT": [ "BDT", "Taka Bangladesh" ], "BGN": [ "BGN", "Lev Bwlgaria" ], "BHD": [ "BHD", "Dinar Bahrain" ], "BIF": [ "BIF", "Ffranc Burundi" ], "BMD": [ "BMD", "Doler Bermuda" ], "BND": [ "BND", "Doler Brunei" ], "BOB": [ "BOB", "Boliviano Bolifia" ], "BRL": [ "R$", "Real Brasil" ], "BSD": [ "BSD", "Doler y Bahamas" ], "BTN": [ "BTN", "Ngultrum Bhutan" ], "BWP": [ "BWP", "Pula Botswana" ], "BYR": [ "BYR", "Rwbl Belarws" ], "BZD": [ "BZD", "Doler Belize" ], "CAD": [ "CA$", "Doler Canada" ], "CDF": [ "CDF", "Ffranc Congo" ], "CHF": [ "CHF", "Ffranc y Swistir" ], "CLP": [ "CLP", "Peso Chile" ], "CNY": [ "CN¥", "Yuan Tsieina" ], "COP": [ "COP", "Peso Colombia" ], "CRC": [ "CRC", "Colón Costa Rica" ], "CUC": [ "CUC", "Peso Trosadwy Cuba" ], "CUP": [ "CUP", "Peso Cuba" ], "CVE": [ "CVE", "Esgwdo Cabo Verde" ], "CZK": [ "CZK", "Koruna Tsiec" ], "DJF": [ "DJF", "Ffranc Djibouti" ], "DKK": [ "DKK", "Krone Denmarc" ], "DOP": [ "DOP", "Peso Gweriniaeth Dominica" ], "DZD": [ "DZD", "Dinar Algeria" ], "EGP": [ "EGP", "Punt Yr Aifft" ], "ERN": [ "ERN", "Nakfa Eritrea" ], "ETB": [ "ETB", "Birr Ethiopia" ], "EUR": [ "€", "Ewro" ], "FJD": [ "FJD", "Doler Ffiji" ], "FKP": [ "FKP", "Punt Ynysoedd Falkland\/Malvinas" ], "GBP": [ "£", "Punt Sterling Prydain" ], "GEL": [ "GEL", "Lari Georgia" ], "GHS": [ "GHS", "Cedi Ghana" ], "GIP": [ "GIP", "Punt Gibraltar" ], "GMD": [ "GMD", "Dalasi Gambia" ], "GNF": [ "GNF", "Ffranc Guinée" ], "GTQ": [ "GTQ", "Quetzal Guatemala" ], "GYD": [ "GYD", "Doler Guyana" ], "HKD": [ "HK$", "Doler Hong Kong" ], "HNL": [ "HNL", "Lempira Honduras" ], "HRK": [ "HRK", "Kuna Croatia" ], "HTG": [ "HTG", "Gourde Haiti" ], "HUF": [ "HUF", "Fforint Hwngari" ], "IDR": [ "IDR", "Rupiah Indonesia" ], "IEP": [ "IEP", "Punt Iwerddon" ], "ILS": [ "₪", "Shegel Newydd Israel" ], "INR": [ "₹", "Rwpî India" ], "IQD": [ "IQD", "Dinar Irac" ], "IRR": [ "IRR", "Rial Iran" ], "ISK": [ "ISK", "Króna Gwlad yr Iâ" ], "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" ], "KRW": [ "₩", "Won De Korea" ], "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" ], "LTL": [ "LTL", "Litas Lithwania" ], "LVL": [ "LVL", "Lats Latfia" ], "LYD": [ "LYD", "Dinar Libya" ], "MAD": [ "MAD", "Dirham Moroco" ], "MDL": [ "MDL", "Leu Moldofa" ], "MGA": [ "MGA", "Ariary Madagascar" ], "MKD": [ "MKD", "Denar Macedonia" ], "MMK": [ "MMK", "Kyat Myanmar" ], "MNT": [ "MNT", "Tugrik Mongolia" ], "MOP": [ "MOP", "Pataca Macau" ], "MRO": [ "MRO", "Ouguiya Mauritania" ], "MUR": [ "MUR", "Rwpî Mauritius" ], "MVR": [ "MVR", "Rufiyaa’r Maldives" ], "MWK": [ "MWK", "Kwacha Malawi" ], "MXN": [ "MX$", "Peso México" ], "MYR": [ "MYR", "Ringgit Malaysia" ], "MZN": [ "MZN", "Metical Mozambique" ], "NAD": [ "NAD", "Doler Namibia" ], "NGN": [ "NGN", "Naira Nigeria" ], "NIO": [ "NIO", "Córdoba Nicaragua" ], "NOK": [ "NOK", "Krone Norwy" ], "NPR": [ "NPR", "Rwpî Nepal" ], "NZD": [ "NZ$", "Doler Seland Newydd" ], "OMR": [ "OMR", "Rial Oman" ], "PAB": [ "PAB", "Balboa Panama" ], "PEN": [ "PEN", "Nuevo Sol Periw" ], "PGK": [ "PGK", "Kina Papua Guinea Newydd" ], "PHP": [ "PHP", "Peso Pilipinas" ], "PKR": [ "PKR", "Rwpî Pacistan" ], "PLN": [ "PLN", "Zloty Gwlad Pwyl" ], "PYG": [ "PYG", "Guarani Paraguay" ], "QAR": [ "QAR", "Rial Qatar" ], "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" ], "SDG": [ "SDG", "Punt Sudan" ], "SEK": [ "SEK", "Krona Sweden" ], "SGD": [ "SGD", "Doler Singapore" ], "SHP": [ "SHP", "Punt Saint Helena" ], "SLL": [ "SLL", "Leone Sierra Leone" ], "SOS": [ "SOS", "Swllt Somalia" ], "SRD": [ "SRD", "Doler Surinam" ], "SSP": [ "SSP", "Punt De Sudan" ], "STD": [ "STD", "Dobra São Tomé a Príncipe" ], "SYP": [ "SYP", "Punt Syria" ], "SZL": [ "SZL", "Lilangeni Gwlad Swazi" ], "THB": [ "฿", "Baht Gwlad Thai" ], "TJS": [ "TJS", "Somoni Tajikistan" ], "TMT": [ "TMT", "Manat Turkmenistan" ], "TND": [ "TND", "Dinar Tunisia" ], "TOP": [ "TOP", "Paʻanga Tonga" ], "TRY": [ "TRY", "Lira Twrci" ], "TTD": [ "TTD", "Doler Trinidad a Tobago" ], "TWD": [ "NT$", "Doler Newydd Taiwan" ], "TZS": [ "TZS", "Swllt Tanzania" ], "UAH": [ "UAH", "Hryvnia Wcráin" ], "UGX": [ "UGX", "Swllt Uganda" ], "USD": [ "US$", "Doler UDA" ], "UYU": [ "UYU", "Peso Uruguay" ], "UZS": [ "UZS", "Som Uzbekistan" ], "VEF": [ "VEF", "Bolívar Venezuela" ], "VND": [ "₫", "Dong Fietnam" ], "VUV": [ "VUV", "Vatu Vanuatu" ], "WST": [ "WST", "Tala Samoa" ], "XAF": [ "FCFA", "Ffranc CFA y BEAC" ], "XCD": [ "EC$", "Doler Dwyrain y Caribî" ], "XOF": [ "CFA", "Ffranc CFA y BCEAO" ], "XPF": [ "CFPF", "Ffranc CPF" ], "YER": [ "YER", "Rial Yemen" ], "ZAR": [ "ZAR", "Rand De Affrica" ], "ZMK": [ "ZMK", "Kwacha Zambia (1968–2012)" ], "ZMW": [ "ZMW", "Kwacha Zambia" ] } } src/Symfony/Component/Intl/Resources/data/currencies/da.json000066400000000000000000000504561266465517700245220ustar00rootroot00000000000000{ "Version": "2.1.9.62", "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)" ], "BYR": [ "BYR", "Hviderussisk rubel" ], "BZD": [ "BZD", "Belizisk dollar" ], "CAD": [ "CA$", "Canadisk dollar" ], "CDF": [ "CDF", "Congolesisk franc" ], "CHE": [ "CHE", "WIR euro" ], "CHF": [ "CHF", "Schweizisk franc" ], "CHW": [ "CHW", "WIR franc" ], "CLP": [ "CLP", "Chilensk peso" ], "CNY": [ "CN¥", "Kinesisk yuan renminbi" ], "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", "Islansk 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$", "New Zealandsk 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", "Sydsudanske 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/de.json000066400000000000000000000562501266465517700245240ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Weißrussischer Rubel" ], "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", "Kap-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 Sterling" ], "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 Neuer 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/de_CH.json000066400000000000000000000003251266465517700250660ustar00rootroot00000000000000{ "Version": "2.1.8.21", "Names": { "BYR": [ "BYR", "Weissrussischer Rubel" ], "CHF": [ "CHF", "Schweizer Franken" ] } } src/Symfony/Component/Intl/Resources/data/currencies/de_LU.json000066400000000000000000000002241266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "LUF": [ "F", "Luxemburgischer Franc", {} ] } } src/Symfony/Component/Intl/Resources/data/currencies/dz.json000066400000000000000000000227161266465517700245510ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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", "སཱའུཐ་ ཨཕ་རི་ཀ་གི་དངུལ་ རཱནད" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ee.json000066400000000000000000000541611266465517700245240ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": [ "A$", "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$", "brazilga 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)" ], "BYR": [ "BYR", "belarusiaga ruble" ], "BZD": [ "BZD", "belizega dollar" ], "CAD": [ "CA$", "kanadaga 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¥", "tsainaga 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", "danemarkga 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": [ "€", "euro" ], "FIM": [ "FIM", "finlandga markka" ], "FJD": [ "FJD", "fidziga dollar" ], "FKP": [ "FKP", "falklanɖ ƒudomekpo dukɔwo ƒe ga pound" ], "FRF": [ "FRF", "frentsiga franc" ], "GBP": [ "£", "britainga pound sterling" ], "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", "indinesiaga 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¥", "dzapanga 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": [ "₩", "anyiehe 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$", "meksikoga 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", "rɔtsiaga ruble" ], "RUR": [ "RUR", "rɔtsiaga ruble (1991–1998)" ], "RWF": [ "RWF", "rwandaga franc" ], "SAR": [ "SAR", "saudiga 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", "swedenga krona" ], "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": [ "THB", "thaiga 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", "tɛkiiga lira" ], "TTD": [ "TTD", "trinidad kple tobagoga dollar" ], "TWD": [ "NT$", "taiwanga yeye 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", "anyiehe afrikaga 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/el.json000066400000000000000000000605471266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Ρούβλι Λευκορωσίας" ], "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 Κεντρικής Αφρικής (BEAC)" ], "XCD": [ "EC$", "Δολάριο Ανατολικής Καραϊβικής" ], "XEU": [ "XEU", "Ευρωπαϊκή Συναλλαγματική Μονάδα" ], "XFO": [ "XFO", "Χρυσό Φράγκο Γαλλίας" ], "XFU": [ "XFU", "UIC-Φράγκο Γαλλίας" ], "XOF": [ "CFA", "Φράγκο CFA Δυτικής Αφρικής (BCEAO)" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en.json000066400000000000000000000547311266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.87", "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 New Ruble (1994–1999)" ], "BYR": [ "BYR", "Belarusian Ruble" ], "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 Sterling" ], "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 Sheqel (1980–1985)" ], "ILS": [ "₪", "Israeli New Sheqel" ], "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 Nuevo 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", "Uzbekistan 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", "CFA Franc BEAC" ], "XCD": [ "EC$", "East Caribbean Dollar" ], "XEU": [ "XEU", "European Currency Unit" ], "XFO": [ "XFO", "French Gold Franc" ], "XFU": [ "XFU", "French UIC-Franc" ], "XOF": [ "CFA", "CFA Franc BCEAO" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_001.json000066400000000000000000000001721266465517700251060ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "USD": [ "US$", "US Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_AG.json000066400000000000000000000002041266465517700250710ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_AI.json000066400000000000000000000002041266465517700250730ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_AU.json000066400000000000000000000011371266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BYR": [ "BYR", "Belarusian Rouble" ], "GBP": [ "£", "British Pound" ], "RUB": [ "RUB", "Russian Rouble" ], "SCR": [ "SCR", "Seychelles Rupee" ], "UZS": [ "UZS", "Uzbekistani Som" ], "XAF": [ "FCFA", "Central African CFA Franc" ], "XOF": [ "CFA", "West African CFA Franc" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_BB.json000066400000000000000000000001771266465517700250760ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BBD": [ "$", "Barbadian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_BM.json000066400000000000000000000001761266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BMD": [ "$", "Bermudan Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_BS.json000066400000000000000000000001761266465517700251160ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BSD": [ "$", "Bahamian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_BW.json000066400000000000000000000001751266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BWP": [ "P", "Botswanan Pula" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_BZ.json000066400000000000000000000001741266465517700251230ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BZD": [ "$", "Belize Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_CA.json000066400000000000000000000003051266465517700250670ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "CAD": [ "$", "Canadian Dollar" ], "USD": [ "US$", "US Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_CC.json000066400000000000000000000002001266465517700250630ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_CK.json000066400000000000000000000002011266465517700250740ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NZD": [ "$", "New Zealand Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_CX.json000066400000000000000000000002001266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_DM.json000066400000000000000000000002041266465517700251020ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_ER.json000066400000000000000000000001771266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ERN": [ "Nfk", "Eritrean Nakfa" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_FJ.json000066400000000000000000000001741266465517700251070ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "FJD": [ "$", "Fijian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_FK.json000066400000000000000000000003331266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "FKP": [ "£", "Falkland Islands Pound" ], "GBP": [ "GB£", "British Pound Sterling" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GB.json000066400000000000000000000442141266465517700251030ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ADP": [ "ADP", "Andorran Peseta" ], "AED": [ "AED", "United Arab Emirates Dirham" ], "AFA": [ "AFA", "Afghan Afghani (1927–2002)" ], "AFN": [ "AFN", "Afghan Afghani" ], "ALL": [ "ALL", "Albanian Lek" ], "AMD": [ "AMD", "Armenian Dram" ], "ANG": [ "ANG", "Netherlands Antillean Guilder" ], "AOA": [ "AOA", "Angolan Kwanza" ], "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" ], "BRL": [ "R$", "Brazilian Real" ], "BSD": [ "BSD", "Bahamian Dollar" ], "BTN": [ "BTN", "Bhutanese Ngultrum" ], "BUK": [ "BUK", "Burmese Kyat" ], "BWP": [ "BWP", "Botswanan Pula" ], "BYB": [ "BYB", "Belarusian New Rouble (1994–1999)" ], "BYR": [ "BYR", "Belarusian Ruble" ], "BZD": [ "BZD", "Belize Dollar" ], "CAD": [ "CA$", "Canadian Dollar" ], "CDF": [ "CDF", "Congolese Franc" ], "CHE": [ "CHE", "WIR Euro" ], "CHF": [ "CHF", "Swiss Franc" ], "CHW": [ "CHW", "WIR Franc" ], "CLP": [ "CLP", "Chilean Peso" ], "CNY": [ "CN¥", "Chinese Yuan" ], "COP": [ "COP", "Colombian Peso" ], "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" ], "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 Sterling" ], "GEK": [ "GEK", "Georgian Kupon Larit" ], "GEL": [ "GEL", "Georgian Lari" ], "GHS": [ "GHS", "Ghanaian Cedi" ], "GIP": [ "GIP", "Gibraltar Pound" ], "GMD": [ "GMD", "Gambian Dalasi" ], "GNF": [ "GNF", "Guinean Franc" ], "GRD": [ "GRD", "Greek Drachma" ], "GTQ": [ "GTQ", "Guatemalan Quetzal" ], "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" ], "ISK": [ "ISK", "Icelandic Króna" ], "ITL": [ "ITL", "Italian Lira" ], "JMD": [ "JMD", "Jamaican Dollar" ], "JOD": [ "JOD", "Jordanian Dinar" ], "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 Rouble" ], "LYD": [ "LYD", "Libyan Dinar" ], "MAD": [ "MAD", "Moroccan Dirham" ], "MCF": [ "MCF", "Monegasque Franc" ], "MDC": [ "MDC", "Moldovan Cupon" ], "MDL": [ "MDL", "Moldovan Leu" ], "MGA": [ "MGA", "Malagasy Ariary" ], "MKD": [ "MKD", "Macedonian Denar" ], "MKN": [ "MKN", "Macedonian Denar (1992–1993)" ], "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" ], "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" ], "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" ], "PEN": [ "PEN", "Peruvian Nuevo Sol" ], "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" ], "ROL": [ "ROL", "Romanian Leu (1952–2006)" ], "RON": [ "RON", "Romanian Leu" ], "RSD": [ "RSD", "Serbian Dinar" ], "RUB": [ "RUB", "Russian Ruble" ], "RUR": [ "RUR", "Russian Rouble (1991–1998)" ], "RWF": [ "RWF", "Rwandan Franc" ], "SAR": [ "SAR", "Saudi Riyal" ], "SBD": [ "SBD", "Solomon Islands Dollar" ], "SCR": [ "SCR", "Seychellois Rupee" ], "SDG": [ "SDG", "Sudanese Pound" ], "SEK": [ "SEK", "Swedish Krona" ], "SGD": [ "SGD", "Singapore Dollar" ], "SHP": [ "SHP", "Saint Helena Pound" ], "SIT": [ "SIT", "Slovenian Tolar" ], "SKK": [ "SKK", "Slovak Koruna" ], "SLL": [ "SLL", "Sierra Leonean Leone" ], "SOS": [ "SOS", "Somali Shilling" ], "SRD": [ "SRD", "Surinamese Dollar" ], "SSP": [ "SSP", "South Sudanese Pound" ], "STD": [ "STD", "São Tomé and Príncipe Dobra" ], "SUR": [ "SUR", "Soviet Rouble" ], "SVC": [ "SVC", "Salvadoran Colón" ], "SYP": [ "SYP", "Syrian Pound" ], "SZL": [ "SZL", "Swazi Lilangeni" ], "THB": [ "฿", "Thai Baht" ], "TJR": [ "TJR", "Tajikistani Rouble" ], "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 and Tobago Dollar" ], "TWD": [ "NT$", "New Taiwan Dollar" ], "TZS": [ "TZS", "Tanzanian Shilling" ], "UAH": [ "UAH", "Ukrainian Hryvnia" ], "UAK": [ "UAK", "Ukrainian Karbovanets" ], "UGX": [ "UGX", "Ugandan Shilling" ], "USN": [ "USN", "US Dollar (Next day)" ], "USS": [ "USS", "US Dollar (Same day)" ], "UYU": [ "UYU", "Uruguayan Peso" ], "UZS": [ "UZS", "Uzbekistan Som" ], "VEF": [ "VEF", "Venezuelan Bolívar" ], "VND": [ "₫", "Vietnamese Dong" ], "VNN": [ "VNN", "Vietnamese Dong (1978–1985)" ], "VUV": [ "VUV", "Vanuatu Vatu" ], "WST": [ "WST", "Samoan Tala" ], "XAF": [ "FCFA", "CFA Franc BEAC" ], "XCD": [ "EC$", "East Caribbean Dollar" ], "XEU": [ "XEU", "European Currency Unit" ], "XFO": [ "XFO", "French Gold Franc" ], "XFU": [ "XFU", "French UIC-Franc" ], "XOF": [ "CFA", "CFA Franc BCEAO" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GD.json000066400000000000000000000002041266465517700250740ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GH.json000066400000000000000000000002001266465517700250740ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GHS": [ "GH₵", "Ghanaian Cedi" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GI.json000066400000000000000000000003241266465517700251040ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GBP": [ "GB£", "British Pound Sterling" ], "GIP": [ "£", "Gibraltar Pound" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GM.json000066400000000000000000000001751266465517700251140ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GMD": [ "D", "Gambian Dalasi" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_GY.json000066400000000000000000000001771266465517700251320ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GYD": [ "$", "Guyanaese Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_JM.json000066400000000000000000000001761266465517700251200ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "JMD": [ "$", "Jamaican Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_KE.json000066400000000000000000000002001266465517700250750ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KES": [ "Ksh", "Kenyan Shilling" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_KI.json000066400000000000000000000002001266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_KN.json000066400000000000000000000002041266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_KY.json000066400000000000000000000002041266465517700251250ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KYD": [ "$", "Cayman Islands Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_LC.json000066400000000000000000000002041266465517700251000ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_LR.json000066400000000000000000000001761266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "LRD": [ "$", "Liberian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_LS.json000066400000000000000000000002011266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ZAR": [ "R", "South African Rand" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MG.json000066400000000000000000000001771266465517700251160ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MGA": [ "Ar", "Malagasy Ariary" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MO.json000066400000000000000000000002011266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "MOP": [ "MOP$", "Macanese Pataca" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MS.json000066400000000000000000000002041266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MT.json000066400000000000000000000002101266465517700251170ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GBP": [ "GB£", "British Pound Sterling" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MU.json000066400000000000000000000001771266465517700251340ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MUR": [ "Rs", "Mauritian Rupee" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MW.json000066400000000000000000000001771266465517700251360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MWK": [ "MK", "Malawian Kwacha" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_MY.json000066400000000000000000000002001266465517700251230ustar00rootroot00000000000000{ "Version": "2.1.3.1", "Names": { "MYR": [ "RM", "Malaysian Ringgit" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NA.json000066400000000000000000000001761266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NAD": [ "$", "Namibian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NF.json000066400000000000000000000002001266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NG.json000066400000000000000000000001771266465517700251170ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NGN": [ "₦", "Nigerian Naira" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NH.json000066400000000000000000000001741266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "VUV": [ "VT", "Vanuatu Vatu" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NR.json000066400000000000000000000002001266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NU.json000066400000000000000000000002011266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NZD": [ "$", "New Zealand Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_NZ.json000066400000000000000000000002011266465517700251260ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "NZD": [ "$", "New Zealand Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_PG.json000066400000000000000000000002051266465517700251110ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "PGK": [ "K", "Papua New Guinean Kina" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_PH.json000066400000000000000000000002001266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "PHP": [ "₱", "Philippine Peso" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_PK.json000066400000000000000000000001771266465517700251250ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "PKR": [ "Rs", "Pakistani Rupee" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_PN.json000066400000000000000000000002011266465517700251140ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NZD": [ "$", "New Zealand Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_RW.json000066400000000000000000000001751266465517700251410ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "RWF": [ "RF", "Rwandan Franc" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SB.json000066400000000000000000000002051266465517700251070ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SBD": [ "$", "Solomon Islands Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SC.json000066400000000000000000000002011266465517700251040ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SCR": [ "SR", "Seychellois Rupee" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SG.json000066400000000000000000000001771266465517700251240ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "SGD": [ "$", "Singapore Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SH.json000066400000000000000000000003271266465517700251220ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GBP": [ "GB£", "British Pound Sterling" ], "SHP": [ "£", "Saint Helena Pound" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SL.json000066400000000000000000000002041266465517700251200ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SLL": [ "Le", "Sierra Leonean Leone" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SS.json000066400000000000000000000003311266465517700251300ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GBP": [ "GB£", "British Pound Sterling" ], "SSP": [ "£", "South Sudanese Pound" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SX.json000066400000000000000000000002171266465517700251400ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ANG": [ "NAf.", "Netherlands Antillean Guilder" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_SZ.json000066400000000000000000000001761266465517700251460ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SZL": [ "E", "Swazi Lilangeni" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_TK.json000066400000000000000000000002011266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NZD": [ "$", "New Zealand Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_TO.json000066400000000000000000000001771266465517700251350ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "TOP": [ "T$", "Tongan Paʻanga" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_TT.json000066400000000000000000000002071266465517700251340ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "TTD": [ "$", "Trinidad & Tobago Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_TV.json000066400000000000000000000002001266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "$", "Australian Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_TZ.json000066400000000000000000000002031266465517700251360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "TZS": [ "TSh", "Tanzanian Shilling" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_UG.json000066400000000000000000000002011266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "UGX": [ "USh", "Ugandan Shilling" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_VC.json000066400000000000000000000002041266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Names": { "XCD": [ "$", "East Caribbean Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_VU.json000066400000000000000000000001741266465517700251420ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "VUV": [ "VT", "Vanuatu Vatu" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_WS.json000066400000000000000000000001741266465517700251410ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "WST": [ "WS$", "Samoan Tala" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_ZA.json000066400000000000000000000002011266465517700251110ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ZAR": [ "R", "South African Rand" ] } } src/Symfony/Component/Intl/Resources/data/currencies/en_ZM.json000066400000000000000000000001751266465517700251370ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ZMW": [ "K", "Zambian Kwacha" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es.json000066400000000000000000000503101266465517700245320ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 armenio" ], "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 de Aruba" ], "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 de Barbados" ], "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", "leva" ], "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 de las Bahamas" ], "BTN": [ "BTN", "gultrum" ], "BUK": [ "BUK", "kyat birmano" ], "BWP": [ "BWP", "pula" ], "BYB": [ "BYB", "nuevo rublo bielorruso (1994–1999)" ], "BYR": [ "BYR", "rublo bielorruso" ], "BZD": [ "BZD", "dólar de Belice" ], "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 eritreo" ], "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 de las Islas Malvinas" ], "FRF": [ "FRF", "franco francés" ], "GBP": [ "GBP", "libra esterlina" ], "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 de Hong Kong" ], "HNL": [ "HNL", "lempira hondureño" ], "HRD": [ "HRD", "dinar croata" ], "HRK": [ "HRK", "kuna" ], "HTG": [ "HTG", "gourde haitiano" ], "HUF": [ "HUF", "forinto" ], "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 de Jamaica" ], "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", "tengue" ], "LAK": [ "LAK", "kip" ], "LBP": [ "LBP", "libra libanesa" ], "LKR": [ "LKR", "rupia de Sri Lanka" ], "LRD": [ "LRD", "dólar liberiano" ], "LSL": [ "LSL", "loti lesothense" ], "LTL": [ "LTL", "litas" ], "LTT": [ "LTT", "talonas lituano" ], "LUC": [ "LUC", "franco convertible luxemburgués" ], "LUF": [ "LUF", "franco luxemburgués" ], "LUL": [ "LUL", "franco financiero luxemburgués" ], "LVL": [ "LVL", "lats" ], "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", "kuacha 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" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_419.json000066400000000000000000000025631266465517700251360ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AMD": [ "AMD", "dram" ], "AWG": [ "AWG", "florín arubeño" ], "BBD": [ "BBD", "dólar barbadense" ], "BSD": [ "BSD", "dólar bahameño" ], "BZD": [ "BZD", "dólar beliceño" ], "CAD": [ "CAD", "dólar canadiense" ], "ERN": [ "ERN", "nakfa" ], "EUR": [ "EUR", "euro" ], "HKD": [ "HKD", "dólar hongkonés" ], "ILS": [ "ILS", "nuevo sheqel israelí" ], "JMD": [ "JMD", "dólar jamaicano" ], "KZT": [ "KZT", "tenge kazako" ], "LKR": [ "LKR", "rupia esrilanquesa" ], "MOP": [ "MOP", "pataca" ], "THB": [ "THB", "bat" ], "USD": [ "USD", "dólar estadounidense" ], "VND": [ "VND", "dong" ], "ZMW": [ "ZMK", "kuacha zambiano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_AR.json000066400000000000000000000003201266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ARS": [ "$", "peso argentino" ], "USD": [ "US$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_BO.json000066400000000000000000000001711266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BOB": [ "Bs", "boliviano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_CL.json000066400000000000000000000003161266465517700251110ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "CLP": [ "$", "peso chileno" ], "USD": [ "US$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_CO.json000066400000000000000000000003211266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "COP": [ "$", "peso colombiano" ], "USD": [ "US$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_CR.json000066400000000000000000000002051266465517700251140ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CRC": [ "₡", "colón costarricense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_CU.json000066400000000000000000000003151266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CUP": [ "$", "peso cubano" ], "USD": [ "US$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_DO.json000066400000000000000000000003211266465517700251110ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DOP": [ "$", "peso dominicano" ], "USD": [ "US$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_EC.json000066400000000000000000000002041266465517700250760ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "USD": [ "$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_GQ.json000066400000000000000000000002011266465517700251130ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "XAF": [ "FCFA", "franco CFA BEAC" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_GT.json000066400000000000000000000002031266465517700251200ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GTQ": [ "Q", "quetzal guatemalteco" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_HN.json000066400000000000000000000002011266465517700251110ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "HNL": [ "L", "lempira hondureño" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_MX.json000066400000000000000000000157411266465517700251470ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AFN": [ "Af", "afgani afgano" ], "ALL": [ "ALL", "lek albanés" ], "AMD": [ "AMD", "dram armenio" ], "ANG": [ "Naf", "florín de las Antillas Neerlandesas" ], "AOA": [ "Kz", "kwanza angoleño" ], "ARA": [ "ARA", "austral argentino" ], "ARS": [ "$a", "peso argentino" ], "AUD": [ "AU$", "dólar australiano" ], "AWG": [ "Afl.", "florín arubeño" ], "BDT": [ "BDT", "taka de Bangladesh" ], "BGN": [ "BGN", "lev búlgaro" ], "BND": [ "BND", "dólar de Brunéi" ], "BOL": [ "BOL", "BOL" ], "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)" ], "BRN": [ "BRN", "nuevo cruzado brasileño" ], "BRR": [ "BRR", "cruceiro brasileño" ], "BRZ": [ "BRZ", "BRZ" ], "BTN": [ "BTN", "ngultrum butanés" ], "BWP": [ "BWP", "pula botsuano" ], "CLE": [ "CLE", "CLE" ], "CLF": [ "CLF", "unidad de fomento chilena" ], "CNY": [ "CN¥", "yuan chino" ], "COU": [ "COU", "unidad de valor real colombiana" ], "ECS": [ "ECS", "sucre ecuatoriano" ], "ECV": [ "ECV", "unidad de valor constante (UVC) ecuatoriana" ], "ERN": [ "ERN", "nakfa eritreo" ], "ETB": [ "ETB", "birr etíope" ], "FKP": [ "FKP", "libra malvinense" ], "GBP": [ "GBP", "libra esterlina británica" ], "GEL": [ "GEL", "lari georgiano" ], "GHS": [ "GHS", "cedi ghanés" ], "GMD": [ "GMD", "dalasi gambiano" ], "HKD": [ "HKD", "dólar de Hong Kong" ], "HRK": [ "HRK", "kuna croata" ], "HUF": [ "HUF", "florín húngaro" ], "ILS": [ "ILS", "nuevo shéquel israelí" ], "JMD": [ "JMD", "dólar jamaiquino" ], "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" ], "LTL": [ "LTL", "litas lituano" ], "LVL": [ "LVL", "lats letón" ], "MGA": [ "MGA", "ariary malgache" ], "MMK": [ "MMK", "kyat de Myanmar" ], "MNT": [ "MNT", "tugrik mongol" ], "MOP": [ "MOP", "pataca de Macao" ], "MRO": [ "MRO", "ouguiya mauritano" ], "MVR": [ "MVR", "rufiyaa de Maldivas" ], "MWK": [ "MWK", "kwacha malauí" ], "MXN": [ "$", "peso mexicano" ], "MXP": [ "MXP", "peso de plata mexicano (1861–1992)" ], "MYR": [ "MYR", "ringgit malayo" ], "MZN": [ "MZN", "metical mozambiqueño" ], "NGN": [ "NGN", "naira nigeriano" ], "NIC": [ "NIC", "córdoba nicaragüense (1988–1991)" ], "PEI": [ "PEI", "inti peruano" ], "PES": [ "PES", "sol peruano" ], "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" ], "SRG": [ "SRG", "florín surinamés" ], "STD": [ "STD", "dobra de Santo Tomé y Príncipe" ], "SVC": [ "SVC", "colón salvadoreño" ], "SZL": [ "SZL", "lilangeni suazi" ], "THB": [ "THB", "baht tailandés" ], "TMT": [ "TMT", "manat turkmeno" ], "TOP": [ "TOP", "paʻanga tongano" ], "UAH": [ "UAH", "grivna ucraniana" ], "USN": [ "USN", "dólar estadounidense (día siguiente)" ], "USS": [ "USS", "dólar estadounidense (mismo día)" ], "UYI": [ "UYI", "peso uruguayo en unidades indexadas" ], "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": [ "ZMK", "kwacha zambiano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_NI.json000066400000000000000000000002061266465517700251170ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NIO": [ "C$", "córdoba nicaragüense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_PA.json000066400000000000000000000002021266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "PAB": [ "B\/.", "balboa panameño" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_PE.json000066400000000000000000000002031266465517700251120ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "PEN": [ "S\/.", "nuevo sol peruano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_PH.json000066400000000000000000000001761266465517700251260ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "PHP": [ "₱", "peso filipino" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_PR.json000066400000000000000000000002041266465517700251300ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "USD": [ "$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_PY.json000066400000000000000000000002031266465517700251360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "PYG": [ "₲", "guaraní paraguayo" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_SV.json000066400000000000000000000002041266465517700251370ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "USD": [ "$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_US.json000066400000000000000000000003041266465517700251370ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "JPY": [ "¥", "yen" ], "USD": [ "$", "dólar estadounidense" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_UY.json000066400000000000000000000003171266465517700251510ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "USD": [ "US$", "dólar estadounidense" ], "UYU": [ "$", "peso uruguayo" ] } } src/Symfony/Component/Intl/Resources/data/currencies/es_VE.json000066400000000000000000000002041266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "VEF": [ "Bs.", "bolívar venezolano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/et.json000066400000000000000000000421471266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ADP": [ "ADP", "Andorra peseeta" ], "AED": [ "AED", "Araabia Ühendemiraatide dirhem" ], "AFA": [ "AFA", "Afganistani afgaani, 1927-2002" ], "AFN": [ "AFN", "Afganistani afgaani" ], "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" ], "ARP": [ "ARP", "Argentina peeso, 1983-1985" ], "ARS": [ "ARS", "Argentina peeso" ], "ATS": [ "ATS", "Austria šilling" ], "AUD": [ "AU$", "Austraalia dollar" ], "AWG": [ "AWG", "Aruba guilder" ], "AZM": [ "AZM", "Aserbaidžaani manat, 1993-2006" ], "AZN": [ "AZN", "Aserbaidžaani manat" ], "BAD": [ "BAD", "Bosnia-Hertsegoviina dinaar" ], "BAM": [ "BAM", "Bosnia-Hertsegoviina mark" ], "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" ], "BHD": [ "BHD", "Bahreini dinaar" ], "BIF": [ "BIF", "Burundi frank" ], "BMD": [ "BMD", "Bermuda dollar" ], "BND": [ "BND", "Brunei dollar" ], "BOB": [ "BOB", "Bolivia boliviaano" ], "BOP": [ "BOP", "Boliivia peeso" ], "BRC": [ "BRC", "Brasiilia krusado" ], "BRL": [ "R$", "Brasiilia reaal" ], "BSD": [ "BSD", "Bahama dollar" ], "BTN": [ "BTN", "Bhutani ngultrum" ], "BUK": [ "BUK", "Birma kjatt" ], "BWP": [ "BWP", "Botswana pula" ], "BYB": [ "BYB", "Valgevene uus rubla, 1994-1999" ], "BYR": [ "BYR", "Valgevene rubla" ], "BZD": [ "BZD", "Belize dollar" ], "CAD": [ "CA$", "Kanada dollar" ], "CDF": [ "CDF", "Kongo frank" ], "CHF": [ "CHF", "Šveitsi frank" ], "CLP": [ "CLP", "Tšiili peeso" ], "CNY": [ "CN¥", "Hiina jüaan" ], "COP": [ "COP", "Kolumbia peeso" ], "CRC": [ "CRC", "Costa Rica colón" ], "CSD": [ "CSD", "Serbia vana dinaar" ], "CUC": [ "CUC", "Kuuba konverteeritav peeso" ], "CUP": [ "CUP", "Kuuba peeso" ], "CVE": [ "CVE", "Roheneemesaarte eskuudo" ], "CYP": [ "CYP", "Küprose nael" ], "CZK": [ "CZK", "Tšehhi kroon" ], "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" ], "GHS": [ "GHS", "Ghana cedi" ], "GIP": [ "GIP", "Gibraltari nael" ], "GMD": [ "GMD", "Gambia dalasi" ], "GNF": [ "GNF", "Guinea frank" ], "GNS": [ "GNS", "Guinea syli" ], "GRD": [ "GRD", "Kreeka drahm" ], "GTQ": [ "GTQ", "Guatemala ketsal" ], "GWP": [ "GWP", "Guinea-Bissau peeso" ], "GYD": [ "GYD", "Guyana dollar" ], "HKD": [ "HK$", "Hongkongi dollar" ], "HNL": [ "HNL", "Hondurase lempiira" ], "HRK": [ "HRK", "Horvaatia kuna" ], "HTG": [ "HTG", "Haiti gurd" ], "HUF": [ "HUF", "Ungari forint" ], "IDR": [ "IDR", "Indoneesia ruupia" ], "IEP": [ "IEP", "Iiri nael" ], "ILP": [ "ILP", "Iisraeli nael" ], "ILS": [ "₪", "Iisraeli uus seekel" ], "INR": [ "₹", "India ruupia" ], "IQD": [ "IQD", "Iraagi dinaar" ], "IRR": [ "IRR", "Iraani riaal" ], "ISK": [ "ISK", "Islandi kroon" ], "ITL": [ "ITL", "Itaalia liir" ], "JMD": [ "JMD", "Jamaica dollar" ], "JOD": [ "JOD", "Jordaania dinaar" ], "JPY": [ "¥", "Jaapani jeen" ], "KES": [ "KES", "Kenya šilling" ], "KGS": [ "KGS", "Kõrgõzstani somm" ], "KHR": [ "KHR", "Kambodža riaal" ], "KMF": [ "KMF", "Komooride frank" ], "KPW": [ "KPW", "Põhja-Korea vonn" ], "KRW": [ "₩", "Lõuna-Korea vonn" ], "KWD": [ "KWD", "Kuveidi dinaar" ], "KYD": [ "KYD", "Caymani saarte 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" ], "LUF": [ "LUF", "Luksemburgi frank" ], "LVL": [ "LVL", "Läti latt" ], "LYD": [ "LYD", "Liibüa dinaar" ], "MAD": [ "MAD", "Maroko dirhem" ], "MDL": [ "MDL", "Moldova leu" ], "MGA": [ "MGA", "Madagaskari ariary" ], "MKD": [ "MKD", "Makedoonia denaar" ], "MMK": [ "MMK", "Myanmari kjatt" ], "MNT": [ "MNT", "Mongoolia tugrik" ], "MOP": [ "MOP", "Macao pataka" ], "MRO": [ "MRO", "Mauritaania ugia" ], "MTL": [ "MTL", "Malta liir" ], "MUR": [ "MUR", "Mauritiuse ruupia" ], "MVR": [ "MVR", "Maldiivide ruupia" ], "MWK": [ "MWK", "Malawi kvatša" ], "MXN": [ "MX$", "Mehhiko peeso" ], "MXP": [ "MXP", "Mehhiko peeso, 1861-1990" ], "MYR": [ "MYR", "Malaisia ringgit" ], "MZN": [ "MZN", "Mosambiigi metikal" ], "NAD": [ "NAD", "Namiibia dollar" ], "NGN": [ "NGN", "Nigeeria naira" ], "NIC": [ "NIC", "Nicaragua kordoba" ], "NIO": [ "NIO", "Nicaragua kuldkordoba" ], "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" ], "PGK": [ "PGK", "Paapua Uus-Guinea kina" ], "PHP": [ "PHP", "Filipiinide peeso" ], "PKR": [ "PKR", "Pakistani ruupia" ], "PLN": [ "PLN", "Poola zlott" ], "PLZ": [ "PLZ", "Poola zlott, 1950-1995" ], "PTE": [ "PTE", "Portugali eskuudo" ], "PYG": [ "PYG", "Paraguai guaranii" ], "QAR": [ "QAR", "Quatari riaal" ], "ROL": [ "ROL", "Rumeenia lei, -2005" ], "RON": [ "RON", "Rumeenia lei" ], "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 saarte ruupia" ], "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", "Slovakkia kroon" ], "SLL": [ "SLL", "Sierra Leone leoone" ], "SOS": [ "SOS", "Somaalia šilling" ], "SRD": [ "SRD", "Surinami dollar" ], "SRG": [ "SRG", "Surinami kulden" ], "SSP": [ "SSP", "Lõuna-Sudaani nael" ], "STD": [ "STD", "São Tomé ja Príncipe dobra" ], "SUR": [ "SUR", "NSVL rubla" ], "SVC": [ "SVC", "Salvadori koloon" ], "SYP": [ "SYP", "Süüria nael" ], "SZL": [ "SZL", "Svaasimaa lilangeni" ], "THB": [ "฿", "Tai baat" ], "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" ], "TRY": [ "TRY", "Türgi uus liir" ], "TTD": [ "TTD", "Trinidadi ja Tobago dollar" ], "TWD": [ "NT$", "Taiwani dollar" ], "TZS": [ "TZS", "Tansaania šilling" ], "UAH": [ "UAH", "Ukraina grivna" ], "UAK": [ "UAK", "Ukraina karbovanets" ], "UGX": [ "UGX", "Uganda šilling" ], "USD": [ "$", "USA dollar" ], "USN": [ "USN", "USA järgmise päeva dollar" ], "USS": [ "USS", "USA sama päeva dollar" ], "UYU": [ "UYU", "Uruguai peeso" ], "UZS": [ "UZS", "Usbekistani somm" ], "VEB": [ "VEB", "Venezuela bolívar (1871–2008)" ], "VEF": [ "VEF", "Venezuela bolívar" ], "VND": [ "₫", "Vietnami dong" ], "VUV": [ "VUV", "Vanuatu vatu" ], "WST": [ "WST", "Lääne-Samoa tala" ], "XAF": [ "FCFA", "CFA frank BEAC" ], "XCD": [ "EC$", "Ida-Kariibi dollar" ], "XEU": [ "XEU", "eküü" ], "XFO": [ "XFO", "Prantsuse kuldfrank" ], "XFU": [ "XFU", "Prantsuse UIC-frank" ], "XOF": [ "CFA", "Aafrika ühisfrank BCEAO" ], "XPF": [ "CFPF", "Prantsuse Vaikse-Ookeani frank" ], "YDD": [ "YDD", "Jeemeni dinaar" ], "YER": [ "YER", "Jeemeni riaal" ], "YUM": [ "YUM", "Jugoslaavia uus dinaar" ], "YUN": [ "YUN", "Jugoslaavia konverteeritav dinaar" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/eu.json000066400000000000000000000307401266465517700245410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Arubeko 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" ], "BYR": [ "BYR", "Bielorrusiako errubloa" ], "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", "Djibouteko frankoa" ], "DKK": [ "DKK", "Danimarkako koroa" ], "DOP": [ "DOP", "Dominikar Errepublikako pesoa" ], "DZD": [ "DZD", "Algeriako 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": [ "₪", "Israeleko sheqel 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 denara" ], "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", "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", "Swaziko 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", "Trinidadeko eta Tobagoko dolarra" ], "TWD": [ "NT$", "Taiwango dolar berria" ], "TZS": [ "TZS", "Tanzaniako txelina" ], "UAH": [ "UAH", "Ukrainako hryvnia" ], "UGX": [ "UGX", "Ugandako txelina" ], "USD": [ "US$", "AEBetako 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 frankoa BEAC" ], "XCD": [ "EC$", "Karibe ekialdeko dolarra" ], "XOF": [ "CFA", "Afrika ekialdeko frankoa BCEAO" ], "XPF": [ "CFPF", "CFP frankoa" ], "YER": [ "YER", "Yemengo riala" ], "ZAR": [ "ZAR", "Hegoafrikako randa" ], "ZMK": [ "ZMK", "Zambiako kwacha (1968–2012)" ], "ZMW": [ "ZMW", "Zambiako kwacha" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fa.json000066400000000000000000000441601266465517700245170ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "روبل جدید بیلوروسی (۱۹۹۴ تا ۱۹۹۹)" ], "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", "سوم ازبکستان" ], "VEF": [ "VEF", "بولیوار ونزوئلا" ], "VND": [ "₫", "دانگ ویتنام" ], "VUV": [ "VUV", "واتوی وانوواتو" ], "WST": [ "WST", "تالای ساموا" ], "XAF": [ "FCFA", "فرانک CFA مرکز آفریقا" ], "XCD": [ "$EC", "دلار شرق کارائیب" ], "XFO": [ "XFO", "فرانک طلای فرانسه" ], "XOF": [ "CFA", "فرانک CFA غرب آفریقا" ], "XPF": [ "CFPF", "فرانک CFP" ], "YDD": [ "YDD", "دینار یمن" ], "YER": [ "YER", "ریال یمن" ], "ZAR": [ "ZAR", "راند افریقای جنوبی" ], "ZMK": [ "ZMK", "کواچای زامبیا (۱۹۶۸ تا ۲۰۱۲)" ], "ZMW": [ "ZMW", "کواچای زامبیا" ], "ZWD": [ "ZWD", "دلار زیمبابوه (۱۹۸۰ تا ۲۰۰۸)" ], "ZWL": [ "ZWL", "دلار زیمبابوه (۲۰۰۹)" ], "ZWR": [ "ZWR", "دلار زیمبابوه (۲۰۰۸)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fa_AF.json000066400000000000000000000023041266465517700250570ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AUD": [ "A$", "دالر آسترالیا" ], "BND": [ "BND", "دالر برونی" ], "BYR": [ "BYR", "روبل روسیهٔ سفید" ], "CAD": [ "$CA", "دالر کانادا" ], "CHF": [ "CHF", "فرانک سویس" ], "DKK": [ "DKK", "کرون دنمارک" ], "JPY": [ "¥", "ین جاپان" ], "MXN": [ "$MX", "پزوی مکسیکو" ], "NLG": [ "NLG", "گیلدر هالند" ], "NOK": [ "NOK", "کرون ناروی" ], "SEK": [ "SEK", "کرون سویدن" ], "SGD": [ "SGD", "دالر سینگاپور" ], "TJS": [ "TJS", "سامانی تاجکستان" ], "USD": [ "$", "دالر امریکا" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ff.json000066400000000000000000000103111266465517700245130ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ff_GN.json000066400000000000000000000001631266465517700251030ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GNF": [ "FG", "GNF" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ff_MR.json000066400000000000000000000001771266465517700251220ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MRO": [ "UM", "Ugiyya Muritani" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fi.json000066400000000000000000000553421266465517700245330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Valko-Venäjän rupla" ], "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 yuan" ], "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 cordoba (1988–1991)" ], "NIO": [ "NIO", "Nicaraguan cordoba" ], "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", "Surinamin dollari" ], "SRG": [ "SRG", "Surinamin 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fo.json000066400000000000000000000006411266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "DKK": [ "kr", "donsk króna" ], "EUR": [ "€", "euro" ], "ISK": [ "ISK", "íslendsk króna" ], "NOK": [ "NOK", "norsk króna" ], "SEK": [ "SEK", "svensk króna" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr.json000066400000000000000000000515131266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "rouble biélorusse" ], "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 Falkland" ], "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": [ "฿", "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_BI.json000066400000000000000000000002001266465517700250750ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BIF": [ "FBu", "franc burundais" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_CA.json000066400000000000000000000064221266465517700251020ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ARS": [ "ARS", "peso argentin" ], "AUD": [ "$ AU", "dollar australien" ], "AZN": [ "AZN", "manat azerbaïdjanais" ], "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" ], "CVE": [ "CVE", "escudo du Cap-Vert" ], "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" ], "LAK": [ "LAK", "kip laotien" ], "LBP": [ "LBP", "livre libanaise" ], "MXN": [ "MXN", "peso mexicain" ], "NAD": [ "NAD", "dollar namibien" ], "NZD": [ "$ NZ", "dollar néo-zélandais" ], "PGK": [ "PGK", "kina papou-néo-guinéen" ], "QAR": [ "QAR", "riyal du Qatar" ], "SBD": [ "SBD", "dollar des îles Salomon" ], "SGD": [ "$ SG", "dollar de Singapour" ], "SRD": [ "SRD", "dollar du Suriname" ], "THB": [ "THB", "baht thaïlandais" ], "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" ], "VUV": [ "VUV", "vatu" ], "WST": [ "WST", "tala" ], "XAF": [ "XAF", "franc CFA (BEAC)" ], "XOF": [ "XOF", "franc CFA (BCEAO)" ], "XPF": [ "XPF", "franc CFP" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_CD.json000066400000000000000000000001771266465517700251060ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CDF": [ "FC", "franc congolais" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_DJ.json000066400000000000000000000002011266465517700251010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DJF": [ "Fdj", "franc djiboutien" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_DZ.json000066400000000000000000000001771266465517700251350ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DZD": [ "DA", "dinar algérien" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_GN.json000066400000000000000000000001761266465517700251230ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GNF": [ "FG", "franc guinéen" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_HT.json000066400000000000000000000002001266465517700251160ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "HTG": [ "G", "gourde haïtienne" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_KM.json000066400000000000000000000001761266465517700251260ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KMF": [ "CF", "franc comorien" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_LU.json000066400000000000000000000003201266465517700251260ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "FRF": [ "FRF", "franc français" ], "LUF": [ "F", "franc luxembourgeois" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_MG.json000066400000000000000000000001771266465517700251230ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MGA": [ "Ar", "ariary malgache" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_MR.json000066400000000000000000000002031266465517700251240ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MRO": [ "UM", "ouguiya mauritanien" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_MU.json000066400000000000000000000002021266465517700251260ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MUR": [ "Rs", "roupie mauricienne" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_RW.json000066400000000000000000000001761266465517700251470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "RWF": [ "RF", "franc rwandais" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_SC.json000066400000000000000000000002051266465517700251150ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SCR": [ "SR", "roupie des Seychelles" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_SY.json000066400000000000000000000001761266465517700251520ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SYP": [ "LS", "livre syrienne" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_TN.json000066400000000000000000000001761266465517700251400ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "TND": [ "DT", "dinar tunisien" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fr_VU.json000066400000000000000000000001761266465517700251510ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "VUV": [ "VT", "vatu vanuatuan" ] } } src/Symfony/Component/Intl/Resources/data/currencies/fy.json000066400000000000000000000545771266465517700245640ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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)" ], "BYR": [ "BYR", "Wit-Russyske roebel" ], "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 sterling" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ga.json000066400000000000000000000533201266465517700245160ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" ], "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)" ], "BYR": [ "BYR", "Rúbal na Bealarúise" ], "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", "Karbovanetz Ú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" ], "YUM": [ "YUM", "Noviy Dinar Iúgslavach" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/gd.json000066400000000000000000000563651266465517700245350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Rùbal Bealaruiseach" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/gl.json000066400000000000000000000370201266465517700245300ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 angoleño" ], "ARP": [ "ARP", "Peso arxentino (1983–1985)" ], "ARS": [ "ARS", "Peso arxentino" ], "AUD": [ "$A", "Dólar australiano" ], "AWG": [ "AWG", "Florín arubeño" ], "AZN": [ "AZN", "Manat acerbaixano" ], "BAM": [ "BAM", "Marco convertible de Bosnia e Hercegovina" ], "BBD": [ "BBD", "Dólar de Barbados" ], "BDT": [ "BDT", "Taka de Bangladesh" ], "BEC": [ "BEC", "Franco belga (convertible)" ], "BEF": [ "BEF", "Franco belga" ], "BEL": [ "BEL", "Franco belga (financeiro)" ], "BGN": [ "BGN", "Lev búlgaro" ], "BHD": [ "BHD", "Dinar de Baréin" ], "BIF": [ "BIF", "Franco burundés" ], "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 botsuano" ], "BYR": [ "BYR", "Rublo bielorruso" ], "BZD": [ "BZD", "Dólar beliceño" ], "CAD": [ "$CA", "Dólar canadiano" ], "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 costarricense" ], "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 fixiano" ], "FKP": [ "FKP", "Libra das Malvinas" ], "FRF": [ "FRF", "Franco francés" ], "GBP": [ "£", "Libra esterlina" ], "GEL": [ "GEL", "Lari xeorxiano" ], "GHS": [ "GHS", "Cedi de Gana" ], "GIP": [ "GIP", "Libra de Xibraltar" ], "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", "Chelín kenyano" ], "KGS": [ "KGS", "Som quirguizo" ], "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", "Kiat birmano" ], "MNT": [ "MNT", "Tugrik mongol" ], "MOP": [ "MOP", "Pataca de Macau" ], "MRO": [ "MRO", "Ouguiya mauritano" ], "MUR": [ "MUR", "Rupia de Mauricio" ], "MVR": [ "MVR", "Rupia maldiva" ], "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 nicaragüense" ], "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 novo peruano" ], "PES": [ "PES", "Sol peruano" ], "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", "Chelín somalí" ], "SRD": [ "SRD", "Dólar surinamés" ], "SSP": [ "SSP", "Libra sursudanesa" ], "STD": [ "STD", "Dobra de San Tomé e Príncipe" ], "SUR": [ "SUR", "Rublo soviético" ], "SVC": [ "SVC", "Colón salvadoreño" ], "SYP": [ "SYP", "Libra siria" ], "SZL": [ "SZL", "Lilanxeni de Suacilandia" ], "THB": [ "฿", "Baht tailandés" ], "TJS": [ "TJS", "Somoni taxico" ], "TMT": [ "TMT", "Manat turcomano" ], "TND": [ "TND", "Dinar tunesino" ], "TOP": [ "TOP", "Paʻanga de Tonga" ], "TRY": [ "TRY", "Lira turca" ], "TTD": [ "TTD", "Dólar de Trinidade e Tobago" ], "TWD": [ "$NT", "Novo dólar taiwanés" ], "TZS": [ "TZS", "Chelín tanzano" ], "UAH": [ "UAH", "Grivna ucraína" ], "UGX": [ "UGX", "Chelín 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 vanuatense" ], "WST": [ "WST", "Tala samoano" ], "XAF": [ "FCFA", "Franco CFA BEAC" ], "XCD": [ "EC$", "Dólar Caribe-Leste" ], "XOF": [ "CFA", "Franco CFA BCEAO" ], "XPF": [ "CFPF", "Franco CFP" ], "YER": [ "YER", "Rial iemení" ], "ZAR": [ "ZAR", "Rand sudafricano" ], "ZMK": [ "ZMK", "Kwacha zambiano (1968–2012)" ], "ZMW": [ "ZMW", "Kwacha zambiano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/gu.json000066400000000000000000000403321266465517700245410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "બોત્સવાનન પુલા" ], "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", "ચેક રીપબ્લિક કોરુના" ], "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] ફ્રેંક [BEAC]" ], "XCD": [ "EC$", "ઇસ્ટ કેરિબિયન ડોલર" ], "XOF": [ "CFA", "[CFA] ફ્રેંક [BCEAO]" ], "XPF": [ "CFPF", "[CFP] ફ્રેંક" ], "YER": [ "YER", "યેમેની રિઆલ" ], "ZAR": [ "ZAR", "દક્ષિણ આફ્રિકી રેંડ" ], "ZMK": [ "ZMK", "ઝામ્બિયન ક્વાચા (1968–2012)" ], "ZMW": [ "ZMW", "ઝામ્બિયન ક્વાચા" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ha.json000066400000000000000000000103111266465517700245100ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ha_GH.json000066400000000000000000000001661266465517700250750ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GHS": [ "GH₵", "GHS" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ha_Latn_GH.json000066400000000000000000000001661266465517700260530ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GHS": [ "GH₵", "GHS" ] } } src/Symfony/Component/Intl/Resources/data/currencies/he.json000066400000000000000000000443611266465517700245300ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "פולה בוצוואני" ], "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", "דינר אלג׳ירי" ], "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": [ "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", "ליטא ליטאי" ], "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", "דולר זימבבואי" ] } } src/Symfony/Component/Intl/Resources/data/currencies/hi.json000066400000000000000000000445161266465517700245360ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "बोत्सवानियाई पुला" ], "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", "चेक गणराज्य कोरुना" ], "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] फ़्रैंक [BCEAO]" ], "XPF": [ "CFPF", "[CFP] फ़्रैंक" ], "YER": [ "YER", "यमनी रियाल" ], "ZAR": [ "ZAR", "दक्षिण अफ़्रीकी रैंड" ], "ZMK": [ "ZMK", "ज़ाम्बियन क्वाचा (1968–2012)" ], "ZMW": [ "ZMW", "ज़ाम्बियन क्वाचा" ] } } src/Symfony/Component/Intl/Resources/data/currencies/hr.json000066400000000000000000000550321266465517700245420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "bjeloruska rublja" ], "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", "vanuatuški 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/hr_BA.json000066400000000000000000000002031266465517700250720ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BAM": [ "KM", "konvertibilna marka" ] } } src/Symfony/Component/Intl/Resources/data/currencies/hu.json000066400000000000000000000513241266465517700245450ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "fehérorosz rubel" ], "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 sterling" ], "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": [ "HUF", "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/hy.json000066400000000000000000000351471266465517700245560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Բոթսվանական պուլա" ], "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", "Չեխական կրոնա" ], "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", "Աֆրիկական ֆինանսական համայնքի ֆրանկ BEAC" ], "XCD": [ "EC$", "Արևելակարիբյան դոլար" ], "XOF": [ "CFA", "Աֆրիկական ֆինանսական համայնքի ֆրանկ BCEAO" ], "XPF": [ "CFPF", "ԿՊՖ ֆրանկ" ], "YER": [ "YER", "Եմենական ռիալ" ], "ZAR": [ "ZAR", "Հարավաֆրիկական ռենդ" ], "ZMK": [ "ZMK", "Զամբիական կվաչա (1968–2012)" ], "ZMW": [ "ZMW", "Զամբիական կվաչա" ] } } src/Symfony/Component/Intl/Resources/data/currencies/id.json000066400000000000000000000537451266465517700245360ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Rubel Belarusia" ], "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 China" ], "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 Sterling 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ig.json000066400000000000000000000003111266465517700245160ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "CVE": [ "CVE", "Escudo Caboverdiano" ], "NGN": [ "₦", "Naịra" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ii.json000066400000000000000000000001631266465517700245250ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CNY": [ "¥", "CNY" ] } } src/Symfony/Component/Intl/Resources/data/currencies/in.json000066400000000000000000000537451266465517700245500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Rubel Belarusia" ], "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 China" ], "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 Sterling 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/is.json000066400000000000000000000420631266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" ], "BYR": [ "BYR", "Hvítrússnesk rúbla" ], "BZD": [ "BZD", "Belískur dalur" ], "CAD": [ "CAD", "Kanadískur dalur" ], "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", "Fídjeyskur 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ópataka" ], "MRO": [ "MRO", "Máritö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íkarö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ádiarabí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úniskur 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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/it.json000066400000000000000000000506261266465517700245510ustar00rootroot00000000000000{ "Version": "2.1.8.32", "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 Conv. Bosnia-Erzegovina" ], "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 Butanese" ], "BUK": [ "BUK", "Kyat Birmano" ], "BWP": [ "BWP", "Pula del Botswana" ], "BYB": [ "BYB", "Nuovo Rublo Bielorussia (1994–1999)" ], "BYR": [ "BYR", "Rublo Bielorussia" ], "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 del Capo Verde" ], "CYP": [ "CYP", "Sterlina Cipriota" ], "CZK": [ "CZK", "Corona Ceca" ], "DDM": [ "DDM", "Ostmark della Germania Orientale" ], "DEM": [ "DEM", "Marco Tedesco" ], "DJF": [ "DJF", "Franco Gibutiano" ], "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 Etiopico" ], "EUR": [ "€", "Euro" ], "FIM": [ "FIM", "Markka Finlandese" ], "FJD": [ "FJD", "Dollaro delle Figi" ], "FKP": [ "FKP", "Sterlina delle Falkland" ], "FRF": [ "FRF", "Franco Francese" ], "GBP": [ "£", "Sterlina Inglese" ], "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 del Gambia" ], "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", "Dinaro 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 della Malesia" ], "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 dell’Oman" ], "PAB": [ "PAB", "Balboa di Panama" ], "PEI": [ "PEI", "Inti Peruviano" ], "PEN": [ "PEN", "Sol Nuevo Peruviano" ], "PES": [ "PES", "Sol Peruviano" ], "PGK": [ "PGK", "Kina della Papua Nuova Guinea" ], "PHP": [ "PHP", "Peso delle Filippine" ], "PKR": [ "PKR", "Rupia del Pakistan" ], "PLN": [ "PLN", "Złoty polacco" ], "PLZ": [ "PLZ", "Złoty Polacco (1950–1995)" ], "PTE": [ "PTE", "Escudo Portoghese" ], "PYG": [ "PYG", "Guaraní del Paraguay" ], "QAR": [ "QAR", "Rial del Qatar" ], "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 Solomon" ], "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 Surinamese" ], "SRG": [ "SRG", "Fiorino del Suriname" ], "SSP": [ "SSP", "Sterlina sudsudanese" ], "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 del Tajikistan" ], "TMM": [ "TMM", "Manat Turkmeno (1993–2009)" ], "TMT": [ "TMT", "Manat Turkmeno" ], "TND": [ "TND", "Dinaro Tunisino" ], "TOP": [ "TOP", "Paʻanga di Tonga" ], "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 Uruguaiano" ], "UZS": [ "UZS", "Sum dell’Uzbekistan" ], "VEB": [ "VEB", "Bolivar Venezuelano (1871–2008)" ], "VEF": [ "VEF", "Bolívar Venezuelano" ], "VND": [ "₫", "Dong Vietnamita" ], "VUV": [ "VUV", "Vatu di Vanuatu" ], "WST": [ "WST", "Tala della Samoa Occidentale" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/iw.json000066400000000000000000000443611266465517700245530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "פולה בוצוואני" ], "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", "דינר אלג׳ירי" ], "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": [ "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", "ליטא ליטאי" ], "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", "דולר זימבבואי" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ja.json000066400000000000000000000620231266465517700245210ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": [ "AU$", "オーストラリア ドル" ], "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)" ], "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", "コロンビア レアル (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": [ "฿", "タイ バーツ" ], "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 フラン(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", "ユーゴスラビア ハード・ディナール (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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ka.json000066400000000000000000000636521266465517700245330ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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)" ], "BYR": [ "BYR", "ბელორუსული რუბლი" ], "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": [ "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 ფრანკი (BEAC)" ], "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", "ზიმბაბვეს დოლარი" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ki.json000066400000000000000000000104471266465517700245350ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/kk.json000066400000000000000000000336701266465517700245420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": [ "БД", "Бермуд доллары" ], "BND": [ "BND", "Бруней доллары" ], "BOB": [ "BOB", "Боливия боливианосы" ], "BRL": [ "R$", "Бразилия реалы" ], "BSD": [ "BSD", "Багам доллары" ], "BTN": [ "BTN", "Бутан нгултрумы" ], "BWP": [ "BWP", "Ботсвана пуласы" ], "BYR": [ "BYR", "Беларус рублі" ], "BZD": [ "BZD", "Белиз доллары" ], "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", "Гондурас лемпираcы" ], "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", "Замбия квачасы" ] } } src/Symfony/Component/Intl/Resources/data/currencies/kl.json000066400000000000000000000002661266465517700245360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DKK": [ "kr.", "DKK" ], "EUR": [ "€", "euro" ] } } src/Symfony/Component/Intl/Resources/data/currencies/km.json000066400000000000000000000411421266465517700245350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ពូឡា​បុតស្វាណា" ], "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", "កូរុណា​សាធារណៈ​ឆេក" ], "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", "ហ្វ្រង់ BEAC CFA" ], "XCD": [ "EC$", "ដុល្លារ​ការ៉ាប៊ីន​ខាង​កើត" ], "XOF": [ "CFA", "ហ្វ្រង់ BCEAO CFA" ], "XPF": [ "CFPF", "ហ្វ្រង់ CFP" ], "YER": [ "YER", "រៀល​យេម៉ែន" ], "ZAR": [ "ZAR", "រ៉ង់​អាព្រិក​ខាង​ត្បូង" ], "ZMK": [ "ZMK", "ក្វាចា សំប៊ី (1968–2012)" ], "ZMW": [ "ZMW", "ក្វាចា​សំប៊ី" ] } } src/Symfony/Component/Intl/Resources/data/currencies/kn.json000066400000000000000000000415031266465517700245370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ಬೋಟ್ಸ್‌ವಾನನ್ ಪುಲಾ" ], "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", "ಝೆಕ್ ಗಣರಾಜ್ಯ ಕೊರೂನ" ], "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 ಫ್ರಾಂಕ್ BCEAO" ], "XPF": [ "CFPF", "CFP ಫ್ರಾಂಕ್" ], "YER": [ "YER", "ಯೆಮೆನಿ ರಿಯಲ್" ], "ZAR": [ "ZAR", "ದಕ್ಷಿಣ ಆಫ್ರಿಕನ್ ರಾಂಡ್" ], "ZMK": [ "ZMK", "ಜಾಂಬಿಯಾ ಕ್ವಾಚ (1968–2012)" ], "ZMW": [ "ZMW", "ಜಾಂಬಿಯಾ ಕ್ವಾಚ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ko.json000066400000000000000000000554001266465517700245410ustar00rootroot00000000000000{ "Version": "2.1.9.31", "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)" ], "BYR": [ "BYR", "벨라루스 루블" ], "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": [ "฿", "태국 바트" ], "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 프랑 BEAC" ], "XCD": [ "EC$", "동카리브 달러" ], "XEU": [ "XEU", "유럽 환율 단위" ], "XFO": [ "XFO", "프랑스 프랑 (Gold)" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ks.json000066400000000000000000000547041266465517700245530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "بِلیروشِیَن نِو رِبٕل" ], "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", "زِمبابِیُک ڈالَر" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ky.json000066400000000000000000000335641266465517700245620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Ботсвана пуласы" ], "BYR": [ "BYR", "беларусь рублу" ], "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", "Замбия квачасы" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lb.json000066400000000000000000000521261266465517700245270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Wäissrussesche Rubel" ], "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 Sterling" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lg.json000066400000000000000000000111371266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ln.json000066400000000000000000000106721266465517700245430ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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ɛ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ln_AO.json000066400000000000000000000002011266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AOA": [ "Kz", "Kwanza ya Angóla" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lo.json000066400000000000000000000744271266465517700245540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "ເບ​ລາ​ຣຸ​ສ​ຊຽນ ຣູ​ເບິນ" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lt.json000066400000000000000000000561321266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Baltarusijos rublis" ], "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": [ "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 sterlingų" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lu.json000066400000000000000000000105551266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/lv.json000066400000000000000000000361121266465517700245500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 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" ], "BYR": [ "BYR", "Baltkrievijas rubelis" ], "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 sterliņu 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/meta.json000066400000000000000000000623451266465517700250640ustar00rootroot00000000000000{ "Version": "2.1.7.12", "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", "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 ], "BYR": [ 0, 0, 0, 0 ], "CAD": [ 2, 0, 2, 0 ], "CHF": [ 2, 0, 2, 0 ], "CLF": [ 4, 0, 4, 0 ], "CLP": [ 0, 0, 0, 0 ], "COP": [ 0, 0, 0, 0 ], "CRC": [ 0, 0, 0, 0 ], "CZK": [ 2, 0, 2, 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, 2, 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, 2, 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, "ARA": 32, "ARP": 32, "ARS": 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, "BRC": 76, "BRE": 76, "BRN": 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, "HRD": 191, "HRK": 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, "LVR": 428, "LVL": 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, "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": [ "ARA", "ARP", "ARS" ], "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": [ "BRC", "BRE", "BRN" ], "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": [ "HRD", "HRK" ], "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": [ "LVR", "LVL" ], "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" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mg.json000066400000000000000000000105031266465517700245260ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mk.json000066400000000000000000000510541266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Белоруска рубља" ], "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", "XAF" ], "XCD": [ "EC$", "Источно карибиски долар" ], "XOF": [ "CFA", "XOF" ], "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", "Зимбабвиски долар" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ml.json000066400000000000000000000712111266465517700245360ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "ബെലാറുഷ്യൻ റൂബിൾ" ], "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 ഫ്രാങ്ക് 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", "സിംബാബ്‌വെ ഡോളർ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mn.json000066400000000000000000000332651266465517700245470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Ботсвани пула" ], "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", "чехийн коруна" ], "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", "Франк КФА BEAC" ], "XCD": [ "EC$", "зүүн карибийн доллар" ], "XOF": [ "CFA", "Франк КФА BCЕАО" ], "XPF": [ "CFPF", "CFP франк" ], "YER": [ "YER", "йемен риал" ], "ZAR": [ "ZAR", "Өмнөд Африкийн ранд" ], "ZMK": [ "ZMK", "Замби квача (1968–2012)" ], "ZMW": [ "ZMW", "Замби квача" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mo.json000066400000000000000000000001761266465517700245430ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MDL": [ "L", "leu moldovenesc" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mr.json000066400000000000000000000400041266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "बोट्सवाना पुला" ], "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", "झेक प्रजासत्ताक कोरुना" ], "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] फ्रँक [BCEAO]" ], "XPF": [ "CFPF", "[CFP] फ्रँक" ], "YER": [ "YER", "येमेनी रियाल" ], "ZAR": [ "ZAR", "दक्षिण आफ्रिकी रँड" ], "ZMK": [ "ZMK", "झांबियन क्वाचा (1968–2012)" ], "ZMW": [ "ZMW", "झांबियन क्वाचा" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ms.json000066400000000000000000000274531266465517700245560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" ], "BYR": [ "BYR", "Ruble Belarus" ], "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 Sterling 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", "Ruble 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": [ "฿", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ms_BN.json000066400000000000000000000001731266465517700251230ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BND": [ "$", "Dolar Brunei" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ms_Latn_BN.json000066400000000000000000000001731266465517700261010ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BND": [ "$", "Dolar Brunei" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ms_Latn_SG.json000066400000000000000000000001761266465517700261160ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SGD": [ "$", "Dolar Singapura" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ms_SG.json000066400000000000000000000001761266465517700251400ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SGD": [ "$", "Dolar Singapura" ] } } src/Symfony/Component/Intl/Resources/data/currencies/mt.json000066400000000000000000000002771266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.8.22", "Names": { "EUR": [ "€", "ewro" ], "MTL": [ "MTL", "Lira Maltija" ] } } src/Symfony/Component/Intl/Resources/data/currencies/my.json000066400000000000000000000447021266465517700245600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AED": [ "AED", "အာရပ်ဒူဟမ်း" ], "AFN": [ "AFN", "အာဖဂန်အာဖဂါနီ" ], "ALL": [ "ALL", "အယ်လ်ဘီးနီးယားလီခ်" ], "AMD": [ "AMD", "အာမေးနီးယားဒရမ်း" ], "ANG": [ "ANG", "နယ်သာလန် အန်တီလန် ဂင်းဒါး" ], "AOA": [ "AOA", "အင်ဂိုလာ ကန်ဇာ" ], "ARP": [ "ARP", "အာဂျင်တီးနား ပီဆို (၁၉၈၃–၁၉၈၅)" ], "ARS": [ "ARS", "အာဂျင်တီးနား ပီဆို" ], "AUD": [ "A$", "ဩစတြေးလျ ဒေါ်လာ" ], "AWG": [ "AWG", "အရူဘန် ဂင်းဒါး" ], "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", "ဘီလာရုစ် ရူဘယ်အသစ် (၁၉၉၄–၁၉၉၉)" ], "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": [ "HTG", "ဟေတီဂူးအော်ဒ်" ], "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": [ "PAB", "ပနားမား ဘလ်ဘိုးအာ" ], "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": [ "TTD", "ထရိုင်နီဒတ်နှင့်တိုဘာဂိုဒေါ်လာ" ], "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", "XPFဖရန့်" ], "YER": [ "YER", "ယီမင်ရီအော်လ်" ], "ZAR": [ "ZAR", "တောင်အဖရိက ရန်း" ], "ZMW": [ "ZMW", "ဇင်ဘာဘွေခွါးချာ" ], "ZWD": [ "ZWD", "ဇင်ဘာဘွေ ဒေါ်လာ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nb.json000066400000000000000000000555171266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ADP": [ "ADP", "andorranske pesetas" ], "AED": [ "AED", "emiratarabiske dirham" ], "AFA": [ "AFA", "afgansk afghani (1927–2002)" ], "AFN": [ "AFN", "afghansk 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 cruzado" ], "BRE": [ "BRE", "brasilianske cruzeiro (1990–1993)" ], "BRL": [ "BRL", "brasilianske real" ], "BRN": [ "BRN", "brasilianske cruzado novo (1989–1990)" ], "BRR": [ "BRR", "brasilianske cruzeiro" ], "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)" ], "BYR": [ "BYR", "hviterussiske rubler" ], "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", "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 ostmark" ], "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 sterling" ], "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", "gammel islandsk krone" ], "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 lita" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nd.json000066400000000000000000000107511266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ne.json000066400000000000000000000413211266465517700245270ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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", "बोट्सवानान पुला" ], "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", "चेख गणतञ्त्र कोरूना" ], "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", "जाम्बियाली क्वाचा" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ne_IN.json000066400000000000000000000002311266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "INR": [ "₹", "भारतीय रूपिँया" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl.json000066400000000000000000000553371266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Wit-Russische roebel" ], "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 yuan 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 sterling" ], "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 franc" ], "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", "Caymaneilandse 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", "Oude 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-franc" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl_AW.json000066400000000000000000000002021266465517700251160ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AWG": [ "Afl.", "Arubaanse gulden" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl_BQ.json000066400000000000000000000002011266465517700251100ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "USD": [ "$", "Amerikaanse dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl_CW.json000066400000000000000000000002201266465517700251200ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ANG": [ "NAf.", "Nederlands-Antilliaanse gulden" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl_SR.json000066400000000000000000000002001266465517700251310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "SRD": [ "$", "Surinaamse dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nl_SX.json000066400000000000000000000002201266465517700251410ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ANG": [ "NAf.", "Nederlands-Antilliaanse gulden" ] } } src/Symfony/Component/Intl/Resources/data/currencies/nn.json000066400000000000000000000502531266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.7.72", "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)" ], "BYR": [ "BYR", "kviterussisk rubel" ], "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 sterling" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/no.json000066400000000000000000000555171266465517700245550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ADP": [ "ADP", "andorranske pesetas" ], "AED": [ "AED", "emiratarabiske dirham" ], "AFA": [ "AFA", "afgansk afghani (1927–2002)" ], "AFN": [ "AFN", "afghansk 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 cruzado" ], "BRE": [ "BRE", "brasilianske cruzeiro (1990–1993)" ], "BRL": [ "BRL", "brasilianske real" ], "BRN": [ "BRN", "brasilianske cruzado novo (1989–1990)" ], "BRR": [ "BRR", "brasilianske cruzeiro" ], "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)" ], "BYR": [ "BYR", "hviterussiske rubler" ], "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", "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 ostmark" ], "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 sterling" ], "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", "gammel islandsk krone" ], "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 lita" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/om.json000066400000000000000000000013341266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BRL": [ "R$", "Brazilian Real" ], "CNY": [ "CN¥", "Chinese Yuan Renminbi" ], "ETB": [ "Br", "Itoophiyaa Birrii" ], "EUR": [ "€", "Euro" ], "GBP": [ "£", "British Pound Sterling" ], "INR": [ "₹", "Indian Rupee" ], "JPY": [ "JP¥", "Japanese Yen" ], "RUB": [ "RUB", "Russian Ruble" ], "USD": [ "US$", "US Dollar" ] } } src/Symfony/Component/Intl/Resources/data/currencies/om_KE.json000066400000000000000000000001641266465517700251170ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KES": [ "Ksh", "KES" ] } } src/Symfony/Component/Intl/Resources/data/currencies/or.json000066400000000000000000000001751266465517700245470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "INR": [ "₹", "ଟଙକା" ] } } src/Symfony/Component/Intl/Resources/data/currencies/os.json000066400000000000000000000010261266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "BRL": [ "R$", "Бразилиаг реал" ], "EUR": [ "€", "Евро" ], "GBP": [ "£", "Бритайнаг Стерлингы Фунт" ], "GEL": [ "GEL", "Лар" ], "RUB": [ "RUB", "Сом" ], "USD": [ "$", "АИШ-ы Доллар" ] } } src/Symfony/Component/Intl/Resources/data/currencies/os_RU.json000066400000000000000000000001731266465517700251540ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "RUB": [ "руб.", "Сом" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pa.json000066400000000000000000000437641266465517700245420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ਬੋਟਸਵਾਨਾ ਪੁਲਾ" ], "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", "ਅਲਜੀਰਿਆਈ ਦਿਨਾਰ" ], "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 BEAC)" ], "XCD": [ "EC$", "ਪੂਰਬੀ ਕੈਰੇਬੀਅਨ ਡਾਲਰ" ], "XEU": [ "XEU", "ਯੂਰਪੀ ਮੁਦਰਾ ਇਕਾਈ" ], "XOF": [ "CFA", "ਫ੍ਰੈਂਕ (CFA BCEAO)" ], "XPF": [ "CFPF", "ਫ੍ਰੈਂਕ (CFP)" ], "YER": [ "YER", "ਯਮਨੀ ਰਿਆਲ" ], "ZAR": [ "ZAR", "ਦੱਖਣੀ ਅਫਰੀਕੀ ਰੈਂਡ" ], "ZMW": [ "ZMW", "ਜ਼ਾਮਬੀਆਈ ਕਵਾਚਾ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pa_Arab.json000066400000000000000000000004221266465517700254470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "EUR": [ "€", "يورو" ], "INR": [ "₹", "روپئیہ [INR]" ], "PKR": [ "ر", "روپئیہ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pl.json000066400000000000000000000476651266465517700245610ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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)" ], "BYR": [ "BYR", "rubel białoruski" ], "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żi" ], "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 malawska" ], "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 Vanuatu" ], "WST": [ "WST", "tala samoańska" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ps.json000066400000000000000000000001741266465517700245500ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AFN": [ "؋", "افغانۍ" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt.json000066400000000000000000000551711266465517700245600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Rublo bielorrusso" ], "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 esterlina 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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_AO.json000066400000000000000000000001771266465517700251330ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AOA": [ "Kz", "Kwanza angolano" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_CV.json000066400000000000000000000003661266465517700251440ustar00rootroot00000000000000{ "Version": "2.1.7.8", "Names": { "CVE": [ "​", "Escudo cabo-verdiano", {} ], "PTE": [ "​PTE", "Escudo português", {} ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_MO.json000066400000000000000000000002011266465517700251330ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MOP": [ "MOP$", "Pataca de Macau" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_MZ.json000066400000000000000000000002071266465517700251540ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MZN": [ "MTn", "Metical de Moçambique" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_PT.json000066400000000000000000000147241266465517700251620ustar00rootroot00000000000000{ "Version": "2.1.8.19", "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" ], "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" ], "NIO": [ "NIO", "Córdoba de ouro da Nicarágua" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/pt_ST.json000066400000000000000000000002171266465517700251550ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "STD": [ "Db", "Dobra de São Tomé e Príncipe" ] } } src/Symfony/Component/Intl/Resources/data/currencies/qu.json000066400000000000000000000001651266465517700245530ustar00rootroot00000000000000{ "Version": "2.1.6.71", "Names": { "PEN": [ "S\/.", "PEN" ] } } src/Symfony/Component/Intl/Resources/data/currencies/qu_BO.json000066400000000000000000000002641266465517700251330ustar00rootroot00000000000000{ "Version": "2.1.6.71", "Names": { "BOB": [ "Bs", "BOB" ], "PEN": [ "PEN", "PEN" ] } } src/Symfony/Component/Intl/Resources/data/currencies/qu_EC.json000066400000000000000000000002631266465517700251210ustar00rootroot00000000000000{ "Version": "2.1.6.71", "Names": { "PEN": [ "PEN", "PEN" ], "USD": [ "$", "USD" ] } } src/Symfony/Component/Intl/Resources/data/currencies/rm.json000066400000000000000000000534651266465517700245570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "rubel bieloruss" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/rn.json000066400000000000000000000110051266465517700245400ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ro.json000066400000000000000000000445701266465517700245560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 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" ], "BYR": [ "BYR", "rublă belarusă" ], "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 din Sri Lanka" ], "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 Singapore" ], "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ă sud-sudaneză" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ro_MD.json000066400000000000000000000001761266465517700251300ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MDL": [ "L", "leu moldovenesc" ] } } src/Symfony/Component/Intl/Resources/data/currencies/root.json000066400000000000000000000025101266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.7.12", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ru.json000066400000000000000000000622351266465517700245620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Белорусский рубль" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ru_BY.json000066400000000000000000000003751266465517700251510ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BYR": [ "р.", "Белорусский рубль" ], "RUR": [ "RUR", "Российский рубль (1991–1998)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ru_KG.json000066400000000000000000000002171266465517700251330ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KGS": [ "сом", "Киргизский сом" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ru_KZ.json000066400000000000000000000002161266465517700251550ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KZT": [ "₸", "Казахский тенге" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ru_MD.json000066400000000000000000000002121266465517700251250ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MDL": [ "L", "Молдавский лей" ] } } src/Symfony/Component/Intl/Resources/data/currencies/rw.json000066400000000000000000000001631266465517700245540ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "RWF": [ "RF", "RWF" ] } } src/Symfony/Component/Intl/Resources/data/currencies/se.json000066400000000000000000000013401266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/se_SE.json000066400000000000000000000003141266465517700251200ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "NOK": [ "Nkr", "norgga kruvdno" ], "SEK": [ "kr", "ruoŧŧa kruvdno" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sg.json000066400000000000000000000110401266465517700245310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sh.json000066400000000000000000000522161266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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 Boliviano" ], "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)" ], "BYR": [ "[BYR]", "Beloruska rublja" ], "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", "Etiopijski bir" ], "EUR": [ "€", "Evro" ], "FIM": [ "FIM", "Finska marka" ], "FJD": [ "FJD", "Fidžijski dolar" ], "FKP": [ "FKP", "Foklandska funta" ], "FRF": [ "FRF", "Francuski franak" ], "GBP": [ "£", "Britanska funta sterlinga" ], "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", "Malagasijski ariari" ], "MGF": [ "MGF", "Malagasijski franak" ], "MKD": [ "MKD", "Makedonski denar" ], "MLF": [ "MLF", "Malijanski franak" ], "MMK": [ "MMK", "Mjanmarski kjat" ], "MNT": [ "MNT", "Mongolski tugrik" ], "MOP": [ "MOP", "Makaniška 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 ringgit" ], "MZE": [ "MZE", "Mozambijski eskudo" ], "MZM": [ "MZM", "Stari mozambijski metikal" ], "MZN": [ "MZN", "Mozambijski 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 nuevo 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", "Sijera-leonški leone" ], "SOS": [ "SOS", "Somalijski šiling" ], "SRD": [ "SRD", "Surinamski dolar" ], "SRG": [ "SRG", "Surinamski gilder" ], "SSP": [ "SSP", "Južnosudanska funta" ], "STD": [ "STD", "Sao Tome i Principe dobra" ], "SUR": [ "SUR", "Sovjetska rublja" ], "SVC": [ "SVC", "Salvadorski kolon" ], "SYP": [ "SYP", "Sirijska funta" ], "SZL": [ "SZL", "Svazi lilangeni" ], "THB": [ "THB", "Tajlandski bat" ], "TJR": [ "TJR", "Tadžihistanska rublja" ], "TJS": [ "TJS", "Tadžihistanski somon" ], "TMM": [ "TMM", "Turkmenistanski manat (1993–2009)" ], "TMT": [ "TMT", "Turkmenistanski manat" ], "TND": [ "TND", "Tuniski dinar" ], "TOP": [ "TOP", "Tongonška 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 grivna" ], "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žno-afrič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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sh_BA.json000066400000000000000000000002031266465517700250730ustar00rootroot00000000000000{ "Version": "2.1.8.20", "Names": { "BAM": [ "KM", "Konvertibilna Marka" ] } } src/Symfony/Component/Intl/Resources/data/currencies/si.json000066400000000000000000000412531266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "බොට්ස්වානා පුලා" ], "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", "චෙක් රිපබ්ලික් කොරූනා" ], "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", "සැම්බියානු ක්වාචා" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sk.json000066400000000000000000000476101266465517700245510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Argentinský austral" ], "ARP": [ "ARP", "Argentinské 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", "Bosnianský dinár" ], "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ý leva" ], "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", "Bolivíjske peso" ], "BOV": [ "BOV", "Bolivíjske mvdol" ], "BRB": [ "BRB", "Bolivíjske Cruzeiro Novo (1967–1986)" ], "BRC": [ "BRC", "Bolivíjske cruzado" ], "BRE": [ "BRE", "Bolivíjske 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)" ], "BYR": [ "BYR", "bieloruský rubeľ" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sl.json000066400000000000000000000507531266465517700245540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "beloruski rubelj" ], "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 renminbi" ], "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", "CFA frank BCEAO" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sn.json000066400000000000000000000105471266465517700245530ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/so.json000066400000000000000000000011061266465517700245430ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/so_DJ.json000066400000000000000000000001771266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "DJF": [ "Fdj", "Faran Jabbuuti" ] } } src/Symfony/Component/Intl/Resources/data/currencies/so_ET.json000066400000000000000000000001771266465517700251420ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ETB": [ "Br", "Birta Itoobbiya" ] } } src/Symfony/Component/Intl/Resources/data/currencies/so_KE.json000066400000000000000000000001641266465517700251250ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "KES": [ "Ksh", "KES" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sq.json000066400000000000000000000302531266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Pezoja 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 e 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 botsvane" ], "BYR": [ "BYR", "Rubla bjelloruse" ], "BZD": [ "BZD", "Dollari i Ishujve Belize" ], "CAD": [ "CA$", "Dollari kanadez" ], "CDF": [ "CDF", "Franga kongole" ], "CHF": [ "CHF", "Franga zvicerane" ], "CLP": [ "CLP", "Pezoja kiliane" ], "CNY": [ "CN¥", "Juani kinez" ], "COP": [ "COP", "Pezoja kolumbiane" ], "CRC": [ "CRC", "Koloni kostarikan" ], "CUC": [ "CUC", "Pezoja kubane e shkëmbyeshme" ], "CUP": [ "CUP", "Pezoja kubane" ], "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", "Pezoja 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 Folkland" ], "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$", "Pezoja 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", "Pezoja 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 Sejçelë" ], "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 Svazilandit" ], "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", "Pezoja 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", "Randa afrikano-jugore" ], "ZMW": [ "ZMW", "Kuaça e Zambikut" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sq_MK.json000066400000000000000000000002011266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MKD": [ "den", "Denari maqedonas" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sr.json000066400000000000000000000622671266465517700245650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "[BYR]", "Белоруска рубља" ], "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", "Tаџихистански сомон" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sr_BA.json000066400000000000000000000002271266465517700251130ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BAM": [ "КМ", "Конвертибилна Марка" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sr_Cyrl_BA.json000066400000000000000000000002271266465517700261040ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BAM": [ "КМ", "Конвертибилна Марка" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sr_Latn.json000066400000000000000000000522161266465517700255340ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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 Boliviano" ], "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)" ], "BYR": [ "[BYR]", "Beloruska rublja" ], "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", "Etiopijski bir" ], "EUR": [ "€", "Evro" ], "FIM": [ "FIM", "Finska marka" ], "FJD": [ "FJD", "Fidžijski dolar" ], "FKP": [ "FKP", "Foklandska funta" ], "FRF": [ "FRF", "Francuski franak" ], "GBP": [ "£", "Britanska funta sterlinga" ], "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", "Malagasijski ariari" ], "MGF": [ "MGF", "Malagasijski franak" ], "MKD": [ "MKD", "Makedonski denar" ], "MLF": [ "MLF", "Malijanski franak" ], "MMK": [ "MMK", "Mjanmarski kjat" ], "MNT": [ "MNT", "Mongolski tugrik" ], "MOP": [ "MOP", "Makaniška 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 ringgit" ], "MZE": [ "MZE", "Mozambijski eskudo" ], "MZM": [ "MZM", "Stari mozambijski metikal" ], "MZN": [ "MZN", "Mozambijski 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 nuevo 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", "Sijera-leonški leone" ], "SOS": [ "SOS", "Somalijski šiling" ], "SRD": [ "SRD", "Surinamski dolar" ], "SRG": [ "SRG", "Surinamski gilder" ], "SSP": [ "SSP", "Južnosudanska funta" ], "STD": [ "STD", "Sao Tome i Principe dobra" ], "SUR": [ "SUR", "Sovjetska rublja" ], "SVC": [ "SVC", "Salvadorski kolon" ], "SYP": [ "SYP", "Sirijska funta" ], "SZL": [ "SZL", "Svazi lilangeni" ], "THB": [ "THB", "Tajlandski bat" ], "TJR": [ "TJR", "Tadžihistanska rublja" ], "TJS": [ "TJS", "Tadžihistanski somon" ], "TMM": [ "TMM", "Turkmenistanski manat (1993–2009)" ], "TMT": [ "TMT", "Turkmenistanski manat" ], "TND": [ "TND", "Tuniski dinar" ], "TOP": [ "TOP", "Tongonška 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 grivna" ], "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žno-afrič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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sr_Latn_BA.json000066400000000000000000000002031266465517700260630ustar00rootroot00000000000000{ "Version": "2.1.8.20", "Names": { "BAM": [ "KM", "Konvertibilna Marka" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sv.json000066400000000000000000000551241266465517700245630ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "vitrysk rubel" ], "BZD": [ "BZ$", "belizisk dollar" ], "CAD": [ "CAN$", "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", "guyanansk dollar" ], "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 rupiah" ], "IEP": [ "IEP", "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", "macaosk pataca" ], "MRO": [ "MRO", "mauretansk ouquiya" ], "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", "French UIC-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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sw.json000066400000000000000000000313201266465517700245540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AED": [ "AED", "dirham ya Falme za Kiarabu" ], "AFN": [ "AFN", "Afghani ya Afuganistani" ], "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", "Convertible Mark ya Bosnia na Hezegovina" ], "BBD": [ "BBD", "Dola ya Barbados" ], "BDT": [ "BDT", "Taka ya Bangladeshi" ], "BGN": [ "BGN", "Lev ya Bulgaria" ], "BHD": [ "BHD", "dinari 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" ], "BYR": [ "BYR", "Ruble ya Belarusi" ], "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 Kepuvede" ], "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": [ "₪", "Sheqel Mpya ya Israeli" ], "INR": [ "₹", "rupia ya India" ], "IQD": [ "IQD", "Dinari ya Iraki" ], "IRR": [ "IRR", "Rial ya Iran" ], "ISK": [ "ISK", "Krona ya Isilandi" ], "JMD": [ "JMD", "Dola ya Jamaica" ], "JOD": [ "JOD", "Dinari ya Yordani" ], "JPY": [ "JP¥", "Yen ya Japani" ], "KES": [ "Ksh", "shilingi ya Kenya" ], "KGS": [ "KGS", "Som ya Kirigistani" ], "KHR": [ "KHR", "Riel ya Kambodia" ], "KMF": [ "KMF", "faranga ya Komoro" ], "KPW": [ "KPW", "Won ya Korea Kaskazini" ], "KRW": [ "₩", "Won ya Korea Kusini" ], "KWD": [ "KWD", "Dinari 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 Sirilanka" ], "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 Katari" ], "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", "leoni" ], "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 Vietinamu" ], "VUV": [ "VUV", "Vatu ya Vanuatu" ], "WST": [ "WST", "Tala ya Samoa" ], "XAF": [ "FCFA", "CFA faranga ya BEAC" ], "XCD": [ "EC$", "Dola ya Karibea ya Mashariki" ], "XOF": [ "CFA", "CFA faranga za BCEAO" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/sw_UG.json000066400000000000000000000002031266465517700251430ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "UGX": [ "USh", "shilingi ya Uganda" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ta.json000066400000000000000000000421441266465517700245350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "போட்ஸ்வானா புலா" ], "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", "செக் குடியரசு கொருனா" ], "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 BEAC)" ], "XCD": [ "EC$", "கிழக்கு கரீபியன் டாலர்" ], "XOF": [ "CFA", "CFA ஃப்ராங்க் BCEAO" ], "XPF": [ "CFPF", "ஃப்ராங்க் (CFP)" ], "YER": [ "YER", "ஏமனி ரியால்" ], "ZAR": [ "ZAR", "தென் ஆப்ரிக்க ராண்ட்" ], "ZMK": [ "ZMK", "ஸாம்பியன் குவாசா (1968–2012)" ], "ZMW": [ "ZMW", "ஸாம்பியன் குவாசா" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ta_LK.json000066400000000000000000000002261266465517700251160ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "LKR": [ "Rs.", "இலங்கை ரூபாய்" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ta_MY.json000066400000000000000000000004111266465517700251310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MYR": [ "RM", "மலேசிய ரிங்கிட்" ], "SGD": [ "S$", "சிங்கப்பூர் டாலர்" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ta_SG.json000066400000000000000000000005561266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "MYR": [ "RM", "மலேசிய ரிங்கிட்" ], "SGD": [ "$", "சிங்கப்பூர் டாலர்" ], "USD": [ "US$", "அமெரிக்க டாலர்" ] } } src/Symfony/Component/Intl/Resources/data/currencies/te.json000066400000000000000000000417371266465517700245500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "బోట్స్‌వానా పులా" ], "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", "చెక్ రిపబ్లిక్ కోరునా" ], "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", "జాంబియన్ క్వాచా" ] } } src/Symfony/Component/Intl/Resources/data/currencies/th.json000066400000000000000000000733321266465517700245470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "รูเบิลเบลารุส" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ti.json000066400000000000000000000015051266465517700245410ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BRL": [ "R$", "የብራዚል ሪል" ], "CNY": [ "CN¥", "የቻይና ዩአን ረንሚንቢ" ], "ETB": [ "Br", "የኢትዮጵያ ብር" ], "EUR": [ "€", "አውሮ" ], "GBP": [ "£", "የእንግሊዝ ፓውንድ ስተርሊንግ" ], "INR": [ "₹", "የሕንድ ሩፒ" ], "JPY": [ "JP¥", "የጃፓን የን" ], "RUB": [ "RUB", "የራሻ ሩብል" ], "USD": [ "US$", "የአሜሪካን ዶላር" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ti_ER.json000066400000000000000000000001641266465517700251270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ERN": [ "Nfk", "ERN" ] } } src/Symfony/Component/Intl/Resources/data/currencies/tl.json000066400000000000000000000310341266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AED": [ "AED", "United Arab Emirates Dirham" ], "AFN": [ "AFN", "Afghan Afghani" ], "ALL": [ "ALL", "Albanian Lek" ], "AMD": [ "AMD", "Armenian Dram" ], "ANG": [ "ANG", "Netherlands Antillean Guilder" ], "AOA": [ "AOA", "Angolan Kwanza" ], "ARS": [ "ARS", "Argentine Peso" ], "AUD": [ "A$", "Dolyar ng Australya" ], "AWG": [ "AWG", "Aruban Florin" ], "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", "Bolivian Boliviano" ], "BRL": [ "R$", "Brazilian Real" ], "BSD": [ "BSD", "Dolyar ng Bahamas" ], "BTN": [ "BTN", "Bhutanese Ngultrum" ], "BWP": [ "BWP", "Botswanan Pula" ], "BYR": [ "BYR", "Belarusian Ruble" ], "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", "Costa Rican Colón" ], "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", "Denmark 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", "Falkland Islands Pound" ], "FRF": [ "FRF", "French Franc" ], "GBP": [ "£", "British Pound Sterling" ], "GEL": [ "GEL", "Georgian Lari" ], "GHS": [ "GHS", "Ghanaian Cedi" ], "GIP": [ "GIP", "Gibraltar Pound" ], "GMD": [ "GMD", "Gambian Dalasi" ], "GNF": [ "GNF", "Guinean Franc" ], "GTQ": [ "GTQ", "Guatemalan Quetzal" ], "GYD": [ "GYD", "Dolyar ng Guyanese" ], "HKD": [ "HK$", "Dolyar ng Hong Kong" ], "HNL": [ "HNL", "Honduran Lempira" ], "HRK": [ "HRK", "Croatian Kuna" ], "HTG": [ "HTG", "Haitian Gourde" ], "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", "North Korean Won" ], "KRW": [ "₩", "South Korean Won" ], "KWD": [ "KWD", "Kuwaiti Dinar" ], "KYD": [ "KYD", "Dolyar ng Cayman Islands" ], "KZT": [ "KZT", "Kazakhstani Tenge" ], "LAK": [ "LAK", "Laotian Kip" ], "LBP": [ "LBP", "Lebanese Pound" ], "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", "Nicaraguan Córdoba" ], "NOK": [ "NOK", "Norwegian Krone" ], "NPR": [ "NPR", "Nepalese Rupee" ], "NZD": [ "NZ$", "Dolyar ng New Zealand" ], "OMR": [ "OMR", "Omani Rial" ], "PAB": [ "PAB", "Panamanian Balboa" ], "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", "Sudanese Pound" ], "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", "South Sudanese Pound" ], "STD": [ "STD", "Sao Tome and Principe 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", "Venezuelan Bolívar" ], "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 BCEAO" ], "XPF": [ "CFPF", "CFP Franc" ], "YER": [ "YER", "Yemeni Rial" ], "ZAR": [ "ZAR", "South African Rand" ], "ZMK": [ "ZMK", "Zambian Kwacha (1968–2012)" ], "ZMW": [ "ZMW", "Zambian Kwacha" ] } } src/Symfony/Component/Intl/Resources/data/currencies/to.json000066400000000000000000000012321266465517700245440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AUD": [ "AUD$", "AUD" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/tr.json000066400000000000000000000550501266465517700245560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Beyaz Rusya Rublesi" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ug.json000066400000000000000000000672571266465517700245600ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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)" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/uk.json000066400000000000000000000632471266465517700245570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "білоруський рубль" ], "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", "нікарагуанська кордоба" ], "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", "західноафриканський франк BCEAO" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ur.json000066400000000000000000000342141266465517700245560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "بوتسوانا کا پولا" ], "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 فرانک BEAC" ], "XCD": [ "EC$", "مشرقی کریبیا کا ڈالر" ], "XOF": [ "CFA", "CFA فرانک BCEAO" ], "XPF": [ "CFPF", "CFP فرانک" ], "YER": [ "YER", "یمنی ریال" ], "ZAR": [ "ZAR", "جنوبی افریقی رانڈ" ], "ZMK": [ "ZMK", "زامبیائی کواچا (1968–2012)" ], "ZMW": [ "ZMW", "زامبیائی کواچا" ] } } src/Symfony/Component/Intl/Resources/data/currencies/ur_IN.json000066400000000000000000000020161266465517700251370ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "CRC": [ "CRC", "کوسٹا ریکا کولون" ], "CUC": [ "CUC", "قابل منتقلی کیوبائی پیسو" ], "CUP": [ "CUP", "کیوبائی پیسو" ], "CVE": [ "CVE", "کیپ ورڈی اسکیوڈو" ], "DKK": [ "DKK", "ڈنمارک کرون" ], "ERN": [ "ERN", "اریٹیریائی ناکفا" ], "GBP": [ "£", "برطانوی پاونڈ سٹرلنگ" ], "GHS": [ "GHS", "گھانی سیڈی" ], "NOK": [ "NOK", "ناروے کرون" ], "PKR": [ "PKR", "پاکستانی روپیہ" ], "WST": [ "WST", "ساموآئی ٹالا" ] } } src/Symfony/Component/Intl/Resources/data/currencies/uz.json000066400000000000000000000256561266465517700246000ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AED": [ "AED", "AED" ], "AFN": [ "AFN", "AFN" ], "ALL": [ "ALL", "Alban leki" ], "AMD": [ "AMD", "AMD" ], "ANG": [ "ANG", "Golland Antil guldeni" ], "AOA": [ "AOA", "AOA" ], "ARS": [ "ARS", "Argentina pesosi" ], "AUD": [ "A$", "Avstraliya dollari" ], "AWG": [ "AWG", "Aruba florini" ], "AZN": [ "AZN", "AZN" ], "BAM": [ "BAM", "Bosniya va Gertsogovina ayriboshlash markasi" ], "BBD": [ "BBD", "Barbados dollari" ], "BDT": [ "BDT", "BDT" ], "BGN": [ "BGN", "Bolgariya levi" ], "BHD": [ "BHD", "BHD" ], "BIF": [ "BIF", "BIF" ], "BMD": [ "BMD", "Bermuda dollari" ], "BND": [ "BND", "BND" ], "BOB": [ "BOB", "Boliviya bolivyani" ], "BRL": [ "R$", "Brazil reali" ], "BSD": [ "BSD", "Bagama dollari" ], "BTN": [ "BTN", "BTN" ], "BWP": [ "BWP", "BWP" ], "BYR": [ "BYR", "Belarus rubli" ], "BZD": [ "BZD", "Beliz dollari" ], "CAD": [ "CA$", "Kanada dollari" ], "CDF": [ "CDF", "CDF" ], "CHF": [ "CHF", "Shvetsariya 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", "CVE" ], "CZK": [ "CZK", "Chex kronasi" ], "DJF": [ "DJF", "DJF" ], "DKK": [ "DKK", "Daniya kronasi" ], "DOP": [ "DOP", "Dominikan pesosi" ], "DZD": [ "DZD", "Jazoir dinori" ], "EGP": [ "EGP", "Misr funti" ], "ERN": [ "ERN", "ERN" ], "ETB": [ "ETB", "ETB" ], "EUR": [ "€", "Yevro" ], "FJD": [ "FJD", "FJD" ], "FKP": [ "FKP", "Folklend oroli funti" ], "GBP": [ "£", "Ingliz funt sterlingi" ], "GEL": [ "GEL", "GEL" ], "GHS": [ "GHS", "GHS" ], "GIP": [ "GIP", "Gibraltar funti" ], "GMD": [ "GMD", "GMD" ], "GNF": [ "GNF", "GNF" ], "GTQ": [ "GTQ", "Gvatemala kvetzali" ], "GYD": [ "GYD", "Gayana dollari" ], "HKD": [ "HK$", "Gonkong dollari" ], "HNL": [ "HNL", "Gonduras lempirasi" ], "HRK": [ "HRK", "Horvat kunasi" ], "HTG": [ "HTG", "Gaiti gurdasi" ], "HUF": [ "HUF", "Vengriya forinti" ], "IDR": [ "IDR", "Indoneziya rupiyasi" ], "ILS": [ "₪", "ILS" ], "INR": [ "₹", "Hind rupiyasi" ], "IQD": [ "IQD", "IQD" ], "IRR": [ "IRR", "IRR" ], "ISK": [ "ISK", "Islandiya kronasi" ], "JMD": [ "JMD", "Yamayka dollari" ], "JOD": [ "JOD", "JOD" ], "JPY": [ "JP¥", "Yapon yenasi" ], "KES": [ "KES", "KES" ], "KGS": [ "KGS", "KGS" ], "KHR": [ "KHR", "KHR" ], "KMF": [ "KMF", "KMF" ], "KPW": [ "KPW", "KPW" ], "KRW": [ "₩", "Janubiy Koreya voni" ], "KWD": [ "KWD", "KWD" ], "KYD": [ "KYD", "Kayman Orollari Dollari" ], "KZT": [ "KZT", "KZT" ], "LAK": [ "LAK", "LAK" ], "LBP": [ "LBP", "LBP" ], "LKR": [ "LKR", "LKR" ], "LRD": [ "LRD", "LRD" ], "LTL": [ "LTL", "Litva liti" ], "LVL": [ "LVL", "Latviya lati" ], "LYD": [ "LYD", "Liviya dinori" ], "MAD": [ "MAD", "Marokash dirhami" ], "MDL": [ "MDL", "Moldova leusi" ], "MGA": [ "MGA", "MGA" ], "MKD": [ "MKD", "Makedoniya dinori" ], "MMK": [ "MMK", "MMK" ], "MNT": [ "MNT", "MNT" ], "MOP": [ "MOP", "MOP" ], "MRO": [ "MRO", "MRO" ], "MUR": [ "MUR", "MUR" ], "MVR": [ "MVR", "MVR" ], "MWK": [ "MWK", "MWK" ], "MXN": [ "MX$", "Meksika pesosi" ], "MYR": [ "MYR", "MYR" ], "MZN": [ "MZN", "MZN" ], "NAD": [ "NAD", "NAD" ], "NGN": [ "NGN", "NGN" ], "NIO": [ "NIO", "Nikaragua kordobasi" ], "NOK": [ "NOK", "Norvegiya kronasi" ], "NPR": [ "NPR", "NPR" ], "NZD": [ "NZ$", "NZD" ], "OMR": [ "OMR", "OMR" ], "PAB": [ "PAB", "Panama balboasi" ], "PEN": [ "PEN", "Peru noyvo soli" ], "PGK": [ "PGK", "PGK" ], "PHP": [ "PHP", "PHP" ], "PKR": [ "PKR", "PKR" ], "PLN": [ "PLN", "Polsha zlotiyi" ], "PYG": [ "PYG", "Paragvay guarani" ], "QAR": [ "QAR", "QAR" ], "RON": [ "RON", "Rumin leusi" ], "RSD": [ "RSD", "Serbiya dinori" ], "RUB": [ "RUB", "Rus rubli" ], "RWF": [ "RWF", "RWF" ], "SAR": [ "SAR", "Saudiya Arabistoni riyoli" ], "SBD": [ "SBD", "SBD" ], "SCR": [ "SCR", "SCR" ], "SDG": [ "SDG", "Sudan funti" ], "SEK": [ "SEK", "Shvetsiya kronasi" ], "SGD": [ "SGD", "SGD" ], "SHP": [ "SHP", "SHP" ], "SLL": [ "SLL", "SLL" ], "SOS": [ "SOS", "SOS" ], "SRD": [ "SRD", "Surinam dollari" ], "SSP": [ "SSP", "Janubiy Sudan funti" ], "STD": [ "STD", "STD" ], "SYP": [ "SYP", "SYP" ], "SZL": [ "SZL", "SZL" ], "THB": [ "฿", "Tayland bahti" ], "TJS": [ "TJS", "TJS" ], "TMT": [ "TMT", "TMT" ], "TND": [ "TND", "Tunis dinori" ], "TOP": [ "TOP", "TOP" ], "TRY": [ "TRY", "Turk lirasi" ], "TTD": [ "TTD", "Trinidad va Tobago dollari" ], "TWD": [ "NT$", "Yangi Tayvan dollari" ], "TZS": [ "TZS", "TZS" ], "UAH": [ "UAH", "Ukrain grivnasi" ], "UGX": [ "UGX", "UGX" ], "USD": [ "US$", "AQSH dollari" ], "UYU": [ "UYU", "Urugvay pesosi" ], "UZS": [ "soʻm", "Oʻzbekiston soʻm" ], "VEF": [ "VEF", "Venesuela bolivari" ], "VND": [ "₫", "VND" ], "VUV": [ "VUV", "VUV" ], "WST": [ "WST", "WST" ], "XAF": [ "FCFA", "XAF" ], "XCD": [ "EC$", "Sharqiy Karib dollari" ], "XOF": [ "CFA", "XOF" ], "XPF": [ "CFPF", "XPF" ], "YER": [ "YER", "YER" ], "ZAR": [ "ZAR", "Janubiy Afrika randi" ], "ZMW": [ "ZMW", "ZMW" ] } } src/Symfony/Component/Intl/Resources/data/currencies/uz_Arab.json000066400000000000000000000001741266465517700255110ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AFN": [ "؋", "افغانی" ] } } src/Symfony/Component/Intl/Resources/data/currencies/uz_Cyrl.json000066400000000000000000000113661266465517700255620ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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", "Парагвай гуарани" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/vi.json000066400000000000000000000560401266465517700245470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "Rúp Belarus" ], "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 Hungaria" ], "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", "Đồng loti của 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", "Đồng 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 Saint 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", "Đồng Colón 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", "CFA Franc BEAC" ], "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 BCEAO" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/yi.json000066400000000000000000000006061266465517700245470ustar00rootroot00000000000000{ "Version": "2.1.7.41", "Names": { "BZD": [ "BZD", "בעליז דאלאַר" ], "CHF": [ "CHF", "שווייצער פֿראַנק" ], "EUR": [ "€", "איירא" ], "SEK": [ "SEK", "שוועדישע קראנע" ] } } src/Symfony/Component/Intl/Resources/data/currencies/yo.json000066400000000000000000000123031266465517700245520ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/yo_BJ.json000066400000000000000000000116551266465517700251360ustar00rootroot00000000000000{ "Version": "2.1.8.19", "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" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh.json000066400000000000000000000547571266465517700245670ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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)" ], "BYR": [ "BYR", "白俄罗斯卢布" ], "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", "毛里求斯卢比" ], "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": [ "฿", "泰铢" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_HK.json000066400000000000000000000042271266465517700251340ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "AED": [ "AED", "阿拉伯聯合酋長國迪爾汗" ], "AUD": [ "AU$", "澳元" ], "AWG": [ "AWG", "阿魯巴盾" ], "AZN": [ "AZN", "亞塞拜疆馬納特" ], "BAD": [ "BAD", "波斯尼亞-黑塞哥維那第納爾" ], "BAM": [ "BAM", "波士尼亞與赫塞哥維納可轉換馬克" ], "CAD": [ "CA$", "加元" ], "CRC": [ "CRC", "哥斯達黎加科郎" ], "ETB": [ "ETB", "埃塞俄比亞比爾" ], "GEL": [ "GEL", "格魯吉亞拉里" ], "HKD": [ "HK$", "港元" ], "ITL": [ "ITL", "意大利里拉" ], "KRW": [ "₩", "韓圓" ], "LRD": [ "LRD", "利比利亞元" ], "MUR": [ "MUR", "毛里求斯盧布" ], "MZN": [ "MZN", "莫桑比克美提卡" ], "NGN": [ "NGN", "尼日利亞奈拉" ], "NZD": [ "NZ$", "紐西蘭元" ], "RSD": [ "RSD", "塞爾維亞第納爾" ], "RWF": [ "RWF", "盧旺達法郎" ], "SAR": [ "SAR", "沙特阿拉伯里亞爾" ], "SGD": [ "SGD", "新加坡元" ], "TWD": [ "NT$", "新台幣" ], "USD": [ "US$", "美元" ], "XAF": [ "FCFA", "中非法郎" ], "XOF": [ "CFA", "多哥非洲共同體法郎" ], "XPF": [ "CFPF", "太平洋法郎" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_HK.json000066400000000000000000000011441266465517700261000ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AWG": [ "AWG", "阿鲁巴弗罗林" ], "CNY": [ "CN¥", "人民币" ], "HNL": [ "HNL", "洪都拉斯拉伦皮拉" ], "KYD": [ "KYD", "开曼群岛元" ], "KZT": [ "KZT", "哈萨克斯坦腾格" ], "NIO": [ "NIO", "尼加拉瓜科多巴" ], "UAH": [ "UAH", "乌克兰赫夫纳" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_MO.json000066400000000000000000000010521266465517700261070ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AWG": [ "AWG", "阿鲁巴弗罗林" ], "BAN": [ "BAN", "波士尼亚-赫塞哥维纳第纳尔 (1994–1997)" ], "CNY": [ "CN¥", "人民币" ], "KZT": [ "KZT", "哈萨克斯坦腾格" ], "MOP": [ "MOP$", "澳门元" ], "NIO": [ "NIO", "尼加拉瓜科多巴" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hans_SG.json000066400000000000000000000006711266465517700261130ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AWG": [ "AWG", "阿鲁巴弗罗林" ], "CNY": [ "CN¥", "人民币" ], "KZT": [ "KZT", "哈萨克斯坦腾格" ], "NIO": [ "NIO", "尼加拉瓜科多巴" ], "SGD": [ "$", "新加坡元" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant.json000066400000000000000000000547541266465517700255360ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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)" ], "BYR": [ "BYR", "白俄羅斯盧布" ], "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": [ "฿", "泰銖" ], "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": [ "$", "美元" ], "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)" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_HK.json000066400000000000000000000042271266465517700261060ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "AED": [ "AED", "阿拉伯聯合酋長國迪爾汗" ], "AUD": [ "AU$", "澳元" ], "AWG": [ "AWG", "阿魯巴盾" ], "AZN": [ "AZN", "亞塞拜疆馬納特" ], "BAD": [ "BAD", "波斯尼亞-黑塞哥維那第納爾" ], "BAM": [ "BAM", "波士尼亞與赫塞哥維納可轉換馬克" ], "CAD": [ "CA$", "加元" ], "CRC": [ "CRC", "哥斯達黎加科郎" ], "ETB": [ "ETB", "埃塞俄比亞比爾" ], "GEL": [ "GEL", "格魯吉亞拉里" ], "HKD": [ "HK$", "港元" ], "ITL": [ "ITL", "意大利里拉" ], "KRW": [ "₩", "韓圓" ], "LRD": [ "LRD", "利比利亞元" ], "MUR": [ "MUR", "毛里求斯盧布" ], "MZN": [ "MZN", "莫桑比克美提卡" ], "NGN": [ "NGN", "尼日利亞奈拉" ], "NZD": [ "NZ$", "紐西蘭元" ], "RSD": [ "RSD", "塞爾維亞第納爾" ], "RWF": [ "RWF", "盧旺達法郎" ], "SAR": [ "SAR", "沙特阿拉伯里亞爾" ], "SGD": [ "SGD", "新加坡元" ], "TWD": [ "NT$", "新台幣" ], "USD": [ "US$", "美元" ], "XAF": [ "FCFA", "中非法郎" ], "XOF": [ "CFA", "多哥非洲共同體法郎" ], "XPF": [ "CFPF", "太平洋法郎" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_Hant_MO.json000066400000000000000000000001731266465517700261130ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "MOP": [ "MOP$", "澳門元" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_MO.json000066400000000000000000000001731266465517700251410ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "MOP": [ "MOP$", "澳門元" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zh_SG.json000066400000000000000000000006711266465517700251420ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AWG": [ "AWG", "阿鲁巴弗罗林" ], "CNY": [ "CN¥", "人民币" ], "KZT": [ "KZT", "哈萨克斯坦腾格" ], "NIO": [ "NIO", "尼加拉瓜科多巴" ], "SGD": [ "$", "新加坡元" ] } } src/Symfony/Component/Intl/Resources/data/currencies/zu.json000066400000000000000000000305111266465517700245620ustar00rootroot00000000000000{ "Version": "2.1.8.18", "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" ], "BYR": [ "BYR", "i-Belarusian Ruble" ], "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 Sterling" ], "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-Metical yase-Mozambicque" ], "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", "Upondo waseNingizimu Sudan" ], "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-CFA Franc BCEA" ], "XCD": [ "EC$", "i-East Caribbean Dollar" ], "XOF": [ "CFA", "i-CFA Franc BCEAO" ], "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" ] } } src/Symfony/Component/Intl/Resources/data/languages/000077500000000000000000000000001266465517700230355ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/languages/af.json000066400000000000000000000143551266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "Abkasies", "ach": "Akoli", "af": "Afrikaans", "agq": "Aghem", "ak": "Akan", "am": "Amharies", "ar": "Arabies", "ar_001": "Moderne Standaard Arabies", "arc": "Aramees", "arn": "Mapuche", "as": "Assamees", "asa": "Asu", "ay": "Aymara", "az": "Azerbeidjans", "ba": "Baskir", "be": "Wit-Russies", "bem": "Bemba", "bez": "Bena", "bg": "Bulgaars", "bm": "Bambara", "bn": "Bengaals", "bo": "Tibettaans", "br": "Bretons", "brx": "Bodo", "bs": "Bosnies", "ca": "Katalaans", "cgg": "Sjiga", "chr": "Cherokees", "ckb": "Sorani Koerdies", "co": "Korsikaans", "cs": "Tsjeggies", "cy": "Wallies", "da": "Deens", "dav": "Taita", "de": "Duits", "de_CH": "Switserse hoog-Duits", "dje": "Zarma", "dsb": "Lae Sorbies", "dua": "Duala", "dv": "Divehi", "dyo": "Jola-Fonyi", "dz": "Dzongkha", "ebu": "Embu", "ee": "Ewe", "efi": "Efik", "egy": "Antieke Egipties", "el": "Grieks", "en": "Engels", "eo": "Esperanto", "es": "Spaans", "et": "Estnies", "eu": "Baskies", "fa": "Persies", "fi": "Fins", "fil": "Filippyns", "fj": "Fidjiaans", "fo": "Faroees", "fr": "Frans", "fy": "Wes-Fries", "ga": "Iers", "gaa": "Gaa", "gag": "Gagauz", "gd": "Skotse Gallies", "gl": "Galisies", "gn": "Guarani", "got": "Goties", "grc": "Antieke Grieks", "gsw": "Switserse Duits", "gu": "Goedjarati", "guz": "Gusii", "gv": "Manx", "ha": "Hausa", "haw": "Hawaiies", "he": "Hebreeus", "hi": "Hindi", "hr": "Kroaties", "hsb": "Hoog-Sorbies", "ht": "Haïtiaans", "hu": "Hongaars", "hy": "Armeens", "ia": "Interlingua", "id": "Indonesies", "ig": "Igbo", "ii": "Sichuan Yi", "is": "Yslands", "it": "Italiaans", "iu": "Innuïties", "ja": "Japannees", "jgo": "Ngomba", "jmc": "Machame", "jv": "Javaans", "ka": "Georgies", "kab": "Kabyle", "kam": "Kamba", "kde": "Makonde", "kea": "Kabuverdianu", "kg": "Kongolees", "khq": "Koyra Chiini", "ki": "Kikuyu", "kk": "Kazaks", "kl": "Kalaallisut", "kln": "Kalenjin", "km": "Khmer", "kn": "Kannada", "ko": "Koreaans", "koi": "Komi-Permyaks", "kok": "Konkani", "ks": "Kasjmirs", "ksb": "Shambala", "ksf": "Bafia", "ku": "Koerdies", "kw": "Kornies", "ky": "Kirgisies", "la": "Latyn", "lag": "Langi", "lb": "Luxemburgs", "lg": "Ganda", "lkt": "Lakota", "ln": "Lingaals", "lo": "Lao", "loz": "Lozi", "lt": "Litaus", "lu": "Luba-Katanga", "lua": "Luba-Lulua", "luo": "Luo", "luy": "Luyia", "lv": "Letties", "mas": "Masai", "mer": "Meru", "mfe": "Morisjen", "mg": "Malgassies", "mgh": "Makhuwa-Meetto", "mgo": "Meta’", "mi": "Maori", "mk": "Masedonies", "ml": "Malabaars", "mn": "Mongools", "moh": "Mohawk", "mr": "Marathi", "ms": "Maleis", "mt": "Maltees", "mua": "Mundang", "mul": "Veelvuldige tale", "my": "Birmaans", "naq": "Nama", "nb": "Noorse Bokmål", "nd": "Noord-Ndebele", "ne": "Nepalees", "nl": "Nederlands", "nl_BE": "Vlaams", "nmg": "Kwasio", "nn": "Noorweegse Nynorsk", "nqo": "N’Ko", "nr": "Suid-Ndebele", "nso": "Noord-Sotho", "nus": "Nuer", "ny": "Nyanja", "nyn": "Nyankole", "oc": "Oksitaans", "om": "Oromo", "or": "Oriya", "os": "Osseties", "pa": "Pandjabi", "pl": "Pools", "ps": "Pasjto", "pt": "Portugees", "qu": "Quechua", "quc": "K’iche’", "rm": "Reto-Romaans", "rn": "Rundi", "ro": "Roemeens", "ro_MD": "Moldawies", "rof": "Rombo", "ru": "Russies", "rw": "Rwandees", "rwk": "Rwa", "sa": "Sanskrit", "saq": "Samburu", "sbp": "Sangu", "sd": "Sindhi", "se": "Noordelike Sami", "seh": "Sena", "ses": "Koyraboro Senni", "sg": "Sango", "shi": "Tachelhit", "si": "Sinhala", "sk": "Slowaaks", "sl": "Sloweens", "sm": "Samoaans", "sma": "Suid-Sami", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Shona", "so": "Somalies", "sq": "Albanees", "sr": "Serwies", "ss": "Swazi", "st": "Suid-Sotho", "su": "Sundanees", "sv": "Sweeds", "sw": "Swahili", "swc": "Swahili (Kongo)", "ta": "Tamil", "te": "Telugu", "teo": "Teso", "tet": "Tetum", "tg": "Tadzjieks", "th": "Thai", "ti": "Tigrinya", "tk": "Turkmeens", "tlh": "Klingon", "tn": "Tswana", "to": "Tongaans", "tpi": "Tok Pisin", "tr": "Turks", "ts": "Tsonga", "tt": "Tataars", "tum": "Toemboeka", "twq": "Tasawaq", "ty": "Tahities", "tzm": "Sentraal Atlas Tamazight", "ug": "Uighur", "uk": "Oekraïens", "und": "Onbekende of ongeldige taal", "ur": "Oerdoe", "uz": "Oezbeeks", "vai": "Vai", "ve": "Venda", "vi": "Viëtnamees", "vun": "Vunjo", "wo": "Wolof", "xh": "Xhosa", "xog": "Soga", "yi": "Jiddisj", "yo": "Yoruba", "zgh": "Standaard Marokkaanse Tamazight", "zh": "Sjinees", "zu": "Zoeloe", "zxx": "Geen linguistiese inhoud" } } src/Symfony/Component/Intl/Resources/data/languages/ak.json000066400000000000000000000024071266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/am.json000066400000000000000000000212331266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "አፋርኛ", "ab": "አብሐዚኛ", "ach": "አኮሊኛ", "af": "አፍሪካንኛ", "agq": "አገም", "ak": "አካንኛ", "am": "አማርኛ", "ar": "ዓረብኛ", "ar_001": "ዘመናዊ መደበኛ ዓረብኛ", "arn": "ማፑቼ", "as": "አሳሜዛዊ", "asa": "አሱ", "ay": "አያማርኛ", "az": "አዘርባጃንኛ", "ba": "ባስኪርኛ", "be": "ቤላራሻኛ", "bem": "ቤምባ", "bez": "ቤና", "bg": "ቡልጋሪኛ", "bi": "ቢስላምኛ", "bm": "ባምባርኛ", "bn": "ቤንጋሊኛ", "bo": "ቲቤታንኛ", "br": "ብሬቶንኛ", "brx": "ቦዶ", "bs": "ቦስኒያንኛ", "byn": "ብሊን", "ca": "ካታላንኛ", "cgg": "ቺጋኛ", "chr": "ቼሮኬኛ", "ckb": "የሶራኒ ኩርድኛ", "co": "ኮርሲካኛ", "cs": "ቼክኛ", "cy": "ወልሽ", "da": "ዴኒሽ", "dav": "ታይታኛ", "de": "ጀርመን", "de_AT": "የኦስትሪያ ጀርመን", "de_CH": "የስዊዝ ከፍተኛ ጀርመንኛ", "dje": "ዛርማኛ", "dsb": "የታችኛው ሶርቢያንኛ", "dua": "ዱዋላኛ", "dv": "ዲቬህ", "dyo": "ጆላ ፎንያኛ", "dz": "ድዞንግኻኛ", "ebu": "ኢቦኛ", "ee": "ኢዊ", "efi": "ኤፊክ", "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": "አይሪሽ", "gaa": "ጋ", "gag": "ጋጉዝኛ", "gd": "እስኮትስ ጌልክኛ", "gez": "ግዕዝኛ", "gl": "ጋሊሺያ", "gn": "ጓራኒኛ", "gsw": "የስዊዝ ጀርመን", "gu": "ጉጃርቲኛ", "guz": "ጉስሊኛ", "gv": "ማንክስኛ", "ha": "ሃውሳኛ", "haw": "ሃዊያኛ", "he": "ዕብራስጥ", "hi": "ሒንዱኛ", "hr": "ክሮሽያንኛ", "hsb": "የላይኛው ሶርቢያንኛ", "ht": "ሃይትኛ", "hu": "ሀንጋሪኛ", "hy": "አርመናዊ", "ia": "ኢንቴርሊንጓ", "id": "ኢንዶኔዥኛ", "ie": "እንተርሊንግወ", "ig": "ኢግቦኛ", "ii": "ሲቹንዪኛ", "ik": "እኑፒያቅኛ", "is": "አይስላንድኛ", "it": "ጣሊያንኛ", "iu": "እኑክቲቱትኛ", "ja": "ጃፓንኛ", "jgo": "ንጎባኛ", "jmc": "ማቻሜኛ", "jv": "ጃቫንኛ", "ka": "ጆርጂያን", "kab": "ካብይል", "kam": "ካምባ", "kde": "ማኮንዴ", "kea": "ካቡቨርዲያኑ", "kg": "ኮንጎኛ", "khq": "ኮይራ ቺኒ", "ki": "ኪኩዩ", "kk": "ካዛክኛ", "kl": "ካላሊሱትኛ", "kln": "ካለንጂን", "km": "ክመርኛ ማእከላዊ", "kn": "ካናዳኛ", "ko": "ኮሪያኛ", "koi": "ኮሚ ፔርምያክ", "kok": "ኮካኒ", "ks": "ካሽሚርኛ", "ksb": "ሻምባላ", "ksf": "ባፊያ", "ku": "ኩርድሽኛ", "kw": "ኮርኒሽ", "ky": "ኪርጊዝኛ", "la": "ላቲንኛ", "lag": "ላንጊ", "lb": "ሉክዘምበርገርኛ", "lg": "ጋንዳኛ", "lkt": "ላኮታ", "ln": "ሊንጋላኛ", "lo": "ላውስኛ", "loz": "ሎዚኛ", "lt": "ሉቴንያንኛ", "lu": "ሉባ ካታንጋ", "lua": "ሉባ-ሉሏ", "luo": "ሉኦ", "luy": "ሉዪያ", "lv": "ላትቪያን", "mas": "ማሳይ", "mer": "ሜሩ", "mfe": "ሞሪሲየኛ", "mg": "ማላጋስኛ", "mgh": "ማኩዋ ሜቶ", "mgo": "ሜታ", "mi": "ማዮሪኛ", "mk": "ማሴዶንኛ", "ml": "ማላያላምኛ", "mn": "ሞንጎላዊኛ", "moh": "ሞሃውክ", "mr": "ማራቲኛ", "ms": "ማላይኛ", "mt": "ማልቲስኛ", "mua": "ሙንዳንግ", "my": "ቡርማኛ", "na": "ናኡሩ", "naq": "ናማ", "nb": "የኖርዌይ ቦክማል", "nd": "ሰሜን ንዴብሌ", "ne": "ኔፓሊኛ", "nl": "ደች", "nl_BE": "ፍሌሚሽ", "nmg": "ክዋሲዮ", "nn": "የኖርዌይ ናይኖርስክ", "no": "ኖርዌጂያን", "nqo": "ንኮ", "nso": "ሰሜናዊ ሶቶ", "nus": "ኑዌር", "ny": "ንያንጃ", "nyn": "ኒያንኮልኛ", "oc": "ኦኪታንኛ", "om": "ኦሮሞኛ", "or": "ኦሪያኛ", "os": "ኦሴቲክ", "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": "ሲንሃልኛ", "sid": "ሲዳምኛ", "sk": "ስሎቫክኛ", "sl": "ስሎቪኛ", "sm": "ሳሞአኛ", "sma": "ደቡባዊ ሳሚ", "smj": "ሉሌ ሳሚ", "smn": "ኢናሪ ሳሚ", "sms": "ስኮልት ሳሚ", "sn": "ሾናኛ", "so": "ሱማልኛ", "sq": "ልቤኒኛ", "sr": "ሰርቢኛ", "ss": "ስዋቲኛ", "st": "ሶዞኛ", "su": "ሱዳንኛ", "sv": "ስዊድንኛ", "sw": "ስዋሂሊኛ", "swc": "ኮንጎ ስዋሂሊ", "ta": "ታሚልኛ", "te": "ተሉጉኛ", "teo": "ቴሶ", "tet": "ቴተም", "tg": "ታጂኪኛ", "th": "ታይኛ", "ti": "ትግርኛ", "tig": "ትግረ", "tk": "ቱርክመንኛ", "tl": "ታጋሎገኛ", "tlh": "ክሊንጎንኛ", "tn": "ጽዋናዊኛ", "to": "ቶንጋኛ", "tpi": "ቶክ ፒሲን", "tr": "ቱርክኛ", "ts": "ጾንጋኛ", "tt": "ታታርኛ", "tum": "ቱምቡካ", "tw": "ትዊኛ", "twq": "ታሳዋቅ", "ty": "ታሂታንኛ", "tzm": "መካከለኛ አትላስ ታማዚግት", "ug": "ኡዊግሁርኛ", "uk": "ዩክሬንኛ", "und": "ያልታወቀ ቋንቋ", "ur": "ኡርዱኛ", "uz": "ኡዝቤክኛ", "vai": "ቫይ", "ve": "ቬንዳ", "vi": "ቪትናምኛ", "vo": "ቮላፑክኛ", "vun": "ቩንጆ", "wo": "ዎሎፍኛ", "xh": "ዞሳኛ", "xog": "ሶጋ", "yi": "ይዲሽኛ", "yo": "ዮሩባዊኛ", "za": "ዡዋንግኛ", "zgh": "መደበኛ የሞሮኮ ታማዚግት", "zh": "ቻይንኛ", "zh_Hans": "ቀለል ያለ ቻይንኛ", "zh_Hant": "ባህላዊ ቻይንኛ", "zu": "ዙሉኛ", "zxx": "ቋንቋዊ ይዘት አይደለም" } } src/Symfony/Component/Intl/Resources/data/languages/ar.json000066400000000000000000000440561266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "بامن", "be": "البيلوروسية", "bej": "البيجا", "bem": "البيمبا", "bez": "بينا", "bg": "البلغارية", "bho": "البهوجبرية", "bi": "البيسلامية", "bik": "البيكولية", "bin": "البينية", "bla": "السيكسيكية", "bm": "البامبارا", "bn": "البنغالية", "bo": "التبتية", "br": "البريتونية", "bra": "البراجية", "brx": "البودو", "bs": "البوسنية", "bss": "أكوس", "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": "التركية الكريمينية", "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": "الإسبانية الأوروبية", "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": "الإيبان", "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": "كانمبو", "kde": "ماكونده", "kea": "كابوفيرديانو", "kfo": "الكورو", "kg": "الكونغو", "kha": "الكازية", "kho": "الخوتانيز", "khq": "كويرا تشيني", "ki": "الكيكيو", "kj": "الكيونياما", "kk": "الكازاخستانية", "kl": "الكالاليست", "kln": "كالينجين", "km": "الخميرية", "kmb": "الكيمبندو", "kn": "الكانادا", "ko": "الكورية", "koi": "كومي-بيرماياك", "kok": "الكونكانية", "kos": "الكوسراين", "kpe": "الكبيل", "kr": "الكانيوري", "krc": "الكاراتشاي-بالكار", "krl": "الكريلية", "kru": "كرخانة", "ks": "الكشميرية", "ksb": "شامبالا", "ksf": "بافيا", "ku": "الكردية", "kum": "الكميك", "kut": "الكتيناي", "kv": "الكومي", "kw": "الكورنية", "ky": "القرغيزية", "la": "اللاتينية", "lad": "الإسباعبرية", "lag": "لانجي", "lah": "اللاهندا", "lam": "اللامبا", "lb": "اللوكسمبرجية", "lez": "الليزجهايانية", "lg": "الجاندا", "li": "الليمبرجيشية", "lkt": "لاكوتا", "ln": "اللينجالا", "lo": "اللاوية", "lol": "منغولى", "loz": "اللوزي", "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": "الأرزية", "na": "النورو", "nap": "اللغة النابولية", "naq": "ناما", "nb": "البوكمالية النرويجية", "nd": "النديبيل الشمالي", "nds": "الألمانية السفلى", "ne": "النيبالية", "new": "النيواري", "ng": "الندونجا", "nia": "النياس", "niu": "النيوي", "nl": "الهولندية", "nl_BE": "الفلمنك", "nmg": "كواسيو", "nn": "النينورسك النرويجي", "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": "الكويتشوا", "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": "السندية", "se": "السامي الشمالي", "seh": "سينا", "sel": "السيلكب", "ses": "كويرابورو سيني", "sg": "السانجو", "sga": "الأيرلندية القديمة", "shi": "تشلحيت", "shn": "الشانية", "shu": "العربية التشادية", "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": "القمرية", "swc": "الكونغو السواحلية", "syc": "سريانية تقليدية", "syr": "السريانية", "ta": "التاميلية", "te": "التيلجو", "tem": "التيمن", "teo": "تيسو", "ter": "التيرينو", "tet": "التيتم", "tg": "الطاجيكية", "th": "التايلاندية", "ti": "التيجرينيا", "tig": "التيجر", "tiv": "التيف", "tk": "التركمانية", "tkl": "التوكيلاو", "tl": "التاغالوغية", "tlh": "الكلينجون", "tli": "التلينغيتية", "tmh": "التاماشيك", "tn": "التسوانية", "to": "التونغية", "tog": "تونجا - نياسا", "tpi": "التوك بيسين", "tr": "التركية", "ts": "السونجا", "tsi": "التسيمشيان", "tt": "التتارية", "tum": "التامبوكا", "tvl": "التوفالو", "tw": "التوي", "twq": "تاساواق", "ty": "التاهيتية", "tyv": "التُرك", "tzm": "الأمازيغية وسط الأطلس", "udm": "الأدمرت", "ug": "الأغورية", "uga": "اليجاريتيك", "uk": "الأوكرانية", "umb": "الأمبندو", "und": "لغة غير معروفة", "ur": "الأردية", "uz": "الأوزباكية", "vai": "الفاي", "ve": "الفيندا", "vi": "الفيتنامية", "vot": "الفوتيك", "vun": "فونجو", "wa": "الولونية", "wal": "الوالامو", "war": "الواراي", "was": "الواشو", "wo": "الولوف", "xal": "الكالميك", "xh": "الخوسا", "xog": "سوجا", "yao": "الياو", "yap": "اليابيز", "yav": "يانجبن", "yi": "اليديشية", "yo": "اليوروبية", "yue": "الكَنْتُونية", "za": "الزهيونج", "zap": "الزابوتيك", "zbl": "رموز المعايير الأساسية", "zen": "الزيناجا", "zgh": "التمازيغية المغربية القياسية", "zh": "الصينية", "zh_Hans": "الصينية المبسطة", "zh_Hant": "الصينية التقليدية", "zu": "الزولو", "zun": "الزونية", "zxx": "بدون محتوى لغوي", "zza": "زازا" } } src/Symfony/Component/Intl/Resources/data/languages/ar_AE.json000066400000000000000000000001221266465517700246720ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "shi": "تكلحيت" } } src/Symfony/Component/Intl/Resources/data/languages/ar_EG.json000066400000000000000000000075561266465517700247220ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ady": "الأديغة", "ae": "الأفستانية", "agq": "الأغيمية", "alt": "الألطية الجنوبية", "an": "الأرغونية", "arn": "المابوتشية", "as": "الأساميزية", "asa": "الآسو", "av": "الآفارية", "ban": "اللغة البالينية", "bbj": "لغة الغومالا", "be": "البيلاروسية", "bfd": "لغة البافوت", "bho": "البهوجبورية", "bkm": "لغة الكوم", "bss": "الأكوسية", "bum": "لغة البولو", "byv": "لغة الميدومبا", "cad": "الكادوية", "cay": "الكايوجية", "cch": "الأتسامية", "ceb": "السيبيونية", "chr": "الشيروكية", "ckb": "السورانية الكردية", "crh": "التركية الكريمانية", "cv": "التشوفاشي", "cy": "الولشية", "da": "الدنماركية", "doi": "الدوجرية", "es_419": "الإسبانية أمريكا اللاتينية", "es_MX": "الإسبانية المكسيكية", "gba": "الجبايا", "gez": "الجعزية", "ibb": "الإيبيبيوية", "jmc": "الماتشامية", "jpr": "الفارسية العبرية", "jrb": "العربية العبرية", "kcg": "التايابية", "kde": "الماكوندية", "kea": "الكابوفيرديانيوية", "khq": "الكورية التشينية", "kkj": "الكاكوية", "kln": "الكالينجينية", "kn": "الكانادية", "krl": "الكاريلية", "kru": "الكيورك", "ksb": "الشمبالاية", "ksf": "لغة البافيا", "ksh": "لغة الكولونيان", "kum": "الكوميك", "ky": "الكيرغزستانية", "lad": "اللادينو", "lag": "اللانغية", "lez": "الليزجية", "lus": "الميزو", "luy": "لغة اللويا", "mag": "المغهية", "mai": "المايثلية", "mer": "الميرو", "mgh": "لغة ماكوا ميتو", "mni": "المانيبورية", "mr": "الماراثية", "mwr": "الماروارية", "naq": "لغة الناما", "new": "النوارية", "nl_BE": "الفلمنكية", "nmg": "لغة الكواسيو", "nnh": "لغة النجيمبون", "rof": "الرومبو", "rom": "الغجرية", "rwk": "الروا", "sam": "الآرامية السامرية", "saq": "السامبورو", "sbp": "السانغو", "see": "السينيكا", "seh": "السينا", "ses": "لغة الكوري ابروسيني", "sh": "صربية-كرواتية", "shi": "التاشلحيت", "ssy": "لغة الساهو", "swb": "لغة جزر القمر", "swc": "لغة الكونغو السواحلية", "teo": "التيزو", "ti": "التيغرينية", "tig": "التيغرية", "trv": "لغة التاروكو", "twq": "لغة التاساواك", "tyv": "التوفية", "tzm": "التمازيغية الأوسط أطلسية", "udm": "الأدمرتية", "ug": "الأويغورية", "uz": "الأوزبكية", "vo": "لغة الفولابوك", "vun": "الفونجو", "wae": "الوالسر", "wal": "الولاياتا", "xog": "السوغا", "yav": "اليانغبين", "ybb": "يمبا" } } src/Symfony/Component/Intl/Resources/data/languages/as.json000066400000000000000000000001321266465517700243270ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "as": "অসমীয়া" } } src/Symfony/Component/Intl/Resources/data/languages/az.json000066400000000000000000000330321266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afarca", "ab": "abxaz", "ace": "akin dili", "ach": "akoli dili", "ada": "adangme dili", "ady": "aduge dili", "ae": "avestanca", "af": "afrikaans", "afh": "afrihili dili", "agq": "aqhem", "ain": "aynuca", "ak": "akanca", "akk": "akadianca", "ale": "aleutca", "alt": "cənub altay dili", "am": "amhar", "an": "aragonca", "ang": "qədimi ingiliscə", "anp": "angikə dili", "ar": "ərəb", "ar_001": "Modern Standart Ərəbcə", "arc": "aramik dili", "arn": "araukanca", "arp": "arapaho dili", "arw": "aravakça", "as": "assam", "asa": "asu", "ast": "asturicə", "av": "avarikcə", "awa": "avadicə", "ay": "aymarca", "az": "azərbaycan", "ba": "başqırd", "bal": "baluc dili", "ban": "balincə", "bas": "basa dili", "be": "belarus", "bej": "beja dili", "bem": "bemba", "bez": "bena", "bg": "bolqar", "bho": "bxoçpuri dili", "bi": "bislama dili", "bik": "bikolca", "bin": "bini dili", "bla": "siksikə dili", "bm": "bambara", "bn": "benqal", "bo": "tibet", "br": "Bretonca", "bra": "braj dili", "brx": "bodo", "bs": "bosniak", "bua": "buryat dili", "bug": "bugin dili", "byn": "bilincə", "ca": "katalan", "cad": "kado dili", "car": "karib dili", "cch": "atsamca", "ce": "çeçen dili", "ceb": "kebuano dili", "cgg": "çiqa", "ch": "çamoro dili", "chb": "çibçə dili", "chg": "çağatay dili", "chk": "çukiz dili", "chm": "mari dili", "chn": "çinuk ləhçəsi", "cho": "çoktau dili", "chp": "çipevyan dili", "chr": "çiroki", "chy": "çeyen dili", "ckb": "sorani kürd", "co": "korsika", "cop": "kopt dili", "cr": "kri dili", "crh": "krım türkçə", "cs": "çex", "csb": "kaşubyan dili", "cu": "kilsə slav dili", "cv": "çuvaş dili", "cy": "uels", "da": "danimarka", "dak": "dakota dili", "dar": "darqva dili", "dav": "taita", "de": "alman", "de_AT": "Avstriya almancası", "de_CH": "İsveçrə yüksək almancası", "del": "delaver dili", "den": "slavey", "dgr": "doqrib dili", "din": "dinka dili", "dje": "zarma", "doi": "doqri dili", "dsb": "aşağı sorb", "dua": "duala", "dum": "ortacaq hollandca", "dv": "diveh dili", "dyo": "diola", "dyu": "dyula dili", "dz": "dzonqa", "ebu": "embu", "ee": "eve", "efi": "efik dili", "egy": "qədimi misir dili", "eka": "ekacuk dili", "el": "yunan", "elx": "elamit dili", "en": "ingilis", "en_AU": "Avstraliya ingiliscəsi", "en_CA": "Kanada ingiliscəsi", "en_GB": "Britaniya ingiliscəsi", "en_US": "Amerika ingiliscəsi", "enm": "ortacaq ingiliscə", "eo": "esperanto", "es": "ispan", "es_419": "Latın Amerikası ispancası", "es_ES": "Kastiliya ispancası", "es_MX": "Meksika ispancası", "et": "eston", "eu": "bask", "ewo": "evondo dili", "fa": "fars", "fan": "fang dili", "fat": "fanti dili", "ff": "fula dili", "fi": "fin", "fil": "filippin", "fj": "fici", "fo": "farer", "fon": "fon dili", "fr": "fransız", "fr_CA": "Kanada fransızcası", "fr_CH": "İsveçrə fransızcası", "frm": "ortacaq fransızca", "fro": "qədimi fransızca", "frr": "şimal fris dili", "fur": "friul dili", "fy": "qərbi friz", "ga": "irland", "gaa": "qa dili", "gag": "qaqauz", "gay": "qayo dili", "gba": "qabaya dili", "gd": "skot gaelik dili", "gez": "qez dili", "gil": "qilbert gili", "gl": "qalisian", "gmh": "ortacaq yüksək almanca", "gn": "quarani", "goh": "qədimi almanca", "gon": "qondi dili", "gor": "qorontalo dili", "got": "gotça", "grb": "qrebo dili", "grc": "qədimi yunanca", "gsw": "İsveçrə almancası", "gu": "qucarat", "guz": "qusi", "gv": "manks", "gwi": "qviçin dili", "ha": "hausa", "hai": "hayda dili", "haw": "havay", "he": "ivrit", "hi": "hindi", "hil": "hiliqaynon dili", "hit": "hittit dili", "hmn": "monq dili", "ho": "hiri motu dili", "hr": "xorvat", "hsb": "yuxarı sorb", "ht": "haiti", "hu": "macar", "hup": "hupa dili", "hy": "erməni", "hz": "Herer dili", "ia": "interlingua dili", "iba": "iban dili", "id": "indonez", "ie": "interlingue dili", "ig": "iqbo", "ii": "siçuan yi", "ik": "inupiaq dili", "ilo": "iloko dili", "inh": "inquş dili", "io": "ido dili", "is": "island", "it": "italyan", "iu": "inuktitut", "ja": "yapon", "jbo": "loğban dili", "jgo": "nqomba", "jmc": "maçam", "jpr": "judo-farsca", "jrb": "jude-ərəbcə", "jv": "yava", "ka": "gürcü", "kaa": "qara-qalpaq dili", "kab": "kabile", "kac": "kaçinca", "kaj": "ju dili", "kam": "kamba", "kaw": "kavi dili", "kbd": "kabardca", "kcg": "tiyap dili", "kde": "makond", "kea": "kabuverdian", "kfo": "koro dili", "kg": "konqo dili", "kha": "xazi dili", "kho": "xotan dili", "khq": "koyra çiini", "ki": "kikuyu", "kj": "kuanyama dili", "kk": "qazax", "kl": "kalaallisut", "kln": "kalencin", "km": "kxmer", "kmb": "kimbundu dili", "kn": "kannada", "ko": "koreya", "koi": "komi-permyak", "kok": "konkan", "kos": "kosreyan dili", "kpe": "kpelle dili", "kr": "kanur dili", "krc": "qaraçay-balkar dili", "krl": "karelyan dili", "kru": "kurux dili", "ks": "kaşmir", "ksb": "şambala", "ksf": "bafia", "ku": "kürd", "kum": "kumuk dili", "kut": "kutenay dili", "kv": "komi dili", "kw": "korn", "ky": "qırğız", "la": "latın", "lad": "ladin dili", "lag": "langi", "lah": "laxnda dili", "lam": "lamba dili", "lb": "lüksemburq", "lez": "ləzqi dili", "lg": "qanda", "li": "limburqiş dili", "lkt": "lakota", "ln": "linqala", "lo": "laos", "lol": "monqo dili", "loz": "lozi dili", "lt": "litva", "lu": "luba-katanqa", "lua": "luba-lulua dili", "lui": "luyseno dili", "lun": "lunda dili", "luo": "luo", "lus": "lushayca", "luy": "luyia", "lv": "latış", "mad": "maduriz dili", "mag": "maqahi dili", "mai": "maitili dili", "mak": "makasar dili", "man": "məndinqo dili", "mas": "masay", "mdf": "mokşa dili", "mdr": "mandar dili", "men": "mende dili", "mer": "meru", "mfe": "morisien", "mg": "malaqas", "mga": "ortacaq irlandca", "mgh": "maxuva-meetto", "mgo": "meta’", "mh": "marşal dili", "mi": "maori", "mic": "mikmak dili", "min": "minanqkaban dili", "mk": "makedon", "ml": "malayalam", "mn": "monqol", "mnc": "mançu dili", "mni": "manipüri dili", "moh": "mohavk", "mos": "mosi dili", "mr": "marati", "ms": "malay", "mt": "malta", "mua": "mundanq", "mul": "digər dillər", "mus": "krik dili", "mwl": "mirand dili", "mwr": "maruari dili", "my": "birma", "myv": "erzya dili", "na": "nauru dili", "nap": "neapolital dili", "naq": "nama", "nb": "bokmal norveç", "nd": "şimali ndebele", "nds": "aşağı almanca", "ne": "nepal", "new": "nevari dili", "ng": "nqonka dili", "nia": "nyas dili", "niu": "niyuan dili", "nl": "holland", "nl_BE": "flamand", "nmg": "kvasio", "nn": "nünorsk norveç", "no": "norveç dili", "nog": "noqay dili", "non": "qədimi norsca", "nqo": "nqo", "nr": "cənub ndebele dili", "nso": "şimal soto dili", "nus": "nuer", "nv": "navayo dili", "ny": "nyanca dili", "nym": "nyamvezi dili", "nyn": "nyankol", "nyo": "niyoro dili", "nzi": "nizima dili", "oc": "oksitanca", "oj": "ocibva dili", "om": "oromo", "or": "oriya", "os": "osetik dili", "osa": "osage dili", "ota": "osman dili", "pa": "pəncab", "pag": "panqasinan dili", "pal": "paxlavi dili", "pam": "pampanqa dili", "pap": "papyamento dili", "pau": "palayanca", "peo": "qədimi farsca", "phn": "foyenik dili", "pi": "pali dili", "pl": "polyak", "pon": "ponpeyan dili", "pro": "qədimi provensialca", "ps": "puştu", "pt": "portuqal", "pt_BR": "Braziliya portuqalcası", "pt_PT": "Portuqaliya portuqalcası", "qu": "keçua", "quc": "kiçe", "raj": "racastan dili", "rap": "rapanu dili", "rar": "rarotonqan dili", "rm": "retoroman", "rn": "rundi", "ro": "rumın", "ro_MD": "moldav", "rof": "rombo", "rom": "roman dili", "root": "rut dili", "ru": "rus", "rup": "aromanca", "rw": "kinyarvanda", "rwk": "rua", "sa": "sanskrit", "sad": "sandave dili", "sah": "yakut dili", "sam": "samaritan dili", "saq": "samburu", "sas": "sasak dili", "sat": "santal dili", "sbp": "sanqu", "sc": "sardin dili", "scn": "sisili dili", "sco": "skots dili", "sd": "sindhi", "se": "şimali sami", "seh": "sena", "sel": "selkup dili", "ses": "koyraboro senni", "sg": "sanqo", "sga": "qədimi irlandca", "sh": "serb-xorvatca", "shi": "taçelit", "shn": "şan dili", "si": "sinhal", "sid": "sidamo dili", "sk": "slovak", "sl": "sloven", "sm": "samoa dili", "sma": "cənubi sami", "smj": "lule sami", "smn": "inari sami", "sms": "skolt", "sn": "şona", "snk": "soninke dili", "so": "somali", "sog": "soqdiyen dili", "sq": "alban", "sr": "serb", "srn": "sranan tonqo dili", "srr": "serer dilii", "ss": "svati dili", "st": "Sesoto dili", "su": "sudan", "suk": "sukuma dili", "sus": "susu dili", "sux": "sumeryan dili", "sv": "isveç", "sw": "suahili", "swc": "Konqo suahilicəsi", "syr": "siryak dili", "ta": "tamil", "te": "teluqu", "tem": "timne dili", "teo": "teso", "ter": "tereno dili", "tet": "tetum dili", "tg": "tacik", "th": "tay", "ti": "tiqrin", "tig": "tiqre dili", "tiv": "tiv dili", "tk": "türkmən", "tkl": "tokelay dili", "tl": "taqaloq dili", "tlh": "klinqon", "tli": "tlinqit dili", "tmh": "tamaşek dili", "tn": "svana dili", "to": "tonqa", "tog": "niyasa tonga dili", "tpi": "tok pisin dili", "tr": "türk", "ts": "sonqa dili", "tsi": "simşyan dili", "tt": "tatar", "tum": "tumbuka dili", "tvl": "tuvalu dili", "tw": "Tvi dili", "twq": "tasavaq", "ty": "taxiti dili", "tyv": "tuvinyan dili", "tzm": "Mərkəzi Atlas tamazicəsi", "udm": "udmurt dili", "ug": "uyğur", "uga": "uqaritik dili", "uk": "ukrayna", "umb": "umbundu dili", "und": "naməlum dil", "ur": "urdu", "uz": "özbək", "vai": "vai", "ve": "venda dili", "vi": "vyetnam", "vo": "volapük dili", "vot": "votik dili", "vun": "vunyo", "wa": "valun dili", "wal": "valamo dili", "war": "varay dili", "was": "vaşo dili", "wo": "volof", "xal": "kalmıqca", "xh": "xosa", "xog": "soqa", "yao": "yao dili", "yap": "yapiz dili", "yi": "Yahudi dili", "yo": "yoruba", "za": "juənq dili", "zap": "zapotek dili", "zbl": "blisimbols dili", "zen": "zenaqa dili", "zgh": "tamazi", "zh": "çin", "zh_Hans": "sadələşmiş çin", "zh_Hant": "ənənəvi çin", "zu": "zulu", "zun": "zuni dili", "zxx": "dil məzmunu yoxdur", "zza": "zaza dili" } } src/Symfony/Component/Intl/Resources/data/languages/az_Cyrl.json000066400000000000000000000006031266465517700253320ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "az": "Азәрбајҹан", "de": "алманҹа", "en": "инҝилисҹә", "es": "испанҹа", "fr": "франсызҹа", "it": "италјанҹа", "ja": "јапонҹа", "pt": "португалҹа", "ru": "русҹа", "zh": "чинҹә" } } src/Symfony/Component/Intl/Resources/data/languages/be.json000066400000000000000000000121311266465517700243140ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "ab": "абхазская", "ady": "адыгейская", "af": "афрыкаанс", "akk": "акадзкая", "ale": "алеуцкая", "am": "амхарская", "an": "арагонская", "ang": "стараанглійская", "ar": "арабская", "arc": "арамейская", "as": "асамская", "ast": "астурыйская", "av": "аварская", "ay": "аймара", "az": "азербайджанская", "ba": "башкірская", "be": "беларуская", "bg": "балгарская", "bn": "бенгальская", "br": "брэтонская", "bs": "баснійская", "bua": "бурацкая", "ca": "каталонская", "ce": "чачэнская", "cop": "копцкая", "cs": "чэшская", "cv": "чувашская", "cy": "валійская", "da": "дацкая", "de": "нямецкая", "de_AT": "нямецкая (аўстр.)", "de_CH": "нямецкая (швейц.)", "egy": "стараэгіпецкая", "el": "грэцкая", "en": "англійская", "en_AU": "англійская (аўстрал.)", "en_CA": "англійская (канад.)", "en_US": "англійская (ЗША)", "eo": "эсперанта", "es": "іспанская", "es_419": "іспанская (лацінаамер.)", "et": "эстонская", "eu": "баскская", "fa": "фарсі", "fi": "фінская", "fil": "тагальская", "fo": "фарэрская", "fr": "французская", "fr_CA": "французская (канад.)", "fr_CH": "французская (швейц.)", "fro": "старафранцузская", "fy": "фрызская", "ga": "ірландская", "gd": "шатландская гэльская", "gl": "галісійская", "gn": "гуарані", "grc": "старагрэцкая", "gu": "гуяраці", "he": "іўрыт", "hi": "хіндзі", "hr": "харвацкая", "hu": "венгерская", "hy": "армянская", "ia": "інтэрлінгва", "id": "інданезійская", "ie": "інтэрлінгве", "is": "ісландская", "it": "італьянская", "ja": "японская", "jv": "яванская", "ka": "грузінская", "kk": "казахская", "kn": "каннада", "ko": "карэйская", "ku": "курдская", "la": "лацінская", "ln": "лінгала", "lo": "лаоская", "lt": "літоўская", "lv": "латышская", "mk": "македонская", "ml": "малаяламская", "mn": "мангольская", "mr": "маратхі", "ms": "малайская", "mt": "мальтыйская", "nb": "нарвэская букмал", "ne": "непальская", "nl": "галандская", "nl_BE": "фламандская", "nn": "нарвежская (нюнорск)", "no": "нарвежская", "oc": "правансальская", "pa": "панджабі", "pl": "польская", "ps": "пушту", "pt": "партугальская", "pt_BR": "партугальская (бразіл.)", "ro": "румынская", "ro_MD": "малдаўская", "ru": "руская", "sa": "санскрыт", "sah": "якуцкая", "sd": "сіндхі", "sh": "сербска-харвацкая", "si": "сінгальская", "sk": "славацкая", "sl": "славенская", "so": "самалійская", "sq": "албанская", "sr": "сербская", "su": "суданская", "sv": "шведская", "sw": "суахілі", "ta": "тамільская", "te": "тэлугу", "th": "тайская", "ti": "тыгрынья", "tk": "туркменская", "tlh": "клінгон", "tr": "турэцкая", "tt": "татарская", "ug": "уйгурская", "uk": "украінская", "und": "невядомая мова", "ur": "урду", "uz": "узбекская", "vi": "в’етнамская", "xh": "хоса", "yi": "ідыш", "zh": "кітайская", "zh_Hans": "спрошчаная кітайская", "zh_Hant": "традыцыйная кітайская", "zu": "зулу" } } src/Symfony/Component/Intl/Resources/data/languages/bg.json000066400000000000000000000412661266465517700243310ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "български", "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": "кримскотатарски", "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": "дзонха", "ebu": "ембу", "ee": "еве", "efi": "ефик", "egy": "египетски", "eka": "екажук", "el": "гръцки", "elx": "еламитски", "en": "английски", "en_AU": "австралийски английски", "en_CA": "канадски английски", "en_GB": "британски английски", "en_US": "американски английски", "enm": "средновековен английски", "eo": "есперанто", "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": "ибан", "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": "казахски", "kl": "гренландски", "kln": "календжин", "km": "кхмерски", "kmb": "кимбунду", "kn": "каннада", "ko": "корейски", "koi": "коми-пермяцки", "kok": "конкани", "kos": "косраен", "kpe": "кпеле", "kr": "канури", "krc": "карачай-балкарски", "krl": "карелски", "kru": "курук", "ks": "кашмирски", "ksb": "шамбала", "ksf": "бафия", "ku": "кюрдски", "kum": "кумикски", "kut": "кутенай", "kv": "Коми", "kw": "корнуолски", "ky": "киргизки", "la": "латински", "lad": "ладино", "lag": "ланги", "lah": "лахнда", "lam": "ламба", "lb": "люксембургски", "lez": "лезгински", "lg": "ганда", "li": "лимбургски", "lkt": "лакота", "ln": "лингала", "lo": "лаоски", "lol": "монго", "loz": "лози", "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": "ерзиа", "na": "науру", "nap": "неаполитански", "naq": "нама", "nb": "норвежки букмол", "nd": "северен ндебеле", "nds": "долносаксонски", "ne": "непалски", "new": "неварски", "ng": "ндонга", "nia": "ниас", "niu": "ниуеан", "nl": "нидерландски", "nl_BE": "фламандски", "nmg": "квасио", "nn": "норвежки нюношк", "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": "португалски", "qu": "кечуа", "quc": "киче", "raj": "раджастански", "rap": "рапа нуи", "rar": "рапотонган", "rm": "реторомански", "rn": "рунди", "ro": "румънски", "ro_MD": "молдовски", "rof": "ромбо", "rom": "цигански език", "root": "роот", "ru": "руски", "rup": "арумънски", "rw": "киняруанда", "rwk": "рва", "sa": "санкскритски", "sad": "сандве", "sah": "якутски", "sam": "самаритански арамейски", "saq": "самбуру", "sas": "сасак", "sat": "сантали", "sbp": "сангу", "sc": "сардински", "scn": "сицилиански", "sco": "шотландски", "sd": "синдхи", "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": "суази", "st": "сесуто", "su": "сундански", "suk": "сукума", "sus": "сусу", "sux": "шумерски", "sv": "шведски", "sw": "суахили", "swb": "коморски", "swc": "конгоански суахили", "syc": "класически сирийски", "syr": "сирийски", "ta": "тамилски", "te": "телугу", "tem": "темне", "teo": "тесо", "ter": "терено", "tet": "тетум", "tg": "таджикски", "th": "тайски", "ti": "тигриня", "tig": "тигре", "tiv": "тив", "tk": "туркменски", "tkl": "токелайски", "tl": "тагалог", "tlh": "клингон", "tli": "тлингит", "tmh": "тамашек", "tn": "тсвана", "to": "тонга", "tog": "нианса тонга", "tpi": "ток писин", "tr": "турски", "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": "валонски", "wal": "валамо", "war": "варай", "was": "уашо", "wo": "волоф", "xal": "калмик", "xh": "ксоса", "xog": "сога", "yao": "яо", "yap": "япезе", "yi": "идиш", "yo": "йоруба", "yue": "кантонски", "za": "зуанг", "zap": "запотек", "zbl": "блис символи", "zen": "зенага", "zgh": "стандартен марокански тамазигт", "zh": "китайски", "zh_Hans": "опростен китайски", "zh_Hant": "традиционен китайски", "zu": "зулуски", "zun": "зуни", "zxx": "без лингвистично съдържание", "zza": "заза" } } src/Symfony/Component/Intl/Resources/data/languages/bm.json000066400000000000000000000024201266465517700243240ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/bn.json000066400000000000000000000510231266465517700243300ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "বুলগেরিয়", "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": "ক্রিমিয়ান তুর্কি", "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": "জোঙ্গা", "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": "ইবান", "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": "কাজাখ", "kl": "ক্যালাল্লিসুট", "kln": "কালেনজিন", "km": "খমের", "kmb": "কিম্বুন্দু", "kn": "কান্নাড়ী", "ko": "কোরিয়ান", "koi": "কমি-পারমিআক", "kok": "কোঙ্কানি", "kos": "কোস্রাইন", "kpe": "ক্‌পেল্লে", "kr": "কানুরি", "krc": "কারচে-বাল্কার", "krl": "কারেলিয়ান", "kru": "কুরুখ", "ks": "কাশ্মীরী", "ksb": "শাম্বালা", "ksf": "বাফিয়া", "ku": "কুর্দি", "kum": "কুমিক", "kut": "কুটেনাই", "kv": "কোমি", "kw": "কর্ণিশ", "ky": "কির্গিজ", "la": "লাটিন", "lad": "লাডিনো", "lag": "লাঙ্গি", "lah": "লান্ডা", "lam": "লাম্বা", "lb": "লুক্সেমবার্গীয়", "lez": "লেজঘিয়ান", "lg": "গান্ডা", "li": "লিম্বুর্গিশ", "lkt": "লাকোটা", "ln": "লিঙ্গালা", "lo": "লাও", "lol": "মোঙ্গো", "loz": "লোজি", "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": "এরজিয়া", "na": "নাউরু", "nap": "নেয়াপোলিটান", "naq": "নামা", "nb": "নরওয়েজিয়ান বোকমাল", "nd": "উত্তর এন্দেবিলি", "nds": "নিম্ন জার্মানি", "ne": "নেপালী", "new": "নেওয়ারি", "ng": "এন্দোঙ্গা", "nia": "নিয়াস", "niu": "নিউয়ান", "nl": "ডাচ", "nl_BE": "ফ্লেমিশ", "nmg": "কোয়াসিও", "nn": "নরওয়েজীয়ান নিনর্স্ক", "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": "কেচুয়া", "quc": "কি‘চে", "raj": "রাজস্থানী", "rap": "রাপানুই", "rar": "রারোটোংগান", "rm": "রোমান্স", "rn": "রুন্দি", "ro": "রোমানীয়", "ro_MD": "মলদাভিয়", "rof": "রম্বো", "rom": "রোমানি", "root": "মূল", "ru": "রুশ", "rup": "আরোমানিয়", "rw": "কিনয়ারোয়ান্ডা", "rwk": "রাওয়া", "sa": "সংষ্কৃত", "sad": "স্যান্ডাওয়ে", "sah": "ইয়াকুট", "sam": "সামারিটান আরামিক", "saq": "সামবুরু", "sas": "সাসাক", "sat": "সাঁওতালি", "sbp": "সাঙ্গু", "sc": "সার্ডিনিয়ান", "scn": "সিসিলিয়ান", "sco": "স্কটস", "sd": "সিন্ধি", "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": "সোয়াতি", "st": "দক্ষিন সোথো", "su": "সুদানী", "suk": "সুকুমা", "sus": "সুসু", "sux": "সুমেরীয়", "sv": "সুইডিশ", "sw": "সোয়াহিলি", "swc": "কঙ্গো সোয়াহিলি", "syc": "প্রাচীন সিরিও", "syr": "সিরিয়াক", "ta": "তামিল", "te": "তেলেগু", "tem": "টাইম্নে", "teo": "তেসো", "ter": "তেরেনো", "tet": "তেতুম", "tg": "তাজিক", "th": "থাই", "ti": "তিগরিনিয়া", "tig": "টাইগ্রে", "tiv": "টিভ", "tk": "তুর্কমেনী", "tkl": "টোকেলাউ", "tl": "তাগালগ", "tlh": "ক্লিঙ্গন", "tli": "ত্লিঙ্গিট", "tmh": "তামাশেক", "tn": "সোয়ানা", "to": "টোঙ্গান", "tog": "নায়াসা টোঙ্গা", "tpi": "টোক পিসিন", "tr": "তুর্কী", "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": "ওয়ালুন", "wal": "ওয়ালামো", "war": "ওয়ারে", "was": "ওয়াশো", "wo": "উওলোফ", "xal": "কাল্মইক", "xh": "জোসা", "xog": "সোগা", "yao": "ইয়াও", "yap": "ইয়াপেসে", "yi": "য়িদ্দিশ", "yo": "ইওরুবা", "za": "ঝু্য়াঙ", "zap": "জাপোটেক", "zbl": "চিত্র ভাষা", "zen": "জেনাগা", "zgh": "আদর্শ মরক্কোন তামাজিগাত", "zh": "চীনা", "zh_Hans": "সরলীকৃত চীনা", "zh_Hant": "ঐতিহ্যবাহি চীনা", "zu": "জুলু", "zun": "জুনি", "zxx": "ভাষাভিত্তিক বিষয়বস্তু নেই", "zza": "জাজা" } } src/Symfony/Component/Intl/Resources/data/languages/bn_IN.json000066400000000000000000000014651266465517700247230ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ab": "আবখাজিয়ান", "ace": "অ্যাচাইনিজ", "ach": "আকোলি", "anp": "আঙ্গিকা", "ch": "চামোরো", "chn": "চিনুক জার্গন", "cho": "চকটোও", "chp": "চিপেওয়াইয়ান", "chy": "চেয়েনি", "cu": "চার্চ স্লাভিক", "de_AT": "অস্ট্রিয়ান জারমান", "doi": "ডোগরি", "fr_CA": "ক্যানাডিয়ান ফরাসী", "or": "উড়িয়া", "rup": "আরমেনিয়ান", "zbl": "ব্লিসসিম্বলস" } } src/Symfony/Component/Intl/Resources/data/languages/bo.json000066400000000000000000000005421266465517700243310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "bo": "བོད་སྐད་", "dz": "རྫོང་ཁ", "hi": "ཧིན་དི", "ja": "རི་པིན་སྐད་", "ne": "ནེ་པ་ལི", "ru": "ཨུ་རུ་སུ་སྐད་", "zh": "རྒྱ་སྐད་" } } src/Symfony/Component/Intl/Resources/data/languages/br.json000066400000000000000000000275211266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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", "ar": "arabeg", "ar_001": "arabeg modern", "arc": "arameeg", "arn": "araoukaneg", "arp": "arapaho", "arq": "arabeg Aljeria", "arw": "arawakeg", "ary": "arabeg Maroko", "arz": "arabeg Egipt", "as": "asameg", "asa": "asu", "av": "avar", "awa": "awadhi", "ay": "aymara", "az": "azeri", "azb": "azeri ar Su", "ba": "bachkir", "bal": "baloutchi", "ban": "balineg", "bar": "bavarieg", "bas": "basaa", "be": "belaruseg", "bej": "bedawieg", "bem": "bemba", "bez": "bena", "bg": "bulgareg", "bho": "bhojpuri", "bi": "bislama", "bik": "bikol", "bin": "bini", "bm": "bambara", "bn": "bengali", "bo": "tibetaneg", "br": "brezhoneg", "bra": "braj", "brh": "brahweg", "brx": "bodo", "bs": "bosneg", "bua": "bouriat", "bug": "bugi", "byn": "blin", "ca": "katalaneg", "cad": "caddo", "car": "karibeg", "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", "fj": "fidjieg", "fo": "faeroeg", "fon": "fon", "fr": "galleg", "fr_CA": "galleg Kanada", "fr_CH": "galleg Suis", "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", "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", "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", "my": "birmaneg", "myv": "erza", "na": "naurueg", "nan": "sinaeg Min Nan", "nap": "napolitaneg", "nb": "norvegeg bokmål", "nd": "ndebele an Norzh", "nds": "alamaneg izel", "ne": "nepaleg", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niue", "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", "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", "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", "swb": "komoreg", "syc": "sirieg klasel", "syr": "sirieg", "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", "ts": "tsonga", "tsi": "tsimshian", "tt": "tatar", "tum": "tumbuka", "tvl": "tuvalu", "tw": "twi", "ty": "tahitianeg", "tyv": "touva", "udm": "oudmourteg", "ug": "ouigoureg", "uga": "ougariteg", "uk": "ukraineg", "umb": "umbundu", "und": "yezh dianav", "ur": "ourdou", "uz": "ouzbekeg", "vai": "vai", "ve": "venda", "vi": "vietnameg", "vls": "flandrezeg ar c’hornôg", "vo": "volapük", "vot": "votyakeg", "wa": "walloneg", "wae": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "wuu": "sinaeg Wu", "xal": "kalmouk", "xh": "xhosa", "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" } } src/Symfony/Component/Intl/Resources/data/languages/bs.json000066400000000000000000000317271266465517700243460ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afarski", "ab": "abhazijski", "ace": "ačineski", "ach": "akoli", "ada": "adangmejski", "ady": "adigejski", "ae": "avestanski", "af": "afrikanerski", "afh": "afrihili", "agq": "aghem", "ain": "ainu", "ak": "akan", "akk": "akadijski", "ale": "aljut", "alt": "južni altai", "am": "amharski", "an": "aragonežanski", "ang": "staroengleski", "anp": "angika", "ar": "arapski", "ar_001": "moderni standardni arapski", "arc": "armajski", "arn": "araukanski", "arp": "arapaho", "arw": "aravak", "as": "asemijski", "asa": "asu", "ast": "asturijski", "av": "avarski", "awa": "avadhi", "ay": "ajmara", "az": "azerbejdžanski", "ba": "baškirski", "bal": "baluči", "ban": "balinezijski", "bas": "basa", "be": "bjeloruski", "bej": "beja", "bem": "bemba", "bez": "bena", "bg": "bugarski", "bho": "bojpuri", "bi": "bislama", "bik": "bikol", "bin": "bini", "bla": "siksika", "bm": "bambara", "bn": "bengalski", "bo": "tibetanski", "br": "bretonski", "bra": "braj", "brx": "bodo", "bs": "bosanski", "bua": "buriat", "bug": "buginežanskii", "byn": "blin", "ca": "katalonski", "cad": "kado", "car": "karipski", "cch": "atsam", "ce": "čečenski", "ceb": "cebuano", "cgg": "čiga", "ch": "čamoro", "chb": "čibča", "chg": "čagatai", "chk": "čukeski", "chm": "mari", "chn": "činukski", "cho": "čoktavski", "chp": "čipvijanski", "chr": "čiroki", "chy": "čejenski", "ckb": "soranski kurdski", "co": "korzikanski", "cop": "koptski", "cr": "kri", "crh": "krimeanski turski", "cs": "češki", "csb": "kašubijanski", "cu": "staroslovenski", "cv": "čuvaški", "cy": "cy", "da": "danski", "dak": "dakota", "dar": "dargva", "dav": "taita", "de": "njemački", "de_AT": "austrijski njemački", "de_CH": "gornjonjemački (švicarski)", "del": "delaver", "den": "slavski", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "donjolužičkosrpski", "dua": "duala", "dum": "srednji holandski", "dv": "divehijski", "dyo": "jola-fonyi", "dyu": "đula", "dz": "džonga", "ebu": "embu", "ee": "eve", "efi": "efikski", "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": "srednji engleski", "eo": "esperanto", "es": "španski", "es_419": "latinoamerički španski", "es_ES": "evropski španski", "es_MX": "meksički španski", "et": "estonski", "eu": "baskijski", "ewo": "evondo", "fa": "perzijski", "fan": "fang", "fat": "fanti", "ff": "fulah", "fi": "finski", "fil": "filipinski", "fj": "fidžijski", "fo": "farski", "fon": "fon", "fr": "francuski", "fr_CA": "kanadski francuski", "fr_CH": "švajcarski francuski", "frm": "srednji francuski", "fro": "starofrancuski", "frr": "severno-frizijski", "frs": "istočni frizijski", "fur": "friulijski", "fy": "frizijski", "ga": "irski", "gaa": "ga", "gag": "gagauški", "gay": "gajo", "gba": "gbaja", "gd": "škotski galski", "gez": "džiz", "gil": "gilbertški", "gl": "galski", "gmh": "srednji visoki nemački", "gn": "gvarani", "goh": "staronemački", "gon": "gondi", "gor": "gorontalo", "got": "gotski", "grb": "grebo", "grc": "starogrčki", "gsw": "švajcarski njemački", "gu": "gudžarati", "guz": "gusii", "gv": "manks", "ha": "hausa", "hai": "haida", "haw": "havajski", "he": "hebrejski", "hi": "hindi", "hil": "hiligajnon", "hit": "hitite", "hmn": "hmong", "ho": "hiri motu", "hr": "hrvatski", "hsb": "gornjolužičkosrpski", "ht": "haićanski", "hu": "mađarski", "hup": "hupa", "hy": "jermenski", "hz": "herero", "ia": "interlingva", "iba": "iban", "id": "indonezijski", "ie": "interlingve", "ig": "igbo", "ii": "sičuan ji", "ik": "inupiak", "ilo": "iloko", "inh": "ingušetski", "io": "ido", "is": "islandski", "it": "italijanski", "iu": "inuktitut", "ja": "japanski", "jbo": "lojban", "jgo": "ngomba", "jmc": "machame", "jpr": "judeo-persijski", "jrb": "judeo-arapski", "jv": "javanski", "ka": "gruzijski", "kaa": "kara-kalpaški", "kab": "kabile", "kac": "kačin", "kaj": "žju", "kam": "kamba", "kaw": "kavi", "kbd": "kabardijski", "kcg": "tjap", "kde": "makonde", "kea": "zelenortski", "kfo": "koro", "kg": "kongo", "kha": "kasi", "kho": "kotanizijski", "khq": "koyra chiini", "ki": "kikuju", "kj": "kuanjama", "kk": "kazački", "kl": "kalalisutski", "kln": "kalenjin", "km": "kmerski", "kmb": "kimbundu", "kn": "kanada", "ko": "korejski", "koi": "komi-permjački", "kok": "konkani", "kos": "kosreanski", "kpe": "kpele", "kr": "kanuri", "krc": "karačaj-balkar", "krl": "karelijski", "kru": "kurukh", "ks": "kašmiri", "ksb": "shambala", "ksf": "bafia", "ku": "kurdski", "kum": "kumik", "kut": "kutenai", "kv": "komi", "kw": "korniški", "ky": "kirgiski", "la": "latinski", "lad": "ladino", "lag": "langi", "lah": "landa", "lam": "lamba", "lb": "luksemburški", "lez": "lezgian", "lg": "ganda", "li": "limburgiš", "lkt": "lakota", "ln": "lingala", "lo": "laoški", "lol": "mongo", "loz": "lozi", "lt": "litvanski", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lušai", "luy": "luyia", "lv": "letonski", "mad": "madureški", "mag": "magahi", "mai": "maitili", "mak": "makasar", "man": "mandingo", "mas": "masai", "mdf": "mokša", "mdr": "mandar", "men": "mende", "mer": "meru", "mfe": "mauricijski kreolski", "mg": "malagazijski", "mga": "srednji irski", "mgh": "makhuwa-meetto", "mgo": "meta’", "mh": "maršalski", "mi": "maorski", "mic": "mikmak", "min": "minangkabau", "mk": "makedonski", "ml": "malajalam", "mn": "mongolski", "mnc": "manču", "mni": "manipuri", "moh": "mahavski", "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", "myv": "erzija", "na": "nauru", "nap": "neapolitanski", "naq": "nama", "nb": "norveški bokmal", "nd": "sjeverni ndebele", "nds": "niski nemački", "ne": "nepalski", "new": "nevari", "ng": "ndonga", "nia": "nias", "niu": "niuean", "nl": "holandski", "nl_BE": "flamanski", "nmg": "kwasio", "nn": "norveški njorsk", "no": "norveški", "nog": "nogai", "non": "stari norski", "nqo": "nko", "nr": "južni ndebele", "nso": "severni soto", "nus": "nuer", "nv": "navaho", "nwc": "klasični nevari", "ny": "njanja", "nym": "njamvezi", "nyn": "njankole", "nyo": "njoro", "nzi": "nzima", "oc": "provansalski", "oj": "ojibva", "om": "oromo", "or": "orijski", "os": "osetski", "osa": "osage", "ota": "otomanski turski", "pa": "pandžabski", "pag": "pangasinski", "pal": "pahlavi", "pam": "pampanga", "pap": "papiamento", "pau": "palauanski", "peo": "staropersijski", "phn": "feničanski", "pi": "pali", "pl": "poljski", "pon": "ponpejski", "pro": "staroprovansalski", "ps": "paštunski", "pt": "portugalski", "qu": "kvenča", "quc": "kiče", "raj": "rađastani", "rap": "rapanui", "rar": "rarotongan", "rm": "reto-romanski", "rn": "rundi", "ro": "rumunski", "ro_MD": "moldavski", "rof": "rombo", "rom": "romani", "root": "run", "ru": "ruski", "rup": "aromanijski", "rw": "kinjarvanda", "rwk": "rua", "sa": "sanskrit", "sad": "sandave", "sah": "jakut", "sam": "samaritanski aramejski", "saq": "samburu", "sas": "sasak", "sat": "santali", "sbp": "sangu", "sc": "sardinijski", "scn": "sicilijanski", "sco": "škotski", "sd": "sindi", "se": "sjeverni sami", "seh": "sena", "sel": "selkap", "ses": "kojraboro seni", "sg": "sango", "sga": "staroirski", "sh": "srpskohrvatski", "shi": "tahelhit", "shn": "šan", "si": "singaleski", "sid": "sidamo", "sk": "slovački", "sl": "slovenački", "sm": "samoanski", "sma": "južni sami", "smj": "lule sami", "smn": "inari sami", "sms": "skoltski jezik", "sn": "šona", "snk": "soninke", "so": "somalski", "sog": "sodžijenski", "sq": "albanski", "sr": "srpski", "srn": "srananski tongo", "srr": "serer", "ss": "svati", "st": "sesoto", "su": "sudanski", "suk": "sukuma", "sus": "susu", "sux": "sumerski", "sv": "švedski", "sw": "svahili", "swc": "kongoanski swahili", "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": "tagalski", "tlh": "klingonski", "tli": "tlingit", "tmh": "tamašek", "tn": "tsvana", "to": "tonga", "tog": "njasa tonga", "tpi": "tok pisin", "tr": "turski", "ts": "tsonga", "tsi": "tsimšian", "tt": "tatarski", "tum": "tumbuka", "tvl": "tuvalu", "tw": "tvi", "twq": "tasavak", "ty": "tahićanski", "tyv": "tuvinijski", "tzm": "marokanski tamazigt", "udm": "udmurt", "ug": "ujgurski", "uga": "ugaritski", "uk": "ukrajinski", "umb": "umbundu", "und": "nepoznati ili nevažeći jezik", "ur": "urdu", "uz": "uzbečki", "vai": "vai", "ve": "venda", "vi": "vijetnamski", "vo": "volapük", "vot": "votski", "vun": "vunjo", "wa": "valun", "wal": "valamo", "war": "varej", "was": "vašo", "wo": "volof", "xal": "kalmik", "xh": "kosa", "xog": "soga", "yao": "jao", "yap": "japeški", "yi": "jidiš", "yo": "jorubanski", "za": "zuang", "zap": "zapotečki", "zbl": "blisimboli", "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" } } src/Symfony/Component/Intl/Resources/data/languages/bs_Cyrl.json000066400000000000000000000362031266465517700253310ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "заза" } } src/Symfony/Component/Intl/Resources/data/languages/ca.json000066400000000000000000000326451266465517700243250ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ale": "aleuta", "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à", "arp": "arapaho", "arw": "arauac", "as": "assamès", "asa": "pare", "ast": "asturià", "av": "àvar", "awa": "awadhi", "ay": "aimara", "az": "azerbaidjanès", "ba": "baixkir", "bal": "balutxi", "ban": "balinès", "bas": "basa", "bax": "bamun", "bbj": "ghomala", "be": "bielorús", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "búlgar", "bho": "bhojpuri", "bi": "bislama", "bik": "bicol", "bin": "bini", "bkm": "kom", "bla": "blackfoot", "bm": "bambara", "bn": "bengalí", "bo": "tibetà", "br": "bretó", "bra": "braj", "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", "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": "slavey", "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", "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", "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ó occidental", "fur": "friülà", "fy": "frisó oriental", "ga": "irlandès", "gaa": "ga", "gag": "gagaús", "gay": "gayo", "gba": "gbaya", "gd": "gaèlic escocès", "gez": "gueez", "gil": "gilbertès", "gl": "gallec", "gmh": "alt alemany mitjà", "gn": "guaraní", "goh": "alt alemany antic", "gon": "gondi", "gor": "gorontalo", "got": "gòtic", "grb": "grebo", "grc": "grec antic", "gsw": "alemany suís", "gu": "gujarati", "guz": "gusí", "gv": "manx", "gwi": "gwichin", "ha": "haussa", "hai": "haida", "haw": "hawaià", "he": "hebreu", "hi": "hindi", "hil": "hiligainon", "hit": "hitita", "hmn": "hmong", "ho": "hiri motu", "hr": "croat", "hsb": "alt sòrab", "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", "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à", "kfo": "koro", "kg": "kongo", "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": "konkani", "kos": "kosraeà", "kpe": "kpelle", "kr": "kanuri", "krc": "karatxai", "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", "lkt": "lakota", "ln": "lingala", "lo": "laosià", "lol": "mongo", "loz": "lozi", "lt": "lituà", "lu": "luba katanga", "lua": "luba-lulua", "lui": "luisenyo", "lun": "lunda", "luo": "luo", "lus": "mizo", "luy": "luyia", "lv": "letó", "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", "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", "na": "nauruà", "nap": "napolità", "naq": "nama", "nb": "noruec bokmål", "nd": "ndebele septentrional", "nds": "baix alemany", "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", "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": "osset", "osa": "osage", "ota": "turc otomà", "pa": "panjabi", "pag": "pangasi", "pal": "pahlavi", "pam": "pampangà", "pap": "papiamento", "pau": "palauà", "peo": "persa antic", "phn": "fenici", "pi": "pali", "pl": "polonès", "pon": "ponapeà", "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à", "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", "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": "siswati", "ssy": "saho", "st": "sotho meridional", "su": "sundanès", "suk": "sukuma", "sus": "susú", "sux": "sumeri", "sv": "suec", "sw": "suahili", "swb": "comorià", "swc": "suahili del Congo", "syc": "siríac clàssic", "syr": "siríac", "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", "tl": "tagàlog", "tlh": "klingonià", "tli": "tlingit", "tmh": "tamazight", "tn": "tswana", "to": "tongalès", "tog": "tonga", "tpi": "tok pisin", "tr": "turc", "trv": "taroko", "ts": "tsonga", "tsi": "tsimshià", "tt": "tàtar", "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", "vi": "vietnamita", "vo": "volapük", "vot": "vòtic", "vun": "vunjo", "wa": "való", "wae": "walser", "wal": "ameto", "war": "waray-waray", "was": "washo", "wo": "wòlof", "xal": "calmuc", "xh": "xosa", "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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/cs.json000066400000000000000000000441251266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "araukánština", "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", "azb": "ázerbájdžánština (jižní)", "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", "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á)", "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_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", "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": "s’-čchuan i", "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", "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", "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", "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", "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", "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": "tachelhit", "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", "swb": "komorština", "swc": "svahilština (Kongo)", "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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/cy.json000066400000000000000000000260471266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.7.80", "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", "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", "ase": "Iaith Arwyddion America", "av": "Afareg", "az": "Aserbaijaneg", "azb": "Aserbaijaneg Deheuol", "ba": "Bashcorteg", "bal": "Balwtsi", "ban": "Balïeg", "bas": "Basâeg", "bax": "Bamwmeg", "be": "Belarwseg", "bej": "Bejäeg", "bem": "Bembeg", "bez": "Bena", "bg": "Bwlgareg", "bi": "Bislama", "bkm": "Comeg", "bm": "Bambareg", "bn": "Bengaleg", "bo": "Tibeteg", "br": "Llydaweg", "brh": "Brahui", "bs": "Bosnieg", "bua": "Bwriateg", "bum": "Bwlw", "ca": "Catalaneg", "cad": "Cado", "car": "Caribeg", "cch": "Atsameg", "ce": "Tsietsieneg", "ch": "Tsiamorro", "chm": "Marieg", "cho": "Siocto", "chr": "Tsierocî", "chy": "Cheyenne", "ckb": "Cwrdeg Sorani", "co": "Corseg", "cop": "Copteg", "cr": "Cri", "crh": "Tyrceg y Crimea", "cs": "Tsieceg", "cu": "Hen Slafoneg", "cy": "Cymraeg", "da": "Daneg", "dak": "Dacotaeg", "dar": "Dargwa", "de": "Almaeneg", "de_AT": "Almaeneg Awstria", "de_CH": "Almaeneg Safonol y Swistir", "din": "Dinca", "dje": "Zarmaeg", "doi": "Dogri", "dsb": "Sorbeg Isaf", "dum": "Iseldireg Canol", "dv": "Difehi", "ebu": "Embw", "ee": "Ewe", "egy": "Hen Eiffteg", "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", "fr": "Ffrangeg", "fr_CA": "Ffrangeg Canada", "fr_CH": "Ffrangeg y Swistir", "frc": "Ffrangeg Cajwn", "frm": "Ffrangeg Canol", "fro": "Hen Ffrangeg", "frr": "Ffriseg y Gogledd", "frs": "Ffriseg y Dwyrain", "fur": "Ffriwleg", "fy": "Ffriseg y Gorllewin", "ga": "Gwyddeleg", "gay": "Gaio", "gba": "Gbaia", "gbz": "Dareg y Zoroastriaid", "gd": "Gaeleg yr Alban", "gil": "Gilberteg", "gl": "Galisieg", "gmh": "Uchel Almaeneg Canol", "gn": "Guaraní", "goh": "Hen Uchel Almaeneg", "got": "Gotheg", "grc": "Hen Roeg", "gsw": "Almaeneg y Swistir", "gu": "Gwjarati", "gv": "Manaweg", "ha": "Hawsa", "hai": "Haida", "haw": "Hawäieg", "he": "Hebraeg", "hi": "Hindi", "hit": "Hetheg", "hmn": "Hmongeg", "hr": "Croateg", "hsb": "Sorbeg Uchaf", "ht": "Creol Haiti", "hu": "Hwngareg", "hy": "Armeneg", "hz": "Herero", "ia": "Interlingua", "iba": "Ibaneg", "ibb": "Ibibio", "id": "Indoneseg", "ie": "Interlingue", "ig": "Igbo", "ii": "Nwosw", "ik": "Inwpiaceg", "ilo": "Ilocaneg", "inh": "Ingwsieg", "is": "Islandeg", "it": "Eidaleg", "iu": "Inwctitwt", "ja": "Japaneeg", "jmc": "Matsiame", "jpr": "Iddew-Bersieg", "jrb": "Iddew-Arabeg", "jv": "Jafanaeg", "ka": "Georgeg", "kaa": "Cara-Calpaceg", "kab": "Cabileg", "kam": "Camba", "kbd": "Circaseg Dwyreiniol", "kde": "Macondeg", "kea": "Caboferdianeg", "kg": "Congo", "kha": "Càseg", "ki": "ki", "kk": "Casacheg", "km": "Chmereg", "kn": "Kannada", "ko": "Coreeg", "kok": "Concani", "kr": "Canwri", "krl": "Careleg", "ks": "Cashmireg", "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", "lmo": "Lombardeg", "ln": "Lingala", "lo": "Laoeg", "lol": "Mongo", "loz": "Lozi", "lt": "Lithwaneg", "ltg": "Latgalieg", "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", "mg": "Malagaseg", "mga": "Gwyddeleg Canol", "mh": "Marsialeg", "mi": "Maori", "mic": "Micmaceg", "mk": "Macedoneg", "ml": "Malayalam", "mn": "Mongoleg", "mnc": "Manshw", "mni": "Manipwri", "moh": "Mohoceg", "mos": "Mosi", "mr": "Marathi", "ms": "Maleieg", "mt": "Malteg", "mua": "Mas", "mul": "mwy nag un iaith", "mwl": "Mirandeg", "mwr": "Marwari", "my": "Byrmaneg", "na": "Nawrŵeg", "nap": "Naplieg", "nb": "Norwyeg Bokmål", "nd": "Ndebele Gogleddol", "nds": "Isel Almaeneg", "ne": "Nepaleg", "new": "Newaeg", "ng": "Ndonga", "nl": "Iseldireg", "nl_BE": "Fflemeg", "nn": "Norwyeg Nynorsk", "no": "Norwyeg", "non": "Hen Norseg", "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", "pcd": "Picardeg", "pdc": "Almaeneg Pensylfania", "peo": "Hen Bersieg", "pfl": "Almaeneg Palatin", "phn": "Phoeniceg", "pi": "Pali", "pl": "Pwyleg", "pms": "Piedmonteg", "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": "Romaunsch", "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", "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", "se": "Sami Gogleddol", "see": "Seneca", "sel": "Selcypeg", "sg": "Sango", "sga": "Hen Wyddeleg", "sh": "Serbo-Croateg", "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", "snk": "Soninceg", "so": "Somaleg", "sog": "Sogdeg", "sq": "Albaneg", "sr": "Serbeg", "st": "Sesotheg", "su": "Swndaneg", "suk": "Swcwma", "sus": "Swsŵeg", "sux": "Swmereg", "sv": "Swedeg", "sw": "Swahili", "swb": "Comoreg", "swc": "Swahili’r Congo", "syc": "Hen Syrieg", "syr": "Syrieg", "szl": "Silesieg", "ta": "Tamileg", "tcy": "Tulu", "te": "Telugu", "tem": "Timneg", "tet": "Tetumeg", "tg": "Tajiceg", "th": "Thai", "ti": "Tigrinya", "tk": "Twrcmeneg", "tl": "Tagalog", "tlh": "Klingon", "tmh": "Tamasheceg", "tn": "Tswana", "to": "Tongeg", "tr": "Tyrceg", "ts": "Tsongaeg", "tt": "Tatareg", "tvl": "Twfalweg", "udm": "Fotiaceg", "ug": "Uighur", "uga": "Wgariteg", "uk": "Wcreineg", "umb": "Umbundu", "und": "Iaith Anhysbys", "ur": "Wrdw", "uz": "Wsbeceg", "vai": "Faieg", "ve": "Fendeg", "vec": "Feniseg", "vi": "Fietnameg", "vls": "Fflemeg Gorllewinol", "wa": "Walwneg", "wal": "Walamo", "wo": "Woloff", "xal": "Calmyceg", "xh": "Xhosa", "ybb": "Iembaeg", "yi": "Iddew-Almaeneg", "yo": "Iorwba", "yue": "Cantoneeg", "zap": "Zapoteceg", "zbl": "Blisssymbols", "zea": "Zêlandeg", "zgh": "Tamazight Safonol Moroco", "zh": "Tsieineeg", "zh_Hans": "Tsieineeg Symledig", "zh_Hant": "Tsieineeg Traddodiadol", "zu": "Swlw", "zun": "Zuni", "zxx": "Dim cynnwys ieithyddol", "zza": "Zazäeg" } } src/Symfony/Component/Intl/Resources/data/languages/da.json000066400000000000000000000325751266465517700243300ustar00rootroot00000000000000{ "Version": "2.1.9.62", "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": "araukansk", "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": "basa", "bax": "bamun", "bbj": "ghomala", "be": "hviderussisk", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "bulgarsk", "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", "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", "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", "haw": "hawaiiansk", "he": "hebraisk", "hi": "hindi", "hil": "hiligaynon", "hit": "hittitisk", "hmn": "hmong", "ho": "hirimotu", "hr": "kroatisk", "hsb": "øvresorbisk", "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", "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": "malay", "mt": "maltesisk", "mua": "mundang", "mul": "flere sprog", "mus": "creek", "mwl": "mirandesisk", "mwr": "marwari", "my": "burmesisk", "mye": "myene", "myv": "erzya", "na": "nauru", "nap": "neapolitansk", "naq": "nama", "nb": "norsk bokmål", "nd": "nordndebele", "nds": "nedertysk", "ne": "nepalesisk", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niuean", "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": "punjabi", "pag": "pangasinan", "pal": "pahlavi", "pam": "pampanga", "pap": "papiamento", "pau": "palauansk", "peo": "oldpersisk", "phn": "fønikisk", "pi": "pali", "pl": "polsk", "pon": "ponape", "pro": "oldprovencalsk", "ps": "pashto", "pt": "portugisisk", "pt_BR": "brasiliansk portugisisk", "pt_PT": "europæisk portugisisk", "qu": "quechua", "quc": "quiché", "raj": "rajasthani", "rap": "rapanui", "rar": "rarotongan", "rm": "rætoromansk", "rn": "rundi", "ro": "rumænsk", "ro_MD": "moldovisk", "rof": "rombo", "rom": "romani", "root": "rot", "ru": "russisk", "rup": "arumænsk", "rw": "kinyarwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "sah": "yakut", "sam": "samaritansk", "saq": "samburu", "sas": "sasak", "sat": "santali", "sba": "ngambay", "sbp": "sangu", "sc": "sardinsk", "scn": "siciliansk", "sco": "skotsk", "sd": "sindhi", "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", "swb": "shimaore", "swc": "congolesisk swahili", "syc": "klassisk syrisk", "syr": "syrisk", "ta": "tamilsk", "te": "telugu", "tem": "temne", "teo": "teso", "ter": "tereno", "tet": "tetum", "tg": "tajik", "th": "thailandsk", "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", "wo": "wolof", "xal": "kalmyk", "xh": "xhosa", "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" } } src/Symfony/Component/Intl/Resources/data/languages/de.json000066400000000000000000000424521266465517700243270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "Afar", "ab": "Abchasisch", "ace": "Aceh-Sprache", "ach": "Acholi-Sprache", "ada": "Adangme", "ady": "Adygeisch", "ae": "Avestisch", "aeb": "Tunesisches Arabisch", "af": "Afrikaans", "afh": "Afrihili", "agq": "Aghem", "ain": "Ainu-Sprache", "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": "Araukanisch", "aro": "Araona", "arp": "Arapaho-Sprache", "arq": "Algerisches Arabisch", "arw": "Arawak-Sprache", "ary": "Marokkanisches Arabisch", "arz": "Ägyptisches Arabisch", "as": "Assamesisch", "asa": "Pare", "ase": "Amerikanische Gebärdensprache", "ast": "Asturianisch", "av": "Awarisch", "avk": "Kotava", "awa": "Awadhi", "ay": "Aymara", "az": "Aserbaidschanisch", "azb": "Südaserbaidschanisch", "ba": "Baschkirisch", "bal": "Belutschisch", "ban": "Balinesisch", "bar": "Bairisch", "bas": "Basaa-Sprache", "bax": "Bamun", "bbc": "Batak Toba", "bbj": "Ghomala", "be": "Weißrussisch", "bej": "Bedauye", "bem": "Bemba-Sprache", "bew": "Betawi", "bez": "Bena", "bfd": "Bafut", "bfq": "Badaga", "bg": "Bulgarisch", "bho": "Bhodschpuri", "bi": "Bislama", "bik": "Bikol-Sprache", "bin": "Bini-Sprache", "bjn": "Banjaresisch", "bkm": "Kom", "bla": "Blackfoot-Sprache", "bm": "Bambara-Sprache", "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-Sprache", "chb": "Chibcha-Sprache", "chg": "Tschagataisch", "chk": "Trukesisch", "chm": "Tscheremissisch", "chn": "Chinook", "cho": "Choctaw", "chp": "Chipewyan", "chr": "Cherokee", "chy": "Cheyenne", "ckb": "Sorani", "co": "Korsisch", "cop": "Koptisch", "cps": "Capiznon", "cr": "Cree", "crh": "Krimtatarisch", "cs": "Tschechisch", "csb": "Kaschubisch", "cu": "Kirchenslawisch", "cv": "Tschuwaschisch", "cy": "Walisisch", "da": "Dänisch", "dak": "Dakota-Sprache", "dar": "Darginisch", "dav": "Taita", "de": "Deutsch", "de_AT": "Österreichisches Deutsch", "de_CH": "Schweizer Hochdeutsch", "del": "Delaware-Sprache", "den": "Slave", "dgr": "Dogrib", "din": "Dinka-Sprache", "dje": "Zarma", "doi": "Dogri", "dsb": "Niedersorbisch", "dtp": "Zentral-Dusun", "dua": "Duala", "dum": "Mittelniederländisch", "dv": "Maledivisch", "dyo": "Diola", "dyu": "Dyula-Sprache", "dz": "Bhutanisch", "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-Sprache", "fat": "Fanti-Sprache", "ff": "Ful", "fi": "Finnisch", "fil": "Filipino", "fit": "Meänkieli", "fj": "Fidschi", "fo": "Färöisch", "fon": "Fon-Sprache", "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": "Friulisch", "fy": "Westfriesisch", "ga": "Irisch", "gaa": "Ga-Sprache", "gag": "Gagausisch", "gan": "Gan", "gay": "Gayo", "gba": "Gbaya-Sprache", "gbz": "Gabri", "gd": "Schottisches Gälisch", "gez": "Geez", "gil": "Gilbertesisch", "gl": "Galizisch", "glk": "Gilaki", "gmh": "Mittelhochdeutsch", "gn": "Guarani", "goh": "Althochdeutsch", "gom": "Goa-Konkani", "gon": "Gondi-Sprache", "gor": "Mongondou", "got": "Gotisch", "grb": "Grebo-Sprache", "grc": "Altgriechisch", "gsw": "Schweizerdeutsch", "gu": "Gujarati", "guc": "Wayúu", "gur": "Farefare", "guz": "Gusii", "gv": "Manx", "gwi": "Kutchin-Sprache", "ha": "Hausa", "hai": "Haida-Sprache", "hak": "Hakka", "haw": "Hawaiisch", "he": "Hebräisch", "hi": "Hindi", "hif": "Fidschi-Hindi", "hil": "Hiligaynon-Sprache", "hit": "Hethitisch", "hmn": "Miao-Sprache", "ho": "Hiri-Motu", "hr": "Kroatisch", "hsb": "Obersorbisch", "hsn": "Xiang", "ht": "Haitianisch", "hu": "Ungarisch", "hup": "Hupa", "hy": "Armenisch", "hz": "Herero-Sprache", "ia": "Interlingua", "iba": "Iban", "ibb": "Ibibio", "id": "Indonesisch", "ie": "Interlingue", "ig": "Igbo", "ii": "Yi", "ik": "Inupiak", "ilo": "Ilokano-Sprache", "inh": "Inguschisch", "io": "Ido-Sprache", "is": "Isländisch", "it": "Italienisch", "iu": "Inuktitut", "izh": "Ischorisch", "ja": "Japanisch", "jam": "Jamaikanisch-kreolische Sprache", "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-Sprache", "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-Sprache", "kho": "Sakisch", "khq": "Koyra Chiini", "khw": "Khowar", "ki": "Kikuyu", "kiu": "Kirmanjki", "kj": "Kwanyama", "kk": "Kasachisch", "kkj": "Kako", "kl": "Grönländisch", "kln": "Kalenjin", "km": "Kambodschanisch", "kmb": "Kimbundu-Sprache", "kn": "Kannada", "ko": "Koreanisch", "koi": "Komi-Permjakisch", "kok": "Konkani", "kos": "Kosraeanisch", "kpe": "Kpelle-Sprache", "kr": "Kanuri-Sprache", "krc": "Karatschaiisch-Balkarisch", "kri": "Krio", "krj": "Kinaray-a", "krl": "Karelisch", "kru": "Oraon-Sprache", "ks": "Kaschmirisch", "ksb": "Shambala", "ksf": "Bafia", "ksh": "Kölsch", "ku": "Kurdisch", "kum": "Kumükisch", "kut": "Kutenai-Sprache", "kv": "Komi-Sprache", "kw": "Kornisch", "ky": "Kirgisisch", "la": "Latein", "lad": "Ladino", "lag": "Langi", "lah": "Lahnda", "lam": "Lamba-Sprache", "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": "Rotse-Sprache", "lt": "Litauisch", "ltg": "Lettgallisch", "lu": "Luba-Katanga", "lua": "Luba-Lulua", "lui": "Luiseno-Sprache", "lun": "Lunda-Sprache", "luo": "Luo-Sprache", "lus": "Lushai-Sprache", "luy": "Luhya", "lv": "Lettisch", "lzh": "Klassisches Chinesisch", "lzz": "Lasisch", "mad": "Maduresisch", "maf": "Mafa", "mag": "Khotta", "mai": "Maithili", "mak": "Makassarisch", "man": "Manding-Sprache", "mas": "Massai-Sprache", "mde": "Maba", "mdf": "Moksha", "mdr": "Mandaresisch", "men": "Mende-Sprache", "mer": "Meru", "mfe": "Morisyen", "mg": "Madagassisch", "mga": "Mittelirisch", "mgh": "Makhuwa-Meetto", "mgo": "Meta’", "mh": "Marschallesisch", "mi": "Maori", "mic": "Micmac-Sprache", "min": "Minangkabau-Sprache", "mk": "Mazedonisch", "ml": "Malayalam", "mn": "Mongolisch", "mnc": "Mandschurisch", "mni": "Meithei-Sprache", "moh": "Mohawk", "mos": "Mossi-Sprache", "mr": "Marathi", "mrj": "Bergmari", "ms": "Malaiisch", "mt": "Maltesisch", "mua": "Mundang", "mul": "Mehrsprachig", "mus": "Muskogee-Sprache", "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-Sprache", "nds": "Niederdeutsch", "ne": "Nepalesisch", "new": "Newari", "ng": "Ndonga", "nia": "Nias-Sprache", "niu": "Niue-Sprache", "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-Sprache", "nso": "Nord-Sotho-Sprache", "nus": "Nuer", "nv": "Navajo", "nwc": "Alt-Newari", "ny": "Nyanja-Sprache", "nym": "Nyamwezi-Sprache", "nyn": "Nyankole", "nyo": "Nyoro", "nzi": "Nzima", "oc": "Okzitanisch", "oj": "Ojibwa-Sprache", "om": "Oromo", "or": "Oriya", "os": "Ossetisch", "osa": "Osage-Sprache", "ota": "Osmanisch", "pa": "Panjabi", "pag": "Pangasinan-Sprache", "pal": "Mittelpersisch", "pam": "Pampanggan-Sprache", "pap": "Papiamento", "pau": "Palau", "pcd": "Picardisch", "pdc": "Pennsylvaniadeutsch", "pdt": "Plautdietsch", "peo": "Altpersisch", "pfl": "Pfälzisch", "phn": "Phönikisch", "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": "Osterinsel-Sprache", "rar": "Rarotonganisch", "rgn": "Romagnol", "rif": "Tarifit", "rm": "Rätoromanisch", "rn": "Rundi-Sprache", "ro": "Rumänisch", "ro_MD": "Moldauisch", "rof": "Rombo", "rom": "Romani", "root": "Root", "rtm": "Rotumanisch", "ru": "Russisch", "rue": "Russinisch", "rug": "Roviana", "rup": "Aromunisch", "rw": "Ruandisch", "rwk": "Rwa", "sa": "Sanskrit", "sad": "Sandawe-Sprache", "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", "se": "Nord-Samisch", "see": "Seneca", "seh": "Sena", "sei": "Seri", "sel": "Selkupisch", "ses": "Koyra Senni", "sg": "Sango", "sga": "Altirisch", "sgs": "Samogitisch", "sh": "Serbo-Kroatisch", "shi": "Taschelhit", "shn": "Schan-Sprache", "shu": "Tschadisch-Arabisch", "si": "Singhalesisch", "sid": "Sidamo", "sk": "Slowakisch", "sl": "Slowenisch", "sli": "Schlesisch", "sly": "Selayar", "sm": "Samoanisch", "sma": "Süd-Samisch", "smj": "Lule-Lappisch", "smn": "Inari-Lappisch", "sms": "Skolt-Lappisch", "sn": "Shona", "snk": "Soninke-Sprache", "so": "Somali", "sog": "Sogdisch", "sq": "Albanisch", "sr": "Serbisch", "srn": "Srananisch", "srr": "Serer-Sprache", "ss": "Swazi", "ssy": "Saho", "st": "Süd-Sotho-Sprache", "stq": "Saterfriesisch", "su": "Sundanesisch", "suk": "Sukuma-Sprache", "sus": "Susu", "sux": "Sumerisch", "sv": "Schwedisch", "sw": "Suaheli", "swb": "Komorisch", "swc": "Kongo-Suaheli", "syc": "Altsyrisch", "syr": "Syrisch", "szl": "Schlesisch (Polen)", "ta": "Tamilisch", "tcy": "Tulu", "te": "Telugu", "tem": "Temne", "teo": "Teso", "ter": "Tereno-Sprache", "tet": "Tetum-Sprache", "tg": "Tadschikisch", "th": "Thailändisch", "ti": "Tigrinja", "tig": "Tigre", "tiv": "Tiv-Sprache", "tk": "Turkmenisch", "tkl": "Tokelauanisch", "tkr": "Tsachurisch", "tl": "Tagalog", "tlh": "Klingonisch", "tli": "Tlingit-Sprache", "tly": "Talisch", "tmh": "Tamaseq", "tn": "Tswana-Sprache", "to": "Tongaisch", "tog": "Tsonga-Sprache", "tpi": "Neumelanesisch", "tr": "Türkisch", "tru": "Turoyo", "trv": "Taroko", "ts": "Tsonga", "tsd": "Tsakonisch", "tsi": "Tsimshian-Sprache", "tt": "Tatarisch", "ttt": "Tatisch", "tum": "Tumbuka-Sprache", "tvl": "Elliceanisch", "tw": "Twi", "twq": "Tasawaq", "ty": "Tahitisch", "tyv": "Tuwinisch", "tzm": "Zentralatlas-Tamazight", "udm": "Udmurtisch", "ug": "Uigurisch", "uga": "Ugaritisch", "uk": "Ukrainisch", "umb": "Mbundu-Sprache", "und": "Unbestimmte Sprache", "ur": "Urdu", "uz": "Usbekisch", "vai": "Vai", "ve": "Venda-Sprache", "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": "Walser-Dialekte", "wal": "Walamo-Sprache", "war": "Waray", "was": "Washo-Sprache", "wo": "Wolof", "wuu": "Wu", "xal": "Kalmückisch", "xh": "Xhosa", "xmf": "Mingrelisch", "xog": "Soga", "yao": "Yao-Sprache", "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-Sprache", "zxx": "Keine Sprachinhalte", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/de_CH.json000066400000000000000000000001621266465517700246710ustar00rootroot00000000000000{ "Version": "2.1.8.21", "Names": { "be": "Weissrussisch", "prg": "Altpreussisch" } } src/Symfony/Component/Intl/Resources/data/languages/dz.json000066400000000000000000000162251266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "སྐད་རིག་ནང་དོན་མེདཔ" } } src/Symfony/Component/Intl/Resources/data/languages/ee.json000066400000000000000000000117741266465517700243330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "abkhaziagbe", "af": "afrikaangbe", "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": "bengalgbe", "bo": "tibetagbe", "br": "bretongbe", "brx": "bodogbe", "bs": "bosniagbe", "ca": "katalagbe", "cs": "tsɛkgbe", "cy": "walesgbe", "da": "denmarkgbe", "de": "germaniagbe", "de_AT": "austriatɔwo ƒe germaniagbe", "de_CH": "swizerlanɖ germaniagbe kɔkɔtɔ", "dv": "divehgbe", "dz": "dzongkhagbe", "ebu": "embugbe", "ee": "eʋegbe", "efi": "efigbe", "el": "grisigbe", "en": "yevugbe", "en_AU": "australiatɔwo ƒe yevugbe", "en_CA": "kanadatɔwo ƒe yevugbe", "en_GB": "britaintɔwo ƒe yevugbe", "en_US": "u.s.dukɔmetɔwo ƒe yevugbe", "eo": "esperantogbe", "es": "spaniagbe", "es_419": "latin amerikatɔwo ƒe spaniagbe", "es_ES": "iberiatɔwo ƒe spaniagbe", "et": "estoniagbe", "eu": "basqugbe", "fa": "persiagbe", "fi": "finlanɖgbe", "fil": "filipingbe", "fj": "fidzigbe", "fr": "fransegbe", "fr_CA": "kanadatɔwo ƒe fransegbe", "fr_CH": "swizerlanɖtɔwo ƒe fransegbe", "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": "dzapangbe", "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": "hɔlandgbe", "nl_BE": "flemiagbe", "nn": "nɔweigbe ninɔsk", "no": "nɔweigbe", "nso": "dziehe sothogbe", "ny": "nyanjagbe", "or": "oriyagbe", "os": "ossetiagbe", "pa": "pundzabgbe", "pl": "polandgbe", "ps": "pashtogbe", "pt": "pɔtugalgbe", "pt_BR": "braziltɔwo ƒe portugalgbe", "pt_PT": "iberiatɔwo ƒe portugalgbe", "qu": "kwetsuagbe", "rm": "romanshgbe", "rn": "rundigbe", "ro": "romaniagbe", "rof": "rombogbe", "ru": "rɔtsiagbe", "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", "su": "sudangbe", "sv": "swedengbe", "sw": "swahili", "swb": "komorogbe", "ta": "tamilgbe", "te": "telegugbe", "tet": "tetumgbe", "tg": "tadzikistangbe", "th": "tailandgbe", "ti": "tigrinyagbe", "tk": "tɛkmengbe", "tl": "tagalogbe", "tn": "tswanagbe", "to": "tongagbe", "tpi": "tok pisigbe", "tr": "tɛkigbe", "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": "kinagbe", "zh_Hans": "tsainagbe", "zh_Hant": "blema tsainagbe", "zu": "zulugbe", "zxx": "gbegbɔgblɔ manɔmee" } } src/Symfony/Component/Intl/Resources/data/languages/el.json000066400000000000000000000441541266465517700243400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Γκα", "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": "Λόζι", "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": "Ολλανδικά", "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": "Παλάουαν", "peo": "Αρχαία Περσικά", "phn": "Φοινικικά", "pi": "Πάλι", "pl": "Πολωνικά", "pon": "Ποχπέιαν", "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": "Σίντι", "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": "Σουαχίλι", "swb": "Κομόρρια", "swc": "Κονγκό Σουαχίλι", "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": "Σύμβολα Bliss", "zen": "Ζενάγκα", "zgh": "Τυπικά Ταμαζίγκτ Μαρόκου", "zh": "Κινεζικά", "zh_Hans": "Απλοποιημένα Κινεζικά", "zh_Hant": "Παραδοσιακά Κινεζικά", "zu": "Ζουλού", "zun": "Ζούνι", "zxx": "Χωρίς γλωσσολογικό περιεχόμενο", "zza": "Ζάζα" } } src/Symfony/Component/Intl/Resources/data/languages/en.json000066400000000000000000000377261266465517700243510ustar00rootroot00000000000000{ "Version": "2.1.8.87", "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", "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", "azb": "South 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", "bho": "Bhojpuri", "bi": "Bislama", "bik": "Bikol", "bin": "Bini", "bjn": "Banjar", "bkm": "Kom", "bla": "Siksika", "bm": "Bambara", "bn": "Bengali", "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": "Sorani Kurdish", "co": "Corsican", "cop": "Coptic", "cps": "Capiznon", "cr": "Cree", "crh": "Crimean Turkish", "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", "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", "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", "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": "Micmac", "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", "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": "Oriya", "os": "Ossetic", "osa": "Osage", "ota": "Ottoman Turkish", "pa": "Punjabi", "pag": "Pangasinan", "pal": "Pahlavi", "pam": "Pampanga", "pap": "Papiamento", "pau": "Palauan", "pcd": "Picard", "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", "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", "swb": "Comorian", "swc": "Congo Swahili", "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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/en_AU.json000066400000000000000000000001651266465517700247210ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "bax": "Bamum", "en_US": "United States English" } } src/Symfony/Component/Intl/Resources/data/languages/en_GB.json000066400000000000000000000001141266465517700246760ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "wal": "Walamo" } } src/Symfony/Component/Intl/Resources/data/languages/eo.json000066400000000000000000000074461266465517700243460ustar00rootroot00000000000000{ "Version": "2.1.6.76", "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" } } src/Symfony/Component/Intl/Resources/data/languages/es.json000066400000000000000000000331241266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afar", "ab": "abjasio", "ace": "acehnés", "ach": "acoli", "ada": "adangme", "ady": "adigeo", "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": "araucano", "arp": "arapaho", "arw": "arahuaco", "as": "asamés", "asa": "asu", "ast": "asturiano", "av": "avar", "awa": "avadhi", "ay": "aimara", "az": "azerí", "ba": "bashkir", "bal": "baluchi", "ban": "balinés", "bas": "basa", "bax": "bamun", "bbj": "ghomala", "be": "bielorruso", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "búlgaro", "bho": "bhojpuri", "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": "buriat", "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", "cs": "checo", "csb": "casubio", "cu": "eslavo eclesiástico", "cv": "chuvash", "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 de Suiza", "del": "delaware", "den": "slave", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "sorbio inferior", "dua": "duala", "dum": "neerlandés medieval", "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 medieval", "eo": "esperanto", "es": "español", "es_419": "español de América", "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 medieval", "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", "gay": "gayo", "gba": "gbaya", "gd": "gaélico escocés", "gez": "geez", "gil": "gilbertés", "gl": "gallego", "gmh": "alemán de la alta edad media", "gn": "guaraní", "goh": "alemán de la alta edad antigua", "gon": "gondi", "gor": "gorontalo", "got": "gótico", "grb": "grebo", "grc": "griego antiguo", "gsw": "alemán suizo", "gu": "gujarati", "guz": "gusii", "gv": "gaélico manés", "gwi": "kutchin", "ha": "hausa", "hai": "haida", "haw": "hawaiano", "he": "hebreo", "hi": "hindi", "hil": "hiligaynon", "hit": "hitita", "hmn": "hmong", "ho": "hiri motu", "hr": "croata", "hsb": "sorbio superior", "ht": "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": "laosiano", "lol": "mongo", "loz": "lozi", "lt": "lituano", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseño", "lun": "lunda", "luo": "luo", "lus": "lushai", "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 medieval", "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": "marathi", "ms": "malayo", "mt": "maltés", "mua": "mundang", "mul": "lenguas múltiples", "mus": "creek", "mwl": "mirandés", "mwr": "marwari", "my": "birmano", "mye": "myene", "myv": "erzya", "na": "nauruano", "nap": "napolitano", "naq": "nama", "nb": "bokmal noruego", "nd": "ndebele septentrional", "nds": "bajo alemán", "ne": "nepalí", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niueano", "nl": "neerlandés", "nl_BE": "flamenco", "nmg": "kwasio", "nn": "nynorsk noruego", "nnh": "ngiemboon", "no": "noruego", "nog": "nogai", "non": "nórdico antiguo", "nqo": "n’ko", "nr": "ndebele meridional", "nso": "sotho 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": "punjabí", "pag": "pangasinán", "pal": "pahlavi", "pam": "pampanga", "pap": "papiamento", "pau": "palauano", "peo": "persa antiguo", "phn": "fenicio", "pi": "pali", "pl": "polaco", "pon": "pohnpeiano", "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": "retorrománico", "rn": "kiroundi", "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", "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": "siswati", "ssy": "saho", "st": "sesotho meridional", "su": "sundanés", "suk": "sukuma", "sus": "susu", "sux": "sumerio", "sv": "sueco", "sw": "swahili", "swb": "comorense", "swc": "swahili del Congo", "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": "setchwana", "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 Marruecos 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": "kivunjo", "wa": "valón", "wae": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wólof", "xal": "kalmyk", "xh": "xhosa", "xog": "soga", "yao": "yao", "yap": "yapés", "yav": "yangben", "ybb": "yemba", "yi": "yídish", "yo": "yoruba", "yue": "cantonés", "za": "zhuang", "zap": "zapoteco", "zbl": "símbolos Bliss", "zen": "zenaga", "zgh": "tamazight", "zh": "chino", "zh_Hans": "chino simplificado", "zh_Hant": "chino tradicional", "zu": "zulú", "zun": "zuni", "zxx": "sin contenido lingüístico", "zza": "zazaki" } } src/Symfony/Component/Intl/Resources/data/languages/es_419.json000066400000000000000000000004001266465517700247260ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "arn": "mapuche", "az": "azerbaiyano", "ba": "baskir", "eu": "vasco", "gsw": "alemán (Suiza)", "luo": "luo", "mr": "maratí", "vai": "vai" } } src/Symfony/Component/Intl/Resources/data/languages/es_MX.json000066400000000000000000000013451266465517700247460ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "arn": "araucano", "ba": "bashkir", "chr": "cheroki", "ckb": "sorani", "de_CH": "alto alemán suizo", "dsb": "bajo sorbio", "es_419": "español latinoamericano", "gsw": "alemán suizo", "gv": "manés", "hsb": "alto sorbio", "kab": "cabilio", "kln": "halenjin", "luo": "luo", "nd": "sindebele", "nqo": "N’Ko", "pa": "panyabí", "rm": "romanche", "rn": "rundi", "smj": "sami de Lule", "smn": "sami de Inari", "su": "sondanés", "vai": "vai", "vun": "vunjo", "zgh": "tamazight estándar marroquí" } } src/Symfony/Component/Intl/Resources/data/languages/et.json000066400000000000000000000317161266465517700243500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afari", "ab": "abhaasi", "ace": "atšehi", "ach": "akoli", "ada": "adangme", "ady": "adõgee", "ae": "avesta", "af": "afrikaani", "afh": "afrihili", "agq": "aghemi", "ain": "ainu", "ak": "akani", "akk": "akadi", "ale": "aleuudi", "alt": "altai", "am": "amhari", "an": "aragoni", "ang": "vanainglise", "anp": "angika", "ar": "araabia", "ar_001": "araabia (tänapäevane)", "arc": "aramea", "arn": "araukaani", "arp": "arapaho", "arw": "aravaki", "as": "assami", "asa": "asa", "ast": "astuuria", "av": "avaari", "awa": "avadhi", "ay": "aimara", "az": "aserbaidžaani", "ba": "baškiiri", "bal": "belutši", "ban": "bali", "bas": "basa", "bax": "bamuni", "bbj": "ghomala", "be": "valgevene", "bej": "bedža", "bem": "bemba", "bez": "bena", "bfd": "bafuti", "bg": "bulgaaria", "bho": "bhodžpuri", "bi": "bislama", "bik": "bikoli", "bin": "edo", "bkm": "itaŋikomi", "bla": "siksika", "bm": "bambara", "bn": "bengali", "bo": "tiibeti", "br": "bretooni", "bra": "bradži", "brx": "bodo", "bs": "bosnia", "bss": "akoose", "bua": "burjaadi", "bug": "bugi", "bum": "bulu", "byn": "bilini", "byv": "medumba", "ca": "katalaani", "cad": "kado", "car": "kariibi", "cay": "cayuga", "cch": "atsami", "ce": "tšetšeeni", "ceb": "sebu", "cgg": "chiga", "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 kurdi", "co": "korsika", "cop": "kopti", "cr": "krii", "crh": "krimmitatari", "cs": "tšehhi", "csb": "kašuubi", "cu": "kirikuslaavi", "cv": "tšuvaši", "cy": "kõmri", "da": "taani", "dak": "siuu", "dar": "dargi", "dav": "taita", "de": "saksa", "de_CH": "saksa (kõrgsaksa)", "del": "delavari", "den": "sleivi", "dgr": "dogribi", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "alamsorbi", "dua": "duala", "dum": "keskhollandi", "dv": "maldiivi", "dyo": "jola-fonyi", "dyu": "djula", "dz": "dzongkha", "dzg": "dazaga", "ebu": "embu", "ee": "eve", "efi": "efiki", "egy": "muinasegiptuse", "eka": "ekadžuki", "el": "kreeka", "elx": "eelami", "en": "inglise", "en_GB": "inglise (Briti)", "en_US": "inglise (USA)", "enm": "keskinglise", "eo": "esperanto", "es": "hispaania", "es_ES": "hispaania (Euroopa)", "et": "eesti", "eu": "baski", "ewo": "evondo", "fa": "pärsia", "fan": "fangi", "fat": "fanti", "ff": "fulbe", "fi": "soome", "fil": "filipino", "fj": "fidži", "fo": "fääri", "fon": "foni", "fr": "prantsuse", "frm": "keskprantsuse", "fro": "vanaprantsuse", "frr": "põhjafriisi", "frs": "idafriisi", "fur": "friuuli", "fy": "läänefriisi", "ga": "iiri", "gaa": "gaa", "gag": "gagauusi", "gay": "gajo", "gba": "gbaja", "gd": "gaeli", "gez": "etioopia", "gil": "kiribati", "gl": "galeegi", "gmh": "keskülemsaksa", "gn": "guaranii", "goh": "vanaülemsaksa", "gon": "gondi", "gor": "gorontalo", "got": "gooti", "grb": "grebo", "grc": "vanakreeka", "gsw": "šveitsisaksa", "gu": "gudžarati", "guz": "gusii", "gv": "mänksi", "gwi": "gvitšini", "ha": "hausa", "hai": "haida", "haw": "havai", "he": "heebrea", "hi": "hindi", "hil": "hiligainoni", "hit": "heti", "hmn": "hmongi", "ho": "motu", "hr": "horvaadi", "hsb": "ülemsorbi", "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", "ja": "jaapani", "jbo": "lojbani", "jgo": "ngomba", "jmc": "machame", "jpr": "juudipärsia", "jrb": "juudiaraabia", "jv": "jaava", "ka": "gruusia", "kaa": "karakalpaki", "kab": "kabiili", "kac": "katšini", "kaj": "jju", "kam": "kamba", "kaw": "kaavi", "kbd": "kabardi-tšerkessi", "kbl": "kanembu", "kcg": "tyapi", "kde": "makonde", "kea": "kabuverdianu", "kfo": "koro", "kg": "kongo", "kha": "khasi", "kho": "saki", "khq": "koyra chiini", "ki": "kikuju", "kj": "ambo", "kk": "kasahhi", "kkj": "kako", "kl": "grööni", "kln": "kaljenjin", "km": "khmeeri", "kmb": "mbundu", "kn": "kannada", "ko": "korea", "koi": "permikomi", "kok": "konkani", "kos": "kosrae", "kpe": "kpelle", "kr": "kanuri", "krc": "karatšai-balkaari", "krl": "karjala", "kru": "oraoni", "ks": "kašmiiri", "ksb": "shambala", "ksf": "bafia", "ksh": "cologniani", "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", "lkt": "lakota", "ln": "lingala", "lo": "lao", "lol": "mongo", "loz": "lozi", "lt": "leedu", "lu": "luba", "lua": "luba-lulua", "lui": "luisenjo", "lun": "lunda", "luo": "luo", "lus": "lušei", "luy": "luyia", "lv": "läti", "mad": "madura", "maf": "mafa", "mag": "magali", "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", "ms": "malai", "mt": "malta", "mua": "mundangi", "mul": "mitu keelt", "mus": "maskogi", "mwl": "miranda", "mwr": "marvari", "my": "birma", "mye": "myene", "myv": "ersa", "na": "nauru", "nap": "napoli", "naq": "nama", "nb": "norra bokmål", "nd": "põhjandebele", "nds": "alamsaksa", "ne": "nepali", "new": "nevari", "ng": "ndonga", "nia": "niasi", "niu": "niue", "nl": "hollandi", "nl_BE": "flaami", "nmg": "kwasio", "nn": "norra nynorsk", "nnh": "ngiembooni", "no": "norra", "nog": "nogai", "non": "vanapõhjala", "nqo": "nkoo", "nr": "lõunandebele", "nso": "pedi", "nus": "nueri", "nv": "navaho", "nwc": "vananevari", "ny": "njandža", "nym": "njamvesi", "nyn": "nkole", "nyo": "njoro", "nzi": "nzima", "oc": "provansi", "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", "peo": "vanapärsia", "phn": "foiniikia", "pi": "paali", "pl": "poola", "pon": "poonpei", "pro": "vanaprovansi", "ps": "puštu", "pt": "portugali", "pt_PT": "portugali (Euroopa)", "qu": "ketšua", "quc": "k’iche’", "raj": "radžastani", "rap": "rapanui", "rar": "rarotonga", "rm": "retoromaani", "rn": "rundi", "ro": "rumeenia", "ro_MD": "moldova", "rof": "rombo", "rom": "mustlaskeel", "root": "root", "ru": "vene", "rup": "aromuuni", "rw": "ruanda", "rwk": "rwa", "sa": "sanskriti", "sad": "sandave", "sah": "jakuudi", "sam": "samaaria aramea", "saq": "samburu", "sas": "sasaki", "sat": "santali", "sba": "ngembay", "sbp": "sangu", "sc": "sardiinia", "scn": "sitsiilia", "sco": "šoti", "sd": "sindhi", "se": "põhjasaami", "see": "seneca", "seh": "sena", "sel": "sölkupi", "ses": "koyraboro senni", "sg": "sango", "sga": "vanaiiri", "sh": "serbia-horvaadi", "shi": "tachelhiti", "shn": "šani", "shu": "Tšaadi araabia", "si": "singali", "sid": "sidamo", "sk": "slovaki", "sl": "sloveeni", "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", "su": "sunda", "suk": "sukuma", "sus": "susu", "sux": "sumeri", "sv": "rootsi", "sw": "suahiili", "swb": "komoori", "swc": "Kongo suahiili", "syc": "klassikaline süüria", "syr": "süüria", "ta": "tamili", "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", "tl": "tagalogi", "tlh": "klingoni", "tli": "tlingiti", "tmh": "tamašeki", "tn": "tsvana", "to": "tonga", "tog": "tšitonga", "tpi": "uusmelaneesia", "tr": "türgi", "trv": "taroko", "ts": "tsonga", "tsi": "tšimši", "tt": "tatari", "tum": "tumbuka", "tvl": "tuvalu", "tw": "tvii", "twq": "taswaqi", "ty": "tahiti", "tyv": "tõva", "tzm": "Kesk-Maroko tamazighti", "udm": "udmurdi", "ug": "uiguuri", "uga": "ugariti", "uk": "ukraina", "umb": "umbundu", "und": "määramata", "ur": "urdu", "uz": "usbeki", "vai": "vai", "ve": "venda", "vi": "vietnami", "vo": "volapüki", "vot": "vadja", "vun": "vunjo", "wa": "vallooni", "wae": "walseri", "wal": "volamo", "war": "varai", "was": "vašo", "wo": "volofi", "xal": "kalmõki", "xh": "koosa", "xog": "soga", "yao": "jao", "yap": "japi", "yav": "yangbeni", "ybb": "yemba", "yi": "jidiši", "yo": "joruba", "yue": "kantoni", "za": "tšuangi", "zap": "sapoteegi", "zbl": "blissümbolid", "zen": "zenaga", "zgh": "tamasikti (Maroko)", "zh": "hiina", "zh_Hans": "hiina (lihtsustatud)", "zh_Hant": "hiina (traditsiooniline)", "zu": "suulu", "zun": "sunji", "zxx": "mittekeeleline", "zza": "zaza" } } src/Symfony/Component/Intl/Resources/data/languages/eu.json000066400000000000000000000154261266465517700243510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "abkhazera", "ach": "Acholiera", "af": "afrikaansa", "agq": "aghemera", "ak": "akanera", "am": "amharera", "ar": "arabiera", "ar_001": "arabiera moderno estandarra", "arn": "maputxea", "as": "assamera", "asa": "asua", "ay": "aimara", "az": "azerbaijanera", "ba": "bashkirrera", "be": "bielorrusiera", "bem": "bembera", "bez": "benera", "bg": "bulgariera", "bm": "bambarera", "bn": "bengalera", "bo": "tibetera", "br": "bretoiera", "brx": "bodoera", "bs": "bosniera", "ca": "katalana", "cgg": "chigera", "chr": "txerokiera", "ckb": "soraniera", "co": "korsikera", "cs": "txekiera", "cy": "galesera", "da": "daniera", "dav": "taitera", "de": "alemana", "de_CH": "aleman garaia (Suitza)", "dje": "zarmera", "dsb": "behe-sorabiera", "dua": "dualera", "dv": "divehiera", "dyo": "fonyi jolera", "dz": "dzongkha", "ebu": "embua", "ee": "eweera", "efi": "efikera", "el": "greziera", "en": "ingelesa", "en_US": "ingelesa (AEB)", "eo": "esperantoa", "es": "espainiera", "es_ES": "espainiera (Europa)", "et": "estoniera", "eu": "euskara", "fa": "persiera", "fi": "finlandiera", "fil": "tagaloga", "fj": "fijiera", "fo": "faroera", "fr": "frantsesa", "fy": "frisiera", "ga": "gaelikoa", "gaa": "Ga", "gag": "gagauzera", "gd": "eskoziako gaelikoa", "gl": "galiziera", "gn": "guaraniera", "gsw": "alemana (Suitza)", "gu": "gujaratera", "guz": "gusiiera", "gv": "manxera", "ha": "hausa", "haw": "hawaiiera", "he": "hebreera", "hi": "hindia", "hr": "kroaziera", "hsb": "goi-sorabiera", "ht": "haitiera", "hu": "hungariera", "hy": "armeniera", "ia": "Interlingua", "id": "indonesiera", "ie": "interlingue", "ig": "igboera", "ii": "sichuan yia", "is": "islandiera", "it": "italiera", "iu": "inuitera", "ja": "japoniera", "jgo": "ngomba", "jmc": "machamera", "jv": "javera", "ka": "georgiera", "kab": "kabilera", "kam": "kambera", "kde": "makondera", "kea": "Cabo Verdeko kreola", "kg": "Kikongoa", "khq": "koyra chiiniera", "ki": "kikuyuera", "kk": "kazakhera", "kl": "kalaallisutera", "kln": "kalenjinera", "km": "khemerera", "kn": "kannadera", "ko": "koreera", "koi": "komi-permyakera", "kok": "konkaniera", "ks": "kashmirera", "ksb": "shambalera", "ksf": "bafiera", "ku": "kurduera", "kw": "kornubiera", "ky": "kirgizera", "la": "latina", "lag": "langiera", "lb": "luxenburgera", "lg": "gandera", "lkt": "lakotera", "ln": "lingala", "lo": "laosera", "loz": "Loziera", "lt": "lituaniera", "lu": "luba-katangera", "lua": "Luba-lulua", "luo": "luoera", "luy": "luhyera", "lv": "letoniera", "mas": "masaiera", "mer": "meruera", "mfe": "Mauritaniako kreolera", "mg": "malagasyera", "mgh": "makhuwa-meettoera", "mgo": "metera", "mi": "maoriera", "mk": "mazedoniera", "ml": "malayalamera", "mn": "mongoliera", "moh": "mohawkera", "mr": "marathera", "ms": "malaysiera", "mt": "maltera", "mua": "mudangera", "mul": "hizkuntza anitzak", "my": "burmatarra", "naq": "namera", "nb": "bokmala (Norvegia)", "nd": "iparraldeko ndebeleera", "ne": "nepalera", "nl": "nederlandera", "nl_BE": "flandriera", "nmg": "kwasiera", "nn": "nynorsk norvegiera", "no": "norvegiera", "nqo": "n’koera", "nso": "pediera", "nus": "nuerera", "ny": "nyanja", "nyn": "ankolera", "oc": "Okzitaniera", "om": "oromoera", "or": "oriyera", "os": "osetiera", "pa": "punjabera", "pl": "poloniera", "ps": "paxtuera", "pt": "portugesa", "pt_PT": "portugesa (Europa)", "qu": "quechuera", "quc": "k’iche’ra", "rm": "erromantxera", "rn": "rundiera", "ro": "errumaniera", "rof": "romboera", "ru": "errusiera", "rw": "kinyaruanda", "rwk": "rwaera", "sa": "sanskritoa", "saq": "samburuera", "sbp": "sanguera", "sd": "sindhia", "se": "iparraldeko samiera", "seh": "senera", "ses": "koyraboro sennia", "sg": "sangoera", "sh": "serbokroaziera", "shi": "tachelhita", "si": "sinhala", "sk": "eslovakiera", "sl": "esloveniera", "sm": "samoera", "sma": "hegoaldeko samiera", "smj": "Lule samiera", "smn": "Inari samiera", "sms": "Skolt samiera", "sn": "shonera", "so": "somaliera", "sq": "albaniera", "sr": "serbiera", "ss": "swatiera", "st": "hegoaldeko sothoera", "su": "sundanera", "sv": "suediera", "sw": "swahili", "swc": "Kongoko swahilia", "ta": "tamilera", "te": "teluguera", "teo": "tesoera", "tet": "tetuma", "tg": "tajikistanera", "th": "thailandiera", "ti": "tigriñera", "tk": "turkmeniera", "tl": "tagalog", "tlh": "Klingonera", "tn": "tswanera", "to": "tongera", "tpi": "tok pisina", "tr": "turkiera", "ts": "tsongera", "tt": "tatarera", "tum": "Tumbukera", "tw": "twia", "twq": "tasawaqa", "ty": "tahitiera", "tzm": "Maroko erdialdeko tamazighta", "ug": "uigurrera", "uk": "ukrainera", "und": "hizkuntza ezezaguna", "ur": "urdua", "uz": "uzbekera", "vai": "vaiera", "ve": "vendera", "vi": "vietnamera", "vun": "vunjoa", "wo": "wolofera", "xh": "xhosera", "xog": "sogera", "yi": "Jiddisha", "yo": "yorubera", "zgh": "tamazight estandarra", "zh": "txinera", "zh_Hans": "txinera soildua", "zh_Hant": "txinera tradizionala", "zu": "zuluera", "zxx": "ez dago eduki linguistikorik" } } src/Symfony/Component/Intl/Resources/data/languages/fa.json000066400000000000000000000410611266465517700243200ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "آسو", "av": "آواری", "ay": "آیمارایی", "az": "ترکی آذربایجانی", "azb": "ترکی آذربایجانی ایران", "ba": "باشغیری", "bal": "بلوچی", "ban": "بالیایی", "bar": "باواریایی", "bas": "باسایی", "bax": "بمونی", "be": "بلوروسی", "bej": "بجایی", "bem": "بمبایی", "bez": "بنایی", "bg": "بلغاری", "bho": "بوجپوری", "bi": "بیسلاما", "bik": "بیکولی", "bin": "بینی", "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": "ترکی کریمه", "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": "جونخایی", "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": "گبایایی", "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": "آیبن", "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": "قزاقی", "kl": "گرینلندی", "kln": "کالنجین", "km": "خمری", "kmb": "کیمبوندویی", "kn": "کاناده‌ای", "ko": "کره‌ای", "koi": "کومی پرمیاک", "kok": "کنکانی", "kpe": "کپله‌ای", "kr": "کانوریایی", "krc": "قره‌چایی‐بالکاری", "kru": "کوروخی", "ks": "کشمیری", "ksb": "شامبالا", "ksf": "بافیایی", "ku": "کردی", "kum": "کومیکی", "kut": "کوتنی", "kv": "کومیایی", "kw": "کرنوالی", "ky": "قرقیزی", "la": "لاتینی", "lad": "لادینو", "lag": "لانگی", "lah": "لاهندا", "lam": "لامبا", "lb": "لوگزامبورگی", "lez": "لزگی", "lg": "گاندایی", "li": "لیمبورگی", "lkt": "لاکوتا", "ln": "لینگالا", "lo": "لائوسی", "lol": "مونگویی", "loz": "لوزیایی", "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": "کریکی", "mwr": "مارواری", "my": "برمه‌ای", "myv": "ارزیایی", "na": "نائورویی", "nap": "ناپلی", "naq": "نامایی", "nb": "بوکسمال نروژی", "nd": "انده‌بله‌ای شمالی", "nds": "آلمانی سفلی", "ne": "نپالی", "new": "نواریایی", "ng": "اندونگایی", "nia": "نیاسی", "niu": "نیویی", "nl": "هلندی", "nl_BE": "فلمنگی", "nmg": "کوازیو", "nn": "نرس جدید نروژی", "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": "پالائویی", "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": "روسی", "rw": "کینیارواندایی", "rwk": "روایی", "sa": "سنسکریت", "sad": "سانداوه‌ای", "sah": "یاقوتی", "sam": "آرامی سامری", "saq": "سامبورو", "sas": "ساساکی", "sat": "سانتالی", "sbp": "سانگو", "sc": "ساردینیایی", "scn": "سیسیلی", "sco": "اسکاتلندی", "sd": "سندی", "se": "سامی شمالی", "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": "سوازیایی", "st": "سوتویی جنوبی", "su": "سوندایی", "suk": "سوکومایی", "sus": "سوسویی", "sux": "سومری", "sv": "سوئدی", "sw": "سواحلی", "swb": "کوموری", "swc": "سواحلی کنگویی", "syc": "سریانی کلاسیک", "syr": "سریانی", "ta": "تامیلی", "te": "تلوگویی", "tem": "تمنه‌ای", "teo": "تسویی", "ter": "ترنو", "tet": "تتومی", "tg": "تاجیکی", "th": "تایلندی", "ti": "تیگرینیایی", "tig": "تیگره‌ای", "tiv": "تیوی", "tk": "ترکمنی", "tl": "تاگالوگی", "tlh": "کلینگون", "tli": "تلین‌گیتی", "tmh": "تاماشقی", "tn": "تسوانایی", "to": "تونگایی", "tog": "تونگایی نیاسا", "tpi": "توک‌پیسینی", "tr": "ترکی استانبولی", "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": "والونی", "wal": "والامو", "war": "وارایی", "was": "واشویی", "wo": "ولوفی", "xal": "قلموقی", "xh": "خوسایی", "xog": "سوگایی", "yao": "یائویی", "yap": "یاپی", "yi": "یدی", "yo": "یوروبایی", "yue": "کانتونی", "za": "چوانگی", "zap": "زاپوتکی", "zen": "زناگا", "zgh": "آمازیغی معیار مراکش", "zh": "چینی", "zh_Hans": "چینی ساده‌شده", "zh_Hant": "چینی سنتی", "zu": "زولویی", "zun": "زونیایی", "zxx": "بدون محتوای زبانی", "zza": "زازایی" } } src/Symfony/Component/Intl/Resources/data/languages/fa_AF.json000066400000000000000000000011731266465517700246660ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "es": "هسپانوی", "fa": "دری", "fi": "فنلندی", "ga": "آیرلندی", "hr": "کروشیایی", "id": "اندونیزیایی", "is": "آیسلندی", "it": "ایتالوی", "ja": "جاپانی", "ko": "کوریایی", "ky": "قرغزی", "mn": "مغلی", "ne": "نیپالی", "nl": "هالندی", "no": "نارویژی", "pl": "پولندی", "pt": "پرتگالی", "sv": "سویدنی", "tg": "تاجکی" } } src/Symfony/Component/Intl/Resources/data/languages/ff.json000066400000000000000000000023211266465517700243210ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/fi.json000066400000000000000000000374351266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "geg", "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", "azb": "etelä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", "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", "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": "espanjanespanja", "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", "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": "monia 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", "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", "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": "portugalinportugali", "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", "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", "swb": "komori", "swc": "kingwana", "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": "määrittämätön 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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/fo.json000066400000000000000000000101111266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "ab": "abkhaziskt", "af": "afríska", "am": "amhariskt", "ar": "arabiskt", "as": "assamesiskt", "asa": "asu (Tanzania)", "ay": "aymara", "az": "azerbaijaniskt", "be": "hvitarussiskt", "bem": "bemba", "bez": "bena (Tanzania)", "bg": "bulgarskt", "bm": "bambara", "bn": "bengaliskt", "bo": "tibetanskt", "br": "bretonskt", "bs": "bosniskt", "bss": "bakossi", "ca": "katalanskt", "cs": "kekkiskt", "cy": "valisiskt", "da": "danskt", "de": "týskt", "dv": "divehi", "dz": "dzongkha", "ebu": "kiembu", "efi": "efik", "el": "grikiskt", "en": "enskt", "eo": "esperanto", "es": "spanskt", "et": "estlendskt", "eu": "baskiskt", "fa": "persiskt", "fi": "finskt", "fil": "filipiniskt", "fj": "fidjianskt", "fo": "føroyskt", "fr": "franskt", "fy": "vestfrisikt", "ga": "írskt", "gd": "skotskt gæliskt", "gl": "galisiskt", "gn": "guarani", "gu": "gujariti", "ha": "haussa", "haw": "hawaiianskt", "he": "hebraiskt", "hi": "hindi", "hr": "kroatiskt", "ht": "haitiskt", "hu": "ungarskt", "hy": "armenskt", "ia": "interlingua", "id": "indonesiskt", "ie": "interlingue", "ig": "igbo", "is": "íslendskt", "it": "italskt", "ja": "japanskt", "jv": "javanesiskt", "ka": "georgiskt", "kea": "kapverdiskt", "kk": "kazakiskt", "km": "kambodjanskt", "kn": "kannada", "ko": "koreanskt", "ks": "kashmiriskt", "ku": "kurdiskt", "ky": "kirgisikt", "la": "latín", "lah": "lahnda", "lb": "luxemburgiskt", "ln": "lingala", "lo": "laotiskt", "lt": "litavskt", "luy": "olulujia", "lv": "latviskt", "mg": "malagasiskt", "mi": "maoriskt", "mk": "makedonskt", "ml": "malayalam", "mn": "mongoliskt", "mr": "marathiskt", "ms": "malajiskt", "mt": "maltesiskt", "my": "burmesiskt", "nb": "norskt bokmál", "ne": "nepalskt", "nl": "hollendskt", "nn": "nýnorskt", "no": "norskt", "ny": "nyanja", "oc": "occitan", "or": "oriya", "os": "ossetiskt", "pa": "punjabiskt", "pl": "polskt", "ps": "afghanskt", "pt": "portugisiskt", "qu": "quechua", "rm": "romansh", "rn": "rundi", "ro": "romanskt", "ru": "russiskt", "rw": "ruanda", "sa": "sanskrit", "sd": "sindhi", "sg": "sango", "sh": "serbokroatiskt", "si": "sinhalesiskt", "sk": "slovakiskt", "sl": "slovenskt", "sm": "samoiskt", "sn": "shona", "so": "somaliskt", "sq": "albanskt", "sr": "serbiskt", "ss": "swatiskt", "st": "sesotho", "su": "sundanesiskt", "sv": "svenskt", "sw": "swahili", "swb": "shimaoré", "ta": "tamilskt", "te": "telugiskt", "tet": "tetum", "tg": "tajikiskt", "th": "thailendskt", "ti": "tigrinya", "tk": "turkmenskt", "tl": "tagalog", "tlh": "klingonskt", "tn": "tswana", "to": "tonganskt", "tpi": "tok pisin", "tr": "turkiskt", "ts": "tsonga", "tt": "tatariskt", "tw": "twi", "ty": "tahitiskt", "ug": "uighur", "uk": "ukrainskt", "und": "ukjent mál", "ur": "urdu", "uz": "uzbekiskt", "ve": "venda", "vi": "vietnamesiskt", "wo": "wolof", "xh": "xhosa", "yi": "jiddiskt", "yo": "yoruba", "yue": "kantonesískt", "zh": "kinesiskt", "zu": "sulu" } } src/Symfony/Component/Intl/Resources/data/languages/fr.json000066400000000000000000000330711266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afar", "ab": "abkhaze", "ace": "aceh", "ach": "acoli", "ada": "adangme", "ady": "adyghéen", "ae": "avestique", "af": "afrikaans", "afh": "afrihili", "agq": "aghem", "ain": "aïnou", "ak": "akan", "akk": "akkadien", "ale": "aléoute", "alt": "altaï du Sud", "am": "amharique", "an": "aragonais", "ang": "ancien anglais", "anp": "angika", "ar": "arabe", "ar_001": "arabe standard moderne", "arc": "araméen", "arn": "araukan", "arp": "arapaho", "arw": "arawak", "as": "assamais", "asa": "assou", "ast": "asturien", "av": "avar", "awa": "awadhi", "ay": "aymara", "az": "azéri", "ba": "bachkir", "bal": "baloutchi", "ban": "balinais", "bas": "bassa", "bax": "bamoun", "bbj": "ghomala", "be": "biélorusse", "bej": "bedja", "bem": "bemba", "bez": "béna", "bfd": "bafut", "bg": "bulgare", "bho": "bhojpuri", "bi": "bichelamar", "bik": "bikol", "bin": "bini", "bkm": "kom", "bla": "siksika", "bm": "bambara", "bn": "bengali", "bo": "tibétain", "br": "breton", "bra": "braj", "brx": "bodo", "bs": "bosniaque", "bss": "akoose", "bua": "bouriate", "bug": "bugi", "bum": "boulou", "byn": "blin", "byv": "medumba", "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", "cr": "cree", "crh": "turc de Crimée", "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": "slavey", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "bas-sorabe", "dua": "douala", "dum": "moyen néerlandais", "dv": "maldivien", "dyo": "diola-fogny", "dyu": "dioula", "dz": "dzongkha", "dzg": "dazaga", "ebu": "embou", "ee": "éwé", "efi": "efik", "egy": "égyptien ancien", "eka": "ekajuk", "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", "es_419": "espagnol latino-américain", "es_ES": "espagnol d’Europe", "es_MX": "espagnol mexicain", "et": "estonien", "eu": "basque", "ewo": "éwondo", "fa": "persan", "fan": "fang", "fat": "fanti", "ff": "peul", "fi": "finnois", "fil": "filipino", "fj": "fidjien", "fo": "féroïen", "fon": "fon", "fr": "français", "fr_CA": "français canadien", "fr_CH": "français suisse", "frm": "moyen français", "fro": "ancien français", "frp": "franco-provençal", "frr": "frison du Nord", "frs": "frison oriental", "fur": "frioulan", "fy": "frison occidental", "ga": "irlandais", "gaa": "ga", "gag": "gagaouze", "gay": "gayo", "gba": "gbaya", "gd": "gaélique écossais", "gez": "guèze", "gil": "gilbertais", "gl": "galicien", "gmh": "moyen haut-allemand", "gn": "guarani", "goh": "ancien haut allemand", "gon": "gondi", "gor": "gorontalo", "got": "gotique", "grb": "grebo", "grc": "grec ancien", "gsw": "alémanique", "gu": "gujarati", "guz": "gusii", "gv": "manx", "gwi": "gwichʼin", "ha": "haoussa", "hai": "haida", "haw": "hawaïen", "he": "hébreu", "hi": "hindi", "hil": "hiligaynon", "hit": "hittite", "hmn": "hmong", "ho": "hiri motu", "hr": "croate", "hsb": "haut-sorabe", "ht": "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", "ja": "japonais", "jbo": "lojban", "jgo": "ngomba", "jmc": "machame", "jpr": "judéo-persan", "jrb": "judéo-arabe", "jv": "javanais", "ka": "géorgien", "kaa": "karakalpak", "kab": "kabyle", "kac": "kachin", "kaj": "jju", "kam": "kamba", "kaw": "kawi", "kbd": "kabardin", "kbl": "kanembou", "kcg": "tyap", "kde": "makonde", "kea": "capverdien", "kfo": "koro", "kg": "kongo", "kha": "khasi", "kho": "khotanais", "khq": "koyra chiini", "ki": "kikuyu", "kj": "kuanyama", "kk": "kazakh", "kkj": "kako", "kl": "groenlandais", "kln": "kalenjin", "km": "khmer", "kmb": "kiMboundou", "kn": "kannada", "ko": "coréen", "koi": "komi-permiak", "kok": "konkani", "kos": "kusaien", "kpe": "kpellé", "kr": "kanouri", "krc": "karatchaï balkar", "krl": "carélien", "kru": "kurukh", "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", "lg": "ganda", "li": "limbourgeois", "lkt": "lakota", "ln": "lingala", "lo": "lao", "lol": "mongo", "loz": "lozi", "lt": "lituanien", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lushai", "luy": "oluluyia", "lv": "letton", "mad": "madurais", "maf": "mafa", "mag": "magahi", "mai": "maithili", "mak": "makassar", "man": "mandingue", "mas": "masai", "mde": "maba", "mdf": "moksa", "mdr": "mandar", "men": "mendé", "mer": "merou", "mfe": "créole mauricien", "mg": "malgache", "mga": "moyen irlandais", "mgh": "makhuwa-meetto", "mgo": "méta’", "mh": "marshall", "mi": "maori", "mic": "micmac", "min": "minangkabau", "mk": "macédonien", "ml": "malayalam", "mn": "mongol", "mnc": "mandchou", "mni": "manipuri", "moh": "mohawk", "mos": "moré", "mr": "marathe", "ms": "malais", "mt": "maltais", "mua": "mundang", "mul": "multilingue", "mus": "creek", "mwl": "mirandais", "mwr": "marwarî", "my": "birman", "mye": "myènè", "myv": "erzya", "na": "nauruan", "nap": "napolitain", "naq": "nama", "nb": "norvégien bokmål", "nd": "ndébélé du Nord", "nds": "bas-allemand", "ne": "népalais", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niué", "nl": "néerlandais", "nl_BE": "flamand", "nmg": "kwasio", "nn": "norvégien nynorsk", "nnh": "ngiemboon", "no": "norvégien", "nog": "nogaï", "non": "vieux norrois", "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", "peo": "persan ancien", "phn": "phénicien", "pi": "pali", "pl": "polonais", "pon": "pohnpei", "pro": "provençal ancien", "ps": "pachto", "pt": "portugais", "pt_BR": "portugais brésilien", "pt_PT": "portugais d’Europe", "qu": "quechua", "quc": "k’iche’", "raj": "rajasthani", "rap": "rapanui", "rar": "rarotongien", "rm": "romanche", "rn": "roundi", "ro": "roumain", "ro_MD": "moldave", "rof": "rombo", "rom": "tzigane", "root": "racine", "ru": "russe", "rup": "valaque", "rw": "rwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "sah": "iakoute", "sam": "araméen samaritain", "saq": "samburu", "sas": "sasak", "sat": "santal", "sba": "ngambay", "sbp": "sangu", "sc": "sarde", "scn": "sicilien", "sco": "écossais", "sd": "sindhi", "se": "sami du Nord", "see": "seneca", "seh": "sena", "sel": "selkoupe", "ses": "koyraboro senni", "sg": "sangho", "sga": "ancien irlandais", "sh": "serbo-croate", "shi": "chleuh", "shn": "shan", "shu": "arabe tchadien", "si": "cinghalais", "sid": "sidamo", "sk": "slovaque", "sl": "slovène", "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": "sesotho", "su": "soundanais", "suk": "sukuma", "sus": "soussou", "sux": "sumérien", "sv": "suédois", "sw": "swahili", "swb": "comorien", "swc": "swahili du Congo", "syc": "syriaque classique", "syr": "syriaque", "ta": "tamoul", "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", "tl": "tagalog", "tlh": "klingon", "tli": "tlingit", "tmh": "tamacheq", "tn": "tswana", "to": "tonguien", "tog": "tonga nyasa", "tpi": "tok pisin", "tr": "turc", "trv": "taroko", "ts": "tsonga", "tsi": "tsimshian", "tt": "tatar", "tum": "tumbuka", "tvl": "tuvalu", "tw": "twi", "twq": "tasawaq", "ty": "tahitien", "tyv": "touva", "tzm": "tamazight", "udm": "oudmourte", "ug": "ouïghour", "uga": "ougaritique", "uk": "ukrainien", "umb": "umbundu", "und": "langue indéterminée", "ur": "ourdou", "uz": "ouzbek", "vai": "vaï", "ve": "venda", "vi": "vietnamien", "vo": "volapuk", "vot": "vote", "vun": "vunjo", "wa": "wallon", "wae": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmouk", "xh": "xhosa", "xog": "soga", "yao": "yao", "yap": "yapois", "yav": "yangben", "ybb": "yemba", "yi": "yiddish", "yo": "yoruba", "yue": "cantonais", "za": "zhuang", "zap": "zapotèque", "zbl": "symboles Bliss", "zen": "zenaga", "zgh": "amazighe standard marocain", "zh": "chinois", "zh_Hans": "chinois simplifié", "zh_Hant": "chinois traditionnel", "zu": "zoulou", "zun": "zuni", "zxx": "sans contenu linguistique", "zza": "zazaki" } } src/Symfony/Component/Intl/Resources/data/languages/fr_CA.json000066400000000000000000000007101266465517700247000ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "es_ES": "espagnol ibérique", "fy": "frison", "gag": "gag", "gsw": "suisse allemand", "gu": "goudjarâtî", "ii": "yi de Sichuan", "luo": "luo", "pt_PT": "portugais ibérique", "rw": "kinyarwanda", "si": "cingalais", "to": "tongan", "ug": "ouïgour", "und": "indéterminé", "ybb": "yémba" } } src/Symfony/Component/Intl/Resources/data/languages/fy.json000066400000000000000000000326621266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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", "swb": "Shimaore", "swc": "Congo Swahili", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ga.json000066400000000000000000000204631266465517700243240ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "Afáiris", "ab": "Abcáisis", "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": "Sisinis", "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", "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", "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", "mwl": "Mioraindéis", "mwr": "Marmhairis", "my": "Burmais", "na": "Nárúis", "nb": "Ioruais Bokmål", "nd": "Ndeibéilis an Tuaiscirt", "nds": "Gearmáinis Í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", "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", "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", "swc": "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" } } src/Symfony/Component/Intl/Resources/data/languages/gd.json000066400000000000000000000220771266465517700243320ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "Afar", "ab": "Abchasais", "ae": "Avestanais", "aeb": "Arabais Thuiniseach", "af": "Afraganais", "agq": "Aghem", "ak": "Akan", "ale": "Aleutais", "am": "Amtharais", "an": "Aragonais", "ang": "Seann-Bheurla", "ar": "Arabais", "ar_001": "Nuadh-Arabais Stannardach", "arc": "Aramais", "arn": "Mapuche", "arq": "Arabais Aildireach", "ary": "Arabais Mhorocach", "arz": "Arabais Èipheiteach", "as": "Asamais", "asa": "Asu", "ase": "Cainnt-shanais na h-Aimeireaga", "ast": "Astùrais", "av": "Avarais", "az": "Asarbaideànais", "azb": "Asarbaideànais Dheasach", "ba": "Bashkir", "bal": "Baluchì", "be": "Bealaruisis", "bem": "Bemba", "bez": "Bena", "bg": "Bulgarais", "bi": "Bislama", "bm": "Bambara", "bn": "Beangailis", "bo": "Tibeitis", "br": "Breatnais", "brx": "Bodo", "bs": "Bosnais", "ca": "Catalanais", "ce": "Deideanais", "cgg": "Chiga", "ch": "Chamorro", "chr": "Cherokee", "ckb": "Cùrdais Soranî", "co": "Corsais", "cop": "Coptais", "crh": "Turcais Chriomach", "cs": "Seacais", "csb": "Caisiubais", "cu": "Slàbhais na h-Eaglaise", "cy": "Cuimris", "da": "Danmhairgis", "dav": "Taita", "de": "Gearmailtis", "de_AT": "Gearmailtis na h-Ostaire", "de_CH": "Àrd-Ghearmailtis na h-Eilbheise", "dje": "Zarma", "dsb": "Sòrbais Ìochdarach", "dua": "Duala", "dum": "Meadhan-Dhuitsis", "dv": "Divehi", "dyo": "Jola-Fonyi", "dz": "Dzongkha", "ebu": "Embu", "ee": "Ewe", "egy": "Èipheitis Àrsaidh", "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", "et": "Eastoinis", "eu": "Basgais", "fa": "Farsaidh", "fi": "Fionnlannais", "fil": "Filipinis", "fj": "Fìdis", "fo": "Fàrothais", "fr": "Fraingis", "fr_CA": "Fraingis Chanada", "fr_CH": "Fraingis Eilbheiseach", "frm": "Meadhan-Fhraingis", "fro": "Seann-Fhraingis", "frr": "Frìoslannais Thuathach", "frs": "Frìoslannais Earach", "fur": "Friùilis", "fy": "Frìoslannais Siarach", "ga": "Gaeilge", "gag": "Gagauz", "gd": "Gàidhlig", "gez": "Ge’ez", "gil": "Ciribeasais", "gl": "Gailìsis", "gmh": "Meadhan-Àrd-Gearmailtis", "gn": "Guaraní", "goh": "Seann-Àrd-Gearmailtis", "got": "Gotais", "grc": "Greugais Àrsaidh", "gsw": "Gearmailtis Eilbheiseach", "gu": "Gujarati", "guz": "Gusii", "gv": "Gaelg", "ha": "Hausa", "haw": "Cànan Hawai’i", "he": "Eabhra", "hi": "Hindis", "hif": "Hindis Fhìditheach", "ho": "Hiri Motu", "hr": "Cròthaisis", "hsb": "Sòrbais Uachdarach", "ht": "Crìtheol Haidhti", "hu": "Ungairis", "hy": "Airmeinis", "ia": "Interlingua", "id": "Innd-Innsis", "ie": "Interlingue", "ig": "Igbo", "ii": "Yi Sichuan", "ik": "Inupiaq", "io": "Ido", "is": "Innis Tìlis", "it": "Eadailtis", "iu": "Inuktitut", "ja": "Seapanais", "jam": "Beurla Crìtheolach Diameuga", "jgo": "Ngomba", "jmc": "Machame", "jpr": "Peirsis Iùdhach", "jrb": "Arabais Iùdhach", "jv": "Deàbhanais", "ka": "Cairtbheilis", "kab": "Kabyle", "kam": "Kamba", "kde": "Makonde", "kea": "Kabuverdianu", "khq": "Koyra Chiini", "ki": "Kikuyu", "kk": "Casachais", "kl": "Kalaallisut", "kln": "Kalenjin", "km": "Cmèar", "kn": "Kannada", "ko": "Coirèanais", "koi": "Komi-Permyak", "kok": "Konkani", "ks": "Caismiris", "ksb": "Shambala", "ksf": "Bafia", "ku": "Cùrdais", "kw": "Còrnais", "ky": "Cìorgasais", "la": "Laideann", "lad": "Ladino", "lag": "Langi", "lb": "Lugsamburgais", "lg": "Ganda", "lij": "Liogùrais", "lkt": "Lakhóta", "lmo": "Lombardais", "ln": "Lingala", "lo": "Làtho", "lt": "Liotuainis", "lu": "Luba-Katanga", "luo": "Luo", "luy": "Luyia", "lv": "Laitbheis", "lzh": "Sìnis an Litreachais", "mas": "Maasai", "mer": "Meru", "mfe": "Morisyen", "mg": "Malagasais", "mga": "Meadhan-Ghaeilge", "mgh": "Makhuwa-Meetto", "mgo": "Meta’", "mh": "Marshallais", "mi": "Māori", "mk": "Masadonais", "ml": "Malayalam", "mn": "Mongolais", "moh": "Mohawk", "mr": "Marathi", "ms": "Malaidhis", "mt": "Maltais", "mua": "Mundang", "mul": "Iomadh cànan", "my": "Burmais", "na": "Nabhru", "naq": "Nama", "nb": "Bokmål na Nirribhidh", "nd": "Ndebele Thuathach", "ne": "Neapàilis", "nl": "Duitsis", "nl_BE": "Flannrais", "nmg": "Kwasio", "nn": "Nynorsk na Nirribhidh", "no": "Nirribhis", "non": "Seann-Lochlannais", "nqo": "N’Ko", "nr": "Ndebele Dheasach", "nso": "Leasotais Thuathach", "nus": "Nuer", "ny": "Chichewa", "nyn": "Nyankole", "oc": "Ogsatanais", "om": "Oromo", "or": "Oriya", "os": "Ossetic", "ota": "Turcais Otomanach", "pa": "Panjabi", "pau": "Palabhais", "pdc": "Gearmailtis Phennsylvania", "peo": "Seann-Pheirsis", "pi": "Pali", "pl": "Pòlainnis", "prg": "Pruisis", "ps": "Pachtu", "pt": "Portagailis", "pt_BR": "Portagailis Bhraisileach", "pt_PT": "Portagailis Eòrpach", "qu": "Ceatsua", "quc": "K’iche’", "rap": "Rapa Nui", "rm": "Rumains", "rn": "Kirundi", "ro": "Romàinis", "ro_MD": "Moldobhais", "rof": "Rombo", "rom": "Romanais", "ru": "Ruisis", "rw": "Kinyarwanda", "rwk": "Rwa", "sa": "Sanskrit", "sah": "Sachais", "sam": "Aramais Shamaritanach", "saq": "Samburu", "sbp": "Sangu", "sc": "Sàrdais", "scn": "Sisilis", "sco": "Albais", "sd": "Sindhi", "se": "Sàmais Thuathach", "seh": "Sena", "ses": "Koyraboro Senni", "sg": "Sango", "sga": "Seann-Ghaeilge", "shi": "Tachelhit", "shu": "Arabais Seàdach", "si": "Sinhala", "sk": "Slòbhacais", "sl": "Slòbhainis", "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", "st": "Leasotach Dheasach", "su": "Cànan Sunda", "sv": "Suainis", "sw": "Kiswahili", "swb": "Comorais", "swc": "Kiswahili na Congo", "syc": "Suraidheac Chlasaigeach", "syr": "Suraidheac", "ta": "Taimilis", "te": "Telugu", "teo": "Teso", "tet": "Tetum", "tg": "Taidigis", "th": "Tàidh", "ti": "Tigrinya", "tk": "Turcmanais", "tkl": "Tokelau", "tl": "Tagalog", "to": "Tongais", "tog": "Nyasa Tonga", "tpi": "Tok Pisin", "tr": "Turcais", "ts": "Tsonga", "tt": "Tatarais", "twq": "Tasawaq", "tzm": "Tamazight Meadhan na h-Atlas", "ug": "Ùigiurais", "uk": "Ucràinis", "und": "Cànan neo-aithnichte", "ur": "Ùrdu", "uz": "Usbagais", "vai": "Vai", "ve": "Venda", "vi": "Bhiet-Namais", "vls": "Flannrais Siarach", "vo": "Volapük", "vun": "Vunjo", "wo": "Wolof", "xh": "Xhosa", "xog": "Soga", "yi": "Iùdhais", "yo": "Ioruba", "yue": "Cantonais", "zgh": "Tamazight Stannardach Moroco", "zh": "Sìnis", "zh_Hans": "Sìnis Shimplichte", "zh_Hant": "Sìnis Thradaiseanta", "zu": "Zulu", "zxx": "Susbaint nach eil ‘na chànan" } } src/Symfony/Component/Intl/Resources/data/languages/gl.json000066400000000000000000000155701266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "abkhazo", "ach": "acoli", "af": "afrikaans", "agq": "aghem", "ak": "akán", "am": "amárico", "an": "aragonés", "ar": "árabe", "ar_001": "árabe estándar moderno", "arc": "arameo", "arn": "mapuche", "as": "assamés", "asa": "asu", "ast": "asturiano", "ay": "aimará", "az": "acerbaixano", "ba": "baskir", "be": "bielorruso", "bem": "bemba", "bez": "bena", "bg": "búlgaro", "bm": "bambara", "bn": "bengalí", "bo": "tibetano", "br": "bretón", "brx": "bodo", "bs": "bosnio", "ca": "catalán", "cgg": "kiga", "chr": "cheroqui", "ckb": "curdo soraní", "co": "corso", "cs": "checo", "cu": "eslavo eclesiástico", "cy": "galés", "da": "dinamarqués", "dav": "taita", "de": "alemán", "de_AT": "alemán de austria", "de_CH": "alto alemán suízo", "dje": "zarma", "dsb": "baixo sorabio", "dua": "duala", "dv": "divehi", "dyo": "jola-fonyi", "dz": "dzongkha", "ebu": "embu", "ee": "ewé", "efi": "ibibio", "egy": "exipcio antigo", "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", "fa": "persa", "fi": "finés", "fil": "filipino", "fj": "fixiano", "fo": "faroés", "fr": "francés", "fr_CA": "francés canadiano", "fr_CH": "francés suízo", "fy": "frisón", "ga": "irlandés", "gaa": "ga", "gag": "gagauz", "gd": "gaélico escocés", "gl": "galego", "gn": "guaraní", "grc": "grego antigo", "gsw": "alemán suízo", "gu": "guxaratiano", "guz": "gusii", "gv": "manx", "ha": "hausa", "haw": "hawaiano", "he": "hebreo", "hi": "hindi", "hr": "croata", "hsb": "alto sorabio", "ht": "haitiano", "hu": "húngaro", "hy": "armenio", "ia": "interlingua", "id": "indonesio", "ig": "ibo", "ii": "yi sichuanés", "is": "islandés", "it": "italiano", "iu": "inuit", "ja": "xaponés", "jgo": "ngomba", "jmc": "machame", "jv": "xavanés", "ka": "xeorxiano", "kab": "kabile", "kam": "kamba", "kde": "makonde", "kea": "caboverdiano", "kg": "kongo", "khq": "koyra chiini", "ki": "kikuyu", "kk": "casaco", "kl": "groenlandés", "kln": "kalenjin", "km": "cambodiano", "kn": "kannada", "ko": "coreano", "koi": "komi permio", "kok": "konkani", "ks": "cachemir", "ksb": "shambala", "ksf": "bafia", "ku": "kurdo", "kw": "córnico", "ky": "quirguiz", "la": "latín", "lag": "langi", "lb": "luxemburgués", "lg": "ganda", "lkt": "lakota", "ln": "lingala", "lo": "laotiano", "loz": "lozi", "lt": "lituano", "lu": "luba-katanga", "lua": "luba-lulua", "luo": "luo", "luy": "luyia", "lv": "letón", "mas": "masai", "mer": "meru", "mfe": "crioulo mauritano", "mg": "malgaxe", "mgh": "makhuwa-meetto", "mgo": "meta’", "mi": "maorí", "mk": "macedonio", "ml": "malabar", "mn": "mongol", "moh": "mohawk", "mr": "marathi", "ms": "malaio", "mt": "maltés", "mua": "mundang", "mul": "varias linguas", "my": "birmano", "naq": "nama", "nb": "noruegués bokmal", "nd": "ndebele do norte", "ne": "nepalí", "nl": "holandés", "nl_BE": "flamenco", "nmg": "kwasio", "nn": "noruegués nynorsk", "no": "noruegués", "nqo": "n’ko", "nso": "sesotho sa leboa", "nus": "nuer", "ny": "chewa", "nyn": "nyankole", "oc": "occitano", "om": "oromo", "or": "oriya", "os": "osetio", "pa": "punjabi", "pl": "polaco", "ps": "paxtún", "pt": "portugués", "pt_BR": "portugués brasileiro", "pt_PT": "portugués europeo", "qu": "quechua", "quc": "quiché", "rm": "romanche", "rn": "rundi", "ro": "romanés", "rof": "rombo", "ru": "ruso", "rw": "ruandés", "rwk": "rwa", "sa": "sánscrito", "saq": "samburu", "sbp": "sangu", "sd": "sindhi", "se": "sami do norte", "seh": "sena", "ses": "koyraboro senni", "sg": "sango", "sh": "serbocroata", "shi": "tachelhit", "si": "cingalés", "sk": "eslovaco", "sl": "esloveno", "sm": "samoano", "sma": "saami do sur", "smj": "saami lule", "smn": "saami inari", "sms": "saami skolt", "sn": "shona", "so": "somalí", "sq": "albanés", "sr": "serbio", "ss": "swati", "st": "sesoto", "su": "sondanés", "sv": "sueco", "sw": "swahili", "swc": "suahili congolés", "ta": "tamil", "te": "telugu", "teo": "teso", "tet": "tetún", "tg": "taxico", "th": "tailandés", "ti": "tigriña", "tk": "turcomano", "tl": "tagalo", "tlh": "klingon", "tn": "tswana", "to": "tonganés", "tpi": "tok pisin", "tr": "turco", "ts": "xitsonga", "tt": "tártaro", "tum": "tumbuka", "twq": "tasawaq", "ty": "tahitiano", "tzm": "tamazight marroquí central", "ug": "uigur", "uk": "ucraíno", "und": "lingua descoñecida ou non válida", "ur": "urdú", "uz": "uzbeco", "vai": "vai", "ve": "venda", "vi": "vietnamita", "vun": "vunjo", "wo": "wólof", "xh": "xhosa", "xog": "soga", "yi": "yiddish", "yo": "ioruba", "zgh": "tamazight de Marrocos estándar", "zh": "chinés", "zh_Hans": "chinés simplificado", "zh_Hant": "chinés tradicional", "zu": "zulú", "zxx": "sen contido lingüístico" } } src/Symfony/Component/Intl/Resources/data/languages/gu.json000066400000000000000000000504731266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "અઝરબૈજાની", "azb": "દક્ષિણ ઝરબૈજાની", "ba": "બશ્કીર", "bal": "બલૂચી", "ban": "બાલિનીસ", "bas": "બસા", "be": "બેલારુશિયન", "bej": "બેજા", "bem": "બેમ્બા", "bez": "બેના", "bg": "બલ્ગેરિયન", "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": "ક્રિમિયન તુર્કી", "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": "ડ્ઝોંગ્ખા", "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": "Ga", "gag": "ગાગાઝ", "gay": "ગાયો", "gba": "બાયા", "gbz": "ઝોરોસ્ટ્રિઅન દારી", "gd": "સ્કોટ્સ ગેલિક", "gez": "ગીઝ", "gil": "જિલ્બરટીઝ", "gl": "ગેલિશિયન", "gmh": "મધ્ય હાઇ જર્મન", "gn": "ગુઆરાની", "goh": "જૂની હાઇ જર્મન", "gom": "ગોઅન કોંકણી", "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": "ઇબાન", "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": "કઝાખ", "kl": "કલાલ્લિસુત", "kln": "કલેજિન", "km": "ખ્મેર", "kmb": "કિમ્બન્દુ", "kn": "કન્નડ", "ko": "કોરિયન", "koi": "કોમી-પર્મ્યાક", "kok": "કોંકણી", "kos": "કોસરિયન", "kpe": "ક્પેલ્લે", "kr": "કનુરી", "krc": "કરાચય-બલ્કાર", "krl": "કરેલિયન", "kru": "કુરૂખ", "ks": "કાશ્મીરી", "ksb": "શમ્બાલા", "ksf": "બફિયા", "ku": "કુર્દિશ", "kum": "કુમીક", "kut": "કુતેનાઇ", "kv": "કોમી", "kw": "કોર્નિશ", "ky": "કિર્ગીઝ", "la": "લેટિન", "lad": "લાદીનો", "lag": "લંગી", "lah": "લાહન્ડા", "lam": "લામ્બા", "lb": "લક્ઝેમબર્ગિશ", "lez": "લેઝધીયન", "lfn": "લિંગ્વા ફેન્કા નોવા", "lg": "ગાંડા", "li": "લિંબૂર્ગિશ", "lkt": "લાકોટા", "ln": "લિંગાલા", "lo": "લાઓથિયન", "lol": "મોગો", "loz": "લોઝી", "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": "એર્ઝયા", "na": "નાઉરૂ", "nap": "નેપોલિટાન", "naq": "નમા", "nb": "નોર્વેજીયન બોકમાલ", "nd": "ઉતર દેબેલ", "nds": "લો જર્મન", "ne": "નેપાળી", "new": "નેવાડી", "ng": "ડોન્ગા", "nia": "નિયાસ", "niu": "નિયુઆન", "nl": "ડચ", "nl_BE": "ફ્લેમિશ", "nmg": "ક્વાસિઓ", "nn": "નૉર્વેજીયન નાયનૉર્સ્ક", "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": "ક્વેચુઆ", "quc": "કિચે", "raj": "રાજસ્થાની", "rap": "રાપાનુઇ", "rar": "રારોટોંગન", "rm": "રોમાન્શ", "rn": "રૂન્દી", "ro": "રોમાનિયન", "ro_MD": "મોલડાવિયન", "rof": "રોમ્બો", "rom": "રોમાની", "root": "મૂલ", "ru": "રશિયન", "rup": "અરોમેનિયન", "rw": "કિન્યારવાન્ડા", "rwk": "રવા", "sa": "સંસ્કૃત", "sad": "સોંડવે", "sah": "યાકૂત", "sam": "સામરિટાન અરેમિક", "saq": "સમ્બુરુ", "sas": "સાસાક", "sat": "સંતાલી", "sbp": "સાંગુ", "sc": "સાર્દિનિયન", "scn": "સિસિલિયાન", "sco": "સ્કોટ્સ", "sd": "સિંધી", "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": "સ્વાતી", "st": "સદર્ન સોથો", "su": "સંડેનીઝ", "suk": "સુકુમા", "sus": "સુસુ", "sux": "સુમેરિયન", "sv": "સ્વીડિશ", "sw": "સ્વાહિલી", "swb": "કોમોરિયન", "swc": "કોંગો સ્વાહિલી", "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": "ટર્કીશ", "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": "વાલૂન", "wal": "વલામો", "war": "વારે", "was": "વાશો", "wo": "વોલોફ", "xal": "કાલ્મિક", "xh": "ખોસા", "xog": "સોગા", "yao": "યાઓ", "yap": "યાપીસ", "yi": "યિદ્દિશ", "yo": "યોરૂબા", "yue": "કેંટોનીઝ", "za": "ઝુઆગ", "zap": "ઝેપોટેક", "zbl": "બ્લિસિમ્બોલ્સ", "zen": "ઝેનાગા", "zgh": "પ્રમાણભૂત મોરોક્કન ટમાઝિટ", "zh": "ચાઇનીઝ", "zh_Hans": "સરળીકૃત ચાઇનીઝ", "zh_Hant": "પારંપરિક ચાઇનીઝ", "zu": "ઝુલુ", "zun": "ઝૂની", "zxx": "કોઇ ભાષાશાસ્ત્રીય સામગ્રી નથી", "zza": "ઝાઝા" } } src/Symfony/Component/Intl/Resources/data/languages/gv.json000066400000000000000000000001121266465517700243360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "gv": "Gaelg" } } src/Symfony/Component/Intl/Resources/data/languages/ha.json000066400000000000000000000024161266465517700243230ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/he.json000066400000000000000000000406651266465517700243370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "בולגרית", "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": "גא", "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": "לוזי", "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": "הולנדית", "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": "פלוואן", "peo": "פרסית עתיקה", "phn": "פניקית", "pi": "פאלי", "pl": "פולנית", "pon": "פונפיאן", "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": "סינדהית", "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": "סווהילית", "swc": "סווהילי קונגולטזית", "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": "זאזא" } } src/Symfony/Component/Intl/Resources/data/languages/hi.json000066400000000000000000000474771266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "बुल्गारियाई", "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": "क्रीमीन तुर्की", "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": "ज़ोन्गखा", "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": "इबान", "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": "कज़ाख़", "kl": "ग्रीनलैंडिक", "kln": "कलेंजिन", "km": "खमेर", "kmb": "किम्बन्दु", "kn": "कन्नड़", "ko": "कोरियाई", "koi": "कोमी-पर्मयाक", "kok": "कोंकणी", "kos": "कोसरैन", "kpe": "क्पेल्लै", "kr": "कनुरी", "krc": "कराचय-बल्कार", "krl": "करेलियन", "kru": "कुरूख", "ks": "कश्मीरी", "ksb": "शम्बाला", "ksf": "बफिआ", "ku": "कुर्दिश", "kum": "कुमीक", "kut": "कुतेनाई", "kv": "कोमी", "kw": "कोर्निश", "ky": "किर्गीज़", "la": "लैटिन", "lad": "लादीनो", "lag": "लांगि", "lah": "लाह्न्डा", "lam": "लाम्बा", "lb": "लग्ज़मबर्गी", "lez": "लेज़्घीयन", "lg": "गांडा", "li": "लिंबर्गिश", "lkt": "लैकोटा", "ln": "लिंगाला", "lo": "लाओ", "lol": "मोंगो", "loz": "लोज़ी", "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": "एर्ज़या", "na": "नाउरू", "nap": "नीपोलिटन", "naq": "नामा", "nb": "नॉर्वेजियाई बोकमाल", "nd": "उत्तरी देबेल", "nds": "निचला जर्मन", "ne": "नेपाली", "new": "नेवाड़ी", "ng": "डोन्गा", "nia": "नियास", "niu": "नियुआन", "nl": "डच", "nl_BE": "फ़्लेमिश", "nmg": "क्वासिओ", "nn": "नॉर्वेजियाई नॉयनॉर्स्क", "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": "क्वेचुआ", "quc": "किश", "raj": "राजस्थानी", "rap": "रापानुई", "rar": "रारोतोंगन", "rm": "रोमान्श", "rn": "रुन्दी", "ro": "रोमानियाई", "ro_MD": "मोलडावियन", "rof": "रोम्बो", "rom": "रोमानी", "root": "रूट", "ru": "रूसी", "rup": "अरोमानियन", "rw": "किन्यारवांडा", "rwk": "रवा", "sa": "संस्कृत", "sad": "सन्डावे", "sah": "याकूत", "sam": "सामैरिटन अरैमिक", "saq": "सैम्बुरु", "sas": "सासाक", "sat": "संताली", "sbp": "सैंगु", "sc": "सार्दिनियन", "scn": "सिसिलियन", "sco": "स्कॉट्स", "sd": "सिंधी", "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": "स्वाती", "st": "सेसोथो", "su": "सुंडानी", "suk": "सुकुमा", "sus": "सुसु", "sux": "सुमेरियन", "sv": "स्वीडिश", "sw": "स्वाहिली", "swc": "कांगो स्वाहिली", "syc": "क्लासिकल सिरिएक", "syr": "सिरिएक", "ta": "तमिल", "te": "तेलुगू", "tem": "टिम्ने", "teo": "टेसो", "ter": "तेरेनो", "tet": "तेतुम", "tg": "ताजिक", "th": "थाई", "ti": "तिग्रीन्या", "tig": "टाइग्रे", "tiv": "तिव", "tk": "तुर्कमेन", "tkl": "तोकेलाऊ", "tl": "तागालोग", "tlh": "क्लिंगन", "tli": "त्लिंगित", "tmh": "तामाशेक", "tn": "सेत्स्वाना", "to": "टोंगन", "tog": "न्यासा टोन्गा", "tpi": "टोक पिसिन", "tr": "तुर्की", "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": "वाल्लून", "wal": "वलामो", "war": "वारै", "was": "वाशो", "wo": "वोलोफ़", "xal": "काल्मिक", "xh": "ख़ोसा", "xog": "सोगा", "yao": "याओ", "yap": "यापीस", "yi": "येहुदी", "yo": "योरूबा", "yue": "कैंटोनीज़", "za": "ज़ुआंग", "zap": "ज़ेपोटेक", "zbl": "ब्लिसिम्बॉल्स", "zen": "ज़ेनान्गा", "zgh": "मानक मोरक्कन तामाज़ाइट", "zh": "चीनी", "zh_Hans": "सरलीकृत चीनी", "zh_Hant": "पारंपरिक चीनी", "zu": "ज़ुलू", "zun": "ज़ूनी", "zxx": "कोई भाषा सामग्री नहीं", "zza": "ज़ाज़ा" } } src/Symfony/Component/Intl/Resources/data/languages/hr.json000066400000000000000000000334211266465517700243440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afarski", "ab": "abhaski", "ace": "achinese", "ach": "acoli", "ada": "adangme", "ady": "adigejski", "ae": "avestan", "af": "afrikaans", "afh": "afrihili", "agq": "aghem", "ain": "ainu", "ak": "akanski", "akk": "akkadian", "ale": "aleutski", "alt": "južni altai", "am": "amharski", "an": "aragonski", "ang": "staroengleski", "anp": "angika", "ar": "arapski", "ar_001": "moderni standardni arapski", "arc": "aramejski", "arn": "araukanski", "arp": "arapaho", "arw": "arawak", "as": "asamski", "asa": "asu", "ast": "asturijski", "av": "avarski", "awa": "awadhi", "ay": "aymara", "az": "azerbajdžanski", "ba": "baškirski", "bal": "baluchi", "ban": "balinezijski", "bas": "basa", "bax": "bamunski", "bbj": "ghomala", "be": "bjeloruski", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "bugarski", "bho": "bhojpuri", "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": "akoose", "bua": "buriat", "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": "chibcha", "chg": "chagatai", "chk": "chuukese", "chm": "mari", "chn": "chinook žargon", "cho": "choctaw", "chp": "chipewyan", "chr": "čeroki", "chy": "čejenski", "ckb": "soranski kurdski", "co": "korzički", "cop": "koptski", "cr": "cree", "crh": "krimski turski", "cs": "češki", "csb": "kašupski", "cu": "crkvenoslavenski", "cv": "chuvash", "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": "lužičkosrpski", "dua": "duala", "dum": "nizozemski, srednji", "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": "engleski, srednji", "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": "fulah", "fi": "finski", "fil": "filipino", "fj": "fidžijski", "fo": "ferojski", "fon": "fon", "fr": "francuski", "fr_CA": "kanadski francuski", "fr_CH": "švicarski francuski", "frm": "francuski, srednji", "fro": "starofrancuski", "frr": "sjevernofrizijski", "frs": "istočnofrizijski", "fur": "friulski", "fy": "zapadnofrizijski", "ga": "irski", "gaa": "ga", "gag": "gagauski", "gay": "gayo", "gba": "gbaya", "gd": "škotski-galski", "gez": "staroetiopski", "gil": "gilbertski", "gl": "galicijski", "gmh": "njemački, srednji visoki", "gn": "guarani", "goh": "staronjemački, visoki", "gon": "gondi", "gor": "gorontalo", "got": "gothic", "grb": "grebo", "grc": "starogrčki", "gsw": "švicarski njemački", "gu": "gudžaratski", "guz": "gusii", "gv": "manski", "gwi": "gwich’in", "ha": "hausa", "hai": "haidi", "haw": "havajski", "he": "hebrejski", "hi": "hindski", "hil": "hiligaynon", "hit": "hetitski", "hmn": "hmong", "ho": "hiri motu", "hr": "hrvatski", "hsb": "gornjolužički", "ht": "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": "kachin", "kaj": "kaje", "kam": "kamba", "kaw": "kawi", "kbd": "kabardian", "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": "kannadski", "ko": "korejski", "koi": "komski ili 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": "kirgiški", "la": "latinski", "lad": "ladino", "lag": "langi", "lah": "lahnda", "lam": "lamba", "lb": "luksemburški", "lez": "lezgiški", "lg": "ganda", "li": "limburgish", "lkt": "lakota", "ln": "lingala", "lo": "laoski", "lol": "mongo", "loz": "lozi", "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": "irski, srednji", "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": "mohawk", "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", "na": "nauru", "nap": "napolitanski", "naq": "nama", "nb": "književni norveški", "nd": "sjeverni ndebele", "nds": "donjonjemački", "ne": "nepalski", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niujski", "nl": "nizozemski", "nl_BE": "flamanski", "nmg": "kwasio", "nn": "novonorveški", "nnh": "ngiemboon", "no": "norveški", "nog": "nogajski", "non": "staronorveški", "nqo": "n’ko", "nr": "južni ndebele", "nso": "sjeverni sotho", "nus": "nuer", "nv": "navajo", "nwc": "klasični newari", "ny": "nyanja", "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", "peo": "staroperzijski", "phn": "fenički", "pi": "pali", "pl": "poljski", "pon": "pohnpeian", "pro": "staroprovansalski", "ps": "paštu", "pt": "portugalski", "pt_BR": "brazilski portugalski", "pt_PT": "europski portugalski", "qu": "kečua", "quc": "kiče", "raj": "rajasthani", "rap": "rapa nui", "rar": "rarotonški", "rm": "romanš", "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": "santali", "sba": "ngambay", "sbp": "sangu", "sc": "sardski", "scn": "sicilijski", "sco": "škotski", "sd": "sindhi", "se": "južni 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": "sjeverni 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", "swb": "komorski", "swc": "kongoanski swahili", "syc": "klasični sirski", "syr": "sirijski", "ta": "tamilski", "te": "telugu", "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": "tamashek", "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": "tuvinian", "tzm": "marokanski tamazight", "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": "votic", "vun": "vunjo", "wa": "valonski", "wae": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmyk", "xh": "xhosa", "xog": "soga", "yao": "yao", "yap": "japski", "yav": "yangben", "ybb": "yemba", "yi": "jidiš", "yo": "joruba", "yue": "kantonski", "za": "zhuang", "zap": "zapotec", "zbl": "blissymbols", "zen": "zenaga", "zgh": "standardni marokanski tamazight", "zh": "kineski", "zh_Hans": "kineski (pojednostavljeni)", "zh_Hant": "kineski (tradicionalni)", "zu": "zulu", "zun": "zuni", "zxx": "bez jezičnog sadržaja", "zza": "zazaki" } } src/Symfony/Component/Intl/Resources/data/languages/hu.json000066400000000000000000000324421266465517700243510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "araucani", "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": "belorusz", "bej": "bedzsa", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "bolgár", "bho": "bodzspuri", "bi": "bislama", "bik": "bikol", "bin": "bini", "bkm": "kom", "bla": "siksika", "bm": "bambara", "bn": "bengáli", "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": "cebui", "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": "szoráni kurd", "co": "korzikai", "cop": "kopt", "cr": "krí", "crh": "krími tatár", "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": "butáni", "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": "fríz", "ga": "ír", "gaa": "ga", "gag": "gagauz", "gay": "gajo", "gba": "gbaja", "gd": "skót gael", "gez": "geez", "gil": "ikiribati", "gl": "galíciai", "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": "gudzsarati", "guz": "guszii", "gv": "man-szigeti", "gwi": "gvicsin", "ha": "hausza", "hai": "haida", "haw": "hawaii", "he": "héber", "hi": "hindi", "hil": "hiligajnon", "hit": "hittite", "hmn": "hmong", "ho": "hiri motu", "hr": "horvát", "hsb": "felső szorb", "ht": "haiti", "hu": "magyar", "hup": "hupa", "hy": "örmény", "hz": "herero", "ia": "interlingva", "iba": "iban", "ibb": "ibibió", "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": "kambodzsai", "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": "kásmí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": "laoszi", "lol": "mongó", "loz": "lozi", "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": "málgas", "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": "marathi", "ms": "maláj", "mt": "máltai", "mua": "mundang", "mul": "többszörös nyelvek", "mus": "krík", "mwl": "mirandéz", "mwr": "marvari", "my": "burmai", "mye": "myene", "myv": "erzjány", "na": "naurui", "nap": "nápolyi", "naq": "nama", "nb": "norvég bokmal", "nd": "északi ndebele", "nds": "alsónémet", "ne": "nepáli", "new": "nevari", "ng": "ndonga", "nia": "nias", "niu": "niui", "nl": "holland", "nl_BE": "flamand", "nmg": "ngumba", "nn": "norvég nynorsk", "nnh": "ngiemboon", "no": "norvég", "nog": "nogaj", "non": "óskandináv", "nqo": "n’kó", "nr": "déli ndebele", "nso": "északi szotó", "nus": "nuer", "nv": "navahó", "nwc": "klasszikus newari", "ny": "nyanja", "nym": "nyamvézi", "nyn": "nyankole", "nyo": "nyoró", "nzi": "nzima", "oc": "okszitán", "oj": "ojibva", "om": "oromói", "or": "orija", "os": "oszét", "osa": "osage", "ota": "ottomán török", "pa": "pandzsábi", "pag": "pangaszinan", "pal": "pahlavi", "pam": "pampangan", "pap": "papiamentó", "pau": "palaui", "peo": "óperzsa", "phn": "főniciai", "pi": "pali", "pl": "lengyel", "pon": "pohnpei", "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éto-román", "rn": "kirundi", "ro": "román", "ro_MD": "moldvai", "rof": "rombo", "rom": "roma", "root": "ősi", "ru": "orosz", "rup": "aromán", "rw": "kiruanda", "rwk": "rwo", "sa": "szanszkrit", "sad": "szandave", "sah": "jakut", "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", "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": "lule számi", "smn": "inar sami", "sms": "koltta lapp", "sn": "sona", "snk": "szoninke", "so": "szomáliai", "sog": "sogdien", "sq": "albán", "sr": "szerb", "srn": "szranai tongó", "srr": "szerer", "ss": "sziszuati", "ssy": "szahó", "st": "szeszotó", "su": "szundanéz", "suk": "szukuma", "sus": "szuszu", "sux": "sumér", "sv": "svéd", "sw": "szuahéli", "swb": "comorei", "swc": "kongói szuahéli", "syc": "klasszikus szír", "syr": "szíriai", "ta": "tamil", "te": "telugu", "tem": "temne", "teo": "teszó", "ter": "terenó", "tet": "tetum", "tg": "tadzsik", "th": "thai", "ti": "tigrinja", "tig": "tigré", "tiv": "tiv", "tk": "türkmén", "tkl": "tokelaui", "tl": "tagalog", "tlh": "klingon", "tli": "tlingit", "tmh": "tamasek", "tn": "szecsuáni", "to": "tonga", "tog": "nyasa tonga", "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-marokkói 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ó", "wo": "volof", "xal": "kalmük", "xh": "hosza", "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" } } src/Symfony/Component/Intl/Resources/data/languages/hy.json000066400000000000000000000203501266465517700243500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "աբխազերեն", "af": "աֆրիկաանս", "agq": "աղեմ", "ak": "աքաներեն", "am": "ամհարերեն", "ar": "արաբերեն", "ar_001": "ժամանակակից ստանդարտ արաբերեն", "arn": "մապուչի", "as": "ասամերեն", "asa": "ասու", "az": "ադրբեջաներեն", "ba": "բաշկիրերեն", "be": "բելառուսերեն", "bem": "բեմբա", "bez": "բենա", "bg": "բուլղարերեն", "bm": "բամբարա", "bn": "բենգալերեն", "bo": "տիբեթերեն", "br": "բրետոներեն", "brx": "բոդո", "bs": "բոսնիերեն", "ca": "կատալաներեն", "cgg": "չիգա", "chr": "շերոկի", "ckb": "սորանի (քրդերեն)", "co": "կորսիկերեն", "cs": "չեխերեն", "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": "լաոսերեն", "lt": "լիտվերեն", "lu": "լուբա-կատանգա", "luo": "լուո", "luy": "լույա", "lv": "լատվիերեն", "mas": "մասաի", "mer": "մերու", "mfe": "մորիսյեն", "mg": "մալագասերեն", "mgh": "մաքուա-մետտո", "mgo": "մետա", "mi": "մաորի", "mk": "մակեդոներեն", "ml": "մալայալամ", "mn": "մոնղոլերեն", "moh": "մոհավք", "mr": "մարաթի", "ms": "մալայերեն", "mt": "մալթերեն", "mua": "մունդանգ", "my": "բիրմայերեն", "naq": "նամա", "nb": "նորվեգերեն բուկմոլ", "nd": "հյուսիսային նդեբելե", "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": "սուահիլի", "swc": "կոնգոյի սուահիլի", "ta": "թամիլերեն", "te": "թելուգու", "teo": "տեսո", "tg": "տաջիկերեն", "th": "թայերեն", "ti": "թիգրինիա", "tk": "թուրքմեներեն", "to": "տոնգա", "tr": "թուրքերեն", "tt": "թաթարերեն", "twq": "տասավաք", "tzm": "կենտրոնատլասյան թամազիխտ", "ug": "ույղուրերեն", "uk": "ուկրաիներեն", "und": "անհայտ լեզու", "ur": "ուրդու", "uz": "ուզբեկերեն", "vai": "վաի", "vi": "վիետնամերեն", "vun": "վունջո", "wo": "վոլոֆ", "xh": "քսոզա", "xog": "սոգա", "yo": "յորուբա", "zgh": "ստանդարտ մարոկական թամազիղտ", "zh": "չինարեն", "zh_Hans": "պարզեցված չինարեն", "zh_Hant": "ավանդական չինարեն", "zu": "զուլուսերեն", "zxx": "առանց լեզվային բովանդակության" } } src/Symfony/Component/Intl/Resources/data/languages/id.json000066400000000000000000000337601266465517700243350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Araukan", "arp": "Arapaho", "arq": "Arab Algeria", "arw": "Arawak", "ary": "Arab Maroko", "arz": "Arab Mesir", "as": "Assam", "asa": "Asu", "ase": "Bahasa Isyarat Amerika", "ast": "Astur", "av": "Avar", "awa": "Awadhi", "ay": "Aymara", "az": "Azerbaijan", "azb": "Azerbaijani Selatan", "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": "Bulgar", "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": "Sebuano", "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", "cs": "Cheska", "csb": "Kashubia", "cu": "Bahasa Gereja Slavonia", "cv": "Chuvash", "cy": "Welsh", "da": "Dansk", "dak": "Dakota", "dar": "Dargwa", "dav": "Taita", "de": "Jerman", "de_AT": "Jerman Austria", "de_CH": "Jerman Tinggi Swiss", "del": "Delaware", "den": "Slave", "dgr": "Dogrib", "din": "Dinka", "dje": "Zarma", "doi": "Dogri", "dsb": "Sorbia Rendah", "dua": "Duala", "dum": "Belanda Tengah", "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_AU": "Inggris Australia", "en_CA": "Inggris Kanada", "en_GB": "Inggris Inggris", "en_US": "Inggris Amerika", "enm": "Inggris Abad Pertengahan", "eo": "Esperanto", "es": "Spanyol", "es_419": "Spanyol Amerika Latin", "es_ES": "Spanyol Eropa", "es_MX": "Spanyol Meksiko", "et": "Esti", "eu": "Bask", "ewo": "Ewondo", "fa": "Persia", "fan": "Fang", "fat": "Fanti", "ff": "Fula", "fi": "Suomi", "fil": "Filipino", "fj": "Fiji", "fo": "Faro", "fon": "Fon", "fr": "Prancis", "fr_CA": "Prancis Kanada", "fr_CH": "Prancis Swiss", "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": "Gothik", "grb": "Grebo", "grc": "Yunani Kuno", "gsw": "Jerman Swiss", "gu": "Gujarati", "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": "Haiti", "hu": "Hungaria", "hup": "Hupa", "hy": "Armenia", "hz": "Herero", "ia": "Interlingua", "iba": "Iban", "ibb": "Ibibio", "id": "Bahasa 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", "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", "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", "nl_BE": "Flemish", "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", "pdc": "Jerman Pennsylvania", "peo": "Persia Kuno", "phn": "Funisia", "pi": "Pali", "pl": "Polski", "pon": "Pohnpeia", "pro": "Provencal Lama", "ps": "Pashto", "pt": "Portugis", "pt_BR": "Portugis Brasil", "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": "Makedo-Rumania", "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", "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 Bawah", "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", "swb": "Komoria", "swc": "Kongo Swahili", "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", "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": "China", "zh_Hans": "China (Aksara Sederhana)", "zh_Hant": "China (Aksara Tradisional)", "zu": "Zulu", "zun": "Zuni", "zxx": "Tidak ada konten linguistik", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/ig.json000066400000000000000000000022411266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ii.json000066400000000000000000000007371266465517700243400ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "de": "ꄓꇩꉙ", "en": "ꑱꇩꉙ", "es": "ꑭꀠꑸꉙ", "fr": "ꃔꇩꉙ", "ii": "ꆈꌠꉙ", "it": "ꑴꄊꆺꉙ", "ja": "ꏝꀪꉙ", "pt": "ꁍꄨꑸꉙ", "pt_BR": "ꀠꑟꁍꄨꑸꉙ", "ru": "ꊉꇩꉙ", "und": "ꅉꀋꌠꅇꂷ", "zh": "ꍏꇩꉙ", "zh_Hans": "ꈝꐯꍏꇩꉙ", "zh_Hant": "ꀎꋏꍏꇩꉙ" } } src/Symfony/Component/Intl/Resources/data/languages/in.json000066400000000000000000000337601266465517700243470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Araukan", "arp": "Arapaho", "arq": "Arab Algeria", "arw": "Arawak", "ary": "Arab Maroko", "arz": "Arab Mesir", "as": "Assam", "asa": "Asu", "ase": "Bahasa Isyarat Amerika", "ast": "Astur", "av": "Avar", "awa": "Awadhi", "ay": "Aymara", "az": "Azerbaijan", "azb": "Azerbaijani Selatan", "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": "Bulgar", "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": "Sebuano", "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", "cs": "Cheska", "csb": "Kashubia", "cu": "Bahasa Gereja Slavonia", "cv": "Chuvash", "cy": "Welsh", "da": "Dansk", "dak": "Dakota", "dar": "Dargwa", "dav": "Taita", "de": "Jerman", "de_AT": "Jerman Austria", "de_CH": "Jerman Tinggi Swiss", "del": "Delaware", "den": "Slave", "dgr": "Dogrib", "din": "Dinka", "dje": "Zarma", "doi": "Dogri", "dsb": "Sorbia Rendah", "dua": "Duala", "dum": "Belanda Tengah", "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_AU": "Inggris Australia", "en_CA": "Inggris Kanada", "en_GB": "Inggris Inggris", "en_US": "Inggris Amerika", "enm": "Inggris Abad Pertengahan", "eo": "Esperanto", "es": "Spanyol", "es_419": "Spanyol Amerika Latin", "es_ES": "Spanyol Eropa", "es_MX": "Spanyol Meksiko", "et": "Esti", "eu": "Bask", "ewo": "Ewondo", "fa": "Persia", "fan": "Fang", "fat": "Fanti", "ff": "Fula", "fi": "Suomi", "fil": "Filipino", "fj": "Fiji", "fo": "Faro", "fon": "Fon", "fr": "Prancis", "fr_CA": "Prancis Kanada", "fr_CH": "Prancis Swiss", "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": "Gothik", "grb": "Grebo", "grc": "Yunani Kuno", "gsw": "Jerman Swiss", "gu": "Gujarati", "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": "Haiti", "hu": "Hungaria", "hup": "Hupa", "hy": "Armenia", "hz": "Herero", "ia": "Interlingua", "iba": "Iban", "ibb": "Ibibio", "id": "Bahasa 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", "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", "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", "nl_BE": "Flemish", "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", "pdc": "Jerman Pennsylvania", "peo": "Persia Kuno", "phn": "Funisia", "pi": "Pali", "pl": "Polski", "pon": "Pohnpeia", "pro": "Provencal Lama", "ps": "Pashto", "pt": "Portugis", "pt_BR": "Portugis Brasil", "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": "Makedo-Rumania", "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", "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 Bawah", "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", "swb": "Komoria", "swc": "Kongo Swahili", "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", "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": "China", "zh_Hans": "China (Aksara Sederhana)", "zh_Hant": "China (Aksara Tradisional)", "zu": "Zulu", "zun": "Zuni", "zxx": "Tidak ada konten linguistik", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/is.json000066400000000000000000000315531266465517700243520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "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", "ak": "akan", "akk": "akkadíska", "ale": "aleúska", "am": "amharíska", "an": "aragonska", "ang": "fornenska", "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", "be": "hvítrússneska", "bej": "beja", "bem": "bemba", "bez": "bena", "bg": "búlgarska", "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", "bua": "búríat", "bug": "búgíska", "byn": "blín", "ca": "katalónska", "cad": "kaddó", "car": "karíbamál", "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", "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", "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ómanskamerí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", "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", "kam": "kamba", "kaw": "kaví", "kbd": "kabardíska", "kde": "makonde", "kea": "grænhöfðeyska", "kg": "kongóska", "kha": "kasí", "kho": "kotaska", "khq": "koyra chiini", "ki": "kíkújú", "kj": "kúanjama", "kk": "kasakska", "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", "kru": "kúrúk", "ks": "kasmírska", "ksb": "sjambala", "ksf": "bafía", "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", "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", "mwr": "marvarí", "my": "burmneska", "myv": "ersja", "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", "ne": "nepalska", "new": "nevarí", "ng": "ndonga", "nia": "nías", "niu": "níveska", "nl": "hollenska", "nl_BE": "flæmska", "nmg": "kwasio", "nn": "nýnorska", "no": "norska", "nog": "nógaí", "non": "norræna", "nqo": "n’ko", "nr": "suðurndebele", "nso": "norðursótó", "nus": "núer", "nv": "navahó", "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", "peo": "fornpersneska", "phn": "fönikíska", "pi": "palí", "pl": "pólska", "pon": "ponpeiska", "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", "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í", "sbp": "sangú", "sc": "sardínska", "scn": "sikileyska", "sco": "skoska", "sd": "sindí", "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", "srr": "serer", "ss": "svatí", "st": "suðursótó", "su": "súndanska", "suk": "súkúma", "sus": "súsú", "sux": "súmerska", "sv": "sænska", "sw": "svahílí", "swc": "Kongó-svahílí", "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", "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", "vot": "votíska", "vun": "vunjó", "wa": "vallónska", "wal": "valamó", "war": "varaí", "was": "vasjó", "wo": "volof", "xal": "kalmúkska", "xh": "sósa", "xog": "sóga", "yao": "jaó", "yap": "japíska", "yi": "jiddíska", "yo": "jórúba", "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" } } src/Symfony/Component/Intl/Resources/data/languages/it.json000066400000000000000000000376601266465517700243600ustar00rootroot00000000000000{ "Version": "2.1.8.32", "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": "araucano", "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", "azb": "azero meridionale", "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", "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", "cs": "ceco", "csb": "kashubian", "cu": "slavo della Chiesa", "cv": "chuvash", "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": "gerbo", "grc": "greco antico", "gsw": "tedesco svizzero", "gu": "gujarati", "guc": "wayuu", "guz": "gusii", "gv": "manx", "gwi": "gwichʼin", "ha": "hausa", "hai": "haida", "hak": "hakka", "haw": "hawaiano", "he": "ebraico", "hi": "hindi", "hif": "hindi figiano", "hil": "hiligayna", "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": "kabardia", "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": "kalaallisut", "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": "lezghian", "lfn": "Lingua Franca Nova", "lg": "ganda", "li": "limburgese", "lij": "ligure", "liv": "livone", "lkt": "lakota", "lmo": "lombardo", "ln": "lingala", "lo": "lao", "lol": "lolo bantu", "loz": "lozi", "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", "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", "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", "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": "chadian arabic", "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", "swb": "comoriano", "swc": "congo swahili", "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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/iw.json000066400000000000000000000406651266465517700243620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "בולגרית", "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": "גא", "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": "לוזי", "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": "הולנדית", "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": "פלוואן", "peo": "פרסית עתיקה", "phn": "פניקית", "pi": "פאלי", "pl": "פולנית", "pon": "פונפיאן", "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": "סינדהית", "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": "סווהילית", "swc": "סווהילי קונגולטזית", "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": "זאזא" } } src/Symfony/Component/Intl/Resources/data/languages/ja.json000066400000000000000000000514361266465517700243330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "アゼルバイジャン語", "azb": "南アゼルバイジャン語", "ba": "バシキール語", "bal": "バルーチー語", "ban": "バリ語", "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_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": "ロジ語", "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": "古ノルド語", "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_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": "ザザ語" } } src/Symfony/Component/Intl/Resources/data/languages/ka.json000066400000000000000000000413141266465517700243260ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "ასტურიული", "awa": "ავადი", "ay": "აიმარა", "az": "აზერბაიჯანული", "ba": "ბაშკირული", "bal": "ბელუჯი", "ban": "ბალინური", "bas": "ბასა", "bax": "ბამუნი", "be": "ბელორუსული", "bej": "ბეჯა", "bem": "ბემბა", "bez": "ბენა", "bg": "ბულგარული", "bho": "ბოჯპური", "bm": "ბამბარა", "bn": "ბენგალური", "bo": "ტიბეტური", "br": "ბრეტონული", "bra": "ბრაჯი", "brx": "ბოდო", "bs": "ბოსნიური", "bua": "ბურიატული", "byn": "ბილინი", "ca": "კატალანური", "cay": "კაიუგა", "ce": "ჩეჩნური", "cgg": "ჩიგა", "chb": "ჩიბჩა", "chm": "მარიული", "chr": "ჩეროკი", "ckb": "სორანი ქურთული", "co": "კორსიკული", "cop": "კოპტური", "cr": "კრი", "crh": "ყირიმულ-თურქული", "cs": "ჩეხური", "csb": "კაშუბური", "cu": "საეკლესიო სლავური", "cv": "ჩუვაშური", "cy": "უელსური", "da": "დანიური", "dak": "დაკოტა", "dar": "დარგუული", "dav": "ტაიტა", "de": "გერმანული", "de_AT": "ავსტრიული გერმანული", "de_CH": "შვეიცარიული ზემოგერმანული", "del": "დელავარული", "dgr": "დოგრიბი", "din": "დინკა", "dje": "ზარმა", "doi": "დოგრი", "dsb": "ქვემოსორბული", "dua": "დუალა", "dv": "დივეჰი", "dyo": "დიოლა", "dyu": "დიულა", "dz": "ძონგკხა", "ebu": "ემბუ", "ee": "ევე", "efi": "ეფიკი", "egy": "ძველეგვიპტური", "el": "ბერძნული", "en": "ინგლისური", "en_AU": "ავსტრალიური ინგლისური", "en_CA": "კანადური ინგლისური", "en_GB": "ბრიტანული ინგლისური", "en_US": "ამერიკული ინგლისური", "eo": "ესპერანტო", "es": "ესპანური", "es_419": "ლათინურ ამერიკული ესპანური", "es_ES": "ევროპული ესპანური", "es_MX": "მექსიკური ესპანური", "et": "ესტონური", "eu": "ბასკური", "ewo": "ევონდო", "fa": "სპარსული", "fi": "ფინური", "fil": "ფილიპინური", "fj": "ფიჯი", "fo": "ფარერული", "fon": "ფონი", "fr": "ფრანგული", "fr_CA": "კანადური ფრანგული", "fr_CH": "შვეიცარიული ფრანგული", "fro": "ძველი ფრანგული", "frr": "ჩრდილოფრიზიული", "frs": "აღმოსავლეთფრიზიული", "fur": "ფრიულური", "fy": "დასავლეთფრიზიული", "ga": "ირლანდიური", "gag": "გაგაუზური", "gba": "გბაია", "gd": "შოტლანდიური გელური", "gez": "გეეზი", "gl": "გალისიური", "gn": "გუარანი", "goh": "ძველი ზემოგერმანული", "gon": "გონდი", "got": "გოთური", "grc": "ძველი ბერძნული", "gsw": "შვეიცარიული გერმანული", "gu": "გუჯარათი", "guz": "გუსიი", "gv": "მენური", "ha": "ჰაუსა", "haw": "ჰავაიური", "he": "ებრაული", "hi": "ჰინდი", "hit": "ხეთური ენა", "hr": "ხორვატული", "hsb": "ზემოსორბული", "ht": "ჰაიტიური", "hu": "უნგრული", "hy": "სომხური", "ia": "ინტერლინგუალური", "iba": "იბანი", "ibb": "იბიბიო", "id": "ინდონეზიური", "ie": "ინტერლინგი", "ig": "იგბო", "ii": "სიჩუანის ი", "inh": "ინგუშური", "io": "იდო", "is": "ისლანდიური", "it": "იტალიური", "iu": "ინუკტიტუტი", "ja": "იაპონური", "jbo": "ლოჟბანი", "jgo": "ნგომბა", "jmc": "კიმაშამი", "jpr": "იუდეო-სპარსული", "jrb": "იუდეო-არაბული", "jv": "იავური", "ka": "ქართული", "kaa": "ყარაყალფახური", "kab": "კაბილური", "kac": "კაჩინი", "kam": "კამბა", "kbd": "ყაბარდოული", "kde": "მაკონდე", "kea": "კაბუვერდიანუ", "kg": "კონგო", "khq": "კოირა-ჩიინი", "ki": "კიკუიუ", "kk": "ყაზახური", "kl": "დასავლეთ გრენლანდიური", "kln": "კალენჯინი", "km": "ქმერული", "kmb": "კიმბუნდუ", "kn": "კანადა", "ko": "კორეული", "koi": "კომი-პერმიაკული", "kok": "კონკანი", "kpe": "კპელე", "kr": "კანური", "krc": "ყარაჩაულ-ბალყარული", "krl": "კარელიური", "kru": "კურუქი", "ks": "ქაშმირული", "ksb": "შამბალა", "ksf": "ბაფია", "ku": "ქურთული", "kum": "ყუმუხური", "kut": "კუტენაი", "kv": "კომი", "kw": "კორნული", "ky": "ყირგიზული", "la": "ლათინური", "lad": "ლადინო", "lag": "ლანგი", "lah": "ლანდა", "lam": "ლამბა", "lb": "ლუქსემბურგული", "lez": "ლეზგიური", "lg": "განდა", "li": "ლიმბურგული", "lkt": "ლაკოტა", "ln": "ლინგალა", "lo": "ლაოსური", "lol": "მონგო", "loz": "ლოზი", "lt": "ლიტვური", "lu": "ლუბა-კატანგა", "lui": "ლუისენიო", "lun": "ლუნდა", "luo": "ლუო", "lus": "მიზო", "luy": "ლუჰია", "lv": "ლატვიური", "maf": "მაფა", "mag": "მაგაჰი", "mai": "მაითილი", "mas": "მასაი", "mde": "მაბა", "mdf": "მოქშა", "men": "მენდე", "mer": "მერუ", "mfe": "მორისიენი", "mg": "მალაგასიური", "mgh": "მაქუვა-მეეტო", "mgo": "მეტა’ ენა", "mi": "მაორი", "mk": "მაკედონური", "ml": "მალაიალამური", "mn": "მონღოლური", "mnc": "მანჯურიული", "mni": "მანიპური", "moh": "მოჰაუკური", "mr": "მარათჰი", "ms": "მალაიური", "mt": "მალტური", "mua": "მუნდანგი", "mus": "კრიკი", "mwl": "მირანდული", "mwr": "მარვარი", "my": "ბირმული", "mye": "მიენე", "myv": "ერზია", "na": "ნაურუ", "nap": "ნეაპოლიტანური", "naq": "ნამა", "nb": "ნორვეგიული ბუკმოლი", "nd": "ჩრდილოეთ ნდებელე", "ne": "ნეპალური", "new": "ნევარი", "nl": "ნიდერლანდური", "nl_BE": "ფლამანდიური", "nmg": "კვასიო", "nn": "ნორვეგიული ნიუნორსკი", "no": "ნორვეგიული", "nog": "ნოღაური", "non": "ძველსკანდინავიური", "nqo": "ნკო", "nus": "ნუერი", "nv": "ნავახო", "nwc": "კლასიკური ნევარული", "ny": "ნიანჯა", "nym": "ნიამვეზი", "nyn": "ნიანკოლე", "nyo": "ნიორო", "nzi": "ნზიმა", "oc": "ოქსიტანური", "oj": "ოჯიბვე", "om": "ორომო", "or": "ორია", "os": "ოსური", "pa": "პენჯაბური", "pal": "ფალაური", "peo": "ძველი სპარსული", "phn": "ფინიკიური", "pi": "პალი", "pl": "პოლონური", "pro": "ძველი პროვანსული", "ps": "პუშტუ", "pt": "პორტუგალიური", "pt_BR": "ბრაზილიური პორტუგალიური", "pt_PT": "ევროპული პორტუგალიური", "qu": "კეჩუა", "quc": "კიჩე", "raj": "რაჯასთანი", "rap": "რაპანუი", "rar": "რაროტონგული", "rm": "რეტორომანული", "rn": "რუნდი", "ro": "რუმინული", "ro_MD": "მოლდავური", "rof": "რომბო", "rom": "ბოშური", "ru": "რუსული", "rw": "კინიარუანდა", "rwk": "რუა", "sa": "სანსკრიტი", "sah": "იაკუტური", "sam": "სამარიულ-არამეული", "saq": "სამბურუ", "sbp": "სანგუ", "sc": "სარდინიული", "scn": "სიცილიური", "sd": "სინდჰური", "se": "ჩრდილოეთ საამური", "see": "სენეკა", "seh": "სენა", "sel": "სელკუპური", "ses": "კოირაბორო-სენი", "sg": "სანგო", "sga": "ძველი ირლანდიური", "sh": "სერბულ-ხორვატული", "shi": "შილჰა", "shn": "შანი", "shu": "ჩადური არაბული", "si": "სინჰალური", "sk": "სლოვაკური", "sl": "სლოვენური", "sm": "სამოა", "sma": "სამხრეთ საამური", "smj": "ლულე-საამური", "smn": "ინარი-საამური", "sms": "სკოლტ-საამური", "sn": "შონა", "so": "სომალიური", "sq": "ალბანური", "sr": "სერბული", "st": "სამხრეთ სოთოს ენა", "su": "სუნდური", "sux": "შუმერული", "sv": "შვედური", "sw": "სუაჰილი", "swb": "კომორული", "swc": "კონგოს სუაჰილი", "syc": "კლასიკური სირიული", "syr": "სირიული", "ta": "ტამილური", "te": "ტელუგუ", "teo": "ტესო", "tg": "ტაჯიკური", "th": "ტაი", "ti": "თიგრინია", "tig": "თიგრე", "tk": "თურქმენული", "tlh": "კლინგონი", "tn": "ტსვანა", "to": "ტონგანური", "tr": "თურქული", "tt": "თათრული", "tw": "თუი", "twq": "ტასავაქი", "tyv": "ტუვა", "tzm": "ცენტრალური მოროკოს ტამაზიგხტი", "udm": "უდმურტული", "ug": "უიღურული", "uga": "უგარითული", "uk": "უკრაინული", "und": "უცნობი ენა", "ur": "ურდუ", "uz": "უზბეკური", "vai": "ვაი", "vi": "ვიეტნამური", "vun": "ვუნჯო", "wal": "ველაითა", "wo": "ვოლოფური", "xal": "ყალმუხური", "xh": "ქჰოსა", "xog": "სოგა", "yi": "იდიში", "yo": "იორუბა", "yue": "კანტონური", "zbl": "ბლისსიმბოლოები", "zen": "ზენაგა", "zgh": "სტანდარტული მაროკოული ტამაზიგხტი", "zh": "ჩინური", "zh_Hans": "გამარტივებული ჩინური", "zh_Hant": "ტრადიციული ჩინური", "zu": "ზულუ", "zxx": "ლინგვისტური შიგთავსი არ არის", "zza": "ზაზაკი" } } src/Symfony/Component/Intl/Resources/data/languages/ki.json000066400000000000000000000023331266465517700243340ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/kk.json000066400000000000000000000177271266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "абхаз тілі", "af": "африкаанс", "agq": "агхем", "ak": "акан", "am": "амхар", "ar": "араб тілі", "ar_001": "қазіргі стандартты араб тілі", "arn": "мапуче", "as": "ассам тілі", "asa": "асу", "az": "әзірбайжан тілі", "ba": "башқұрт тілі", "be": "беларус тілі", "bem": "бемба", "bez": "бена", "bg": "болгар тілі", "bm": "бамбара", "bn": "бенгал тілі", "bo": "тибет тілі", "br": "бретон тілі", "brx": "бодо тілі", "bs": "босния тілі", "ca": "каталан", "cgg": "кига", "chr": "чероки тілі", "ckb": "сорани тілі", "co": "корсикан тілі", "cs": "чех тілі", "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": "лаос тілі", "lt": "литва тілі", "lu": "луба-катанга", "luo": "луо", "luy": "лухиа", "lv": "латыш тілі", "mas": "масай", "mer": "меру", "mfe": "морисиен", "mg": "малагаси", "mgh": "макуа-меетто", "mgo": "мета", "mi": "маори", "mk": "македон тілі", "ml": "малайялам", "mn": "моңғол тілі", "moh": "мохоки", "mr": "маратхи", "ms": "малай", "mt": "мальта", "mua": "мунданг", "my": "бирман", "naq": "нама", "nb": "норвегиялық букмол", "nd": "солтүстік ндебел", "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": "суахили", "swc": "конго суахили тілі", "ta": "тамил", "te": "телугу", "teo": "тесо", "tg": "тәжік тілі", "th": "тай", "ti": "тигринья", "tk": "түрікмен", "to": "тонган", "tr": "түрік", "tt": "татар тілі", "twq": "тасавак", "tzm": "орталық атлас тамасагихт тілі", "ug": "ұйғыр тілі", "uk": "украин тілі", "und": "белгісіз тіл", "ur": "урду", "uz": "өзбек", "vai": "вай", "vi": "вьетнам", "vun": "вунджо", "wo": "волоф", "xh": "ксоза", "xog": "сога", "yo": "йоруба", "zgh": "марокколық стандартты тамазигхт", "zh": "қытай тілі", "zh_Hans": "жеңілдетілген қытай тілі", "zh_Hant": "дәстүрлі қытай тілі", "zu": "зулу", "zxx": "тілдік мазмұны жоқ" } } src/Symfony/Component/Intl/Resources/data/languages/kl.json000066400000000000000000000001201266465517700243270ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "kl": "kalaallisut" } } src/Symfony/Component/Intl/Resources/data/languages/km.json000066400000000000000000000212261266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "ភាសាអាហ្វារ", "ab": "អាប់ខាហ៊្សាន", "ae": "ភាសាអាវែស្តង់", "af": "អាហ្វ្រីកាអាន", "agq": "Aghem", "ak": "Akan", "am": "អាមហារីច", "an": "ភាសាអារ៉ាហ្គោន", "ar": "អារ៉ាប់", "ar_001": "អារ៉ាប់​ស្តង់ដារ​ទំនើប", "arn": "Mapuche", "as": "អាសាមីស", "asa": "Asu", "ay": "ភាសាអីម៉ារ៉ា", "az": "អាហ៊្សែរបែហ្សង់", "ba": "បែស្កឺ", "be": "បេឡារុស្ស", "bem": "Bemba", "bez": "Bena", "bg": "ប៊ុលហ្ការី", "bm": "បាម្បារា", "bn": "បង់ក្លាដែស", "bo": "ទីបេ", "br": "ប្រីស្តុន", "brx": "Bodo", "bs": "បូស្នី", "ca": "កាតាឡាន", "cgg": "Chiga", "chr": "ឆេរូគី", "ckb": "សុរ៉ានី", "co": "Corsican", "cs": "ឆេក", "cy": "វេល", "da": "ដាណឺម៉ាក", "dav": "Taita", "de": "អាល្លឺម៉ង់", "de_AT": "អាល្លឺម៉ង់ អូទ្រីស", "de_CH": "អាល្លឺម៉ង់ ស្វីស", "dje": "Zarma", "dsb": "Lower Sorbian", "dua": "Duala", "dyo": "Jola-Fonyi", "dz": "ភាសាប៊ូតាន", "ebu": "Embu", "ee": "Ewe", "el": "ក្រិច", "en": "អង់គ្លេស", "en_AU": "អង់គ្លេស អូស្ត្រាលី", "en_CA": "អង់គ្លេស កាណាដា", "en_GB": "អង់គ្លេស ចក្រភព​អង់គ្លេស", "en_US": "អង់គ្លេស អាមេរិក", "eo": "អេស្ពេរ៉ាន់តូ", "es": "អេស្ប៉ាញ", "es_419": "អេស្ប៉ាញ អាមេរីកឡាតាំង", "es_ES": "អេស្ប៉ាញ អឺរ៉ុប", "et": "អេស្តូនី", "eu": "បាស្កេ", "fa": "ភឺសៀន", "fi": "ហ្វាំងឡង់", "fil": "ហ្វីលីពីន", "fj": "ហ៊្វីជី", "fo": "ហ្វារូស", "fr": "បារាំង", "fy": "ហ្វ្រីស៊ានខាងលិច", "ga": "អៀរឡង់", "gag": "Gagauz", "gd": "ភាសាហ្កែលិគ (gd)", "gl": "ហ្គាលីស្យាន", "gn": "ហ្គូរ៉ានី", "gsw": "អាល្លឺម៉ង ស្វីស", "gu": "ហ្កុយ៉ារាទី", "guz": "Gusii", "gv": "Manx", "ha": "ហូសា", "haw": "ហាវៃ", "he": "អ៊ីស្រាអែល", "hi": "ហិណ្ឌូ", "hr": "ក្រូអាត", "hsb": "Upper Sorbian", "ht": "ហៃទី", "hu": "ហុងគ្រី", "hy": "អារមេនី", "id": "ឥណ្ឌូណេស៊ី", "ig": "អ៊ីកបូ", "ii": "Sichuan Yi", "is": "អ៊ីស្លង់", "it": "អ៊ីតាលី", "iu": "Inuktitut", "ja": "ជប៉ុន", "jgo": "Ngomba", "jmc": "Machame", "jv": "ជ្វា", "ka": "ហ្សក​ហ្ស៊ី", "kab": "Kabyle", "kam": "Kamba", "kde": "Makonde", "kea": "Kabuverdianu", "khq": "Koyra Chiini", "ki": "Kikuyu", "kk": "កាហ្សាក់ស្តង់់", "kl": "Kalaallisut", "kln": "Kalenjin", "km": "ខ្មែរ", "kn": "កន្នដ", "ko": "កូរ៉េ", "koi": "Komi-Permyak", "kok": "Konkani", "ks": "កាស្មៀរ", "ksb": "Shambala", "ksf": "Bafia", "ku": "ឃឺដ", "kw": "Cornish", "ky": "គៀរហ្គីស្តង់", "la": "ឡាតំាង", "lag": "Langi", "lb": "លុចហ្សំបួរ", "lg": "Ganda", "lkt": "Lakota", "ln": "លីនកាឡា", "lo": "ឡាវ", "lt": "លីទុយអានី", "lu": "Luba-Katanga", "luo": "Luo", "luy": "Luyia", "lv": "ឡាតវីយ៉ា", "mas": "Masai", "mer": "Meru", "mfe": "Morisyen", "mg": "ម៉ាឡាហ្គាស៊ី", "mgh": "Makhuwa-Meetto", "mgo": "Meta", "mi": "ម៉ោរី", "mk": "ម៉ាសេដូនី", "ml": "មលយាល័ម", "mn": "ម៉ុងហ្គោលី", "moh": "Mohawk", "mr": "មរាធិ", "ms": "ម៉ាឡេស៊ី", "mt": "ម៉ាល់តា", "mua": "Mundang", "my": "ភូមា", "naq": "Nama", "nb": "ន័រវែស បុកម៉ាល់", "nd": "North Ndebele", "ne": "នេប៉ាល់", "nl": "ហុល្លង់", "nl_BE": "ផ្លាមីស", "nmg": "Kwasio", "nn": "ន័រវែស នីនូស", "no": "ភាសាន័រវែស", "nqo": "N’Ko", "nus": "Nuer", "nyn": "Nyankole", "om": "Oromo", "or": "អូរីយ៉ា", "pa": "បឹនជាពិ", "pl": "ប៉ូឡូញ", "ps": "បាស្តូ", "pt": "ព័រទុយហ្កាល់", "pt_BR": "ព័រទុយហ្គាល់ ប្រេស៊ីល", "pt_PT": "ព័រទុយហ្គាល់ អឺរ៉ុប", "qu": "កេទជួអា", "quc": "Kʼicheʼ", "rm": "រ៉ូម៉ង់", "rn": "រូន្ឌី", "ro": "រូម៉ានី", "ro_MD": "ភាសាម៉ុលដាវី", "rof": "Rombo", "ru": "រុស្ស៊ី", "rw": "Kinyarwanda", "rwk": "Rwa", "sa": "សំស្ក្រឹត", "saq": "Samburu", "sbp": "Sangu", "sd": "​​ស៊ីន្តី", "se": "Sami ភាគ​ខាង​ជើង", "seh": "Sena", "ses": "Koyraboro Senni", "sg": "Sango", "shi": "Tachelhit", "si": "ស្រីលង្កា", "sk": "ស្លូវ៉ាគី", "sl": "ស្លូវ៉ានី", "sm": "ភាសាសាមូអា", "sma": "Sami ភាគ​ខាង​ត្បូង", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Shona", "so": "សូម៉ាលី", "sq": "អាល់បានី", "sr": "សើប", "su": "ស៊ូដង់", "sv": "ស៊ុយអែដ", "sw": "ស្វាហ៊ីលី", "swc": "Congo Swahili", "ta": "តាមីល", "te": "តេលុគុ", "teo": "Teso", "tg": "តាដហ្សីគីស្តង់", "th": "ថៃ", "ti": "ទីរិនយា", "tk": "ទួគមេនីស្តង់", "to": "តុងហ្គោ", "tr": "ទួរគី", "tt": "តាតារ", "twq": "Tasawaq", "tzm": "Atlas Tamazight កណ្ដាល", "ug": "អ៊ុយហ្គឺរ", "uk": "អ៊ុយក្រែន", "und": "មិន​ស្គាល់​ភាសា", "ur": "អ៊ូរឌូ", "uz": "អ៊ូហ្សបេគីស្តង់", "vai": "Vai", "vi": "វៀតណាម", "vun": "Vunjo", "wo": "វូឡុហ្វ", "xh": "ឃសា", "xog": "Soga", "yi": "ភាសាយីឌីហ្ស", "yo": "យរូបា", "za": "ភាសាចួង", "zgh": "ម៉ារ៉ុក", "zh": "ចិន", "zh_Hans": "ចិន​អក្សរ​កាត់", "zh_Hant": "ចិន​អក្សរ​ពេញ", "zu": "សូលូ", "zxx": "គ្មាន​ទិន្នន័យ​ភាសា" } } src/Symfony/Component/Intl/Resources/data/languages/kn.json000066400000000000000000000506201266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ಬಲ್ಗೇರಿಯನ್", "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": "ಕ್ರಿಮೀಯನ್ ಟರ್ಕಿಷ್", "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": "ಜೋಂಗ್‌ಖಾ", "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": "ಇಬಾನ್", "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": "ಕಝಕ್", "kl": "ಕಲಾಲ್ಲಿಸುಟ್", "kln": "ಕಲೆಂಜಿನ್", "km": "ಖಮೇರ್", "kmb": "ಕಿಂಬುಂಡು", "kn": "ಕನ್ನಡ", "ko": "ಕೊರಿಯನ್", "koi": "ಕೊಮಿ-ಪರ್ಮ್ಯಕ್", "kok": "ಕೊಂಕಣಿ", "kos": "ಕೊಸರಿಯನ್", "kpe": "ಕಪೆಲ್ಲೆ", "kr": "ಕನುರಿ", "krc": "ಕರಚಯ್-ಬಲ್ಕಾರ್", "krl": "ಕರೇಲಿಯನ್", "kru": "ಕುರುಖ್", "ks": "ಕಾಶ್ಮೀರಿ", "ksb": "ಶಂಬಲ", "ksf": "ಬಫಿಯ", "ku": "ಕುರ್ದಿಷ್", "kum": "ಕುಮೈಕ್", "kut": "ಕುಟೇನಾಯ್", "kv": "ಕೋಮಿ", "kw": "ಕೋರ್ನಿಷ್", "ky": "ಕಿರ್ಗಿಜ್", "la": "ಲ್ಯಾಟಿನ್", "lad": "ಕಾಡಿನೋ", "lag": "ಲಾಂಗಿ", "lah": "ಲಹಂಡಾ", "lam": "ಲಂಬಾ", "lb": "ಲಕ್ಸಂಬರ್ಗ್", "lez": "ಲೆಜ್ಘಿಯನ್", "lg": "ಗಾಂಡಾ", "li": "ಲಿಂಬರ್ಗಿಶ್", "lkt": "ಲಕೊಟ", "ln": "ಲಿಂಗಾಲ", "lo": "ಲಾವೋ", "lol": "ಮೊಂಗೋ", "loz": "ಲೋಝಿ", "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": "ಎರ್‌ಝ್ಯಾ", "na": "ನೌರು", "nap": "ನಿಯಾಪೊಲಿಟನ್", "naq": "ನಮ", "nb": "ನಾರ್ವೆಜಿಯನ್ ಬೊಕ್ಮಲ್", "nd": "ಉತ್ತರ ದೆಬೆಲೆ", "nds": "ಲೋ ಜರ್ಮನ್", "ne": "ನೇಪಾಳಿ", "new": "ನೇವಾರೀ", "ng": "ಡೋಂಗಾ", "nia": "ನಿಯಾಸ್", "niu": "ನಿಯುವನ್", "nl": "ಡಚ್", "nl_BE": "ಫ್ಲೆಮಿಷ್", "nmg": "ಖ್ವಾಸಿಯೊ", "nn": "ನಾರ್ವೆಜಿಯನ್ ನೈನೊಸ್ಕ್", "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": "ಕ್ವೆಚುವಾ", "quc": "ಕಿಷೆ", "raj": "ರಾಜಾಸ್ಥಾನಿ", "rap": "ರಾಪಾನುಯಿ", "rar": "ರಾರೋಟೊಂಗನ್", "rm": "ರೊಮಾನ್ಷ್", "rn": "ರುಂಡಿ", "ro": "ರೊಮೇನಿಯನ್", "ro_MD": "ಮೊಲ್ಡೆವಿಯನ್", "rof": "ರೊಂಬೊ", "rom": "ರೋಮಾನಿ", "root": "ರೂಟ್", "ru": "ರಷ್ಯನ್", "rup": "ಅರೋಮಾನಿಯನ್", "rw": "ಕೀನ್ಯಾರುವಾಂಡಾ", "rwk": "ರುವ", "sa": "ಸಂಸ್ಕೃತ", "sad": "ಸಂಡಾವೇ", "sah": "ಯಾಕುಟ್", "sam": "ಸಮರಿಟನ್ ಅರಾಮಿಕ್", "saq": "ಸಂಬುರು", "sas": "ಸಸಾಕ್", "sat": "ಸಂತಾಲಿ", "sbp": "ಸಂಗು", "sc": "ಸರ್ಡೀನಿಯನ್", "scn": "ಸಿಸಿಲಿಯನ್", "sco": "ಸ್ಕೋಟ್ಸ್", "sd": "ಸಿಂಧಿ", "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": "ಸ್ವಾತಿ", "st": "ದಕ್ಷಿಣ ಸೋಥೋ", "su": "ಸುಂಡಾನೀಸ್", "suk": "ಸುಕುಮಾ", "sus": "ಸುಸು", "sux": "ಸುಮೇರಿಯನ್", "sv": "ಸ್ವೀಡಿಷ್", "sw": "ಸ್ವಹಿಲಿ", "swc": "ಕಾಂಗೊ ಸ್ವಹಿಲಿ", "syc": "ಶಾಸ್ತ್ರೀಯ ಸಿರಿಯಕ್", "syr": "ಸಿರಿಯಕ್", "ta": "ತಮಿಳು", "te": "ತೆಲುಗು", "tem": "ಟಿಮ್ನೆ", "teo": "ಟೆಸೊ", "ter": "ಟೆರೆನೋ", "tet": "ಟೇಟಮ್", "tg": "ತಾಜಿಕ್", "th": "ಥಾಯ್", "ti": "ಟಿಗ್ರಿನ್ಯಾ", "tig": "ಟೈಗ್ರೆ", "tiv": "ಟಿವ್", "tk": "ಟರ್ಕ್‌ಮೆನ್", "tkl": "ಟೊಕೆಲಾವ್", "tl": "ಟ್ಯಾಗಲೋಗ್", "tlh": "ಕ್ಲಿಂಗನ್", "tli": "ಟ್ಲಿಂಗಿಟ್", "tmh": "ಟಮಾಷೆಕ್", "tn": "ಸ್ವಾನಾ", "to": "ಟೋಂಗನ್", "tog": "ನ್ಯಾಸಾ ಟೋಂಗಾ", "tpi": "ಟೋಕ್ ಪಿಸಿನ್", "tr": "ಟರ್ಕಿಶ್", "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": "ವಾಲೂನ್", "wal": "ವಲಾಮೋ", "war": "ವರಾಯ್", "was": "ವಾಷೋ", "wo": "ವೋಲೋಫ್", "xal": "ಕಲ್‌ಮೈಕ್", "xh": "ಕ್ಸೋಸ", "xog": "ಸೊಗ", "yao": "ಯಾಓ", "yap": "ಯಪೀಸೆ", "yi": "ಯಡ್ಡಿಶ್", "yo": "ಯೊರುಬಾ", "za": "ಝೂವಾಂಗ್", "zap": "ಝೋಪೊಟೆಕ್", "zbl": "ಬ್ಲಿಸ್‌ಸಿಂಬಲ್ಸ್", "zen": "ಝೆನಾಗಾ", "zgh": "ಸ್ಟ್ಯಾಂಡರ್ಡ್ ಮೊರೊಕ್ಕನ್ ಟಮಜೈಟ್", "zh": "ಚೈನೀಸ್", "zh_Hans": "ಸರಳೀಕೃತ ಚೈನೀಸ್", "zh_Hant": "ಸಾಂಪ್ರದಾಯಿಕ ಚೈನೀಸ್", "zu": "ಜುಲು", "zun": "ಝೂನಿ", "zxx": "ಯಾವುದೇ ಭಾಷಾಸಂಬಂಧಿ ವಿಷಯವಿಲ್ಲ", "zza": "ಜಾಝಾ" } } src/Symfony/Component/Intl/Resources/data/languages/ko.json000066400000000000000000000414631266465517700243510ustar00rootroot00000000000000{ "Version": "2.1.9.31", "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": "아제르바이잔어", "azb": "남아제르바이잔어", "ba": "바슈키르어", "bal": "발루치어", "ban": "발리어", "bas": "바사어", "bax": "바문어", "bbj": "고말라어", "be": "벨라루스어", "bej": "베자어", "bem": "벰바어", "bez": "베나어", "bfd": "바푸트어", "bg": "불가리아어", "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": "크리민 터키어; 크리민 타타르어", "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": "영어(호주)", "en_CA": "영어 (캐나다)", "en_GB": "영어 (영국식)", "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": "가어", "gag": "가가우스어", "gay": "가요어", "gba": "그바야어", "gbz": "조로아스터 다리어", "gd": "스코틀랜드 게일어", "gez": "게이즈어", "gil": "키리바시어", "gl": "갈리시아어", "glk": "길라키어", "gmh": "중세 고지 독일어", "gn": "과라니어", "goh": "고대 고지 독일어", "gom": "고아 콘칸어", "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": "카바르디어", "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": "로지어", "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": "나우루어", "nap": "나폴리어", "naq": "나마어", "nb": "노르웨이어(보크말)", "nd": "북부 은데벨레어", "nds": "저지 독일어", "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": "파라우안어", "peo": "고대 페르시아어", "phn": "페니키아어", "pi": "팔리어", "pl": "폴란드어", "pnt": "폰틱어", "pon": "폼페이어", "pro": "고대 프로방스어", "ps": "파슈토어", "pt": "포르투갈어", "pt_BR": "포르투갈어 (브라질)", "pt_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": "신디어", "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": "스와힐리어", "swb": "코모로어", "swc": "콩고 스와힐리어", "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": "와쇼어", "wo": "올로프어", "xal": "칼미크어", "xh": "코사어", "xog": "소가어", "yao": "야오족어", "yap": "얍페세어", "yav": "양본어", "ybb": "옘바어", "yi": "이디시어", "yo": "요루바어", "za": "주앙어", "zap": "사포테크어", "zbl": "블리스 심볼", "zen": "제나가어", "zgh": "표준 모로코 타마제크어", "zh": "중국어", "zh_Hans": "중국어(간체)", "zh_Hant": "중국어(번체)", "zu": "줄루어", "zun": "주니어", "zxx": "언어 관련 내용 없음", "zza": "자자어" } } src/Symfony/Component/Intl/Resources/data/languages/ks.json000066400000000000000000000351551266465517700243560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "زازا" } } src/Symfony/Component/Intl/Resources/data/languages/kw.json000066400000000000000000000001151266465517700243460ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "kw": "kernewek" } } src/Symfony/Component/Intl/Resources/data/languages/ky.json000066400000000000000000000172441266465517700243630ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "абхазча", "af": "африкаанча", "agq": "агемче", "ak": "аканча", "am": "амхарча", "ar": "арабча", "ar_001": "азыркы адабий араб тилинде", "arn": "мапучеде", "as": "ассамча", "asa": "асуча", "az": "азербайжанча", "ba": "башкырча", "be": "беларусча", "bem": "бембача", "bez": "бенача", "bg": "болгарча", "bm": "бамбарада", "bn": "бангладешче", "bo": "тибетче", "br": "бретончо", "brx": "бододо", "bs": "боснийче", "ca": "каталанча", "cgg": "чигача", "chr": "черокиче", "ckb": "сорани курд", "co": "корсиканча", "cs": "чехче", "cy": "уелшче", "da": "датча", "dav": "таитача", "de": "немисче", "de_CH": "жогорку немисче (Швейцария)", "dje": "замрача", "dsb": "төмөнкү сорбианча", "dua": "дуалача", "dyo": "жола-фониче", "dz": "жонгуча", "ebu": "эмбуча", "ee": "эбече", "el": "грекче", "en": "англисче", "eo": "эсперанто", "es": "испанча", "es_ES": "испанча (Европа)", "et": "эстончо", "eu": "баскча", "fa": "фарсыча", "fi": "финче", "fil": "филипино", "fj": "фижиче", "fo": "фароэче", "fr": "французча", "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": "лаочо", "lt": "литовчо", "lu": "луба-катангача", "luo": "луочо", "luy": "лухияча", "lv": "латышча", "mas": "масайча", "mer": "меруча", "mfe": "морисианча", "mg": "малагасча", "mgh": "макуача", "mgo": "метөчө", "mi": "маориче", "mk": "македончо", "ml": "малайаламча", "mn": "моңголчо", "moh": "мохаукча", "mr": "маратиче", "ms": "малайча", "mt": "малтизче", "mua": "мундангча", "my": "бурмача", "naq": "намача", "nb": "норвежче (Букмал)", "nd": "түндүк ндыбелче", "ne": "непалча", "nl": "голландча", "nl_BE": "фламандча", "nmg": "квасиочо", "nn": "норвежче (Нинорск)", "no": "норвежче", "nqo": "нкочо", "nus": "нуерче", "nyn": "ныйанколчо", "om": "оромочо", "or": "орияча", "pa": "пунжабиче", "pl": "полякча", "ps": "пашточо", "pt": "португалча", "pt_PT": "португалча (Европа)", "qu": "кечуача", "quc": "кичече", "rm": "романшча", "rn": "рундиче", "ro": "румынча", "ro_MD": "молдованча", "rof": "ромбочо", "ru": "орусча", "rw": "руандача", "rwk": "руача", "sa": "санскритче", "saq": "самбуруча", "sbp": "сангуча", "sd": "синдхиче", "se": "түндүк самиче", "seh": "сенача", "ses": "койраборо сенниче", "sg": "сангочо", "sh": "серб-хорват", "shi": "ташелитче", "si": "сингалача", "sk": "словакча", "sl": "словенче", "sma": "түштүк саамиче", "smj": "лөлө саамиче", "smn": "инари саамиче", "sms": "сколт саамиче", "sn": "шонача", "so": "сомаличе", "sq": "албанча", "sr": "сербче", "st": "сесото", "su": "сунданча", "sv": "шведче", "sw": "суахиличе", "swc": "конго суахаличе", "ta": "тамилче", "te": "телугуча", "teo": "тесочо", "tg": "тажикче", "th": "тайча", "ti": "тигриниача", "tk": "түркмөнчө", "tlh": "клингончо", "to": "тонгача", "tr": "түркчө", "tt": "татарча", "tw": "тви", "twq": "тасабакча", "tzm": "борбордук Атлас тамазитче", "ug": "уйгурча", "uk": "украинче", "und": "белгисиз тилде", "ur": "урдуча", "uz": "өзбекче", "vai": "вайиче", "vi": "вьетнамча", "vun": "вунжочо", "wo": "уолофчо", "xh": "косача", "xog": "согача", "yi": "идишче", "yo": "йорубача", "zgh": "марокко тамазигт адабий тилинде", "zh": "кытайча", "zh_Hans": "кытайча (жөнөкөйлөштүрүлгөн)", "zh_Hant": "кытайча (салттуу)", "zu": "зулуча", "zxx": "тилдик мазмун жок" } } src/Symfony/Component/Intl/Resources/data/languages/lb.json000066400000000000000000000427611266465517700243370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Araukanesch", "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", "azb": "Süd-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", "swb": "Komoresch", "swc": "Kongo-Swahili", "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" } } src/Symfony/Component/Intl/Resources/data/languages/lg.json000066400000000000000000000023551266465517700243370ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ln.json000066400000000000000000000023321266465517700243410ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/lo.json000066400000000000000000000477021266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ກາ", "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": "ໂລຊິ", "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": "ດັຊ", "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": "ປາລົວອານ", "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": "ສິນທິ", "se": "ຊາມິເໜືອ", "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": "ຊວາຮີລິ", "swb": "ໂຄໂນຣຽນ", "swc": "ຄອງໂກ ຊວາຮີລິ", "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": "ຊາຊາ" } } src/Symfony/Component/Intl/Resources/data/languages/lt.json000066400000000000000000000415571266465517700243630ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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ų", "azb": "pietų Azerbaidžano", "ba": "baškirų", "bal": "baluči", "ban": "balinezų", "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ų", "bho": "baučpuri", "bi": "bislama", "bik": "bikolų", "bin": "bini", "bjn": "bandžarų", "bkm": "komų", "bla": "siksika", "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": "cebuanų", "cgg": "čigų", "ch": "čamorų", "chb": "čibča", "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ų", "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": "divehi", "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": "frulan", "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": "herero", "ia": "interlingva", "iba": "iban", "ibb": "ibibio", "id": "indoneziečių", "ie": "interkalba", "ig": "igbų", "ii": "sičuan ji", "ik": "inupiak", "ilo": "iloko", "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": "kpele", "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": "limburgiš", "lij": "ligūrų", "liv": "lyvių", "lkt": "lakotų", "lmo": "lombardų", "ln": "ngalų", "lo": "laosiečių", "lol": "mongo", "loz": "lozi", "lt": "lietuvių", "ltg": "latgalių", "lu": "luba katanga", "lua": "luba lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "mizo", "luy": "luja", "lv": "latvių", "lzh": "klasikinė kinų", "lzz": "laz", "mad": "madurezų", "maf": "mafų", "mag": "magahi", "mai": "maithili", "mak": "makasaro", "man": "mandingo", "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": "minankabu", "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": "Norvegijos rašytinė – būkmolų", "nd": "šiaurės ndebelų", "nds": "Žemutinės Vokietijos", "ne": "nepaliečių", "new": "nevari", "ng": "ndongų", "nia": "nias", "niu": "niuenų", "njo": "ao naga", "nl": "olandų", "nl_BE": "flamandų", "nmg": "kvasių", "nn": "naujoji norvegų", "nnh": "ngiembūnų", "no": "norvegų", "nog": "nogų", "non": "norsu", "nov": "novial", "nqo": "enko", "nr": "pietų ndebele", "nso": "šiaurės sothų", "nus": "nuerų", "nv": "navajų", "nwc": "klasikinė nevari", "ny": "nianja", "nym": "niamvezi", "nyn": "niankolų", "nyo": "nioro", "nzi": "nzima", "oc": "očitarų", "oj": "ojibva", "om": "oromų", "or": "orijų", "os": "osetinų", "osa": "osage", "ota": "osmanų turkų", "pa": "pendžabų", "pag": "pangasinan", "pal": "pahlavi", "pam": "pampanga", "pap": "papiemento", "pau": "palau", "pcd": "pikardų", "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ų", "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": "sidamo", "sk": "slovakų", "sl": "slovėnų", "sli": "sileziečių žemaičių", "sly": "selajarų", "sm": "samoa", "sma": "pietų samių", "smj": "Lulėjo 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": "svati", "ssy": "saho", "st": "pietų sesuto", "stq": "Saterlendo fryzų", "su": "sundų", "suk": "sukuma", "sus": "susu", "sux": "šumerų", "sv": "švedų", "sw": "suahilių", "swb": "Komorų", "swc": "Kongo suahilių", "syc": "klasikinė siriečių", "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": "tsvana", "to": "tonganų", "tog": "niasa tongos", "tpi": "tok pisin", "tr": "turkų", "tru": "turoyo", "trv": "taroko", "ts": "tsonga", "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": "ugaritic", "uk": "ukrainiečių", "umb": "umbundu", "und": "nežinoma kalba", "ur": "urdų", "uz": "uzbekų", "vai": "vai", "ve": "venda", "vec": "venetų", "vep": "vepsų", "vi": "vietnamiečių", "vls": "vakarų flamandų", "vmf": "pagrindinė frankonų", "vo": "volapiuk", "vot": "votik", "vro": "võro", "vun": "vunjo", "wa": "valonų", "wae": "valserų", "wal": "valamo", "war": "varai", "was": "vašo", "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" } } src/Symfony/Component/Intl/Resources/data/languages/lu.json000066400000000000000000000021751266465517700243550ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/lv.json000066400000000000000000000332261266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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": "kurdu (Sorani)", "co": "korsikāņu", "cop": "koptu", "cr": "krī", "crh": "Krimas tatāru", "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", "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", "na": "nauruiešu", "nap": "neapoliešu", "naq": "nama", "nb": "norvēģu bukmols", "nd": "ziemeļndebelu", "nds": "lejasvācu", "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", "peo": "senpersu", "phn": "feniķiešu", "pi": "pāli", "pl": "poļu", "pon": "ponapieš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", "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": "sundaniešu", "suk": "sukumu", "sus": "susu", "sux": "šumeru", "sv": "zviedru", "sw": "svahili", "swb": "komoru", "swc": "Kongo svahili", "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", "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" } } src/Symfony/Component/Intl/Resources/data/languages/meta.json000066400000000000000000000456151266465517700246710ustar00rootroot00000000000000{ "Version": "2.1.7.12", "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", "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" ], "Aliases": { "aa_SAAHO": "ssy", "aar": "aa", "abk": "ab", "afr": "af", "aju": "jrb", "aka": "ak", "alb": "sq", "als": "sq", "amh": "am", "ara": "ar", "arb": "ar", "arg": "an", "arm": "hy", "art_lojban": "jbo", "asm": "as", "ava": "av", "ave": "ae", "aym": "ay", "ayr": "ay", "aze": "az", "azj": "az", "bak": "ba", "bam": "bm", "baq": "eu", "bcc": "bal", "bcl": "bik", "bel": "be", "ben": "bn", "bih": "bh", "bis": "bi", "bod": "bo", "bos": "bs", "bre": "br", "bul": "bg", "bur": "my", "bxk": "luy", "bxr": "bua", "cat": "ca", "ces": "cs", "cha": "ch", "che": "ce", "chi": "zh", "chu": "cu", "chv": "cv", "cld": "syr", "cmn": "zh", "cor": "kw", "cos": "co", "cre": "cr", "cwd": "cr", "cym": "cy", "cze": "cs", "dan": "da", "deu": "de", "dgo": "doi", "dhd": "mwr", "dik": "din", "diq": "zza", "div": "dv", "dut": "nl", "dzo": "dz", "ekk": "et", "ell": "el", "emk": "man", "eng": "en", "epo": "eo", "esk": "ik", "est": "et", "eus": "eu", "ewe": "ee", "fao": "fo", "fas": "fa", "fat": "ak", "fij": "fj", "fin": "fi", "fra": "fr", "fre": "fr", "fry": "fy", "fuc": "ff", "ful": "ff", "gaz": "om", "gbo": "grb", "geo": "ka", "ger": "de", "gla": "gd", "gle": "ga", "glg": "gl", "glv": "gv", "gno": "gon", "gre": "el", "grn": "gn", "gug": "gn", "guj": "gu", "gya": "gba", "hat": "ht", "hau": "ha", "hbs": "sr_Latn", "hdn": "hai", "hea": "hmn", "heb": "he", "her": "hz", "him": "srx", "hin": "hi", "hmo": "ho", "hrv": "hr", "hun": "hu", "hye": "hy", "i_ami": "ami", "i_bnn": "bnn", "i_hak": "hak", "i_klingon": "tlh", "i_lux": "lb", "i_navajo": "nv", "i_pwn": "pwn", "i_tao": "tao", "i_tay": "tay", "i_tsu": "tsu", "ibo": "ig", "ice": "is", "ido": "io", "iii": "ii", "ike": "iu", "iku": "iu", "ile": "ie", "in": "id", "ina": "ia", "ind": "id", "ipk": "ik", "isl": "is", "ita": "it", "iw": "he", "jav": "jv", "ji": "yi", "jpn": "ja", "jw": "jv", "kal": "kl", "kan": "kn", "kas": "ks", "kat": "ka", "kau": "kr", "kaz": "kk", "khk": "mn", "khm": "km", "kik": "ki", "kin": "rw", "kir": "ky", "kmr": "ku", "knc": "kr", "kng": "kg", "knn": "kok", "kom": "kv", "kon": "kg", "kor": "ko", "kpv": "kv", "kua": "kj", "kur": "ku", "lao": "lo", "lat": "la", "lav": "lv", "lbk": "bnc", "lim": "li", "lin": "ln", "lit": "lt", "ltz": "lb", "lub": "lu", "lug": "lg", "lvs": "lv", "mac": "mk", "mah": "mh", "mal": "ml", "mao": "mi", "mar": "mr", "may": "ms", "mhr": "chm", "mkd": "mk", "mlg": "mg", "mlt": "mt", "mnk": "man", "mo": "ro_MD", "mol": "ro_MD", "mon": "mn", "mri": "mi", "msa": "ms", "mup": "raj", "mya": "my", "nau": "na", "nav": "nv", "nbl": "nr", "nde": "nd", "ndo": "ng", "nep": "ne", "nld": "nl", "nno": "nn", "no": "nb", "no_BOKMAL": "nb", "no_NYNORSK": "nn", "no_bok": "nb", "no_nyn": "nn", "nob": "nb", "nor": "nb", "npi": "ne", "nya": "ny", "oci": "oc", "ojg": "oj", "oji": "oj", "ori": "or", "orm": "om", "ory": "or", "oss": "os", "pan": "pa", "pbu": "ps", "per": "fa", "pes": "fa", "pli": "pi", "plt": "mg", "pnb": "lah", "pol": "pl", "por": "pt", "pus": "ps", "que": "qu", "quz": "qu", "rmy": "rom", "roh": "rm", "ron": "ro", "rum": "ro", "run": "rn", "rus": "ru", "sag": "sg", "san": "sa", "sgn_BE_FR": "sfb", "sgn_BE_NL": "vgt", "sgn_CH_DE": "sgg", "sh": "sr_Latn", "sin": "si", "slk": "sk", "slo": "sk", "slv": "sl", "sme": "se", "smo": "sm", "sna": "sn", "snd": "sd", "som": "so", "sot": "st", "spa": "es", "spy": "kln", "sqi": "sq", "src": "sc", "srd": "sc", "srp": "sr", "ssw": "ss", "sun": "su", "swa": "sw", "swe": "sv", "swh": "sw", "tah": "ty", "tam": "ta", "tat": "tt", "tel": "te", "tgk": "tg", "tgl": "fil", "tha": "th", "tib": "bo", "tir": "ti", "tl": "fil", "ton": "to", "tsn": "tn", "tso": "ts", "ttq": "tmh", "tuk": "tk", "tur": "tr", "tw": "ak", "twi": "ak", "uig": "ug", "ukr": "uk", "umu": "del", "urd": "ur", "uzb": "uz", "uzn": "uz", "ven": "ve", "vie": "vi", "vol": "vo", "wel": "cy", "wln": "wa", "wol": "wo", "xho": "xh", "xpe": "kpe", "xsl": "den", "ydd": "yi", "yid": "yi", "yor": "yo", "zai": "zap", "zh_guoyu": "zh", "zh_hakka": "hak", "zh_min_nan": "nan", "zh_xiang": "hsn", "zha": "za", "zho": "zh", "zsm": "ms", "zul": "zu", "zyb": "za" }, "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", "bh": "bih", "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", "si": "sin", "sk": "slk", "sl": "slv", "se": "sme", "sm": "smo", "sn": "sna", "sd": "snd", "so": "som", "st": "sot", "es": "spa", "sc": "srd", "sr": "srp", "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" } } src/Symfony/Component/Intl/Resources/data/languages/mg.json000066400000000000000000000022631266465517700243360ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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ò" } } src/Symfony/Component/Intl/Resources/data/languages/mk.json000066400000000000000000000516161266465517700243500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "азербејџански", "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": "германски", "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_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": "француски (во Канада)", "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": "марвари", "my": "бурмански", "mye": "мјене", "myv": "ерзјански", "mzn": "мазендерански", "na": "науруански", "nan": "јужномински", "nap": "неаполски", "naq": "нама", "nb": "норвешки букмол", "nd": "северен ндебеле", "nds": "долногермански", "ne": "непалски", "new": "неварски", "ng": "ндонга", "nia": "нијас", "niu": "ниуејски", "njo": "ао", "nl": "холандски", "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_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": "заза" } } src/Symfony/Component/Intl/Resources/data/languages/ml.json000066400000000000000000000521641266465517700243500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ഗാ", "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": "ലൊസി", "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": "ഡച്ച്", "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": "പലാവുൻ", "peo": "പ്രാചീന പേർഷ്യൻ", "phn": "ഫീനിഷ്യൻ", "pi": "പാലി", "pl": "പോളിഷ്", "pon": "പൊൻപിയൻ", "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": "സിന്ധി", "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": "സ്വാഹിലി", "swb": "കൊമോറിയൻ", "swc": "കോംഗോ സ്വാഹിലി", "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": "സാസാ" } } src/Symfony/Component/Intl/Resources/data/languages/mn.json000066400000000000000000000164631266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "абхаз", "af": "африк", "agq": "агем", "ak": "акан", "am": "амхар", "ar": "араб", "ar_001": "стандарт араб", "arn": "мапүчи", "as": "ассам", "asa": "асу", "az": "азербайжан", "ba": "башкир", "be": "беларусь", "bem": "бемба", "bez": "бена", "bg": "болгар", "bm": "бамбара", "bn": "бенгал", "bo": "төвд", "br": "бретон", "brx": "бодо", "bs": "босни", "ca": "каталан", "cgg": "чига", "chr": "чироки", "ckb": "сорани күрд", "co": "корсик", "cs": "чех", "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": "гагуз", "gd": "шотланд келт", "gl": "галик", "gn": "гуарани", "gsw": "швейцари герман", "gu": "гужарати", "guz": "гузы", "gv": "манкс", "ha": "хауса", "haw": "хавай", "he": "еврей", "hi": "хинди", "hr": "хорват", "hsb": "дээд сорби", "ht": "гаити", "hu": "унгар", "hy": "армен", "ia": "интерлингво", "id": "индонези", "ie": "нэгдмэл хэл", "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": "лаос", "lt": "литва", "lu": "луба-катанга", "luo": "луо", "luy": "луяа", "lv": "латви", "mas": "масай", "mer": "меру", "mfe": "морисен", "mg": "малагаси", "mgh": "макува-мито", "mgo": "мета", "mi": "маори", "mk": "македон", "ml": "малайлам", "mn": "монгол", "moh": "мохаук", "mr": "марати", "ms": "малай", "mt": "малти", "mua": "мунданг", "my": "бирм", "naq": "нама", "nb": "норвегийн букмол", "nd": "хойд ндебеле", "ne": "балба", "nl": "голланд", "nl_BE": "фламанд", "nmg": "квазио", "nn": "норвегийн нинорск", "no": "норвеги", "nqo": "нко", "nus": "нуер", "nyn": "нянколе", "oc": "францын окситан", "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": "свахили", "swc": "конго свахили", "ta": "тамил", "te": "тэлүгү", "teo": "тэсо", "tg": "тажик", "th": "тай", "ti": "тигрина", "tk": "туркмен", "to": "тонга", "tr": "турк", "tt": "татар", "tw": "тви", "twq": "тасавак", "tzm": "төв атласын тамазайт", "ug": "уйгар", "uk": "украйн", "und": "тодорхойгүй хэл", "ur": "урду", "uz": "узбек", "vai": "вай", "vi": "вьетнам", "vun": "вунжо", "wo": "волоф", "xh": "хоса", "xog": "сога", "yi": "иддиш", "yo": "ёруба", "zgh": "тамазит", "zh": "хятад", "zh_Hans": "хялбаршуулсан хятад", "zh_Hant": "уламжлалт хятад", "zu": "зулу", "zxx": "хэл зүйн агуулга байхгүй" } } src/Symfony/Component/Intl/Resources/data/languages/mr.json000066400000000000000000000472531266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "बल्गेरियन", "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": "क्राइमीन तुर्की", "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": "झोंगखा", "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": "Ga", "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": "इबान", "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": "कझाक", "kl": "कलाल्लिसत", "kln": "कालेंजीन", "km": "ख्मेर", "kmb": "किम्बन्दु", "kn": "कन्नड", "ko": "कोरियन", "koi": "कोमी-परम्याक", "kok": "कोंकणी", "kos": "कोसरियन", "kpe": "क्पेल्ले", "kr": "कनुरी", "krc": "कराचय-बाल्कर", "krl": "करेलियन", "kru": "कुरूख", "ks": "काश्मीरी", "ksb": "शांबाला", "ksf": "बाफिया", "ku": "कुर्दिश", "kum": "कुमीक", "kut": "कुतेनाई", "kv": "कोमी", "kw": "कोर्निश", "ky": "किरगीझ", "la": "लॅटिन", "lad": "लादीनो", "lag": "लांगी", "lah": "लाह्न्डा", "lam": "लाम्बा", "lb": "लक्झेंबर्गिश", "lez": "लेझ्घीयन", "lg": "गांडा", "li": "लिंबूर्गिश", "lkt": "लाकोटा", "ln": "लिंगाला", "lo": "लाओ", "lol": "मोंगो", "loz": "लोझि", "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": "एर्झ्या", "na": "नउरू", "nap": "नेपोलिटान", "naq": "नामा", "nb": "नॉर्वेजियन बोकमाल", "nd": "उत्तर देबेली", "nds": "लो जर्मन", "ne": "नेपाळी", "new": "नेवारी", "ng": "डोंगा", "nia": "नियास", "niu": "नियुआन", "nl": "डच", "nl_BE": "फ्लेमिश", "nmg": "क्वासिओ", "nn": "नॉर्वेजियन न्योर्स्क", "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": "क्वेचुआ", "quc": "कीशेइ", "raj": "राजस्थानी", "rap": "रापानुई", "rar": "रारोटोंगन", "rm": "रोमान्श", "rn": "रुन्दी", "ro": "रोमानियन", "ro_MD": "मोल्डाव्हियन", "rof": "रोम्बो", "rom": "रोमानी", "root": "रूट", "ru": "रशियन", "rup": "अरोमानियन", "rw": "किन्यार्वान्डा", "rwk": "रव्हा", "sa": "संस्कृत", "sad": "सँडवे", "sah": "याकूत", "sam": "सामरिटान अरॅमिक", "saq": "सांबुरू", "sas": "सासाक", "sat": "संताली", "sbp": "सांगु", "sc": "सर्दिनियन", "scn": "सिसिलियन", "sco": "स्कॉट्स", "sd": "सिंधी", "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": "स्वाती", "st": "सेसोथो", "su": "सुंदानीज", "suk": "सुकुमा", "sus": "सुसु", "sux": "सुमेरियन", "sv": "स्वीडिश", "sw": "स्वाहिली", "swb": "कोमोरियन", "swc": "काँगो स्वाहिली", "syc": "अभिजात सिरियाक", "syr": "सिरियाक", "ta": "तामिळ", "te": "तेलगू", "tem": "टिम्ने", "teo": "तेसो", "ter": "तेरेनो", "tet": "तेतुम", "tg": "ताजिक", "th": "थाई", "ti": "तिग्रिन्या", "tig": "टाइग्रे", "tiv": "तिव", "tk": "तुर्कमेन", "tkl": "टोकेलाऊ", "tl": "टागालोग", "tlh": "क्लिंगोन", "tli": "लिंगित", "tmh": "तामाशेक", "tn": "त्स्वाना", "to": "टोंगन", "tog": "न्यासा टोन्गा", "tpi": "टोक पिसिन", "tr": "तुर्की", "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": "वालून", "wal": "वलामो", "war": "वारे", "was": "वाशो", "wo": "वोलोफ", "xal": "काल्मिक", "xh": "खोसा", "xog": "सोगा", "yao": "याओ", "yap": "यापीस", "yi": "यिद्दिश", "yo": "योरुबा", "yue": "कँटोनीज", "za": "झुआंग", "zap": "झेपोटेक", "zbl": "ब्लिसिम्बॉल्स", "zen": "झेनान्गा", "zgh": "प्रमाण मोरोक्कन तॅमॅझायट", "zh": "चीनी", "zh_Hans": "सरलीकृत चीनी", "zh_Hant": "पारंपारिक चीनी", "zu": "झुलू", "zun": "झुनी", "zxx": "भाषावैज्ञानिक सामग्री नाही", "zza": "झाझा" } } src/Symfony/Component/Intl/Resources/data/languages/ms.json000066400000000000000000000177601266465517700243620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "Abkhazia", "ach": "Akoli", "ady": "Adyghe", "ae": "Avestan", "aeb": "Arab Tunisia", "af": "Afrikaans", "agq": "Aghem", "ak": "Akan", "alt": "Altai Selatan", "am": "Amharic", "ar": "Arab", "ar_001": "Arab Standard Moden", "arn": "Mapuche", "arq": "Arab Algeria", "ary": "Arab Maghribi", "arz": "Arab Mesir", "as": "Assam", "asa": "Asu", "av": "Avaric", "ay": "Aymara", "az": "Azerbaijan", "azb": "Azerbaijan Selatan", "ba": "Bashkir", "bal": "Baluchi", "bax": "Bamun", "bbj": "Ghomala", "be": "Belarus", "bej": "Beja", "bem": "Bemba", "bez": "Bena", "bfd": "Bafut", "bg": "Bulgaria", "bkm": "Kom", "bm": "Bambara", "bn": "Benggala", "bo": "Tibet", "bpy": "Bishnupriya", "br": "Breton", "brh": "Brahui", "brx": "Bodo", "bs": "Bosnia", "bss": "Akoose", "bua": "Buriat", "bum": "Bulu", "byv": "Medumba", "ca": "Catalonia", "cay": "Cayuga", "ce": "Chechen", "cgg": "Chiga", "chm": "Mari", "chr": "Cherokee", "ckb": "Kurdi Sorani", "co": "Corsica", "cop": "Coptic", "crh": "Turki Krimea", "cs": "Czech", "cu": "Slavik Gereja", "cv": "Chuvash", "cy": "Wales", "da": "Denmark", "dav": "Taita", "de": "Jerman", "de_AT": "Jerman Austria", "de_CH": "Jerman Halus Switzerland", "dje": "Zarma", "doi": "Dogri", "dsb": "Lower Sorbian", "dua": "Duala", "dv": "Divehi", "dyo": "Jola-Fonyi", "dz": "Dzongkha", "dzg": "Dazaga", "ebu": "Embu", "ee": "Ewe", "efi": "Efik", "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", "fa": "Parsi", "fi": "Finland", "fil": "Filipina", "fj": "Fiji", "fo": "Faroe", "fr": "Perancis", "fr_CA": "Perancis Kanada", "fr_CH": "Perancis Switzerland", "fy": "Frisian", "ga": "Ireland", "gaa": "Ga", "gag": "Gagauz", "gba": "Gbaya", "gbz": "Zoroastrian Dari", "gd": "Scots Gaelic", "gl": "Galicia", "glk": "Gilaki", "gn": "Guarani", "grc": "Greek Purba", "gsw": "Jerman Switzerland", "gu": "Gujerat", "guz": "Gusii", "gv": "Manx", "ha": "Hausa", "haw": "Hawaii", "he": "Ibrani", "hi": "Hindi", "hr": "Croat", "hsb": "Upper Sorbian", "ht": "Haiti", "hu": "Hungary", "hy": "Armenia", "ia": "Interlingua", "ibb": "Ibibio", "id": "Indonesia", "ie": "Interlingue", "ig": "Igbo", "ii": "Sichuan Yi", "is": "Iceland", "it": "Itali", "iu": "Inuktitut", "ja": "Jepun", "jgo": "Ngomba", "jmc": "Machame", "jv": "Jawa", "ka": "Georgia", "kab": "Kabyle", "kam": "Kamba", "kbl": "Kanembu", "kde": "Makonde", "kea": "Kabuverdianu", "kg": "Kongo", "khq": "Koyra Chiini", "khw": "Khowar", "ki": "Kikuya", "kk": "Kazakhstan", "kkj": "Kako", "kl": "Kalaallisut", "kln": "Kalenjin", "km": "Khmer", "kn": "Kannada", "ko": "Korea", "koi": "Komi-Permyak", "kok": "Konkani", "ks": "Kashmir", "ksb": "Shambala", "ksf": "Bafia", "ksh": "Colognian", "ku": "Kurdish", "kw": "Cornish", "ky": "Kirghiz", "la": "Latin", "lag": "Langi", "lah": "Lahnda", "lb": "Luxembourg", "lg": "Ganda", "lkt": "Lakota", "ln": "Lingala", "lo": "Laos", "loz": "Lozi", "lt": "Lithuania", "lu": "Luba-Katanga", "lua": "Luba-Lulua", "luo": "Luo", "lus": "Mizo", "luy": "Luyia", "lv": "Latvia", "maf": "Mafa", "mas": "Masai", "mde": "Maba", "mer": "Meru", "mfe": "Morisyen", "mg": "Malagasy", "mgh": "Makhuwa-Meetto", "mgo": "Meta’", "mi": "Maori", "mk": "Macedonia", "ml": "Malayalam", "mn": "Mongolia", "mni": "Manipuri", "moh": "Mohawk", "mr": "Marathi", "ms": "Bahasa Melayu", "mt": "Malta", "mua": "Mundang", "my": "Burma", "mye": "Myene", "mzn": "Mazanderani", "naq": "Nama", "nb": "Bokmål Norway", "nd": "Ndebele Utara", "ne": "Nepal", "nl": "Belanda", "nl_BE": "Flemish", "nmg": "Kwasio", "nn": "Nynorsk Norway", "no": "Norway", "nqo": "N’ko", "nso": "Sotho Utara", "nus": "Nuer", "ny": "Nyanja", "nyn": "Nyankole", "oc": "Occitania", "om": "Oromo", "or": "Oriya", "os": "Ossete", "pa": "Punjabi", "pl": "Poland", "ps": "Pashto", "pt": "Portugis", "pt_BR": "Portugis Brazil", "pt_PT": "Portugis Eropah", "qu": "Quechua", "quc": "Kʼicheʼ", "rm": "Romansh", "rn": "Rundi", "ro": "Romania", "ro_MD": "Moldavia", "rof": "Rombo", "ru": "Rusia", "rw": "Kinyarwanda", "rwk": "Rwa", "sa": "Sanskrit", "saq": "Samburu", "sba": "Ngambay", "sbp": "Sangu", "sd": "Sindhi", "se": "Sami Utara", "see": "Seneca", "seh": "Sena", "ses": "Koyraboro Senni", "sg": "Sango", "sh": "SerboCroatia", "shi": "Tachelhit", "shu": "Chadian Arab", "si": "Sinhala", "sk": "Slovak", "sl": "Slovenia", "sm": "Samoa", "sma": "Sami Selatan", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Shona", "so": "Somali", "sq": "Albania", "sr": "Serbia", "ss": "Swati", "ssy": "Saho", "st": "Sotho Selatan", "su": "Sunda", "sv": "Sweden", "sw": "Swahili", "swb": "Comoria", "swc": "Congo Swahili", "ta": "Tamil", "te": "Telugu", "teo": "Teso", "tet": "Tetum", "tg": "Tajik", "th": "Thai", "ti": "Tigrinya", "tk": "Turkmen", "tlh": "Klingon", "tly": "Talysh", "tn": "Tswana", "to": "Tonga", "tpi": "Tok Pisin", "tr": "Turki", "trv": "Taroko", "ts": "Tsonga", "tt": "Tatar", "tum": "Tumbuka", "tw": "Twi", "twq": "Tasawaq", "ty": "Tahiti", "tzm": "Tamazight Atlas Tengah", "ug": "Uyghur", "uk": "Ukraine", "und": "Bahasa Tidak Diketahui", "ur": "Urdu", "uz": "Uzbekistan", "vai": "Vai", "ve": "Venda", "vi": "Vietnam", "vun": "Vunjo", "wae": "Walser", "wo": "Wolof", "xh": "Xhosa", "xog": "Soga", "yav": "Yangben", "ybb": "Yemba", "yi": "Yiddish", "yo": "Yoruba", "zgh": "Tamazight Maghribi Standard", "zh": "Cina", "zh_Hans": "Cina Ringkas", "zh_Hant": "Cina Tradisional", "zu": "Zulu", "zxx": "Tiada kandungan linguistik", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/mt.json000066400000000000000000000255611266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.22", "Names": { "aa": "Afar", "ab": "Abkażjan", "ace": "Aċiniż", "ach": "Akoli", "ada": "Adangme", "ady": "Adyghe", "ae": "Avestan", "af": "Afrikans", "afh": "Afriħili", "ain": "Ajnu", "ak": "Akan", "akk": "Akkadjen", "ale": "Aleut", "am": "Amħariku", "an": "Aragonese", "ang": "Ingliż, Antik", "anp": "Angika", "ar": "Għarbi", "ar_001": "Għarbi Standard Modern", "arc": "Aramajk", "arn": "Arawkanjan", "arp": "Arapaħo", "arw": "Arawak", "as": "Assamese", "ast": "Asturian", "av": "Avarik", "awa": "Awadħi", "ay": "Ajmara", "az": "Ażerbajġani", "ba": "Baxkir", "bal": "Baluċi", "ban": "Baliniż", "bas": "Basa", "be": "Belarussu", "bej": "Beja", "bem": "Bemba", "bg": "Bulgaru", "bho": "Bojpuri", "bi": "Bislama", "bik": "Bikol", "bin": "Bini", "bla": "Siksika", "bm": "Bambara", "bn": "Bengali", "bo": "Tibetjan", "br": "Brenton", "bra": "Braj", "bs": "Bosnijan", "bua": "Burjat", "bug": "Buginiż", "byn": "Blin", "ca": "Katalan", "cad": "Kaddo", "car": "Karib", "cch": "Atsam", "ce": "Ċeċen", "ceb": "Sibwano", "ch": "Ċamorro", "chb": "Ċibċa", "chg": "Ċagataj", "chk": "Ċukese", "chm": "Mari", "chn": "Ġargon taċ-Ċinuk", "cho": "Ċostaw", "chp": "Ċipewjan", "chr": "Ċerokij", "chy": "Xajenn", "co": "Korsiku", "cop": "Koptiku", "cr": "Krij", "crh": "Crimean Turkish; Crimean Tatar", "cs": "Ċek", "csb": "Kashubian", "cu": "Slaviku tal-Knisja", "cv": "Ċuvax", "cy": "Welx", "da": "Daniż", "dak": "Dakota", "dar": "Dargwa", "de": "Ġermaniż", "del": "Delawerjan", "den": "Slav", "dgr": "Dogrib", "din": "Dinka", "doi": "Dogri", "dsb": "Lower Sorbian", "dua": "Dwala", "dum": "Olandiż, Medjevali", "dv": "Diveħi", "dyu": "Djula", "dz": "Dżongka", "ee": "Ewe", "efi": "Efik", "egy": "Eġizzjan (Antik)", "eka": "Ekajuk", "el": "Grieg", "elx": "Elamit", "en": "Ingliż", "en_AU": "Ingliż Awstraljan", "en_GB": "Ingliż Brittaniku", "en_US": "Ingliż Amerikan", "enm": "Ingliż, Medjevali", "eo": "Esperanto", "es": "Spanjol", "et": "Estonjan", "eu": "Bask", "ewo": "Ewondo", "fa": "Persjan", "fan": "Fang", "fat": "Fanti", "ff": "Fulaħ", "fi": "Finlandiż", "fil": "Filippino", "fj": "Fiġi", "fo": "Fawriż", "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": "Friżjan", "ga": "Irlandiż", "gaa": "Ga", "gay": "Gajo", "gba": "Gbaja", "gd": "Galliku Skoċċiż", "gez": "Geez", "gil": "Gilbertjan", "gl": "Gallegjan", "gmh": "Ġermaniku, Medjevali Pulit", "gn": "Gwarani", "goh": "Ġermaniku, Antik Pulit", "gon": "Gondi", "gor": "Gorontalo", "got": "Gotiku", "grb": "Ġerbo", "grc": "Grieg, Antik", "gu": "Guġarati", "gv": "Manks", "gwi": "Gwiċin", "ha": "Ħawsa", "hai": "Ħajda", "haw": "Ħawajjan", "he": "Ebrajk", "hi": "Ħindi", "hil": "Hiligaynon", "hit": "Ħittit", "hmn": "Ħmong", "ho": "Ħiri Motu", "hr": "Kroat", "hsb": "Upper Sorbian", "ht": "Haitian", "hu": "Ungeriż", "hup": "Ħupa", "hy": "Armenjan", "hz": "Ħerero", "ia": "Interlingua", "iba": "Iban", "id": "Indoneżjan", "ie": "Interlingue", "ig": "Igbo", "ii": "Sichuan Yi", "ik": "Inupjak", "ilo": "Iloko", "inh": "Ingush", "io": "Ido", "is": "Iżlandiż", "it": "Taljan", "iu": "Inukitut", "ja": "Ġappuniż", "jbo": "Lojban", "jpr": "Lhudi-Persjan", "jrb": "Lhudi-Għarbi", "jv": "Ġavaniż", "ka": "Ġorġjan", "kaa": "Kara-Kalpak", "kab": "Kabuljan", "kac": "Kaċin", "kam": "Kamba", "kaw": "Kawi", "kbd": "Kabardian", "kg": "Kongo", "kha": "Kasi", "kho": "Kotaniż", "ki": "Kikuju", "kj": "Kuanyama", "kk": "Każak", "kl": "Kalallisut", "km": "Kmer", "kmb": "Kimbundu", "kn": "Kannada", "ko": "Korejan", "kok": "Konkani", "kos": "Kosrejan", "kpe": "Kpelle", "kr": "Kanuri", "krc": "Karachay-Balkar", "kru": "Kurusk", "ks": "Kaxmiri", "ku": "Kurdiż", "kum": "Kumiku", "kut": "Kutenaj", "kv": "Komi", "kw": "Korniku", "ky": "Kirgiż", "la": "Latin", "lad": "Ladino", "lah": "Landa", "lam": "Lamba", "lb": "Letżburgiż", "lez": "Leżgjan", "lg": "Ganda", "li": "Limburgish", "ln": "Lingaljan", "lo": "Lao", "lol": "Mongo", "loz": "Lożi", "lt": "Litwanjan", "lu": "Luba-Katanga", "lua": "Luba-Luluwa", "lui": "Luwisinuż", "lun": "Lunda", "luo": "Luwa", "lus": "Luxaj", "lv": "Latvjan", "mad": "Maduriż", "mag": "Magaħi", "mai": "Majtili", "mak": "Makasar", "man": "Mandingwan", "mas": "Masaj", "mdf": "Moksha", "mdr": "Mandar", "men": "Mende", "mg": "Malagażi", "mga": "Irlandiż, Medjevali", "mh": "Marxall", "mi": "Maori", "mic": "Mikmek", "min": "Minangkabaw", "mk": "Maċedonjan", "ml": "Malajalam", "mn": "Mongoljan", "mnc": "Manċurjan", "mni": "Manipuri", "moh": "Moħak", "mos": "Mossi", "mr": "Marati", "ms": "Malajan", "mt": "Malti", "mul": "Lingwi Diversi", "mus": "Kriek", "mwl": "Mirandiż", "mwr": "Marwari", "my": "Burmiż", "myv": "Erzya", "na": "Nawuru", "nap": "Neapolitan", "nb": "Bokmahal Norveġiż", "nd": "Ndebele, ta’ Fuq", "nds": "Ġermaniż Komuni; Sassonu Komuni", "ne": "Nepaliż", "new": "Newari", "ng": "Ndonga", "nia": "Nijas", "niu": "Nijuwejan", "nl": "Olandiż", "nn": "Ninorsk Norveġiż", "no": "Norveġiż", "nog": "Nogai", "non": "Skandinav, Antik", "nr": "Ndebele, t’Isfel", "nso": "Soto, ta’ Fuq", "nv": "Navaħo", "nwc": "Classical Newari", "ny": "Ċiċewa; Njanġa", "nym": "Njamweżi", "nyn": "Nyankole", "nyo": "Njoro", "nzi": "Nżima", "oc": "Oċċitan", "oj": "Oġibwa", "om": "Oromo (Afan)", "or": "Orija", "os": "Ossettiku", "osa": "Osaġjan", "ota": "Tork (Imperu Ottoman)", "pa": "Punġabi", "pag": "Pangasinjan", "pal": "Paħlavi", "pam": "Pampamga", "pap": "Papjamento", "pau": "Palawjan", "peo": "Persjan Antik", "phn": "Feniċju", "pi": "Pali", "pl": "Pollakk", "pon": "Ponpejan", "pro": "Provenzal, Antik", "ps": "Paxtun", "pt": "Portugiż", "qu": "Keċwa", "raj": "Raġastani", "rap": "Rapanwi", "rar": "Rarotongani", "rm": "Reto-Romanz", "rn": "Rundi", "ro": "Rumen", "ro_MD": "Moldavjan", "rom": "Żingaru", "root": "Għerq", "ru": "Russu", "rup": "Aromanijan", "rw": "Kinjarwanda", "sa": "Sanskrit", "sad": "Sandawe", "sah": "Jakut", "sam": "Samritan", "sas": "Saska", "sat": "Santali", "sc": "Sardinjan", "sco": "Skoċċiż", "sd": "Sindi", "se": "Sami ta’ Fuq", "sel": "Selkup", "sg": "Sango", "sga": "Irlandiż, Antik", "sh": "Serbo-Kroat", "shn": "Xan", "si": "Sinħaliż", "sid": "Sidamo", "sk": "Slovakk", "sl": "Sloven", "sm": "Samojan", "sma": "Southern Sami", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Xona", "snk": "Soninke", "so": "Somali", "sog": "Sogdien", "sq": "Albaniż", "sr": "Serb", "srr": "Serer", "ss": "Swati", "st": "Soto, t’Isfel", "su": "Sundaniż", "suk": "Sukuma", "sus": "Susu", "sux": "Sumerjan", "sv": "Svediż", "sw": "Swaħili", "syr": "Sirjan", "ta": "Tamil", "te": "Telugu", "tem": "Timne", "ter": "Tereno", "tet": "Tetum", "tg": "Taġik", "th": "Tajlandiż", "ti": "Tigrinja", "tig": "Tigre", "tiv": "Tiv", "tk": "Turkmeni", "tkl": "Tokelau", "tl": "Tagalog", "tlh": "Klingon", "tli": "Tlingit", "tmh": "Tamaxek", "tn": "Zwana", "to": "Tongan", "tog": "Tonga (Njasa)", "tpi": "Tok Pisin", "tr": "Tork", "ts": "Tsonga", "tsi": "Zimxjan", "tt": "Tatar", "tum": "Tumbuka", "tvl": "Tuvalu", "tw": "Twi", "ty": "Taħitjan", "tyv": "Tuvinjan", "udm": "Udmurt", "ug": "Wigur", "uga": "Ugaritiku", "uk": "Ukranjan", "umb": "Umbundu", "und": "Lingwa Mhux Magħrufa", "ur": "Urdu", "uz": "Użbek", "vai": "Vai", "ve": "Venda", "vi": "Vjetnamiż", "vo": "Volapuk", "vot": "Votik", "wa": "Walloon", "wal": "Walamo", "war": "Waraj", "was": "Waxo", "wo": "Wolof", "xal": "Kalmyk", "xh": "Ħoża", "yao": "Jao", "yap": "Japese", "yi": "Jiddix", "yo": "Joruba", "za": "Żwang", "zap": "Żapotek", "zen": "Żenaga", "zh": "Ċiniż", "zh_Hans": "Ċiniż Simplifikat", "zu": "Żulu", "zun": "Żuni" } } src/Symfony/Component/Intl/Resources/data/languages/my.json000066400000000000000000000266121266465517700243640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "အက်ခါဇူအနျ", "af": "အာဖရိကန်းစ်", "agq": "အာဂ်ဟိန်း", "ak": "အာကိန်", "am": "အန်ဟာရစျချ", "ang": "အင်္ဂလိပ်စာဟောင်း", "ar": "အာရေဗီ", "ar_001": "အရေဗီ(ပုံမှန်)", "arn": "မာပုချီ", "as": "အက္စမီစ်", "asa": "အာစု", "az": "အော်ဇောဘိုင်ဂျောနီ", "ba": "ဘက်ရှ်ကီအာ", "ban": "ဘာလီ", "bas": "ဘာဆာ", "be": "ဘီလာရု", "bem": "ဘိန်ဘာ", "bez": "ဘီနာ", "bg": "ဘူဂေးရီးယား", "bm": "ဘန်ဘာရာ", "bn": "ဘင်္ဂါလီ", "bo": "တိဘက်", "br": "ဘရီတွန်", "brx": "ဗိုဒို", "bs": "ဘော့စ်နီးယား", "ca": "ကာတာလန်", "ce": "ချေချင်း", "cgg": "ချီဂါ", "chr": "ချာရိုကီ", "ckb": "ဆိုရာနီ ကူဒစ်ရှ်", "co": "ခိုစီကန်", "cr": "ခရီး", "cs": "ချက်", "cy": "ဝေလ", "da": "ဒိန်းမတ်", "dak": "ဒါကိုတာ", "dav": "တိုင်တာ", "de": "ဂျာမန်", "de_AT": "ဩစတြီးယ ဂျာမန်", "de_CH": "ဆွစ် အမြင့် ဂျာမန်", "del": "ဒီလာဝဲ", "dje": "ဇာမာ", "dsb": "အောက်ဆိုဘီအမ်", "dua": "ဒူအလာ", "dum": "အလယ်ပိုင်း ဒတ်ချ်", "dyo": "ဂျိုလာ-ဖွန်ရီ", "dz": "ဒွန်ကာ", "ebu": "အမ်ဘူ", "ee": "ဝီ", "egy": "ရှေးဟောင်း အီဂျစ်", "el": "ဂရိ", "en": "အင်္ဂလိပ်", "en_AU": "ဩစတြေးလျှ အင်္ဂလိပ်", "en_CA": "ကနေဒါ အင်္ဂလိပ်", "en_GB": "ဗြိတိသျှ အင်္ဂလိပ်", "en_US": "အမေရိကန် အင်္ဂလိပ်", "enm": "အလယ်ပိုင်း အင်္ဂလိပ်", "eo": "အက္စပရန္တို", "es": "စပိန်", "es_419": "လက်တင်အမေရိက စပိန်", "es_ES": "စပိန်(ဥရောပ)", "et": "အက်စ်တိုးနီးရန်း", "eu": "ဘစ်က္ကီ", "fa": "ပါရှန်", "fi": "ဖင်နစ်ရှ်", "fil": "ဖိလစ်ပီနို", "fj": "ဖီဂျီ", "fo": "ဖာရိုအိစ်", "fr": "ပြင်သစ်", "fr_CA": "ကနေဒါ ပြင်သစ်", "fr_CH": "ဆွစ် ပြင်သစ်", "frm": "အလယ်ပိုင်းပြင်သစ်", "fro": "ပြင်သစ်ဟောင်း", "frr": "မြောက်ပိုင်း ဖရီစီရန်", "frs": "အရှေ့ပိုင်း ဖရီစီရန်", "fy": "အနောက်ပိုင်း ဖရီစီရန်", "ga": "အိုင်းရစ်", "gag": "ဂါဂါဇ်", "gl": "ဂါလာစီယံ", "gmh": "အလယ်ပိုင်းအမြင့်ဂျာမန်", "gn": "ဂူအာရာနီ", "grc": "ရှေးဟောင်း ဂရိ", "gsw": "ဆွစ် ဂျာမန်", "gu": "ဂူဂျာရသီ", "guz": "ဂူစီး", "gv": "မန်းဇ်", "ha": "ဟာဥစာ", "haw": "ဟာဝေယံ", "he": "ဟီးဘရူး", "hi": "ဟိန္ဒီ", "hr": "ခရိုအေရှန်", "hsb": "အပေါ်ဆိုဘီအမ်", "ht": "ဟာအီတီအန်", "hu": "ဟန်ဂေရီ", "hy": "အာမေနီအန်", "id": "အင်ဒိုနီးရှား", "ig": "အစ္ဂဘို", "ii": "စီချွမ် ရီ", "is": "အိုင်စ်လန္ဒီ", "it": "အီတလီ", "iu": "အီနုခ်တီတု", "ja": "ဂျပန်", "jgo": "ဂွမ်ဘာ", "jmc": "မချာမီ", "jpr": "ဂျူဒီယို-ပါရှန်", "jrb": "ဂျူဒီယို-အာရေဗျ", "jv": "ဂျာဗားနီးစ်", "ka": "ဂျော်ဂျီယန်", "kab": "ခဘိုင်လ်", "kac": "ကချင်", "kam": "ခမ်ဘာ", "kde": "မာခွန်ဒီ", "kea": "ခဘူဗာဒီအာနူ", "kg": "ကွန်ဂို", "kha": "ခါစီ", "khq": "ခိုရာ ချီအီနီ", "ki": "ခီခူယူ", "kk": "ခါဇါခ်", "kl": "ခလာအ်လီဆပ်", "kln": "ခါလိမ်ဂျင်", "km": "ခမာ", "kn": "ကန္နာဒါ", "ko": "ကိုးရီးယား", "koi": "ကိုမီ-ပါမြက်", "kok": "ကွန်ကနီ", "ks": "ကက်ရှ်မီရီ", "ksb": "ရှန်ဘာလာ", "ksf": "ဘာဖီအာ", "ku": "ကဒ်", "kw": "ခိုနီရှ်", "ky": "ခရူဂစ်", "la": "လက်တင်", "lag": "လန်ဂီ", "lb": "လူဇင်ဘတ်က်", "lg": "ဂန်ဒီ", "lkt": "လာကိုတာ", "ln": "လင်ဂါလာ", "lo": "လာအို", "lt": "လစ္သူအာနီယံ", "lu": "လူဘာ-ခါတန်ဂါ", "luo": "လူအို", "luy": "လူရီအာ", "lv": "လက္ဘီအံ", "mas": "မာဆိုင်", "mer": "မီရု", "mfe": "မိုရှီစ်ယန်း", "mg": "အာလာဂါစီ", "mga": "အလယ်ပိုင်း အိုင်းရစ်", "mgh": "မာခူဝါ-မီအီတို", "mgo": "မီတာ", "mi": "မောင်းရီ (နယူးဇီလန်ကျွန်းရှိ ပင်ရင်းတိုင်းရင်းသားလူမျိုး)", "mk": "မာစီဒိုနီယံ", "ml": "မလေးရာလမ်", "mn": "မွန်ဂိုလီးယန်း", "mnc": "မန်ချူး", "moh": "မိုဟော့ခ်", "mr": "မာရသီ", "ms": "မလေး", "mt": "မောလ္တီစ်", "mua": "မန်ဒန်း", "mul": "အကြိမ်များစွာ ဘာသာစကားများ", "my": "ဗမာ", "naq": "နာမာ", "nb": "ဘွတ်မော်လ်", "nd": "တောင်ဒီဘီလီ", "nds": "အနိမ့် ဂျာမန်", "ne": "နီပါလီ", "nl": "ဒတ်ချ်", "nl_BE": "ဖလီမစ်ရှ်", "nmg": "ဝါဆီအို", "nn": "နော်ဝေး နီးနော်စ်ခ်", "no": "နော်ဝေး", "nqo": "နကို", "nus": "နူအာ", "nyn": "ယန်ကိုလီ", "om": "အိုရိုမို", "or": "အိုရီရာ", "pa": "ပန်ချာပီ", "peo": "ပါရှန် အဟောင်း", "pi": "ပါဠိ", "pl": "ပိုလန်", "ps": "ပါရှ်တို", "pt": "ပေါ်တူဂီ", "pt_BR": "ဘရာဇီး ပေါ်တူဂီ", "pt_PT": "ဥရောပ ပေါ်တူဂီ", "qu": "ခက်ချ်ဝါ", "quc": "ခီခ်အီချီ", "rm": "ရောမ", "rn": "ရွန်ဒီ", "ro": "ရိုမေနီယား", "rof": "ရွမ်ဘို", "root": "မူလရင်းမြစ်", "ru": "ရုရှ", "rw": "ကင်ရာဝန်ဒါ", "rwk": "ဝါ", "sa": "သင်္သကရိုက်", "saq": "ဆန်ဘူရု", "sbp": "ဆန်ဂု", "sco": "စကော့", "sd": "စင်ဒီ", "se": "တောင်ဆာမိ", "seh": "စီနာ", "ses": "ခိုရာဘိုရို ဆမ်နီ", "sg": "ဆမ်ဂို", "sga": "အိုင်းရစ် ဟောင်း", "shi": "တာချယ်လ်ဟစ်", "shn": "ရှမ်း", "si": "ဆင်ဟာလ", "sk": "စလိုဗက်", "sl": "စလိုဗေးနီးယမ်း", "sma": "တောင်ပိုင်း ဆာမိ", "smj": "လူလီ ဆာမိ", "smn": "အီနာရီ ဆာမိ", "sms": "ခိုလ် ဆာမိ", "sn": "ရှိနာ", "so": "ဆိုမာလီ", "sq": "အယ်လ်ဘေးနီးယန်း", "sr": "ဆားဗီးယန်း", "su": "ဆူဒန်", "sv": "ဆွီဒင်", "sw": "ဆြာဟီလီ", "swc": "ခွန်ဂို စွာဟီလီ", "ta": "တမီးလ်", "te": "တီလီဂု", "teo": "တီဆို", "tg": "တာဂွီခ်", "th": "ထိုင်း", "ti": "တီဂ်ရင်ရာ", "tk": "တခ္မင်", "to": "တွန်ဂါ", "tr": "တာကစ်", "tt": "တတာ", "twq": "တာဆာဝါခ်", "tzm": "အလယ်အက်တ်လက်စ် တာမာဇိုက်", "ug": "ဝီဂါ", "uk": "ယူကရိန်း", "und": "မသိ သို့မဟုတ် မရှိ သော ဘာသာစကား", "ur": "အော်ဒူ", "uz": "ဦးဇ်ဘက်", "vai": "ဗိုင်", "vi": "ဗီယက်နမ်", "vun": "ဗန်ဂျို", "wo": "ဝူလိုဖ်", "xh": "ဇိုစာ", "xog": "ဆိုဂါ", "yo": "ရိုရုဘာ", "zgh": "မိုရိုကန် တွမ်မဇိုတ် စံ", "zh": "တရုတ်", "zh_Hans": "ရိုးရှင်းသော တရုတ်", "zh_Hant": "ရှေးရိုးစဉ်လာ တရုတ်", "zu": "ဇူလူ", "zxx": "ဘာသာစကား နှင့် ပတ်သက် သောအရာမရှိ" } } src/Symfony/Component/Intl/Resources/data/languages/nb.json000066400000000000000000000327171266465517700243410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afar", "ab": "abkhasisk", "ace": "achinesisk", "ach": "acoli", "ada": "adangme", "ady": "adyghe", "ae": "avestisk", "af": "afrikaans", "afh": "afrihili", "agq": "aghem", "ain": "ainu", "ak": "akan", "akk": "akkadisk", "ale": "aleutisk", "alt": "søraltaisk", "am": "amharisk", "an": "aragonsk", "ang": "gammelengelsk", "anp": "angika", "ar": "arabisk", "ar_001": "moderne standard arabisk", "arc": "arameisk", "arn": "araukansk", "arp": "arapaho", "arw": "arawak", "as": "assamisk", "asa": "asu", "ast": "asturisk", "av": "avarisk", "awa": "awadhi", "ay": "aymara", "az": "aserbajdsjansk", "ba": "basjkirsk", "bal": "baluchi", "ban": "balinesisk", "bas": "basa", "bax": "bamun", "bbj": "ghomala", "be": "hviterussisk", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "bulgarsk", "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": "akose", "bua": "buriat", "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": "chagatai", "chk": "chuukesisk", "chm": "mari", "chn": "chinook", "cho": "choctaw", "chp": "chipewiansk", "chr": "cherokesisk", "chy": "cheyenne", "ckb": "kurdisk (sorani)", "co": "korsikansk", "cop": "koptisk", "cr": "cree", "crh": "krimtatarisk", "cs": "tsjekkisk", "csb": "kasjubisk", "cu": "kirkeslavisk", "cv": "tsjuvansk", "cy": "walisisk", "da": "dansk", "dak": "dakota", "dar": "dargwa", "dav": "taita", "de": "tysk", "de_AT": "østerriksk tysk", "de_CH": "sveitsisk høytysk", "del": "delaware", "den": "slavisk", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "lavsorbisk", "dua": "duala", "dum": "mellomnederlandsk", "dv": "divehi", "dyo": "jola-fonyi", "dyu": "dyula", "dz": "dzongkha", "dzg": "dazaga", "ebu": "kiembu", "ee": "ewe", "efi": "efik", "egy": "gammelegyptisk", "eka": "ekajuk", "el": "gresk", "elx": "elamittisk", "en": "engelsk", "en_AU": "australsk engelsk", "en_CA": "canadisk engelsk", "en_GB": "britisk engelsk", "en_US": "amerikansk engelsk", "enm": "mellomengelsk", "eo": "esperanto", "es": "spansk", "es_419": "latinamerikansk spansk", "es_ES": "europeisk spansk", "es_MX": "meksikansk spansk", "et": "estisk", "eu": "baskisk", "ewo": "ewondo", "fa": "persisk", "fan": "fang", "fat": "fanti", "ff": "fulani", "fi": "finsk", "fil": "filippinsk", "fj": "fijiansk", "fo": "færøysk", "fon": "fon", "fr": "fransk", "fr_CA": "canadisk fransk", "fr_CH": "sveitsisk fransk", "frm": "mellomfransk", "fro": "gammelfransk", "frr": "nordfrisisk", "frs": "østfrisisk", "fur": "friuliansk", "fy": "vestfrisisk", "ga": "irsk", "gaa": "ga", "gag": "gagausisk", "gay": "gayo", "gba": "gbaya", "gd": "skotsk gælisk", "gez": "ges", "gil": "kiribatisk", "gl": "galisisk", "gmh": "mellomhøytysk", "gn": "guarani", "goh": "gammelhøytysk", "gon": "gondi", "gor": "gorontalo", "got": "gotisk", "grb": "grebo", "grc": "gammelgresk", "gsw": "sveitsertysk", "gu": "gujarati", "guz": "gusii", "gv": "mansk", "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øysorbisk", "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": "inuktitut", "ja": "japansk", "jbo": "lojban", "jgo": "ngomba", "jmc": "machame", "jpr": "jødepersisk", "jrb": "jødearabisk", "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", "kfo": "koro", "kg": "kikongo", "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": "komipermjakisk", "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": "ladinsk", "lag": "langi", "lah": "lahnda", "lam": "lamba", "lb": "luxemburgsk", "lez": "lezghian", "lg": "ganda", "li": "limburgisk", "lkt": "lakota", "ln": "lingala", "lo": "laotisk", "lol": "mongo", "loz": "lozi", "lt": "litauisk", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lushai", "luy": "luhya", "lv": "latvisk", "mad": "maduresisk", "maf": "mafa", "mag": "magahi", "mai": "maithili", "mak": "makasar", "man": "mandingo", "mas": "masai", "mde": "maba", "mdf": "moksha", "mdr": "mandar", "men": "mende", "mer": "meru", "mfe": "mauritisk-kreolsk", "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": "flere språk", "mus": "creek", "mwl": "mirandesisk", "mwr": "marwari", "my": "burmesisk", "mye": "myene", "myv": "erzya", "na": "nauru", "nap": "napolitansk", "naq": "nama", "nb": "norsk bokmål", "nd": "nord-ndebele", "nds": "lavtysk", "ne": "nepali", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niueansk", "nl": "nederlandsk", "nl_BE": "flamsk", "nmg": "kwasio", "nn": "norsk nynorsk", "nnh": "ngiemboon", "no": "norsk", "nog": "nogai", "non": "gammelnorsk", "nqo": "nkå", "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", "peo": "gammelpersisk", "phn": "fønikisk", "pi": "pali", "pl": "polsk", "pon": "ponapisk", "pro": "gammelprovençalsk", "ps": "pashto", "pt": "portugisisk", "pt_BR": "brasiliansk portugisisk", "pt_PT": "europeisk portugisisk", "qu": "quechua", "quc": "quiché", "raj": "rajasthani", "rap": "rapanui", "rar": "rarotongansk", "rm": "retoromansk", "rn": "rundi", "ro": "rumensk", "ro_MD": "moldovsk", "rof": "rombo", "rom": "romani", "root": "rot", "ru": "russisk", "rup": "aromansk", "rw": "kinyarwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "sah": "jakutsk", "sam": "samaritansk arameisk", "saq": "samburu", "sas": "sasak", "sat": "santali", "sba": "ngambay", "sbp": "sangu", "sc": "sardinsk", "scn": "siciliansk", "sco": "skotsk", "sd": "sindhi", "se": "nordsamisk", "see": "seneca", "seh": "sena", "sel": "selkupisk", "ses": "koyraboro senni", "sg": "sango", "sga": "gammelirsk", "sh": "serbokroatisk", "shi": "tachelhit", "shn": "shan", "shu": "Tsjad-arabisk", "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ør-sotho", "su": "sundanesisk", "suk": "sukuma", "sus": "susu", "sux": "sumerisk", "sv": "svensk", "sw": "swahili", "swb": "komorisk", "swc": "kongolesisk swahili", "syc": "klassisk syrisk", "syr": "syrisk", "ta": "tamilsk", "te": "telugu", "tem": "temne", "teo": "teso", "ter": "tereno", "tet": "tetum", "tg": "tadsjikisk", "th": "thai", "ti": "tigrinja", "tig": "tigré", "tiv": "tiv", "tk": "turkmensk", "tkl": "tokelau", "tl": "tagalog", "tlh": "klingon", "tli": "tlingit", "tmh": "tamasjek", "tn": "setswana", "to": "tongansk", "tog": "nyasa-tongansk", "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": "sentralmarokkansk 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": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmyk", "xh": "xhosa", "xog": "soga", "yao": "yao", "yap": "yapesisk", "yav": "yangben", "ybb": "yemba", "yi": "jiddisk", "yo": "joruba", "yue": "kantonesisk", "za": "zhuang", "zap": "zapotec", "zbl": "blissymboler", "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": "zaza" } } src/Symfony/Component/Intl/Resources/data/languages/nd.json000066400000000000000000000025051266465517700243330ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ne.json000066400000000000000000000212471266465517700243400ustar00rootroot00000000000000{ "Version": "2.1.8.95", "Names": { "ab": "अब्खाजियाली", "af": "अफ्रिकान्स", "agq": "आघेम", "ak": "आकान", "am": "अम्हारिक", "ar": "अरबी", "ar_001": "आधुनिक मानक अरबी", "arn": "मापुचे", "as": "आसामी", "asa": "आसु", "az": "अजरबैजानी", "ba": "बाश्किर", "be": "वेलारूसी", "bem": "बेम्बा", "bez": "बेना", "bg": "बुल्गेरियाली", "bm": "बाम्बारा", "bn": "बंगाली", "bo": "तिब्बती", "br": "ब्रेटन", "brx": "बोडो", "bs": "बोस्नियाली", "ca": "क्याटालन", "cgg": "चिगा", "chr": "चेरोकी", "ckb": "सोरानी कुर्दिश", "co": "कोर्सिकन", "cs": "चेक", "cy": "वेल्श", "da": "डेनिश", "dav": "ताइता", "de": "जर्मन", "de_AT": "अष्ट्रियन जर्मन", "de_CH": "स्वीस हाई जर्मन", "dje": "जर्मा", "dsb": "तल्लो सोर्बियन", "dua": "दुवाला", "dyo": "जोला-फोनिल", "dz": "जोङ्खा", "ebu": "एम्बु", "ee": "इवि", "el": "ग्रीक", "en": "अंग्रेजी", "eo": "एस्पेरान्तो", "es": "स्पेनिस", "es_ES": "युरोपेली स्पेनिस", "et": "इस्टोनियाली", "eu": "बास्क", "fa": "फारसी", "fi": "फिनिश", "fil": "फिलिपिनी", "fj": "फिजियाली", "fo": "फारोज", "fr": "फ्रान्सेली", "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": "लाओ", "lt": "लिथुआनियाली", "lu": "लुबा-काताङ्गा", "luo": "लुओ", "luy": "लुइया", "lv": "लात्भियाली", "mas": "मासाल", "mer": "मेरू", "mfe": "मोरिसेन", "mg": "मलागासी", "mgh": "माखुवा-मिट्टो", "mgo": "मेटा", "mi": "माओरी", "mk": "म्याकेडोनियन", "ml": "मलयालम", "mn": "मंगोल", "moh": "मोहक", "mr": "मराठी", "ms": "मलाया", "mt": "माल्टिज", "mua": "मुन्डाङ", "my": "वर्मेली", "naq": "नामा", "nb": "नर्वेली बोकमाल", "nd": "उत्तर नेडेबेले", "ne": "नेपाली", "nl": "डच", "nl_BE": "फ्लेमिश", "nmg": "क्वासियो", "nn": "नर्वेली नाइनोर्स्क", "nqo": "नको", "nus": "नुएर", "nyn": "न्यान्कोल", "om": "ओरोमो", "or": "ओरिया", "pa": "पंजाबी", "pl": "पोलिश", "ps": "पाश्तो", "pt": "पोर्तुगी", "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": "स्वाहिली", "swc": "कोङ्गो स्वाहिली", "ta": "तामिल", "te": "तेलुगु", "teo": "टेसो", "tg": "ताजिक", "th": "थाई", "ti": "तिग्रीन्या", "tk": "टर्कमेन", "to": "टोङ्गन", "tr": "टर्किश", "tt": "तातार", "twq": "तासावाक", "tzm": "केन्द्रीय एट्लास टामाजिघट", "ug": "उइघुर", "uk": "युक्रेनी", "und": "अज्ञात भाषा", "ur": "उर्दु", "uz": "उज्बेकी", "vai": "भाइ", "vi": "भियतनामी", "vun": "भुन्जो", "wo": "वुलुफ", "xh": "खोसा", "xog": "सोगा", "yo": "योरूवा", "zgh": "मानक मोरोक्कोन तामाजिघट", "zh": "चिनियाँ", "zh_Hans": "सरलिकृत चिनियाँ", "zh_Hant": "परम्परागत चिनियाँ", "zu": "जुलु", "zxx": "भाषिक सामग्री छैन" } } src/Symfony/Component/Intl/Resources/data/languages/ne_IN.json000066400000000000000000000002011266465517700247110ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ar_001": "अधुनिक प्रमाणिक अरबी" } } src/Symfony/Component/Intl/Resources/data/languages/nl.json000066400000000000000000000377621266465517700243600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ar_001": "modern standaard 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", "azb": "Zuid-Azerbeidzjaans Arabisch", "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", "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", "cs": "Tsjechisch", "csb": "Kasjoebisch", "cu": "Kerkslavisch", "cv": "Tsjoevasjisch", "cy": "Welsh", "da": "Deens", "dak": "Dakota", "dar": "Dargwa", "dav": "Taita", "de": "Duits", "de_AT": "Oostenrijks Duits", "de_CH": "Zwitsers Hoogduits", "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", "en_AU": "Australisch Engels", "en_CA": "Canadees Engels", "en_GB": "Brits Engels", "en_US": "Amerikaans Engels", "enm": "Middelengels", "eo": "Esperanto", "es": "Spaans", "es_419": "Latijns-Amerikaans Spaans", "es_ES": "Europees Spaans", "es_MX": "Mexicaans 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", "fr_CA": "Canadees Frans", "fr_CH": "Zwitsers 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", "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", "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", "nl_BE": "Vlaams", "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", "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", "pt_BR": "Braziliaans Portugees", "pt_PT": "Europees 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", "se": "Noord-Samisch", "see": "Seneca", "seh": "Sena", "sei": "Seri", "sel": "Selkoeps", "ses": "Koyraboro Senni", "sg": "Sango", "sga": "Oudiers", "sgs": "Samogitisch", "sh": "Servokroatisch", "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", "swc": "Congo Swahili", "syc": "Klassiek Syrisch", "syr": "Syrisch", "szl": "Silezisch", "ta": "Tamil", "tcy": "Tulu", "te": "Telugu", "tem": "Timne", "teo": "Teso", "ter": "Tereno", "tet": "Tetun", "tg": "Tadzjieks", "th": "Thais", "ti": "Tigrinya", "tig": "Tigre", "tiv": "Tiv", "tk": "Turkmeens", "tkl": "Tokelaus", "tkr": "Tsakhur", "tl": "Tagalog", "tlh": "Klingon", "tli": "Tlingit", "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", "vo": "Volapük", "vot": "Votisch", "vro": "Võro", "vun": "Vunjo", "wa": "Waals", "wae": "Walser", "wal": "Wolaytta", "war": "Waray", "was": "Washo", "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", "zh_Hans": "vereenvoudigd Chinees", "zh_Hant": "traditioneel Chinees", "zu": "Zoeloe", "zun": "Zuni", "zxx": "geen linguïstische inhoud", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/nl_BE.json000066400000000000000000000001751266465517700247120ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "oc": "Occitaans; Provençaals", "sh": "Servo-Kroatisch" } } src/Symfony/Component/Intl/Resources/data/languages/nn.json000066400000000000000000000277261266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.7.72", "Names": { "aa": "afar", "ab": "abkhasisk", "ace": "achinesisk", "ach": "acoli", "ada": "adangme", "ady": "adyghe", "ae": "avestisk", "af": "afrikaans", "afh": "afrihili", "agq": "aghem", "ain": "ainu", "ak": "akan", "akk": "akkadisk", "ale": "aleutisk", "alt": "sør-altai", "am": "amharisk", "an": "aragonsk", "ang": "gammalengelsk", "anp": "angika", "ar": "arabisk", "arc": "arameisk", "arn": "araukansk", "arp": "arapaho", "arw": "arawak", "as": "assamisk", "asa": "asu (Tanzania)", "ast": "asturisk", "av": "avarisk", "awa": "awadhi", "ay": "aymara", "az": "aserbajdsjansk", "ba": "basjkirsk", "bal": "baluchi", "ban": "balinesisk", "bas": "basa", "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", "bua": "burjatisk", "bug": "buginesisk", "byn": "blin", "ca": "katalansk", "cad": "caddo", "car": "karibisk", "cch": "atsam", "ce": "tsjetsjensk", "ceb": "cebuansk", "ch": "chamorro", "chb": "chibcha", "chg": "chagatai", "chk": "chuukesisk", "chm": "mari", "chn": "chinook", "cho": "choctaw", "chp": "chipewiansk", "chr": "cherokee", "chy": "cheyenne", "co": "korsikansk", "cop": "koptisk", "cr": "cree", "crh": "krimtatarisk", "cs": "tsjekkisk", "csb": "kasjubisk", "cu": "kyrkjeslavisk", "cv": "tsjuvansk", "cy": "walisisk", "da": "dansk", "dak": "dakota", "dar": "dargwa", "de": "tysk", "de_AT": "austerriksk tysk", "de_CH": "sveitsisk høgtysk", "del": "delaware", "den": "slavej", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "lågsorbisk", "dua": "duala", "dum": "mellumnederlandsk", "dv": "divehi", "dyo": "jola-fonyi", "dyu": "dyula", "dz": "dzongkha", "ebu": "kiembu", "ee": "ewe", "efi": "efik", "egy": "gammalegyptisk", "eka": "ekajuk", "el": "gresk", "elx": "elamittisk", "en": "engelsk", "en_AU": "australisk engelsk", "en_CA": "kanadisk engelsk", "en_GB": "britisk engelsk", "en_US": "engelsk (amerikansk)", "enm": "mellomengelsk", "eo": "esperanto", "es": "spansk", "es_419": "latinamerikansk spansk", "es_ES": "iberisk spansk", "et": "estisk", "eu": "baskisk", "ewo": "ewondo", "fa": "persisk", "fan": "fang", "fat": "fanti", "ff": "fulani", "fi": "finsk", "fil": "filippinsk", "fj": "fijiansk", "fo": "færøysk", "fon": "fon", "fr": "fransk", "fr_CA": "kanadisk fransk", "fr_CH": "sveitsisk fransk", "frm": "mellomfransk", "fro": "gammalfransk", "frr": "nordfrisisk", "frs": "austfrisisk", "fur": "friuliansk", "fy": "vestfrisisk", "ga": "irsk", "gaa": "ga", "gay": "gayo", "gba": "gbaya", "gd": "skotsk-gælisk", "gez": "ges", "gil": "kiribatisk", "gl": "galicisk", "gmh": "mellomhøgtysk", "gn": "guarani", "goh": "gammalhøgtysk", "gon": "gondi", "gor": "gorontalo", "got": "gotisk", "grb": "grebo", "grc": "gammalgresk", "gsw": "sveitsertysk", "gu": "gujarati", "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", "id": "indonesisk", "ie": "interlingue", "ig": "ibo", "ii": "sichuan-yi", "ik": "inupiak", "ilo": "iloko", "inh": "ingusjisk", "io": "ido", "is": "islandsk", "it": "italiensk", "iu": "inuktitut", "ja": "japansk", "jbo": "lojban", "jpr": "jødepersisk", "jrb": "jødearabisk", "jv": "javanesisk", "ka": "georgisk", "kaa": "karakalpakisk", "kab": "kabylsk", "kac": "kachin", "kaj": "jju", "kam": "kamba", "kaw": "kawi", "kbd": "kabardisk", "kcg": "tyap", "kea": "kapverdisk", "kfo": "koro", "kg": "kikongo", "kha": "khasi", "kho": "khotanesisk", "ki": "kikuyu", "kj": "kuanyama", "kk": "kasakhisk", "kl": "kalaallisut; grønlandsk", "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", "ksf": "bafia", "ku": "kurdisk", "kum": "kumyk", "kut": "kutenai", "kv": "komi", "kw": "kornisk", "ky": "kirgisisk", "la": "latin", "lad": "ladinsk", "lah": "lahnda", "lam": "lamba", "lb": "luxemburgsk", "lez": "lezghian", "lg": "ganda", "li": "limburgisk", "ln": "lingala", "lo": "laotisk", "lol": "mongo", "loz": "lozi", "lt": "litauisk", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lushai", "lv": "latvisk", "mad": "maduresisk", "mag": "magahi", "mai": "maithili", "mak": "makasar", "man": "mandingo", "mas": "masai", "mdf": "moksha", "mdr": "mandar", "men": "mende", "mg": "madagassisk", "mga": "mellomirsk", "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": "erzya", "na": "nauru", "nap": "napolitansk", "nb": "bokmål", "nd": "nord-ndebele", "nds": "lågtysk", "ne": "nepalsk", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niueansk", "nl": "nederlandsk", "nl_BE": "flamsk", "nmg": "kwasio", "nn": "nynorsk", "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": "oriya", "os": "ossetisk", "osa": "osage", "ota": "ottomansk tyrkisk", "pa": "panjabi", "pag": "pangasinan", "pal": "pahlavi", "pam": "pampanga", "pap": "papiamento", "pau": "palauisk", "peo": "gammalpersisk", "phn": "fønikisk", "pi": "pali", "pl": "polsk", "pon": "ponapisk", "pro": "gammalprovençalsk", "ps": "pashto", "pt": "portugisisk", "pt_BR": "brasiliansk portugisisk", "pt_PT": "europeisk portugisisk", "qu": "quechua", "raj": "rajasthani", "rap": "rapanui", "rar": "rarotongansk", "rm": "retoromansk", "rn": "rundi", "ro": "rumensk", "ro_MD": "moldavisk", "rof": "rombo", "rom": "romani", "root": "rot", "ru": "russisk", "rup": "aromansk", "rw": "kinjarwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "sah": "jakutsk", "sam": "samaritansk arameisk", "sas": "sasak", "sat": "santali", "sbp": "sangu", "sc": "sardinsk", "scn": "siciliansk", "sco": "skotsk", "sd": "sindhi", "se": "nordsamisk", "sel": "selkupisk", "sg": "sango", "sga": "gammalirsk", "sh": "serbokroatisk", "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", "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", "ter": "tereno", "tet": "tetum", "tg": "tatsjikisk", "th": "thai", "ti": "tigrinja", "tig": "tigré", "tiv": "tivi", "tk": "turkmensk", "tkl": "tokelau", "tl": "tagalog", "tlh": "klingon", "tli": "tlingit", "tmh": "tamasjek", "tn": "tswana", "to": "tonga (Tonga-øyane)", "tog": "tonga (Nyasa)", "tpi": "tok pisin", "tr": "tyrkisk", "ts": "tsonga", "tsi": "tsimshian", "tt": "tatarisk", "tum": "tumbuka", "tvl": "tuvalu", "tw": "twi", "twq": "tasawaq", "ty": "tahitisk", "tyv": "tuvinisk", "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", "wa": "vallonsk", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmyk", "xh": "xhosa", "yao": "yao", "yap": "yapesisk", "yav": "yangben", "yi": "jiddisk", "yo": "joruba", "yue": "kantonesisk", "za": "zhuang", "zap": "zapotec", "zbl": "blissymbol", "zen": "zenaga", "zh": "kinesisk", "zh_Hans": "forenkla kinesisk", "zh_Hant": "tradisjonell kinesisk", "zu": "zulu", "zun": "zuni", "zxx": "utan språkleg innhald", "zza": "zaza" } } src/Symfony/Component/Intl/Resources/data/languages/no.json000066400000000000000000000327171266465517700243560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afar", "ab": "abkhasisk", "ace": "achinesisk", "ach": "acoli", "ada": "adangme", "ady": "adyghe", "ae": "avestisk", "af": "afrikaans", "afh": "afrihili", "agq": "aghem", "ain": "ainu", "ak": "akan", "akk": "akkadisk", "ale": "aleutisk", "alt": "søraltaisk", "am": "amharisk", "an": "aragonsk", "ang": "gammelengelsk", "anp": "angika", "ar": "arabisk", "ar_001": "moderne standard arabisk", "arc": "arameisk", "arn": "araukansk", "arp": "arapaho", "arw": "arawak", "as": "assamisk", "asa": "asu", "ast": "asturisk", "av": "avarisk", "awa": "awadhi", "ay": "aymara", "az": "aserbajdsjansk", "ba": "basjkirsk", "bal": "baluchi", "ban": "balinesisk", "bas": "basa", "bax": "bamun", "bbj": "ghomala", "be": "hviterussisk", "bej": "beja", "bem": "bemba", "bez": "bena", "bfd": "bafut", "bg": "bulgarsk", "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": "akose", "bua": "buriat", "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": "chagatai", "chk": "chuukesisk", "chm": "mari", "chn": "chinook", "cho": "choctaw", "chp": "chipewiansk", "chr": "cherokesisk", "chy": "cheyenne", "ckb": "kurdisk (sorani)", "co": "korsikansk", "cop": "koptisk", "cr": "cree", "crh": "krimtatarisk", "cs": "tsjekkisk", "csb": "kasjubisk", "cu": "kirkeslavisk", "cv": "tsjuvansk", "cy": "walisisk", "da": "dansk", "dak": "dakota", "dar": "dargwa", "dav": "taita", "de": "tysk", "de_AT": "østerriksk tysk", "de_CH": "sveitsisk høytysk", "del": "delaware", "den": "slavisk", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "lavsorbisk", "dua": "duala", "dum": "mellomnederlandsk", "dv": "divehi", "dyo": "jola-fonyi", "dyu": "dyula", "dz": "dzongkha", "dzg": "dazaga", "ebu": "kiembu", "ee": "ewe", "efi": "efik", "egy": "gammelegyptisk", "eka": "ekajuk", "el": "gresk", "elx": "elamittisk", "en": "engelsk", "en_AU": "australsk engelsk", "en_CA": "canadisk engelsk", "en_GB": "britisk engelsk", "en_US": "amerikansk engelsk", "enm": "mellomengelsk", "eo": "esperanto", "es": "spansk", "es_419": "latinamerikansk spansk", "es_ES": "europeisk spansk", "es_MX": "meksikansk spansk", "et": "estisk", "eu": "baskisk", "ewo": "ewondo", "fa": "persisk", "fan": "fang", "fat": "fanti", "ff": "fulani", "fi": "finsk", "fil": "filippinsk", "fj": "fijiansk", "fo": "færøysk", "fon": "fon", "fr": "fransk", "fr_CA": "canadisk fransk", "fr_CH": "sveitsisk fransk", "frm": "mellomfransk", "fro": "gammelfransk", "frr": "nordfrisisk", "frs": "østfrisisk", "fur": "friuliansk", "fy": "vestfrisisk", "ga": "irsk", "gaa": "ga", "gag": "gagausisk", "gay": "gayo", "gba": "gbaya", "gd": "skotsk gælisk", "gez": "ges", "gil": "kiribatisk", "gl": "galisisk", "gmh": "mellomhøytysk", "gn": "guarani", "goh": "gammelhøytysk", "gon": "gondi", "gor": "gorontalo", "got": "gotisk", "grb": "grebo", "grc": "gammelgresk", "gsw": "sveitsertysk", "gu": "gujarati", "guz": "gusii", "gv": "mansk", "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øysorbisk", "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": "inuktitut", "ja": "japansk", "jbo": "lojban", "jgo": "ngomba", "jmc": "machame", "jpr": "jødepersisk", "jrb": "jødearabisk", "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", "kfo": "koro", "kg": "kikongo", "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": "komipermjakisk", "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": "ladinsk", "lag": "langi", "lah": "lahnda", "lam": "lamba", "lb": "luxemburgsk", "lez": "lezghian", "lg": "ganda", "li": "limburgisk", "lkt": "lakota", "ln": "lingala", "lo": "laotisk", "lol": "mongo", "loz": "lozi", "lt": "litauisk", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lushai", "luy": "luhya", "lv": "latvisk", "mad": "maduresisk", "maf": "mafa", "mag": "magahi", "mai": "maithili", "mak": "makasar", "man": "mandingo", "mas": "masai", "mde": "maba", "mdf": "moksha", "mdr": "mandar", "men": "mende", "mer": "meru", "mfe": "mauritisk-kreolsk", "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": "flere språk", "mus": "creek", "mwl": "mirandesisk", "mwr": "marwari", "my": "burmesisk", "mye": "myene", "myv": "erzya", "na": "nauru", "nap": "napolitansk", "naq": "nama", "nb": "norsk bokmål", "nd": "nord-ndebele", "nds": "lavtysk", "ne": "nepali", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niueansk", "nl": "nederlandsk", "nl_BE": "flamsk", "nmg": "kwasio", "nn": "norsk nynorsk", "nnh": "ngiemboon", "no": "norsk", "nog": "nogai", "non": "gammelnorsk", "nqo": "nkå", "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", "peo": "gammelpersisk", "phn": "fønikisk", "pi": "pali", "pl": "polsk", "pon": "ponapisk", "pro": "gammelprovençalsk", "ps": "pashto", "pt": "portugisisk", "pt_BR": "brasiliansk portugisisk", "pt_PT": "europeisk portugisisk", "qu": "quechua", "quc": "quiché", "raj": "rajasthani", "rap": "rapanui", "rar": "rarotongansk", "rm": "retoromansk", "rn": "rundi", "ro": "rumensk", "ro_MD": "moldovsk", "rof": "rombo", "rom": "romani", "root": "rot", "ru": "russisk", "rup": "aromansk", "rw": "kinyarwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "sah": "jakutsk", "sam": "samaritansk arameisk", "saq": "samburu", "sas": "sasak", "sat": "santali", "sba": "ngambay", "sbp": "sangu", "sc": "sardinsk", "scn": "siciliansk", "sco": "skotsk", "sd": "sindhi", "se": "nordsamisk", "see": "seneca", "seh": "sena", "sel": "selkupisk", "ses": "koyraboro senni", "sg": "sango", "sga": "gammelirsk", "sh": "serbokroatisk", "shi": "tachelhit", "shn": "shan", "shu": "Tsjad-arabisk", "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ør-sotho", "su": "sundanesisk", "suk": "sukuma", "sus": "susu", "sux": "sumerisk", "sv": "svensk", "sw": "swahili", "swb": "komorisk", "swc": "kongolesisk swahili", "syc": "klassisk syrisk", "syr": "syrisk", "ta": "tamilsk", "te": "telugu", "tem": "temne", "teo": "teso", "ter": "tereno", "tet": "tetum", "tg": "tadsjikisk", "th": "thai", "ti": "tigrinja", "tig": "tigré", "tiv": "tiv", "tk": "turkmensk", "tkl": "tokelau", "tl": "tagalog", "tlh": "klingon", "tli": "tlingit", "tmh": "tamasjek", "tn": "setswana", "to": "tongansk", "tog": "nyasa-tongansk", "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": "sentralmarokkansk 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": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmyk", "xh": "xhosa", "xog": "soga", "yao": "yao", "yap": "yapesisk", "yav": "yangben", "ybb": "yemba", "yi": "jiddisk", "yo": "joruba", "yue": "kantonesisk", "za": "zhuang", "zap": "zapotec", "zbl": "blissymboler", "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": "zaza" } } src/Symfony/Component/Intl/Resources/data/languages/om.json000066400000000000000000000053111266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/or.json000066400000000000000000000446271266465517700243650ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ଜାଜା" } } src/Symfony/Component/Intl/Resources/data/languages/os.json000066400000000000000000000053431266465517700243560ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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": "традицион китайаг" } } src/Symfony/Component/Intl/Resources/data/languages/pa.json000066400000000000000000000227451266465517700243420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "ਅਬਖਾਜ਼ੀਅਨ", "ace": "ਅਚੀਨੀ", "ach": "ਅਕੋਲੀ", "af": "ਅਫ਼ਰੀਕੀ", "agq": "ਅਗੇਮ", "ak": "ਅਕਾਨ", "am": "ਅਮਹਾਰਿਕ", "ang": "ਪੁਰਾਣੀ ਅੰਗਰੇਜ਼ੀ", "ar": "ਅਰਬੀ", "ar_001": "ਆਧੁਨਿਕ ਮਿਆਰੀ ਅਰਬੀ", "arn": "ਮਾਪੁਚੇ", "as": "ਅਸਾਮੀ", "asa": "ਅਸੂ", "az": "ਅਜ਼ਰਬਾਈਜਾਨੀ", "ba": "ਬਸ਼ਕੀਰ", "be": "ਬੇਲਾਰੂਸੀ", "bem": "ਬੇਮਬਾ", "bez": "ਬੇਨਾ", "bg": "ਬੁਲਗਾਰੀਆਈ", "bho": "ਭੋਜਪੁਰੀ", "bm": "ਬੰਬਾਰਾ", "bn": "ਬੰਗਾਲੀ", "bo": "ਤਿੱਬਤੀ", "br": "ਬਰੇਟਨ", "brx": "ਬੋਡੋ", "bs": "ਬੋਸਨੀਆਈ", "ca": "ਕੈਟਾਲਾਨ", "ce": "ਚੇਚਨ", "cgg": "ਚੀਗਾ", "chm": "ਮਾਰੀ", "chr": "ਚੇਰੋਕੀ", "ckb": "ਸੋਰਾਨੀ ਕੁਰਦਿਸ਼", "co": "ਕੋਰਸੀਕਨ", "cs": "ਚੈਕ", "cy": "ਵੈਲਜ਼", "da": "ਡੈਨਿਸ਼", "dav": "ਟੇਟਾ", "de": "ਜਰਮਨ", "de_AT": "ਆਸਟਰੀਆਈ ਜਰਮਨ", "de_CH": "ਸਵਿਸ ਹਾਈ ਜਰਮਨ", "dje": "ਜ਼ਾਰਮਾ", "dsb": "ਲੋਅਰ ਸੋਰਬੀਅਨ", "dua": "ਡੂਆਲਾ", "dyo": "ਜੋਲਾ-ਫੋਇਨੀ", "dz": "ਜ਼ੋਂਗਖਾ", "ebu": "ਇੰਬੂ", "ee": "ਈਵਈ", "egy": "ਪੁਰਾਤਨ ਮਿਸਰੀ", "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": "ਗੁਆਰਾਨੀ", "grc": "ਪੁਰਾਤਨ ਯੂਨਾਨੀ", "gsw": "ਸਵਿਸ ਜਰਮਨ", "gu": "ਗੁਜਰਾਤੀ", "guz": "ਗੁਸੀ", "gv": "ਮੈਂਕਸ", "ha": "ਹੌਸਾ", "haw": "ਹਵਾਈ", "he": "ਹਿਬਰੂ", "hi": "ਹਿੰਦੀ", "hif": "ਫਿਜੀ ਹਿੰਦੀ", "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": "ਲਾਓ", "lt": "ਲਿਥੁਆਨੀਅਨ", "lu": "ਲੂਬਾ-ਕਾਟਾਂਗਾ", "luo": "ਲੂਓ", "luy": "ਲੂਈਆ", "lv": "ਲਾਟਵਿਅਨ", "mai": "ਮੈਥਲੀ", "mas": "ਮਸਾਈ", "mer": "ਮੇਰੂ", "mfe": "ਮੋਰੀਸਿਅਨ", "mg": "ਮੇਲੇਗਸੀ", "mgh": "ਮਖੋਵਾ-ਮਿੱਟੋ", "mgo": "ਮੇਟਾ", "mi": "ਮਾਉਰੀ", "mk": "ਮੈਕਡੋਨੀਆਈ", "ml": "ਮਲਿਆਲਮ", "mn": "ਮੰਗੋਲੀਅਨ", "mni": "ਮਨੀਪੁਰੀ", "moh": "ਮੋਹਾਵਕ", "mr": "ਮਰਾਠੀ", "ms": "ਮਲਯ", "mt": "ਮਾਲਟੀਜ਼", "mua": "ਮੁੰਡੇਂਗ", "mul": "ਕਈ ਭਾਸ਼ਾਵਾਂ", "my": "ਬਰਮੀ", "naq": "ਨਾਮਾ", "nb": "ਨਾਰਵੇਜਿਆਈ ਬੋਕਮਲ", "nd": "ਉੱਤਰੀ ਨਡੇਬੇਲੇ", "ne": "ਨੇਪਾਲੀ", "nl": "ਡੱਚ", "nl_BE": "ਫਲੈਮਿਸ਼", "nmg": "ਕਵਾਸਿਓ", "nn": "ਨਾਰਵੇਜਿਆਈ ਨਿਓਨੌਰਸਕ", "no": "ਨਾਰਵੇਜੀਅਨ", "nqo": "ਐਂਕੋ", "nus": "ਨੁਏਰ", "nyn": "ਨਿਆਂਕੋਲੇ", "om": "ਓਰੋਮੋ", "or": "ਉੜੀਆ", "pa": "ਪੰਜਾਬੀ", "pi": "ਪਲੀ", "pl": "ਪੋਲੈਂਡੀ", "ps": "ਪਸ਼ਤੋ", "pt": "ਪੁਰਤਗਾਲੀ", "pt_BR": "ਬ੍ਰਾਜ਼ੀਲੀਆਈ ਪੁਰਤਗਾਲੀ", "pt_PT": "ਯੂਰਪੀ ਪੁਰਤਗਾਲੀ", "qu": "ਕਕੇਸ਼ੁਆ", "quc": "ਕੇਸ਼", "raj": "ਰਾਜਸਥਾਨੀ", "rm": "ਰੋਮਾਂਸ਼", "rn": "ਰੁੰਡੀ", "ro": "ਰੋਮਾਨੀਆਈ", "ro_MD": "ਮੋਲਡਾਵੀਆਈ", "rof": "ਰੋਮਬੋ", "ru": "ਰੂਸੀ", "rw": "ਕਿਨਿਆਰਵਾਂਡਾ", "rwk": "ਰਵਾ", "sa": "ਸੰਸਕ੍ਰਿਤ", "saq": "ਸਮਬੁਰੂ", "sat": "ਸੰਥਾਲੀ", "sbp": "ਸੇਂਗੋ", "sd": "ਸਿੰਧੀ", "se": "ਉੱਤਰੀ ਸਾਮੀ", "seh": "ਸੇਨਾ", "ses": "ਕੋਇਰਾਬੋਰੋ ਸੇਂਨੀ", "sg": "ਸਾਂਗੋ", "shi": "ਟਚੇਲਹਿਟ", "shn": "ਸ਼ਾਨ", "si": "ਸਿੰਹਾਲਾ", "sk": "ਸਲੋਵਾਕ", "sl": "ਸਲੋਵੇਨੀਆਈ", "sma": "ਦੱਖਣੀ ਸਾਮੀ", "smj": "ਲਿਊਲ ਸਾਮੀ", "smn": "ਇਨਾਰੀ ਸਾਮੀ", "sms": "ਸਕੌਲਟ ਸਾਮੀ", "sn": "ਸ਼ੋਨਾ", "so": "ਸੋਮਾਲੀ", "sq": "ਅਲਬਾਨੀਆਈ", "sr": "ਸਰਬੀਆਈ", "su": "ਸੂਡਾਨੀ", "sv": "ਸਵੀਡਿਸ਼", "sw": "ਸਵਾਹਿਲੀ", "swc": "ਕਾਂਗੋ ਸਵਾਹਿਲੀ", "ta": "ਤਮਿਲ", "te": "ਤੇਲਗੂ", "teo": "ਟੇਸੋ", "tg": "ਤਾਜਿਕ", "th": "ਥਾਈ", "ti": "ਤਿਗ੍ਰੀਨਿਆ", "tk": "ਤੁਰਕਮੇਨ", "to": "ਟੌਂਗਨ", "tr": "ਤੁਰਕੀ", "tt": "ਤਤਾਰ", "tw": "ਤ੍ਵਿ", "twq": "ਤਾਸਾਵਿਕ", "tzm": "ਮੱਧ ਐਟਲਸ ਤਮਾਜ਼ਿਤ", "ug": "ਉਇਗੁਰ", "uk": "ਯੂਕਰੇਨੀਆਈ", "und": "ਅਣਪਛਾਤੀ ਭਾਸ਼ਾ", "ur": "ਉਰਦੂ", "uz": "ਉਜ਼ਬੇਕ", "vai": "ਵਾਈ", "vi": "ਵੀਅਤਨਾਮੀ", "vun": "ਵੂੰਜੋ", "wo": "ਵੋਲੋਫ", "xh": "ਖੋਸਾ", "xog": "ਸੋਗਾ", "yo": "ਯੋਰੂਬਾ", "zgh": "ਮਿਆਰੀ ਮੋਰੋਕੇਨ ਟਾਮਾਜ਼ਿਕ", "zh": "ਚੀਨੀ", "zh_Hans": "ਸਰਲ ਚੀਨੀ", "zh_Hant": "ਰਵਾਇਤੀ ਚੀਨੀ", "zu": "ਜ਼ੁਲੂ", "zxx": "ਕੋਈ ਭਾਸ਼ਾਈ ਸਮੱਗਰੀ ਨਹੀਂ" } } src/Symfony/Component/Intl/Resources/data/languages/pa_Arab.json000066400000000000000000000001211266465517700252470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "pa": "پنجابی" } } src/Symfony/Component/Intl/Resources/data/languages/pl.json000066400000000000000000000411371266465517700243510ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "araukański", "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": "azerski", "azb": "południowoazerski", "ba": "baszkirski", "bal": "beludżi", "ban": "balijski", "bar": "bawarski", "bas": "basa", "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", "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": "akose", "bua": "buriacki", "bug": "bugiński", "bum": "bulu", "byn": "blin", "byv": "medumba", "ca": "kataloński", "cad": "kaddo", "car": "karibi", "cay": "kajuga", "cch": "atsam", "ce": "czeczeński", "ceb": "cebuano", "cgg": "chiga", "ch": "chamorro", "chb": "czibcza", "chg": "czagatajski", "chk": "truk", "chm": "maryjski", "chn": "żargon Chinook", "cho": "choctaw", "chp": "chipewyan", "chr": "czirokeski", "chy": "język Czejenów", "ckb": "sorani", "co": "korsykański", "cop": "koptyjski", "cps": "capiznon", "cr": "kri", "crh": "krymski turecki", "cs": "czeski", "csb": "kaszubski", "cu": "staro-cerkiewno-sł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": "dyula", "dz": "dzongkha", "dzg": "dazaga", "ebu": "embu", "ee": "ewe", "efi": "efik", "egl": "emilijski", "egy": "starożytny egipski", "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": "cajun", "frm": "średniofrancuski", "fro": "starofrancuski", "frp": "franko-prowansalski", "frr": "północnofryzyjski", "frs": "fryzyjski wschodni", "fur": "friulijski", "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źaracki", "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": "hiligajnon", "hit": "hetycki", "hmn": "hmongijski", "ho": "hiri motu", "hr": "chorwacki", "hsb": "górnołużycki", "hsn": "xiang", "ht": "haitański", "hu": "węgierski", "hup": "hupa", "hy": "ormiański", "hz": "herero", "ia": "interlingua", "iba": "ibanag", "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": "judeoperski", "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 chini", "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": "limburgijski", "lij": "liguryjski", "liv": "liwski", "lkt": "lakota", "lmo": "lombardzki", "ln": "lingala", "lo": "laotański", "lol": "mongo", "loz": "lozi", "lt": "litewski", "ltg": "łatgalski", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lushai", "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": "moksha", "mdr": "mandar", "men": "mende", "mer": "meru", "mfe": "kreolski Mauritiusa", "mg": "malgaski", "mga": "średnioirlandzki", "mgh": "makua", "mgo": "meta", "mh": "marshall", "mi": "maoryjski", "mic": "micmac", "min": "minangkabu", "mk": "macedoński", "ml": "malajalam", "mn": "mongolski", "mnc": "manchu", "mni": "manipuryjski", "moh": "mohawk", "mos": "mossi", "mr": "marathi", "mrj": "zachodniomaryjski", "ms": "malajski", "mt": "maltański", "mua": "mundang", "mul": "wiele języków", "mus": "creek", "mwl": "mirandese", "mwr": "marwari", "mwv": "mentawai", "my": "birmański", "mye": "myene", "myv": "erzya", "mzn": "mazanderański", "na": "nauru", "nan": "minnański", "nap": "neapolitański", "naq": "nama", "nb": "norweski (bokmål)", "nd": "ndebele północny", "nds": "dolnosaksoński", "ne": "nepalski", "new": "newarski", "ng": "ndonga", "nia": "nias", "niu": "niue", "njo": "ao", "nl": "niderlandzki", "nl_BE": "flamandzki (Belgia)", "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": "prowansalski", "oj": "odżibwa", "om": "oromski", "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", "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": "chimborazo górski keczua", "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": "szkocki", "sd": "sindhi", "sdc": "sassarski", "se": "lapoński północny", "see": "seneka", "seh": "sena", "sei": "seri", "sel": "selkupski", "ses": "koyraboro senni", "sg": "sango", "sga": "staroirlandzki", "sgs": "żmudzki", "sh": "serbsko-chorwacki", "shi": "tashelhiyt", "shn": "shan", "shu": "arabski (Czad)", "si": "syngaleski", "sid": "sidamo", "sk": "słowacki", "sl": "słoweński", "sli": "dolnośląski", "sly": "selayar", "sm": "samoański", "sma": "lapoński południowy", "smj": "lapoński Lule", "smn": "lapoński Inari", "sms": "lapoński Skolt", "sn": "szona", "snk": "soninke", "so": "somalijski", "sog": "sogdyjski", "sq": "albański", "sr": "serbski", "srn": "sranan tongo", "srr": "serer", "ss": "siswati", "ssy": "saho", "st": "sotho południowy", "stq": "fryzyjski saterlandzki", "su": "sundajski", "suk": "sukuma", "sus": "susu", "sux": "sumeryjski", "sv": "szwedzki", "sw": "suahili", "swb": "komoryjski", "swc": "kongijski suahili", "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": "centralnomarokański tamazight", "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": "volapuk", "vot": "wotiacki", "vro": "võro", "vun": "vunjo", "wa": "waloński", "wae": "walser", "wal": "walamo", "war": "waraj", "was": "washo", "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": "nhengatu", "yue": "kantoński", "za": "czuang", "zap": "zapotecki", "zbl": "bliss", "zea": "zelandzki", "zen": "zenaga", "zgh": "zgh", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ps.json000066400000000000000000000016621266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "ar": "عربي", "bal": "بلوڅي", "de": "الماني", "el": "یوناني", "en": "انګلیسي", "et": "حبشي", "fa": "فارسي", "fi": "فینلنډي", "fr": "فرانسوي", "he": "عبري", "hi": "هندي", "hy": "ارمني", "it": "ایټالوي", "ja": "جاپانی", "ku": "کردي", "la": "لاتیني", "mg": "ملغاسي", "mk": "مقدوني", "mn": "مغولي", "ms": "ملایا", "pl": "پولنډي", "ps": "پښتو", "pt": "پورتګالي", "ru": "روسي", "sa": "سنسکریټ", "sv": "سویډنی", "tg": "تاجک", "tk": "ترکمني", "tt": "تاتار", "uz": "ازبکي", "zh": "چیني" } } src/Symfony/Component/Intl/Resources/data/languages/pt.json000066400000000000000000000330151266465517700243550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "araucano", "arp": "arapaho", "arw": "arauaqui", "as": "assamês", "asa": "asu", "ast": "asturiano", "av": "avaric", "awa": "awadhi", "ay": "aimara", "az": "azerbaijano", "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", "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": "buriat", "bug": "buguinê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": "chinook jargon", "cho": "choctaw", "chp": "chipewyan", "chr": "cherokee", "chy": "cheiene", "ckb": "sorâni curdo", "co": "córsico", "cop": "copta", "cr": "cree", "crh": "turco da Crimeia", "cs": "tcheco", "csb": "kashubian", "cu": "eslavo eclesiástico", "cv": "chuvash", "cy": "galês", "da": "dinamarquês", "dak": "dacota", "dar": "dargwa", "dav": "taita", "de": "alemão", "de_AT": "alemão austríaco", "de_CH": "alto alemão suíço", "del": "delaware", "den": "slave", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "sérvio baixo", "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", "en_AU": "inglês australiano", "en_CA": "inglês canadense", "en_GB": "inglês britânico", "en_US": "inglês americano", "enm": "inglês médio", "eo": "esperanto", "es": "espanhol", "es_419": "espanhol latino-americano", "es_ES": "espanhol europeu", "es_MX": "espanhol mexicano", "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", "fr_CA": "francês canadense", "fr_CH": "francês suíço", "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", "gay": "gayo", "gba": "gbaia", "gd": "gaélico escocês", "gez": "geez", "gil": "gilbertês", "gl": "galego", "gmh": "alemão médio-alto", "gn": "guarani", "goh": "alemão arcaico alto", "gon": "gondi", "gor": "gorontalo", "got": "gótico", "grb": "grebo", "grc": "grego arcaico", "gsw": "alemão suíço", "gu": "guzerate", "guz": "gusii", "gv": "manx", "gwi": "gwichʼin", "ha": "hauçá", "hai": "haida", "haw": "havaiano", "he": "hebraico", "hi": "híndi", "hil": "hiligaynon", "hit": "hitita", "hmn": "hmong", "ho": "hiri motu", "hr": "croata", "hsb": "sorábio superior", "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": "idioma 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", "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": "idiomas múltiplos", "mus": "creek", "mwl": "mirandês", "mwr": "marwari", "my": "birmanês", "mye": "myene", "myv": "erzya", "na": "nauruano", "nap": "napolitano", "naq": "nama", "nb": "bokmål norueguês", "nd": "ndebele do norte", "nds": "baixo-alemã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": "ossetic", "osa": "osage", "ota": "turco otomano", "pa": "panjabi", "pag": "pangasinã", "pal": "pálavi", "pam": "pampanga", "pap": "papiamento", "pau": "palauano", "peo": "persa arcaico", "phn": "fenício", "pi": "páli", "pl": "polonês", "pon": "pohnpeian", "pro": "provençal arcaico", "ps": "pashto", "pt": "português", "pt_BR": "português do Brasil", "pt_PT": "português europeu", "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", "ru": "russo", "rup": "aromeno", "rw": "ruanda", "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": "escocês", "sd": "sindi", "se": "sami do norte", "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": "lule sami", "smn": "inari sami", "sms": "skolt sami", "sn": "shona", "snk": "soninquê", "so": "somali", "sog": "sogdiano", "sq": "albanês", "sr": "sérvio", "srn": "idioma surinamês", "srr": "serere", "ss": "swati", "ssy": "saho", "st": "soto do sul", "su": "sundanês", "suk": "sukuma", "sus": "sosso", "sux": "sumério", "sv": "sueco", "sw": "suaíli", "swb": "comoriano", "swc": "suaíli do Congo", "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ínia", "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": "tsimshian", "tt": "tatar", "tum": "tumbuka", "tvl": "tuvaluano", "tw": "twi", "twq": "tasawaq", "ty": "taitiano", "tyv": "tuvinian", "tzm": "tamazight", "udm": "udmurt", "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": "votic", "vun": "vunjo", "wa": "valão", "wae": "walser", "wal": "walamo", "war": "waray", "was": "washo", "wo": "uólofe", "xal": "kalmyk", "xh": "xosa", "xog": "lusoga", "yao": "yao", "yap": "yapese", "yav": "yangben", "ybb": "yemba", "yi": "iídiche", "yo": "ioruba", "yue": "cantonês", "za": "zhuang", "zap": "zapoteca", "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" } } src/Symfony/Component/Intl/Resources/data/languages/pt_PT.json000066400000000000000000000036101266465517700247560ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "af": "africânder", "ar_001": "árabe moderno padrão", "arn": "mapuche", "bax": "bamun", "bbj": "ghomala", "bug": "buginese", "ce": "chechene", "chn": "jargão chinook", "ckb": "sorani curdo", "cs": "checo", "dsb": "baixo sórabio", "dyu": "diula", "ee": "ewe", "egy": "egípcio clássico", "en_CA": "inglês canadiano", "enm": "inglês medieval", "es_MX": "espanhol do México", "et": "estónio", "fr_CA": "francês canadiano", "frm": "francês medieval", "frs": "frísio oriental", "fy": "frísico ocidental", "gmh": "alemão medieval alto", "grc": "grego clássico", "ha": "haúça", "hi": "hindi", "hsb": "alto sórabio", "hy": "arménio", "ig": "igbo", "ik": "inupiaq", "kea": "cabo-verdiano", "kg": "conguês", "km": "cmer", "kn": "canarim", "lez": "lezghiano", "lg": "ganda", "luo": "luo", "mga": "irlandês, medieval", "mk": "macedónio", "moh": "mohawk", "nb": "norueguês bokmål", "nds": "baixo alemão", "nn": "norueguês nynorsk", "non": "norse, old", "oc": "provençal", "os": "ossético", "pl": "polaco", "pro": "provençal, arcaico", "ps": "pastó", "rom": "romanês", "root": "root", "rw": "kinyarwanda", "sah": "sakha", "shu": "árabe do Chade", "swb": "língua comoriana", "tk": "turcomano", "to": "tonga", "tog": "toganês", "tyv": "tuviniano", "tzm": "tamazight do Atlas Central", "vai": "vai", "xog": "soga", "zgh": "tamazight padrão de Marrocos" } } src/Symfony/Component/Intl/Resources/data/languages/qu.json000066400000000000000000000075511266465517700243650ustar00rootroot00000000000000{ "Version": "2.1.6.71", "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" } } src/Symfony/Component/Intl/Resources/data/languages/rm.json000066400000000000000000000264471266465517700243630ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" } } src/Symfony/Component/Intl/Resources/data/languages/rn.json000066400000000000000000000024771266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/ro.json000066400000000000000000000333461266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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ă", "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": "cebuano", "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ă sorani", "co": "corsicană", "cop": "coptă", "cr": "cree", "crh": "turcă crimeeană", "cs": "cehă", "csb": "cașubiană", "cu": "slavonă", "cv": "ciuvașă", "cy": "galeză", "da": "daneză", "dak": "dakota", "dar": "dargwa", "dav": "taita", "de": "germană", "de_AT": "germană austriacă", "de_CH": "germană standard elvețiană", "del": "delaware", "den": "slave", "dgr": "dogrib", "din": "dinka", "dje": "zarma", "doi": "dogri", "dsb": "sorabă de jos", "dua": "duala", "dum": "olandeză mijlocie", "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ă", "en_AU": "engleză australiană", "en_CA": "engleză canadiană", "en_GB": "engleză britanică", "en_US": "engleză americană", "enm": "engleză mijlocie", "eo": "esperanto", "es": "spaniolă", "es_419": "spaniolă latino-americană", "es_ES": "spaniolă europeană", "es_MX": "spaniolă mexicană", "et": "estoniană", "eu": "bască", "ewo": "ewondo", "fa": "persană", "fan": "fang", "fat": "fanti", "ff": "fulah", "fi": "finlandeză", "fil": "filipineză", "fj": "fijiană", "fo": "faroeză", "fon": "fon", "fr": "franceză", "fr_CA": "franceză canadiană", "fr_CH": "franceză elvețiană", "frm": "franceză mijlocie", "fro": "franceză veche", "frr": "frizonă nordică", "frs": "frizonă orientală", "fur": "friulană", "fy": "frizonă occidentală", "ga": "irlandeză", "gaa": "ga", "gag": "găgăuză", "gay": "gayo", "gba": "gbaya", "gd": "gaelică scoțiană", "gez": "geez", "gil": "gilbertină", "gl": "galiciană", "gmh": "germană mijlocie înaltă", "gn": "guarani", "goh": "germană veche înaltă", "gon": "gondi", "gor": "gorontalo", "got": "gotică", "grb": "grebo", "grc": "greacă veche", "gsw": "germană elvețiană", "gu": "gujarati", "guz": "gusii", "gv": "manx", "gwi": "gwichʼin", "ha": "hausa", "hai": "haida", "haw": "hawaiiană", "he": "ebraică", "hi": "hindi", "hil": "hiligaynon", "hit": "hitită", "hmn": "hmong", "ho": "hiri motu", "hr": "croată", "hsb": "sorabă de sus", "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": "limbp 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", "lt": "lituaniană", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseno", "lun": "lunda", "luo": "luo", "lus": "lusahi", "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ă mijlocie", "mgh": "makhuwa-meetto", "mgo": "meta’", "mh": "marshalleză", "mi": "maori", "mic": "micmac", "min": "minangkabau", "mk": "macedoneană", "ml": "malayalam", "mn": "mongolă", "mnc": "manciuriană", "mni": "manipur", "moh": "mohawk", "mos": "mossi", "mr": "marathi", "ms": "malaeză", "mt": "malteză", "mua": "mundang", "mul": "limbi multiple", "mus": "creek", "mwl": "mirandeză", "mwr": "marwari", "my": "birmaneză", "mye": "myene", "myv": "erzya", "na": "nauru", "nap": "napolitană", "naq": "nama", "nb": "norvegiană bokmål", "nd": "ndebele de nord", "nds": "germana de jos", "ne": "nepaleză", "new": "newari", "ng": "ndonga", "nia": "nias", "niu": "niueană", "nl": "olandeză", "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ă", "peo": "persană veche", "phn": "feniciană", "pi": "pali", "pl": "poloneză", "pon": "pohnpeiană", "pro": "provensală veche", "ps": "paștună", "pt": "portugheză", "pt_BR": "portugheză braziliană", "pt_PT": "portugheză europeană", "qu": "quechua", "quc": "kʼicheʼ", "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", "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": "singhaleză", "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", "swb": "comoreză", "swc": "swahili Congo", "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": "tonga", "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": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "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_Hans": "chineză simplificată", "zh_Hant": "chineză tradițională", "zu": "zulu", "zun": "zuni", "zxx": "fară conținut lingvistic", "zza": "zaza" } } src/Symfony/Component/Intl/Resources/data/languages/ru.json000066400000000000000000000447741266465517700243760ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "европейский испанский", "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": "лози", "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": "голландский", "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": "палау", "peo": "староперсидский", "phn": "финикийский", "pi": "пали", "pl": "польский", "pon": "понапе", "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": "синдхи", "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": "суахили", "swb": "коморский", "swc": "конголезский суахили", "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": "вашо", "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": "заза" } } src/Symfony/Component/Intl/Resources/data/languages/ru_UA.json000066400000000000000000000002331266465517700247410ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "den": "слэйви", "mh": "маршальский", "tlh": "клингон" } } src/Symfony/Component/Intl/Resources/data/languages/rw.json000066400000000000000000000062001266465517700243560ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/se.json000066400000000000000000000066141266465517700243460ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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" } } src/Symfony/Component/Intl/Resources/data/languages/se_FI.json000066400000000000000000000023441266465517700247200ustar00rootroot00000000000000{ "Version": "2.1.8.19", "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" } } src/Symfony/Component/Intl/Resources/data/languages/sg.json000066400000000000000000000022751266465517700243470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/sh.json000066400000000000000000000311431266465517700243440ustar00rootroot00000000000000{ "Version": "2.1.8.20", "Names": { "aa": "Afarski", "ab": "abhaski", "ace": "Ačineski", "ach": "Akoli", "ada": "Adangmejski", "ady": "Adigejski", "ae": "Avestanski", "af": "afrikans", "afh": "Afrihili", "agq": "agem", "ain": "Ainu", "ak": "akan", "akk": "Akadijski", "ale": "Aljut", "alt": "Južni altai", "am": "amharski", "an": "Aragonežanski", "ang": "Staroengleski", "anp": "Angika", "ar": "arapski", "ar_001": "moderan standardni arapski", "arc": "Armajski", "arn": "mapuče", "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", "be": "beloruski", "bej": "Beja", "bem": "bemba", "bez": "bena", "bg": "bugarski", "bho": "Bojpuri", "bi": "Bislama", "bik": "Bikol", "bin": "Bini", "bla": "Sisika", "bm": "bambara", "bn": "bengalski", "bo": "tibetanski", "br": "bretonski", "bra": "Braj", "brx": "bodo", "bs": "bosanski", "bua": "Buriat", "bug": "Buginežanski", "byn": "Blin", "ca": "katalonski", "cad": "Kado", "car": "Karipski", "cch": "Atsamski", "ce": "Čečenski", "ceb": "Cebuano", "cgg": "čiga", "ch": "Čamoro", "chb": "Čibča", "chg": "Čagatai", "chk": "Čukeski", "chm": "Mari", "chn": "Činukski", "cho": "Čoktavski", "chp": "Čipvijanski", "chr": "čeroki", "chy": "Čejenski", "ckb": "sorani kurdski", "co": "korzikanski", "cop": "Koptski", "cr": "Kri", "crh": "Krimeanski turski", "cs": "češki", "csb": "Kašubijanski", "cu": "Staroslovenski", "cv": "Čuvaški", "cy": "velški", "da": "danski", "dak": "Dakota", "dar": "Dargva", "dav": "taita", "de": "nemački", "de_CH": "švajcarski visoki nemački", "del": "Delaver", "den": "Slavski", "dgr": "Dogrib", "din": "Dinka", "dje": "zarma", "doi": "Dogri", "dsb": "donji lužičkosrpski", "dua": "duala", "dum": "Srednji holandski", "dv": "Divehijski", "dyo": "džola fonji", "dyu": "Đula", "dz": "džonga", "ebu": "embu", "ee": "eve", "efi": "Efikski", "egy": "Staroegipatski", "eka": "Ekajuk", "el": "grčki", "elx": "Elamitski", "en": "engleski", "enm": "Srednji engleski", "eo": "esperanto", "es": "španski", "et": "estonski", "eu": "baskijski", "ewo": "Evondo", "fa": "persijski", "fan": "Fang", "fat": "Fanti", "ff": "Fulah", "fi": "finski", "fil": "filipinski", "fj": "fidžijski", "fo": "farski", "fon": "Fon", "fr": "francuski", "frm": "Srednji francuski", "fro": "Starofrancuski", "frr": "Severno-frizijski", "frs": "Istočni frizijski", "fur": "Friulijski", "fy": "zapadni frizijski", "ga": "irski", "gaa": "Ga", "gag": "gagauz", "gay": "Gajo", "gba": "Gbaja", "gd": "Škotski Galski", "gez": "Džiz", "gil": "Gilbertški", "gl": "galicijski", "gmh": "Srednji visoki nemač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č’in", "ha": "hausa", "hai": "Haida", "haw": "havajski", "he": "hebrejski", "hi": "hindi", "hil": "Hiligajnon", "hit": "Hitite", "hmn": "Hmong", "ho": "Hiri Motu", "hr": "hrvatski", "hsb": "gornji lužičkosrpski", "ht": "Haitski", "hu": "mađarski", "hup": "Hupa", "hy": "jermenski", "hz": "Herero", "ia": "Interlingva", "iba": "Iban", "id": "indonežanski", "ie": "Međujezički", "ig": "igbo", "ii": "sečuan ji", "ik": "Unupiak", "ilo": "Iloko", "inh": "Ingviški", "io": "Ido", "is": "islandski", "it": "italijanski", "iu": "inuktitut", "ja": "japanski", "jbo": "Lojban", "jgo": "ngomba", "jmc": "mačame", "jpr": "Judeo-persijski", "jrb": "Judeo-arapski", "jv": "javanski", "ka": "gruzijski", "kaa": "Kara-kalpaški", "kab": "kabile", "kac": "Kačin", "kaj": "Đu", "kam": "kamba", "kaw": "Kavi", "kbd": "Kabardijski", "kcg": "Tjap", "kde": "makonde", "kea": "zelenortski kreolski", "kfo": "Koro", "kg": "Kongo", "kha": "Kasi", "kho": "Kotaneški", "khq": "kojra čiini", "ki": "kikuju", "kj": "Kuanjama", "kk": "kazaški", "kl": "kalalisut", "kln": "kalendžin", "km": "kmerski", "kmb": "Kimbundu", "kn": "kanada", "ko": "korejski", "koi": "komi-permski", "kok": "konkani", "kos": "Kosreanski", "kpe": "Kpele", "kr": "Kanuri", "krc": "Karačaj-balkar", "krl": "Karelijski", "kru": "Kurukh", "ks": "kašmirski", "ksb": "šambala", "ksf": "bafija", "ku": "kurdski", "kum": "Kumik", "kut": "Kutenai", "kv": "Komi", "kw": "kornvolski", "ky": "kirgiski", "la": "latinski", "lad": "Ladino", "lag": "langi", "lah": "Landa", "lam": "Lamba", "lb": "luksemburški", "lez": "Lezgian", "lg": "ganda", "li": "Limburgiš", "lkt": "lakota", "ln": "lingala", "lo": "laoški", "lol": "Mongo", "loz": "Lozi", "lt": "litvanski", "lu": "luba-katanga", "lua": "Luba-lulua", "lui": "Luiseno", "lun": "Lunda", "luo": "luo", "lus": "Lušai", "luy": "lujia", "lv": "letonski", "mad": "Madureški", "mag": "Magahi", "mai": "Maitili", "mak": "Makasar", "man": "Mandingo", "mas": "masai", "mdf": "Mokša", "mdr": "Mandar", "men": "Mende", "mer": "meru", "mfe": "morisjen", "mg": "malgaški", "mga": "Srednji irski", "mgh": "makuva-meeto", "mgo": "meta", "mh": "Maršalski", "mi": "maorski", "mic": "Mikmak", "min": "Minangkabau", "mk": "makedonski", "ml": "malajalam", "mn": "mongolski", "mnc": "Manču", "mni": "Manipuri", "moh": "mohok", "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", "myv": "Erzija", "na": "Nauru", "nap": "Neapolitanski", "naq": "nama", "nb": "norveški bokmal", "nd": "severni ndebele", "nds": "Niski nemački", "ne": "nepalski", "new": "Nevari", "ng": "Ndonga", "nia": "Nias", "niu": "Niuean", "nl": "holandski", "nl_BE": "flamanski", "nmg": "kvasio", "nn": "norveški ninorsk", "no": "Norveški", "nog": "Nogai", "non": "Stari norski", "nqo": "N’ko", "nr": "Južni ndebele", "nso": "Severni soto", "nus": "nuer", "nv": "Navaho", "nwc": "Klasični nevari", "ny": "Njanja", "nym": "Njamvezi", "nyn": "njankole", "nyo": "Njoro", "nzi": "Nzima", "oc": "Provansalski", "oj": "Ojibva", "om": "oromo", "or": "orija", "os": "Osetski", "osa": "Osage", "ota": "Otomanski turski", "pa": "pandžabi", "pag": "Pangasinski", "pal": "Pahlavi", "pam": "Pampanga", "pap": "Papiamento", "pau": "Palauanski", "peo": "Staropersijski", "phn": "Feničanski", "pi": "Pali", "pl": "poljski", "pon": "Ponpejski", "pro": "Staroprovansalski", "ps": "paštunski", "pt": "portugalski", "pt_BR": "Brazilski portugalski", "pt_PT": "Iberijski portugalski", "qu": "kečua", "quc": "k’iče", "raj": "Rađastani", "rap": "Rapanui", "rar": "Rarotongan", "rm": "reto-romanski", "rn": "rundi", "ro": "rumunski", "ro_MD": "moldavski", "rof": "rombo", "rom": "Romani", "root": "Rut", "ru": "ruski", "rup": "Aromanijski", "rw": "kinjaruanda", "rwk": "rua", "sa": "sanskrit", "sad": "Sandave", "sah": "Jakut", "sam": "Samaritanski aramejski", "saq": "samburu", "sas": "Sasak", "sat": "Santali", "sbp": "sangu", "sc": "Sardinjaski", "scn": "Sicilijanski", "sco": "Škotski", "sd": "sindi", "se": "severni sami", "seh": "sena", "sel": "Selkap", "ses": "kojraboro seni", "sg": "sango", "sga": "Staroirski", "sh": "Srpskohrvatski", "shi": "tašelhit", "shn": "Šan", "si": "sinhalski", "sid": "Sidamo", "sk": "slovački", "sl": "slovenački", "sm": "Samoanski", "sma": "južni sami", "smj": "lule sami", "smn": "inari sami", "sms": "skolt sami", "sn": "šona", "snk": "Soninke", "so": "somalski", "sog": "Sodžijenski", "sq": "albanski", "sr": "srpski", "srn": "Srananski tongo", "srr": "Serer", "ss": "Svati", "st": "Sesoto", "su": "sudanski", "suk": "Sukuma", "sus": "Susu", "sux": "Sumerski", "sv": "švedski", "sw": "svahili", "swb": "Komorski", "swc": "kongo svahili", "syc": "Klasični sirijski", "syr": "Sirijski", "ta": "tamilski", "te": "telugu", "tem": "Timne", "teo": "teso", "ter": "Tereno", "tet": "Tetum", "tg": "Tađik", "th": "tajlandski", "ti": "tigrinja", "tig": "Tigre", "tiv": "Tiv", "tk": "turkmenski", "tkl": "Tokelau", "tl": "Tagalski", "tlh": "Klingonski", "tli": "Tlingit", "tmh": "Tamašek", "tn": "Tsvana", "to": "tonga", "tog": "Njasa tonga", "tpi": "Tok Pisin", "tr": "turski", "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": "nepoznat jezik", "ur": "urdu", "uz": "uzbečki", "vai": "vai", "ve": "Venda", "vi": "vijetnamski", "vo": "Volapuk", "vot": "Votski", "vun": "vundžo", "wa": "Valun", "wal": "Valamo", "war": "Varaj", "was": "Vašo", "wo": "volof", "xal": "Kalmik", "xh": "kosa", "xog": "soga", "yao": "Jao", "yap": "Japeški", "yi": "Jidiš", "yo": "joruba", "yue": "Kantonski", "za": "Žuang", "zap": "Zapotečki", "zbl": "Blisimboli", "zen": "Zenaga", "zgh": "standardni marokanski tamazigt", "zh": "kineski", "zu": "zulu", "zun": "Zuni", "zxx": "bez lingvističkog sadržaja", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/si.json000066400000000000000000000230171266465517700243460ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "ඇබ්කාසියානු", "aeb": "ටියුනිසියනු අරාබි", "af": "අප්‍රිකානු", "agq": "ඇගම්", "ak": "අකාන්", "am": "ඇම්හාරික්", "ar": "අරාබි", "ar_001": "නවීන සම්මත අරාබි", "arn": "මපුචෙ", "as": "ඇසමියානු", "asa": "අසු", "az": "අසර්බයිජාන්", "ba": "බාෂ්කිර්", "be": "බෙලරුසියානු", "bem": "බෙම්බා", "bez": "බෙනා", "bg": "බල්ගේරියානු", "bm": "බම්බරා", "bn": "බෙංගාලි", "bo": "ටිබෙට්", "br": "බ්‍රේටොන්", "brx": "බොඩො", "bs": "බොස්නියානු", "ca": "කැටලන්", "cgg": "චිගා", "chr": "චෙරොකී", "ckb": "සොරානි කුර්දිෂ්", "co": "ක්‍රොඑශියානු", "cs": "චෙත්", "cy": "වේල්ස්", "da": "ඩැනිශ්", "dav": "ටයිටා", "de": "ජර්මන්", "de_AT": "ඔස්ට්‍රියානු ජර්මන්", "de_CH": "ස්විස් උසස් ජර්මන්", "dje": "ෆර්මා", "dsb": "පහළ සෝබියානු", "dua": "ඩුආලා", "dv": "දිවෙහි", "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": "ලාඕ", "lt": "ලිතුවේනියානු", "lu": "ලු", "luo": "ලුඔ", "luy": "ලුයියා", "lv": "ලැට්වියානු", "mas": "මසායි", "mer": "මෙරු", "mfe": "මොරිස්යෙම්", "mg": "මලගාසි", "mgh": "මඛුවා-මීටෝ", "mgo": "මෙටා", "mi": "මාවොරි", "mk": "මැසිඩෝනියානු", "ml": "මලයාලම්", "mn": "මොංගෝලියානු", "moh": "මොහොව්ක්", "mr": "මරාති", "ms": "මැලේ", "mt": "මොල්ටිස්", "mua": "මුන්ඩන්", "my": "බුරුම", "naq": "නාමා", "nb": "නෝවේජියානු බොක්මාල්", "nd": "උතුරු එන්ඩිබෙලෙ", "ne": "නේපාල", "nl": "ලන්දේසි", "nl_BE": "ෆ්ලෙමිශ්", "nmg": "කුවාසිඔ", "nn": "නොවේර්ජියානු නයිනෝර්ස්ක්", "nqo": "එන්‘කෝ", "nus": "නොයර්", "nyn": "නයන්කොළේ", "om": "ඔරොමෝ", "or": "ඔරියා", "pa": "ජන්ජාබි", "pl": "පෝලන්ත", "ps": "පෂ්ටො", "pt": "පෘතුගීසි", "pt_BR": "බ්‍රසීල පෘතුගීසි", "pt_PT": "යුරෝපීය පෘතුගීසි", "qu": "ක්වීචුවා", "quc": "කියිචේ", "rm": "රොමෑන්ශ්", "rn": "රුන්ඩි", "ro": "රොමේනියානු", "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": "ස්වාහිලි", "swc": "කොන්ගෝ ස්වාහිලි", "ta": "දෙමළ", "te": "තෙළිඟු", "teo": "ටෙසෝ", "tg": "ටජික්", "th": "තායි", "ti": "ටිග්‍රින්යා", "tk": "ටර්ක්මෙන්", "to": "ටොංගා", "tr": "තුර්කි", "tt": "ටාටර්", "twq": "ටසවාක්", "tzm": "මධ්‍යම ඇට්ලස් ටමසිට්", "ug": "උයිගර්", "uk": "යුක්රේනියානු", "und": "නොදන්නා භාෂාව", "ur": "උර්දු", "uz": "උස්බෙක්", "vai": "වයි", "vi": "වියට්නාම්", "vun": "වුන්ජෝ", "wo": "වොලොෆ්", "xh": "ශෝසා", "xog": "සොගා", "yo": "යොරූබා", "zgh": "සම්මත මොරොක්කෝ ටමසිග්ත්", "zh": "චීන", "zh_Hans": "සුළුකළ චීන", "zh_Hant": "සාම්ප්‍රදායික චීන", "zu": "සුලු", "zxx": "වාග් විද්‍යා අන්තර්ගතයක් නැත" } } src/Symfony/Component/Intl/Resources/data/languages/sk.json000066400000000000000000000355221266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "afarčina", "ab": "abcházčina", "ace": "acehčina", "ach": "ačoli", "ada": "adangme", "ady": "adygč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": "arapaho", "arw": "arawačtina", "as": "ásamčina", "asa": "asu", "ast": "astúrčina", "av": "avarčina", "awa": "avadhčina", "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", "bho": "bhódžpurčina", "bi": "bislama", "bik": "bikol", "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": "karibský", "cay": "cayuga", "cch": "atsam", "ce": "čečenčina", "ceb": "cebuánčina", "cgg": "kiga", "ch": "čamorčina", "chb": "čibča", "chg": "čagatajčina", "chk": "truk", "chm": "marijčina", "chn": "činucký žargón", "cho": "čoktavčina", "chp": "čipevajčina", "chr": "čerokí", "chy": "čejenčina", "ckb": "kurdčina (sorání)", "co": "korzičtina", "cop": "koptčina", "cr": "krí", "crh": "krymská turečtina", "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": "slovančina", "dgr": "dogribčina", "din": "dinka", "dje": "zarma", "doi": "dógrí", "dsb": "dolnolužická srbčina", "dua": "duala", "dum": "stredná holandčina", "dv": "divehi", "dyo": "jola-fonyi", "dyu": "ďula", "dz": "dzongkä", "dzg": "dazaga", "ebu": "embu", "ee": "ewe", "efi": "efik", "egy": "staroegyptský", "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ýchodná frí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í", "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": "gwichʼin", "ha": "hauština", "hai": "haida", "haw": "havajčina", "he": "hebrejčina", "hi": "hindčina", "hil": "hiligajnončina", "hit": "chetitčina", "hmn": "hmong", "ho": "hiri motu", "hr": "chorvátčina", "hsb": "hornolužická srbčina", "ht": "haitč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á ioština", "ik": "inupiaq", "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-balkarský jazyk", "krl": "karelčina", "kru": "kurukhč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", "lt": "litovčina", "lu": "luba-katanga", "lua": "luba-luluánčina", "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": "mendi", "mer": "meru", "mfe": "maurícijská kreolčina", "mg": "malgaština", "mga": "stredná írčina", "mgh": "makua-meetto", "mgo": "meta’", "mh": "kajin-majol", "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": "marawari", "my": "barmčina", "mye": "myene", "myv": "erzjančina", "na": "nauru", "nap": "neapolčina", "naq": "nama", "nb": "nórsky bokmål", "nd": "severné ndebele", "nds": "dolná nemčina", "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órsky 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": "navajo", "nwc": "klasická nevárčina", "ny": "čewa", "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": "osagčina", "ota": "osmanská turečtina", "pa": "pandžábčina", "pag": "pangasinančina", "pal": "pahlaví", "pam": "pampanga", "pap": "papiamento", "pau": "palaučina", "peo": "stará perzština", "phn": "feničtina", "pi": "pálí", "pl": "poľština", "pon": "pohnpeičina", "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": "kʼicheʼ", "raj": "radžastančina", "rap": "rapanujčina", "rar": "rarotongan", "rm": "rétorománčina", "rn": "kirundčina", "ro": "rumunčina", "ro_MD": "moldavčina", "rof": "rombo", "rom": "rómčina", "root": "koreň", "ru": "ruština", "rup": "arumunčina", "rw": "kiňarwanda", "rwk": "rwa", "sa": "sanskrit", "sad": "sandawe", "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", "se": "severné sami", "see": "seneca", "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é sami", "smj": "sami (lule)", "smn": "sami (inari)", "sms": "sami (skolt)", "sn": "šončina", "snk": "soninke", "so": "somálčina", "sog": "sogdijčina", "sq": "albánčina", "sr": "srbčina", "srn": "sranan", "srr": "serer", "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": "svahilčina", "swb": "komorčina", "swc": "svahilčina (konžská)", "syc": "klasická sýrčina", "syr": "sýrčina", "ta": "tamilčina", "te": "telugčina", "tem": "temne", "teo": "teso", "ter": "tereno", "tet": "tetum", "tg": "tadžičtina", "th": "thajčina", "ti": "tigriňa", "tig": "tigrejčina", "tiv": "tiv", "tk": "turkménčina", "tkl": "tokelaučina", "tl": "tagalčina", "tlh": "klingónčina", "tli": "tlingitčina", "tmh": "tamašek", "tn": "tswančina", "to": "tongčina", "tog": "ňasa tonga", "tpi": "tok pisin", "tr": "turečtina", "trv": "taroko", "ts": "tsonga", "tsi": "tsimshijské jazyky", "tt": "tatárčina", "tum": "tumbuka", "tvl": "tuvalčina", "tw": "twi", "twq": "tasawaq", "ty": "tahitčina", "tyv": "tuviančina", "tzm": "tamašek (stredomarocký)", "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": "walamo", "war": "waray", "was": "washo", "wo": "wolof", "xal": "kalmyčtina", "xh": "xhosa", "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": "tamašek (š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": "zázá" } } src/Symfony/Component/Intl/Resources/data/languages/sl.json000066400000000000000000000353461266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "aravkanšč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", "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", "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", "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": "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", "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", "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": "gruzinščina", "kaa": "karakalpaščina", "kab": "kabilščina", "kac": "kačinščina", "kam": "kambaščina", "kaw": "kavi", "kbd": "kabardinščina", "kcg": "tjapska nigerijščina", "kde": "makondščina", "kea": "zelenortskootoška kreolščina", "kg": "kongovščina", "kha": "kasi", "kho": "kotanščina", "khq": "koyra chiini", "ki": "kikujščina", "kj": "kvanjama", "kk": "kazaščina", "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": "shambala", "ksf": "bafia", "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", "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", "mwl": "mirandeščina", "mwr": "marvarščina", "my": "burmanščina", "myv": "erzjanščina", "na": "naurujščina", "nap": "napolitanščina", "naq": "khoekhoe", "nb": "knjižna norveščina", "nd": "severna ndebelščina", "nds": "nizka nemščina", "ne": "nepalščina", "new": "nevarščina", "nia": "niaščina", "niu": "niuejščina", "nl": "nizozemščina", "nl_BE": "flamščina", "nmg": "kwasio", "nn": "novonorvešč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": "orijšč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", "peo": "stara perzijščina", "phn": "feničanščina", "pi": "palijščina", "pl": "poljščina", "pon": "ponpejšč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", "ru": "ruščina", "rup": "aromunščina", "rw": "ruandščina", "rwk": "rwa", "sa": "sanskrt", "sah": "jakutščina", "sam": "samaritanska aramejščina", "saq": "samburščina", "sas": "sasaščina", "sat": "santalščina", "sbp": "sangujščina", "sc": "sardinščina", "scn": "sicilijanščina", "sco": "škotščina", "sd": "sindšč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": "singalšč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", "so": "somalščina", "sq": "albanščina", "sr": "srbščina", "srn": "surinamska kreolščina", "srr": "sererščina", "ss": "svazijščina", "st": "sesoto", "su": "sundanščina", "suk": "sukuma", "sus": "susujščina", "sux": "sumerščina", "sv": "švedščina", "sw": "svahili", "swb": "šikomor", "swc": "svahili (Kongo)", "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", "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 ali neveljaven 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", "wal": "valamščina", "war": "varajščina", "was": "vašajščina", "wo": "volofščina", "xal": "kalmiščina", "xh": "xhosa", "xog": "sogščina", "yao": "jaojščina", "yap": "japšč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" } } src/Symfony/Component/Intl/Resources/data/languages/sn.json000066400000000000000000000023661266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/so.json000066400000000000000000000023071266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/languages/sq.json000066400000000000000000000146631266465517700243650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "abkazisht", "af": "afrikanisht", "agq": "agemisht", "ak": "akanisht", "am": "amarike", "ar": "arabisht", "ar_001": "arabishte standarde moderne", "arn": "mapuçisht", "as": "asamezisht", "asa": "asuisht", "az": "azere", "ba": "bashkirisht", "be": "bjellorusisht", "bem": "bemba", "bez": "bena", "bg": "bullgarisht", "bm": "bambara", "bn": "bengalisht", "bo": "tibetisht", "br": "bretone", "brx": "bodo", "bs": "boshnjakisht", "ca": "katalonisht", "cgg": "çigisht", "chr": "çeroki", "ckb": "kurdishte sorani", "co": "korsikanisht", "cs": "çekisht", "cy": "uellsisht", "da": "danisht", "dav": "taitisht", "de": "gjermanisht", "de_AT": "gjermanishte austriake", "de_CH": "gjermanishte zvicerane (dialekti i Alpeve)", "dje": "zarmisht", "dsb": "sorbishte e poshtme", "dua": "dualisht", "dyo": "xhula-fonji", "dz": "xongka", "ebu": "embuisht", "ee": "juisht", "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", "fa": "persisht", "fi": "finlandisht", "fil": "filipinase", "fj": "fixhiane", "fo": "faroisht", "fr": "frëngjisht", "fr_CA": "frëngjishte kanadeze", "fr_CH": "frëngjishte zvicerane", "fy": "frizianisht", "ga": "irlandezçe", "gag": "gagauzisht", "gl": "galike", "gn": "guaranisht", "gsw": "gjermanishte zvicerane", "gu": "guxharatisht", "guz": "gusisht", "gv": "mankse", "ha": "hausisht", "haw": "hauajane", "he": "hebraisht", "hi": "indishte", "hr": "kroatisht", "hsb": "sorbiane e sipërme", "ht": "haitiançe", "hu": "hungarisht", "hy": "armenisht", "id": "indonezisht", "ig": "igbe", "ii": "sishuanisht", "is": "islandisht", "it": "italisht", "iu": "inuktitut", "ja": "japonisht", "jgo": "ngombisht", "jmc": "maçamisht", "jv": "javanisht", "ka": "gjeorgjisht", "kab": "kabilisht", "kam": "kambishte", "kde": "makondisht", "kea": "kabuverdianisht", "khq": "kojraçinisht", "ki": "kikujuisht", "kk": "kazakisht", "kl": "kalalisute", "kln": "kalenjinisht", "km": "kmere", "kn": "kanade", "ko": "koreanisht", "koi": "komishte permiake", "kok": "konkanisht", "ks": "kashmire", "ksb": "shambalisht", "ksf": "bafianisht", "ku": "kurde", "kw": "kornisht", "ky": "kirgizisht", "la": "latinisht", "lag": "langisht", "lb": "luksemburgase", "lg": "gandisht", "lkt": "lakotisht", "ln": "lingalisht", "lo": "laosisht", "lt": "lituanisht", "lu": "Lubakatange", "luo": "luoisht", "luy": "lujaisht", "lv": "letonisht", "mas": "masaisht", "mer": "meruisht", "mfe": "norisjene", "mg": "malageze", "mgh": "makuamito", "mgo": "metaisht", "mi": "maorisht", "mk": "maqedonisht", "ml": "malajalame", "mn": "mongolisht", "moh": "mohaukisht", "mr": "maratisht", "ms": "malajisht", "mt": "maltisht", "mua": "mundagishte", "my": "birmanisht", "naq": "namaishte", "nb": "bokmalishte norvegjeze", "nd": "ndebelishte veriore", "ne": "nepalisht", "nl": "holandisht", "nl_BE": "flamande", "nmg": "kuasisht", "nn": "ninorske norvegjeze", "nqo": "nkoisht", "nus": "nuerisht", "nyn": "niankolisht", "om": "oromoisht", "or": "orije", "pa": "panxhabe", "pl": "polonisht", "ps": "pashto", "pt": "portugalisht", "pt_BR": "portugalishte braziliane", "pt_PT": "portugalishte evropiane", "qu": "keçua", "quc": "kiçeisht", "rm": "rome", "rn": "rundisht", "ro": "rumanisht", "ro_MD": "moldavishte", "rof": "romboishte", "ru": "rusisht", "rw": "kiniaruandisht", "rwk": "ruaisht", "sa": "sanskritisht", "saq": "samburisht", "sbp": "sanguisht", "sd": "sindi", "se": "samishte veriore", "seh": "senaishte", "ses": "senishte kojrabore", "sg": "sangoisht", "sh": "Serbo-Kroatisht", "shi": "taçelit", "si": "sinhale", "sk": "sllovakisht", "sl": "sllovenisht", "sma": "samishte jugore", "smj": "samishte luleje", "smn": "samishte inarie", "sms": "samishte skolte", "sn": "shonisht", "so": "somalisht", "sq": "shqip", "sr": "serbisht", "su": "sundanisht", "sv": "suedisht", "sw": "suahilisht", "swc": "suahilishte kongoje", "ta": "tamile", "te": "teluge", "teo": "tezoisht", "tg": "taxhikisht", "th": "tajlandisht", "ti": "tigrinje", "tk": "turkmenisht", "to": "tonganisht", "tr": "turqisht", "tt": "tatarisht", "twq": "tasaukisht", "tzm": "tamaziatishte atlase qendrore", "ug": "ujgure", "uk": "ukrainisht", "und": "e panjohur", "ur": "urdu", "uz": "uzbeke", "vai": "vaisht", "vi": "vietnamisht", "vun": "vunjisht", "wo": "ulufisht", "xh": "xhose", "xog": "sogisht", "yo": "jorubisht", "zgh": "tamazishte standarde marokene", "zh": "kinezisht", "zh_Hans": "kinezishte e thjeshtuar", "zh_Hant": "kinezishte tradicionale", "zu": "zulu", "zxx": "nuk ka përmbajtje gjuhësore" } } src/Symfony/Component/Intl/Resources/data/languages/sr.json000066400000000000000000000401311266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "бугарски", "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": "Кримеански турски", "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": "џонга", "ebu": "ембу", "ee": "еве", "efi": "Ефикски", "egy": "Староегипатски", "eka": "Екајук", "el": "грчки", "elx": "Еламитски", "en": "енглески", "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": "Ибан", "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": "казашки", "kl": "калалисут", "kln": "каленџин", "km": "кмерски", "kmb": "Кимбунду", "kn": "канада", "ko": "корејски", "koi": "коми-пермски", "kok": "конкани", "kos": "Косреански", "kpe": "Кпеле", "kr": "Канури", "krc": "Карачај-балкар", "krl": "Карелијски", "kru": "Курукх", "ks": "кашмирски", "ksb": "шамбала", "ksf": "бафија", "ku": "курдски", "kum": "Кумик", "kut": "Кутенаи", "kv": "Коми", "kw": "корнволски", "ky": "киргиски", "la": "латински", "lad": "Ладино", "lag": "ланги", "lah": "Ланда", "lam": "Ламба", "lb": "луксембуршки", "lez": "Лезгиан", "lg": "ганда", "li": "Лимбургиш", "lkt": "лакота", "ln": "лингала", "lo": "лаошки", "lol": "Монго", "loz": "Лози", "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": "Ерзија", "na": "Науру", "nap": "Неаполитански", "naq": "нама", "nb": "норвешки бокмал", "nd": "северни ндебеле", "nds": "Ниски немачки", "ne": "непалски", "new": "Невари", "ng": "Ндонга", "nia": "Ниас", "niu": "Ниуеан", "nl": "холандски", "nl_BE": "фламански", "nmg": "квасио", "nn": "норвешки нинорск", "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": "кечуа", "quc": "к’иче", "raj": "Рађастани", "rap": "Рапануи", "rar": "Раротонган", "rm": "рето-романски", "rn": "рунди", "ro": "румунски", "ro_MD": "молдавски", "rof": "ромбо", "rom": "Романи", "root": "Рут", "ru": "руски", "rup": "Ароманијски", "rw": "кинјаруанда", "rwk": "руа", "sa": "санскрит", "sad": "Сандаве", "sah": "Јакут", "sam": "Самаритански арамејски", "saq": "самбуру", "sas": "Сасак", "sat": "Сантали", "sbp": "сангу", "sc": "Сардињаски", "scn": "Сицилијански", "sco": "Шкотски", "sd": "синди", "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": "Свати", "st": "Сесото", "su": "судански", "suk": "Сукума", "sus": "Сусу", "sux": "Сумерски", "sv": "шведски", "sw": "свахили", "swb": "Коморски", "swc": "конго свахили", "syc": "Класични сиријски", "syr": "Сиријски", "ta": "тамилски", "te": "телугу", "tem": "Тимне", "teo": "тесо", "ter": "Терено", "tet": "Тетум", "tg": "Тађик", "th": "тајландски", "ti": "тигриња", "tig": "Тигре", "tiv": "Тив", "tk": "туркменски", "tkl": "Токелау", "tl": "Тагалски", "tlh": "Клингонски", "tli": "Тлингит", "tmh": "Тамашек", "tn": "Тсвана", "to": "тонга", "tog": "Њаса тонга", "tpi": "Ток Писин", "tr": "турски", "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": "Валун", "wal": "Валамо", "war": "Варај", "was": "Вашо", "wo": "волоф", "xal": "Калмик", "xh": "коса", "xog": "сога", "yao": "Јао", "yap": "Јапешки", "yi": "Јидиш", "yo": "јоруба", "yue": "Кантонски", "za": "Жуанг", "zap": "Запотечки", "zbl": "Блисимболи", "zen": "Зенага", "zgh": "стандардни марокански тамазигт", "zh": "кинески", "zu": "зулу", "zun": "Зуни", "zxx": "без лингвистичког садржаја", "zza": "Заза" } } src/Symfony/Component/Intl/Resources/data/languages/sr_Latn.json000066400000000000000000000311431266465517700253340ustar00rootroot00000000000000{ "Version": "2.1.8.20", "Names": { "aa": "Afarski", "ab": "abhaski", "ace": "Ačineski", "ach": "Akoli", "ada": "Adangmejski", "ady": "Adigejski", "ae": "Avestanski", "af": "afrikans", "afh": "Afrihili", "agq": "agem", "ain": "Ainu", "ak": "akan", "akk": "Akadijski", "ale": "Aljut", "alt": "Južni altai", "am": "amharski", "an": "Aragonežanski", "ang": "Staroengleski", "anp": "Angika", "ar": "arapski", "ar_001": "moderan standardni arapski", "arc": "Armajski", "arn": "mapuče", "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", "be": "beloruski", "bej": "Beja", "bem": "bemba", "bez": "bena", "bg": "bugarski", "bho": "Bojpuri", "bi": "Bislama", "bik": "Bikol", "bin": "Bini", "bla": "Sisika", "bm": "bambara", "bn": "bengalski", "bo": "tibetanski", "br": "bretonski", "bra": "Braj", "brx": "bodo", "bs": "bosanski", "bua": "Buriat", "bug": "Buginežanski", "byn": "Blin", "ca": "katalonski", "cad": "Kado", "car": "Karipski", "cch": "Atsamski", "ce": "Čečenski", "ceb": "Cebuano", "cgg": "čiga", "ch": "Čamoro", "chb": "Čibča", "chg": "Čagatai", "chk": "Čukeski", "chm": "Mari", "chn": "Činukski", "cho": "Čoktavski", "chp": "Čipvijanski", "chr": "čeroki", "chy": "Čejenski", "ckb": "sorani kurdski", "co": "korzikanski", "cop": "Koptski", "cr": "Kri", "crh": "Krimeanski turski", "cs": "češki", "csb": "Kašubijanski", "cu": "Staroslovenski", "cv": "Čuvaški", "cy": "velški", "da": "danski", "dak": "Dakota", "dar": "Dargva", "dav": "taita", "de": "nemački", "de_CH": "švajcarski visoki nemački", "del": "Delaver", "den": "Slavski", "dgr": "Dogrib", "din": "Dinka", "dje": "zarma", "doi": "Dogri", "dsb": "donji lužičkosrpski", "dua": "duala", "dum": "Srednji holandski", "dv": "Divehijski", "dyo": "džola fonji", "dyu": "Đula", "dz": "džonga", "ebu": "embu", "ee": "eve", "efi": "Efikski", "egy": "Staroegipatski", "eka": "Ekajuk", "el": "grčki", "elx": "Elamitski", "en": "engleski", "enm": "Srednji engleski", "eo": "esperanto", "es": "španski", "et": "estonski", "eu": "baskijski", "ewo": "Evondo", "fa": "persijski", "fan": "Fang", "fat": "Fanti", "ff": "Fulah", "fi": "finski", "fil": "filipinski", "fj": "fidžijski", "fo": "farski", "fon": "Fon", "fr": "francuski", "frm": "Srednji francuski", "fro": "Starofrancuski", "frr": "Severno-frizijski", "frs": "Istočni frizijski", "fur": "Friulijski", "fy": "zapadni frizijski", "ga": "irski", "gaa": "Ga", "gag": "gagauz", "gay": "Gajo", "gba": "Gbaja", "gd": "Škotski Galski", "gez": "Džiz", "gil": "Gilbertški", "gl": "galicijski", "gmh": "Srednji visoki nemač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č’in", "ha": "hausa", "hai": "Haida", "haw": "havajski", "he": "hebrejski", "hi": "hindi", "hil": "Hiligajnon", "hit": "Hitite", "hmn": "Hmong", "ho": "Hiri Motu", "hr": "hrvatski", "hsb": "gornji lužičkosrpski", "ht": "Haitski", "hu": "mađarski", "hup": "Hupa", "hy": "jermenski", "hz": "Herero", "ia": "Interlingva", "iba": "Iban", "id": "indonežanski", "ie": "Međujezički", "ig": "igbo", "ii": "sečuan ji", "ik": "Unupiak", "ilo": "Iloko", "inh": "Ingviški", "io": "Ido", "is": "islandski", "it": "italijanski", "iu": "inuktitut", "ja": "japanski", "jbo": "Lojban", "jgo": "ngomba", "jmc": "mačame", "jpr": "Judeo-persijski", "jrb": "Judeo-arapski", "jv": "javanski", "ka": "gruzijski", "kaa": "Kara-kalpaški", "kab": "kabile", "kac": "Kačin", "kaj": "Đu", "kam": "kamba", "kaw": "Kavi", "kbd": "Kabardijski", "kcg": "Tjap", "kde": "makonde", "kea": "zelenortski kreolski", "kfo": "Koro", "kg": "Kongo", "kha": "Kasi", "kho": "Kotaneški", "khq": "kojra čiini", "ki": "kikuju", "kj": "Kuanjama", "kk": "kazaški", "kl": "kalalisut", "kln": "kalendžin", "km": "kmerski", "kmb": "Kimbundu", "kn": "kanada", "ko": "korejski", "koi": "komi-permski", "kok": "konkani", "kos": "Kosreanski", "kpe": "Kpele", "kr": "Kanuri", "krc": "Karačaj-balkar", "krl": "Karelijski", "kru": "Kurukh", "ks": "kašmirski", "ksb": "šambala", "ksf": "bafija", "ku": "kurdski", "kum": "Kumik", "kut": "Kutenai", "kv": "Komi", "kw": "kornvolski", "ky": "kirgiski", "la": "latinski", "lad": "Ladino", "lag": "langi", "lah": "Landa", "lam": "Lamba", "lb": "luksemburški", "lez": "Lezgian", "lg": "ganda", "li": "Limburgiš", "lkt": "lakota", "ln": "lingala", "lo": "laoški", "lol": "Mongo", "loz": "Lozi", "lt": "litvanski", "lu": "luba-katanga", "lua": "Luba-lulua", "lui": "Luiseno", "lun": "Lunda", "luo": "luo", "lus": "Lušai", "luy": "lujia", "lv": "letonski", "mad": "Madureški", "mag": "Magahi", "mai": "Maitili", "mak": "Makasar", "man": "Mandingo", "mas": "masai", "mdf": "Mokša", "mdr": "Mandar", "men": "Mende", "mer": "meru", "mfe": "morisjen", "mg": "malgaški", "mga": "Srednji irski", "mgh": "makuva-meeto", "mgo": "meta", "mh": "Maršalski", "mi": "maorski", "mic": "Mikmak", "min": "Minangkabau", "mk": "makedonski", "ml": "malajalam", "mn": "mongolski", "mnc": "Manču", "mni": "Manipuri", "moh": "mohok", "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", "myv": "Erzija", "na": "Nauru", "nap": "Neapolitanski", "naq": "nama", "nb": "norveški bokmal", "nd": "severni ndebele", "nds": "Niski nemački", "ne": "nepalski", "new": "Nevari", "ng": "Ndonga", "nia": "Nias", "niu": "Niuean", "nl": "holandski", "nl_BE": "flamanski", "nmg": "kvasio", "nn": "norveški ninorsk", "no": "Norveški", "nog": "Nogai", "non": "Stari norski", "nqo": "N’ko", "nr": "Južni ndebele", "nso": "Severni soto", "nus": "nuer", "nv": "Navaho", "nwc": "Klasični nevari", "ny": "Njanja", "nym": "Njamvezi", "nyn": "njankole", "nyo": "Njoro", "nzi": "Nzima", "oc": "Provansalski", "oj": "Ojibva", "om": "oromo", "or": "orija", "os": "Osetski", "osa": "Osage", "ota": "Otomanski turski", "pa": "pandžabi", "pag": "Pangasinski", "pal": "Pahlavi", "pam": "Pampanga", "pap": "Papiamento", "pau": "Palauanski", "peo": "Staropersijski", "phn": "Feničanski", "pi": "Pali", "pl": "poljski", "pon": "Ponpejski", "pro": "Staroprovansalski", "ps": "paštunski", "pt": "portugalski", "pt_BR": "Brazilski portugalski", "pt_PT": "Iberijski portugalski", "qu": "kečua", "quc": "k’iče", "raj": "Rađastani", "rap": "Rapanui", "rar": "Rarotongan", "rm": "reto-romanski", "rn": "rundi", "ro": "rumunski", "ro_MD": "moldavski", "rof": "rombo", "rom": "Romani", "root": "Rut", "ru": "ruski", "rup": "Aromanijski", "rw": "kinjaruanda", "rwk": "rua", "sa": "sanskrit", "sad": "Sandave", "sah": "Jakut", "sam": "Samaritanski aramejski", "saq": "samburu", "sas": "Sasak", "sat": "Santali", "sbp": "sangu", "sc": "Sardinjaski", "scn": "Sicilijanski", "sco": "Škotski", "sd": "sindi", "se": "severni sami", "seh": "sena", "sel": "Selkap", "ses": "kojraboro seni", "sg": "sango", "sga": "Staroirski", "sh": "Srpskohrvatski", "shi": "tašelhit", "shn": "Šan", "si": "sinhalski", "sid": "Sidamo", "sk": "slovački", "sl": "slovenački", "sm": "Samoanski", "sma": "južni sami", "smj": "lule sami", "smn": "inari sami", "sms": "skolt sami", "sn": "šona", "snk": "Soninke", "so": "somalski", "sog": "Sodžijenski", "sq": "albanski", "sr": "srpski", "srn": "Srananski tongo", "srr": "Serer", "ss": "Svati", "st": "Sesoto", "su": "sudanski", "suk": "Sukuma", "sus": "Susu", "sux": "Sumerski", "sv": "švedski", "sw": "svahili", "swb": "Komorski", "swc": "kongo svahili", "syc": "Klasični sirijski", "syr": "Sirijski", "ta": "tamilski", "te": "telugu", "tem": "Timne", "teo": "teso", "ter": "Tereno", "tet": "Tetum", "tg": "Tađik", "th": "tajlandski", "ti": "tigrinja", "tig": "Tigre", "tiv": "Tiv", "tk": "turkmenski", "tkl": "Tokelau", "tl": "Tagalski", "tlh": "Klingonski", "tli": "Tlingit", "tmh": "Tamašek", "tn": "Tsvana", "to": "tonga", "tog": "Njasa tonga", "tpi": "Tok Pisin", "tr": "turski", "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": "nepoznat jezik", "ur": "urdu", "uz": "uzbečki", "vai": "vai", "ve": "Venda", "vi": "vijetnamski", "vo": "Volapuk", "vot": "Votski", "vun": "vundžo", "wa": "Valun", "wal": "Valamo", "war": "Varaj", "was": "Vašo", "wo": "volof", "xal": "Kalmik", "xh": "kosa", "xog": "soga", "yao": "Jao", "yap": "Japeški", "yi": "Jidiš", "yo": "joruba", "yue": "Kantonski", "za": "Žuang", "zap": "Zapotečki", "zbl": "Blisimboli", "zen": "Zenaga", "zgh": "standardni marokanski tamazigt", "zh": "kineski", "zu": "zulu", "zun": "Zuni", "zxx": "bez lingvističkog sadržaja", "zza": "Zaza" } } src/Symfony/Component/Intl/Resources/data/languages/sv.json000066400000000000000000000374151266465517700243720ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "ale": "aleutiska", "aln": "gegiska", "alt": "sydaltaiska", "am": "amhariska", "an": "aragonesiska", "ang": "fornengelska", "anp": "angika", "ar": "arabiska", "ar_001": "modern standardarabiska", "arc": "arameiska", "arn": "araukanska", "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", "azb": "sydazerbadjanska", "ba": "basjkiriska", "bal": "baluchiska", "ban": "balinesiska", "bar": "bayerska", "bas": "basa", "bax": "bamunska", "bbj": "ghomala", "be": "vitryska", "bej": "beja", "bem": "bemba", "bew": "betawiska", "bez": "bena", "bfd": "bafut", "bfq": "bagada", "bg": "bulgariska", "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", "cr": "cree", "crh": "krimtatariska", "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", "dua": "duala", "dum": "medelnederländska", "dv": "divehi", "dyo": "jola-fonyi", "dyu": "dyula", "dz": "bhutanesiska", "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", "et": "estniska", "eu": "baskiska", "ewo": "ewondo", "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": "höglandsskotska", "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", "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", "kfo": "koro", "kg": "kikongo", "kha": "khasi", "kho": "khotanesiska", "khq": "Timbuktu-songhoy", "khw": "khowar", "ki": "kikuyu", "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", "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", "lg": "luganda", "li": "limburgiska", "lij": "liguriska", "liv": "livoniska", "lkt": "lakota", "lmo": "lombardiska", "ln": "lingala", "lo": "laotiska", "lol": "mongo", "loz": "lozi", "lt": "litauiska", "ltg": "lettgalliska", "lu": "luba-katanga", "lua": "luba-lulua", "lui": "luiseño", "lun": "lunda", "luo": "luo", "lus": "lushai", "luy": "luhya", "lv": "lettiska", "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", "my": "burmesiska", "mye": "myene", "myv": "erjya", "mzn": "mazanderani", "na": "nauru", "nan": "min nan", "nap": "napolitanska", "naq": "nama", "nb": "norskt bokmål", "nd": "nordndebele", "nds": "lågtyska", "ne": "nepalesiska", "new": "newariska", "ng": "ndonga", "nia": "nias", "niu": "niueanska", "nl": "nederländska", "nl_BE": "flamländska", "nmg": "kwasio", "nn": "nynorska", "nnh": "bamileké-ngiemboon", "no": "norska", "nog": "nogai", "non": "fornnordiska", "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", "pdc": "Pennsylvaniatyska", "pdt": "mennonitisk lågtyska", "peo": "fornpersiska", "pfl": "Pfalz-tyska", "phn": "feniciska", "pi": "pali", "pl": "polska", "pms": "piemontesiska", "pnt": "pontiska", "pon": "ponape", "prg": "fornpreussiska", "pro": "fornprovensalska", "ps": "afghanska", "pt": "portugisiska", "pt_BR": "brasiliansk portugisiska", "pt_PT": "europeisk portugisiska", "qu": "quechua", "quc": "kʼicheʼ", "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": "sardiska", "scn": "sicilianska", "sco": "skotska", "sd": "sindhi", "sdc": "sassaresisk sardiska", "se": "nordsamiska", "see": "seneca", "seh": "sena", "sel": "selkup", "ses": "Gao-songhay", "sg": "sango", "sga": "forniriska", "sgs": "samogitiska", "sh": "serbokroatiska", "shi": "tachelhit", "shn": "shan", "shu": "Chad-arabiska", "si": "singalesiska", "sid": "sidamo", "sk": "slovakiska", "sl": "slovenska", "sli": "lågsilesiska", "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", "swb": "shimaoré", "swc": "Kongo-swahili", "syc": "klassisk syriska", "syr": "syriska", "szl": "silesiska", "ta": "tamil", "tcy": "tulu", "te": "telugiska", "tem": "temne", "teo": "teso", "ter": "tereno", "tet": "tetum", "tg": "tadzjikiska", "th": "thailändska", "ti": "tigrinja", "tig": "tigré", "tiv": "tivi", "tk": "turkmeniska", "tkl": "tokelauiska", "tl": "tagalog", "tlh": "klingonska", "tli": "tlingit", "tly": "talysh", "tmh": "tamashek", "tn": "tswana", "to": "tonganska", "tog": "nyasatonganska", "tpi": "tok pisin", "tr": "turkiska", "trv": "taroko", "ts": "tsonga", "tsd": "tsakodiska", "tsi": "tsimshian", "tt": "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", "wo": "wolof", "wuu": "wu", "xal": "kalmuckiska", "xh": "xhosa", "xog": "lusoga", "yao": "kiyao", "yap": "japetiska", "yav": "yangben", "ybb": "bamileké-jemba", "yi": "jiddisch", "yo": "yoruba", "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" } } src/Symfony/Component/Intl/Resources/data/languages/sv_FI.json000066400000000000000000000005651266465517700247440ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "chm": "mari", "fj": "fiji", "km": "khmer", "ks": "kashmiri", "ky": "kirgiziska", "lo": "lao", "nb": "bokmål", "pa": "panjabi", "ps": "pashto", "te": "telugu", "th": "thai", "ti": "tigrinska", "und": "okänt språk" } } src/Symfony/Component/Intl/Resources/data/languages/sw.json000066400000000000000000000153041266465517700243640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "Kiabkhazi", "ach": "Kiakoli", "af": "Kiafrikana", "agq": "Kiaghem", "ak": "Kiakani", "am": "Kiamhari", "ar": "Kiarabu", "ar_001": "Kiarabu Sanifu cha Kisasa", "arn": "Kimapuche", "arq": "Kiarabu cha Kialjeria", "arz": "Kiarabu cha Misri", "as": "Kiassam", "asa": "Kiasu", "ay": "Kiaimara", "az": "Kiazabajani", "ba": "Kibashkir", "be": "Kibelarusi", "bem": "Kibemba", "bez": "Kibena", "bg": "Kibulgaria", "bm": "Kibambara", "bn": "Kibengali", "bo": "Kitibeti", "br": "Kibretoni", "brx": "brx", "bs": "Kibosnia", "ca": "Kikatalani", "cgg": "Kichiga", "chr": "Kicherokee", "ckb": "Kikurdi cha Sorani", "co": "Kikosikani", "cs": "Kicheki", "cy": "Kiwelisi", "da": "Kidenmaki", "dav": "Kitaita", "de": "Kijerumani", "dje": "Kizarma", "dsb": "Kidolnoserbski", "dua": "Kiduala", "dv": "Kidivehi", "dyo": "Kijola-Fonyi", "dz": "Kizongkha", "ebu": "Kiembu", "ee": "Kiewe", "efi": "Kiefiki", "el": "Kigiriki", "en": "Kiingereza", "eo": "Kiesperanto", "es": "Kihispania", "es_ES": "Kihispania cha Ulaya", "et": "Kiestonia", "eu": "Kibasque", "fa": "Kiajemi", "fi": "Kifinlandi", "fil": "Kifilipino", "fj": "Kifiji", "fo": "Kifaroe", "fr": "Kifaransa", "fy": "Kifrisia cha Magharibi", "ga": "Kiayalandi", "gaa": "Kiga", "gag": "Kigagauzi", "gd": "Kigaeli cha Uskoti", "gl": "Kigalisi", "gn": "Kiguarani", "grc": "Kiyunani", "gsw": "Kijerumani cha Uswisi", "gu": "Kigujarati", "guz": "Kikisii", "gv": "Kimanx", "ha": "Kihausa", "haw": "Kihawai", "he": "Kiebrania", "hi": "Kihindi", "hit": "Kihiti", "hr": "Kroeshia", "hsb": "hsb", "ht": "Kihaiti", "hu": "Kihungari", "hy": "Kiarmenia", "ia": "Kiintalingua", "id": "Kiindonesia", "ig": "Kiigbo", "ii": "Sichuan Yi", "is": "Kiaisilandi", "it": "Kiitaliano", "iu": "iu", "ja": "Kijapani", "jgo": "Kingomba", "jmc": "Kimachame", "jv": "Kijava", "ka": "Kijojia", "kab": "Kikabylia", "kam": "Kikamba", "kde": "Kimakonde", "kea": "Kikabuverdianu", "kfo": "Kikoro", "kg": "Kikongo", "khq": "Kikoyra Chiini", "ki": "Kikikuyu", "kk": "Kikazaki", "kl": "Kikalaallisut", "kln": "Kikalenjin", "km": "Kikambodia", "kn": "Kikannada", "ko": "Kikorea", "koi": "Kikomipermyak", "kok": "kok", "ks": "Kikashmiri", "ksb": "Kisambaa", "ksf": "Kibafia", "ku": "Kikurdi", "kv": "Kikomi", "kw": "Kikorni", "ky": "Kikirigizi", "la": "Kilatini", "lag": "Kirangi", "lam": "Chilamba", "lb": "Kilasembagi", "lg": "Kiganda", "lkt": "Kilakota", "ln": "Kilingala", "lo": "Kilaosi", "loz": "Kilozi", "lt": "Kilithuania", "lu": "Kiluba-Katanga", "lua": "Kiluba-Lulua", "luo": "Kijaluo", "luy": "Kiluhya", "lv": "Kilatvia", "mag": "Kimagahi", "mas": "Kimaasai", "mer": "Kimeru", "mfe": "Kimoriseni", "mg": "Malagasi", "mgh": "Kimakhuwa-Meetto", "mgo": "Kimeta", "mi": "Kimaori", "mk": "Kimasedonia", "ml": "Kimalayalam", "mn": "Kimongolia", "moh": "Kimohoki", "mr": "Kimarathi", "ms": "Kimalesia", "mt": "Kimalta", "mua": "Kimundang", "my": "Kiburma", "naq": "Kinama", "nb": "Kibokmal cha Norwe", "nd": "Kindebele cha Kaskazini", "ne": "Kinepali", "new": "Kinewari", "nl": "Kiholanzi", "nmg": "Kikwasio", "nn": "Kinorwe Kipya", "nqo": "N’Ko", "nso": "Kisotho cha Kaskazini", "nus": "Kinuer", "nwc": "Kinewari cha kale", "ny": "Kinyanja", "nyn": "Kinyankole", "oc": "Kiokitani", "om": "Kioromo", "or": "Kioriya", "os": "Kiosetia", "pa": "Kipunjabi", "pl": "Kipolandi", "ps": "Kipashto", "pt": "Kireno", "qu": "Kiquechua", "quc": "Kʼicheʼ", "rm": "Kiromanshi", "rn": "Kirundi", "ro": "Kiromania", "rof": "Kirombo", "ru": "Kirusi", "rw": "Kinyarwanda", "rwk": "Kirwo", "sa": "Kisanskriti", "saq": "Kisamburu", "sbp": "Kisangu", "sd": "Kisindhi", "se": "Kisami cha Kaskazini", "seh": "Kisena", "ses": "Koyraboro Senni", "sg": "Kisango", "shi": "Tachelhit", "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", "so": "Kisomali", "sq": "Kialbania", "sr": "Kiserbia", "ss": "Kiswati", "st": "Kisotho cha Kusini", "su": "Kisunda", "suk": "Kisukuma", "sv": "Kiswidi", "sw": "Kiswahili", "swc": "Kingwana", "ta": "Kitamil", "te": "Kitelugu", "teo": "Kiteso", "tet": "Kitetum", "tg": "Kitajiki", "th": "Kitailandi", "ti": "Kitigrinya", "tk": "Kiturukimeni", "tlh": "Kiklingoni", "tn": "Kitswana", "to": "Kitonga", "tpi": "Kitokpisin", "tr": "Kituruki", "ts": "Kitsonga", "tt": "Kitatari", "tum": "Kitumbuka", "twq": "Kitasawaq", "ty": "Kitahiti", "tzm": "Central Atlas Tamazight", "ug": "Kiuiguri", "uk": "Kiukrania", "und": "Lugha Isiyojulikana", "ur": "Kiurdu", "uz": "Kiuzbeki", "vai": "Kivai", "ve": "Kivenda", "vi": "Kivietinamu", "vun": "Kivunjo", "wo": "Kiwolofu", "xh": "Kixhosa", "xog": "Kisoga", "yao": "Kiyao", "yi": "Kiyidi", "yo": "Kiyoruba", "zgh": "Tamaziti Msingi ya Kimoroko", "zh": "Kichina", "zh_Hant": "Kichina cha Jadi", "zu": "Kizulu", "zxx": "Hakuna maudhui ya lugha" } } src/Symfony/Component/Intl/Resources/data/languages/ta.json000066400000000000000000000522621266465517700243430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "பல்கேரியன்", "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": "கிரிமியன் துர்க்கி", "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": "பூடானி", "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": "இந்தி", "hif": "பிஜி இந்தி", "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": "லோஜ்பன்", "jgo": "நகொம்பா", "jmc": "மாசெம்", "jpr": "ஜூதேயோ-பெர்ஷியன்", "jrb": "ஜூதேயோ-அராபிக்", "jv": "ஜாவானீஸ்", "ka": "ஜார்ஜியன்", "kaa": "காரா-கல்பாக்", "kab": "கபாய்ல்", "kac": "காசின்", "kaj": "ஜ்ஜூ", "kam": "கம்பா", "kaw": "காவி", "kbd": "கபார்டியன்", "kcg": "தையாப்", "kde": "மகொண்டே", "kea": "கபுவெர்தியானு", "kfo": "கோரோ", "kg": "காங்கோ", "kha": "காஸி", "kho": "கோதானீஸ்", "khq": "கொய்ரா சீனீ", "ki": "கிகுயூ", "kj": "குவான்யாமா", "kk": "கசாக்", "kl": "கலாலிசூட்", "kln": "கலின்ஜின்", "km": "கெமெர்", "kmb": "கிம்புன்து", "kn": "கன்னடம்", "ko": "கொரியன்", "koi": "கொமி-பெர்ம்யாக்", "kok": "கொங்கணி", "kos": "கோஸ்ரைன்", "kpe": "க்பெல்லே", "kr": "கனுரி", "krc": "கராசே-பல்கார்", "krl": "கரேலியன்", "kru": "குருக்", "ks": "காஷ்மிரி", "ksb": "ஷம்பாலா", "ksf": "பாஃபியா", "ku": "குர்திஷ்", "kum": "கும்இக்", "kut": "குடேனை", "kv": "கோமி", "kw": "கார்னிஷ்", "ky": "கிர்கிஸ்", "la": "லத்தின்", "lad": "லடினோ", "lag": "லங்கி", "lah": "லஹன்டா", "lam": "லம்பா", "lb": "லக்ஸம்போர்கிஷ்", "lez": "லெஜ்ஜியன்", "lg": "கான்டா", "li": "லிம்பர்கிஷ்", "lkt": "லகோடா", "ln": "லிங்காலா", "lo": "லாவோ", "lol": "மோங்கோ", "loz": "லோசி", "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": "ஏர்ஜியா", "na": "நவ்ரூ", "nap": "நியோபோலிடன்", "naq": "நாமா", "nb": "நார்வேஜியன் பொக்மால்", "nd": "வடக்கு தெபெலே", "nds": "லோ ஜெர்மன்", "ne": "நேபாளி", "new": "நெவாரி", "ng": "தோங்கா", "nia": "நியாஸ்", "niu": "நியூவான்", "nl": "டச்சு", "nl_BE": "பிலெமிஷ்", "nmg": "க்வாசியோ", "nn": "நார்வேஜியன் நியூநார்ஸ்க்", "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": "பலௌவ்ன்", "pdc": "பென்சில்வேனிய ஜெர்மன்", "peo": "பழைய பெர்ஷியன்", "phn": "ஃபொனிஷியன்", "pi": "பாலி", "pl": "போலிஷ்", "pon": "ஃபோன்பெயென்", "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": "சௌராஷ்டிரம்", "sbp": "சங்கு", "sc": "சாடினியன்", "scn": "சிசிலியன்", "sco": "ஸ்காட்ஸ்", "sd": "சிந்தி", "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": "ஸ்வாடீ", "st": "தெற்கு ஸோதோ", "su": "சுண்டானீஸ்", "suk": "சுகுமா", "sus": "சுசு", "sux": "சுமேரியன்", "sv": "ஸ்வீடிஷ்", "sw": "சுவாஹிலி", "swb": "கொமோரியன்", "swc": "காங்கோ சுவாஹிலி", "syc": "பாரம்பரிய சிரியாக்", "syr": "சிரியாக்", "ta": "தமிழ்", "te": "தெலுங்கு", "tem": "டிம்னே", "teo": "டெசோ", "ter": "டெரெனோ", "tet": "டெடும்", "tg": "தாஜிக்", "th": "தாய்", "ti": "டிக்ரின்யா", "tig": "டைக்ரே", "tiv": "டிவ்", "tk": "டர்க்மென்", "tkl": "டோகேலௌ", "tl": "டாகாலோக்", "tlh": "க்ளிங்கோன்", "tli": "டிலிங்கிட்", "tmh": "டாமாஷேக்", "tn": "ஸ்வானா", "to": "டோங்கான்", "tog": "நயாசா டோங்கா", "tpi": "டோக் பிஸின்", "tr": "டர்கிஷ்", "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": "ஒவாலூன்", "wal": "வாலாமோ", "war": "வாரே", "was": "வாஷோ", "wo": "ஒலூஃப்", "xal": "கல்மிக்", "xh": "ஹோசா", "xog": "சோகா", "yao": "யாவ்", "yap": "யாபேசி", "yi": "இத்திஷ்", "yo": "யோருபா", "yue": "காண்டோனீஸ்", "za": "ஜுவாங்", "zap": "ஜாபோடெக்", "zbl": "ப்லிஸ்ஸிம்பால்ஸ்", "zen": "ஜெனகா", "zgh": "ஸ்டாண்டர்ட் மொராக்கன் தமாசைட்", "zh": "சீனம்", "zh_Hans": "எளிதாக்கப்பட்ட சீனம்", "zh_Hant": "பாரம்பரிய சீனம்", "zu": "ஜுலு", "zun": "ஜூனி", "zxx": "மொழி உள்ளடக்கம் ஏதுமில்லை", "zza": "ஜாஜா" } } src/Symfony/Component/Intl/Resources/data/languages/te.json000066400000000000000000000505461266465517700243520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "బల్గేరియన్", "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": "క్రిమియన్ టర్కిష్", "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": "జొన్ఖా", "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": "ఐబాన్", "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": "కజఖ్", "kl": "కలాల్లిసూట్", "kln": "కలెంజిన్", "km": "ఖ్మేర్", "kmb": "కిమ్బుండు", "kn": "కన్నడ", "ko": "కొరియన్", "koi": "కోమి-పర్మాక్", "kok": "కొంకణి", "kos": "కోస్రేయన్", "kpe": "పెల్లే", "kr": "కానురి", "krc": "కరచే-బల్కార్", "krl": "కరేలియన్", "kru": "కూరుఖ్", "ks": "కాశ్మీరి", "ksb": "శంబాలా", "ksf": "బాఫియ", "ku": "కర్డిష్", "kum": "కుమ్యిక్", "kut": "కుటేనై", "kv": "కోమి", "kw": "కోర్నిష్", "ky": "కిర్గిజ్", "la": "లాటిన్", "lad": "లాడినో", "lag": "లాంగీ", "lah": "లాహండా", "lam": "లాంబా", "lb": "లుక్సంబర్గిష్", "lez": "లేజ్ఘియన్", "lg": "గాండా", "li": "లిమ్బర్గిష్", "lkt": "లకొటా", "ln": "లింగాల", "lo": "లావో", "lol": "మొంగో", "loz": "లోజి", "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": "ఎర్జియా", "na": "నౌరు", "nap": "నియాపోలిటన్", "naq": "నమ", "nb": "నార్వీజియన్ బొక్మాల్", "nd": "ఉత్తర దెబెలె", "nds": "లో జర్మన్", "ne": "నేపాలి", "new": "నెవారి", "ng": "దోంగా", "nia": "నియాస్", "niu": "నియూఇయాన్", "nl": "డచ్", "nl_BE": "ఫ్లెమిష్", "nmg": "క్వాసియె", "nn": "నార్విజియాన్ న్యోర్స్క్", "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": "కెషుయా", "quc": "కిచే", "raj": "రాజస్తాని", "rap": "రాపన్యుయి", "rar": "రారోటొంగాన్", "rm": "రోమన్ష్", "rn": "రండి", "ro": "రోమానియన్", "ro_MD": "మొల్డావియన్", "rof": "రోంబో", "rom": "రోమానీ", "root": "రూట్", "ru": "రష్యన్", "rup": "ఆరోమేనియన్", "rw": "కిన్యర్వాండా", "rwk": "ర్వా", "sa": "సంస్కృతం", "sad": "సండావి", "sah": "యాకుట్", "sam": "సమారిటన్ అరమేక్", "saq": "సంబురు", "sas": "ససక్", "sat": "సంటాలి", "sbp": "సాంగు", "sc": "సార్డీనియన్", "scn": "సిసిలియన్", "sco": "స్కాట్స్", "sd": "సింధీ", "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": "స్వాతి", "st": "దక్షిణ సోతో", "su": "సుడానీస్", "suk": "సుకుమా", "sus": "సుసు", "sux": "సుమేరియాన్", "sv": "స్వీడిష్", "sw": "స్వాహిలి", "swb": "కొమొరియన్", "swc": "కాంగో స్వాహిలి", "syc": "సాంప్రదాయ సిరియాక్", "syr": "సిరియాక్", "ta": "తమిళము", "te": "తెలుగు", "tem": "టింనే", "teo": "టెసో", "ter": "టెరెనో", "tet": "టేటం", "tg": "తజిక్", "th": "థాయ్", "ti": "తిగ్రిన్యా", "tig": "టీగ్రె", "tiv": "టివ్", "tk": "తుర్కమెన్", "tkl": "టోకెలావ్", "tl": "తగలోగ్", "tlh": "క్లింగాన్", "tli": "లింగిట్", "tmh": "టామషేక్", "tn": "సెటస్వానా", "to": "టాంగాన్", "tog": "న్యాసా టోన్గా", "tpi": "టోక్ పిసిన్", "tr": "టర్కిష్", "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": "వాలూన్", "wal": "వాలామో", "war": "వారే", "was": "వాషో", "wo": "వొలాఫ్", "xal": "కల్మిక్", "xh": "షోసా", "xog": "సొగా", "yao": "యాఒ", "yap": "యాపిస్", "yi": "ఇడ్డిష్", "yo": "యోరుబా", "yue": "కాంటనీస్", "za": "జువాన్", "zap": "జపోటెక్", "zbl": "బ్లిసింబల్స్", "zen": "జెనాగా", "zgh": "ప్రామాణిక మొరొకన్ తమజియట్", "zh": "చైనీస్", "zh_Hans": "సరళీకృత చైనీస్", "zh_Hant": "సాంప్రదాయక చైనీస్", "zu": "జూలూ", "zun": "జుని", "zxx": "లిపి లేదు", "zza": "జాజా" } } src/Symfony/Component/Intl/Resources/data/languages/th.json000066400000000000000000000606501266465517700243520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "อาเซอร์ไบจาน", "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_ES": "สเปน (ยุโรป)", "esu": "ยูพิกกลาง", "et": "เอสโตเนีย", "eu": "บัสเก", "ewo": "อีวันโด", "ext": "เอกซ์เตรมาดูรา", "fa": "เปอร์เซีย", "fan": "ฟอง", "fat": "ฟันติ", "ff": "ฟูลาฮ์", "fi": "ฟินแลนด์", "fil": "ฟิลิปปินส์", "fit": "ฟินแลนด์ทอร์เนดาเล็น", "fj": "ฟิจิ", "fo": "แฟโร", "fon": "ฟอน", "fr": "ฝรั่งเศส", "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": "ซาซา" } } src/Symfony/Component/Intl/Resources/data/languages/ti.json000066400000000000000000000060731266465517700243520ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ዙሉኛ" } } src/Symfony/Component/Intl/Resources/data/languages/tl.json000066400000000000000000000150451266465517700243540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "Abkhazian", "ach": "Acoli", "af": "Afrikaans", "agq": "Aghem", "ak": "Akan", "am": "Amharic", "ar": "Arabe", "ar_001": "Modernong Karaniwang Arabe", "arn": "Mapuche", "as": "Assamese", "asa": "Asu", "ay": "Aymara", "az": "Azerbaijani", "ba": "Bashkir", "be": "Belarusian", "bem": "Bemba", "bez": "Bena", "bg": "Bulgarian", "bm": "Bambara", "bn": "Bengali", "bo": "Tibetan", "br": "Breton", "brx": "Bodo", "bs": "Bosnian", "ca": "Catalan", "cgg": "Chiga", "chr": "Cherokee", "ckb": "Sorani Kurdish", "co": "Corsican", "cs": "Czech", "cy": "Welsh", "da": "Danish", "dav": "Taita", "de": "German", "dje": "Zarma", "dsb": "Lower Sorbian", "dua": "Duala", "dv": "Divehi", "dyo": "Jola-Fonyi", "dz": "Dzongkha", "ebu": "Embu", "ee": "Ewe", "efi": "Efik", "el": "Greek", "en": "Ingles", "en_AU": "Ingles ng Australya", "en_CA": "Ingles sa Canada", "en_GB": "Ingles (UK)", "en_US": "Ingles (US)", "eo": "Esperanto", "es": "Spanish", "es_419": "Latin American Spanish", "es_ES": "European Spanish", "es_MX": "Mexican Spanish", "et": "Estonian", "eu": "Basque", "fa": "Persian", "fi": "Finnish", "fil": "Filipino", "fj": "Fijian", "fo": "Faroese", "fr": "French", "fr_CA": "Canadian French", "fr_CH": "Swiss French", "fy": "Western Frisian", "ga": "Irish", "gaa": "Ga", "gag": "Gagauz", "gd": "Scots Gaelic", "gl": "Galician", "gn": "Guarani", "gsw": "Swiss German", "gu": "Gujarati", "guz": "Gusii", "gv": "Manx", "ha": "Hausa", "haw": "Hawaiian", "he": "Hebrew", "hi": "Hindi", "hr": "Croatian", "hsb": "Upper Sorbian", "ht": "Haitian", "hu": "Hungarian", "hy": "Armenian", "ia": "Interlingua", "id": "Indonesian", "ie": "Interlingue", "ig": "Igbo", "ii": "Sichuan Yi", "is": "Icelandic", "it": "Italian", "iu": "Inuktitut", "ja": "Japanese", "jgo": "Ngomba", "jmc": "Machame", "jv": "Javanese", "ka": "Georgian", "kab": "Kabyle", "kam": "Kamba", "kde": "Makonde", "kea": "Kabuverdianu", "kg": "Kongo", "khq": "Koyra Chiini", "ki": "Kikuyu", "kk": "Kazakh", "kl": "Kalaallisut", "kln": "Kalenjin", "km": "Khmer", "kn": "Kannada", "ko": "Korean", "koi": "Komi-Permyak", "kok": "Konkani", "ks": "Kashmiri", "ksb": "Shambala", "ksf": "Bafia", "ku": "Kurdish", "kw": "Cornish", "ky": "Kirghiz", "la": "Latin", "lag": "Langi", "lb": "Luxembourgish", "lg": "Ganda", "lkt": "Lakota", "ln": "Lingala", "lo": "Lao", "loz": "Lozi", "lt": "Lithuanian", "lu": "Luba-Katanga", "lua": "Luba-Lulua", "luo": "Luo", "luy": "Luyia", "lv": "Latvian", "mas": "Masai", "mer": "Meru", "mfe": "Morisyen", "mg": "Malagasy", "mgh": "Makhuwa-Meetto", "mgo": "Meta’", "mi": "Maori", "mk": "Macedonian", "ml": "Malayalam", "mn": "Mongolian", "moh": "Mohawk", "mr": "Marathi", "ms": "Malay", "mt": "Maltese", "mua": "Mundang", "my": "Burmese", "naq": "Nama", "nb": "Norwegian Bokmal", "nd": "North Ndebele", "ne": "Nepali", "nl": "Dutch", "nl_BE": "Flemish", "nmg": "Kwasio", "nn": "Norwegian Nynorsk", "no": "Norwegian", "nqo": "N’Ko", "nso": "Northern Sotho", "nus": "Nuer", "ny": "Nyanja", "nyn": "Nyankole", "oc": "Occitan", "om": "Oromo", "or": "Oriya", "os": "Ossetic", "pa": "Punjabi", "pl": "Polish", "ps": "Pashto", "pt": "Portuges", "pt_BR": "Brazilian Portuguese", "pt_PT": "European Portuguese", "qu": "Quechua", "quc": "Kʼicheʼ", "rm": "Romansh", "rn": "Rundi", "ro": "Romanian", "ro_MD": "Moldavian", "rof": "Rombo", "ru": "Russian", "rw": "Kinyarwanda", "rwk": "Rwa", "sa": "Sanskrit", "saq": "Samburu", "sbp": "Sangu", "sd": "Sindhi", "se": "Northern Sami", "seh": "Sena", "ses": "Koyraboro Senni", "sg": "Sango", "sh": "Serbo-Croatian", "shi": "Tachelhit", "si": "Sinhala", "sk": "Slovak", "sl": "Slovenian", "sm": "Samoan", "sma": "Southern Sami", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Shona", "so": "Somali", "sq": "Albanian", "sr": "Serbian", "ss": "Swati", "st": "Southern Sotho", "su": "Sundanese", "sv": "Swedish", "sw": "Swahili", "swb": "Comorian", "swc": "Swahili (Congo)", "ta": "Tamil", "te": "Telugu", "teo": "Teso", "tet": "Tetum", "tg": "Tajik", "th": "Thai", "ti": "Tigrinya", "tk": "Turkmen", "tlh": "Klingon", "tn": "Tswana", "to": "Tongan", "tpi": "Tok Pisin", "tr": "Turkish", "ts": "Tsonga", "tt": "Tatar", "tum": "Tumbuka", "twq": "Tasawaq", "ty": "Tahitian", "tzm": "Tamazight ng Gitnang Atlas", "ug": "Uyghur", "uk": "Ukranian", "und": "Hindi Kilalang Wika", "ur": "Urdu", "uz": "Uzbek", "vai": "Vai", "ve": "Venda", "vi": "Vietnamese", "vun": "Vunjo", "wo": "Wolof", "xh": "Xhosa", "xog": "Soga", "yi": "Yiddish", "yo": "Yoruba", "yue": "Cantonese", "zgh": "Standard Moroccan Tamazight", "zh": "Chinese", "zh_Hans": "Simplified Chinese", "zu": "Zulu", "zxx": "Walang nilalaman na ukol sa wika" } } src/Symfony/Component/Intl/Resources/data/languages/to.json000066400000000000000000000523431266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "azb": "lea fakaʻasapaisani-tonga", "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", "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-solani", "co": "lea fakakōsika", "cop": "lea fakakopitika", "cps": "lea fakakapiseno", "cr": "lea fakakelī", "crh": "lea fakatoake-kilimea", "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 fakaputeni", "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 fakahihitī-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", "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 fakameta", "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 fakamolota", "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", "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 fakanouē", "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ʻinitia-ʻolāea", "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", "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 fakapōlani", "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 fakaromaniolo", "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", "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 fakasuranane-tongikō", "srr": "lea fakasēlēle", "ss": "lea fakasuasilani", "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", "swb": "lea fakakomolo", "swc": "lea fakasuahili-kongikō", "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īnia", "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 suana", "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ō", "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ā" } } src/Symfony/Component/Intl/Resources/data/languages/tr.json000066400000000000000000000411451266465517700243620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "aa": "Afar", "ab": "Abhazca", "ace": "Achinese", "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", "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": "Araukanya 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", "azb": "Güney Azerice", "ba": "Başkırtça", "bal": "Baluchi", "ban": "Bali Dili", "bar": "Bavyera Dili", "bas": "Basa Dili", "bax": "Bamun", "bbc": "Batak Toba", "bbj": "Ghomala", "be": "Beyaz Rusça", "bej": "Beja Dili", "bem": "Bemba", "bew": "Betawi", "bez": "Bena", "bfd": "Bafut", "bfq": "Badaga", "bg": "Bulgarca", "bho": "Arayanice", "bi": "Bislama", "bik": "Bikol", "bin": "Bini", "bjn": "Banjar Dili", "bkm": "Kom", "bla": "Siksika", "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", "bug": "Bugis", "bum": "Bulu", "byn": "Blin", "byv": "Medumba", "ca": "Katalanca", "cad": "Caddo", "car": "Carib", "cay": "Cayuga", "cch": "Atsam", "ce": "Çeçence", "ceb": "Cebuano", "cgg": "Kigaca", "ch": "Chamorro", "chb": "Chibcha", "chg": "Çağatay Dili", "chk": "Chuukese", "chm": "Mari", "chn": "Chinook Jargon", "cho": "Choctaw", "chp": "Chipewyan", "chr": "Çerokice", "chy": "Şayen Dili", "ckb": "Orta Kürtçe", "co": "Korsikaca", "cop": "Kıptice", "cps": "Capiznon", "cr": "Cree", "crh": "Kırım Türkçesi", "cs": "Çekçe", "csb": "Kashubian", "cu": "Kilise Slavcası", "cv": "Çuvaşça", "cy": "Galce", "da": "Danca", "dak": "Dakota", "dar": "Dargince", "dav": "Taita", "de": "Almanca", "de_AT": "Avusturya Almancası", "de_CH": "İsviçre Yüksek Almancası", "del": "Delaware", "den": "Slavey", "dgr": "Dogrib", "din": "Dinka", "dje": "Zarma", "doi": "Dogri", "dsb": "Aşağı Sorbça", "dtp": "Orta Kadazan", "dua": "Duala", "dum": "Ortaçağ Felemenkçesi", "dv": "Divehi", "dyo": "Jola-Fonyi", "dyu": "Dyula", "dz": "Butan Dili", "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": "Fulah", "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": "Friulian", "fy": "Batı Frizcesi", "ga": "İrlandaca", "gaa": "Ga", "gag": "Gagavuzca", "gan": "Gan Çincesi", "gay": "Gayo", "gba": "Gbaya", "gbz": "Zerdüşt Daricesi", "gd": "İskoç Gal Dili", "gez": "Geez", "gil": "Kiribati Dili", "gl": "Galiçyaca", "glk": "Gilanice", "gmh": "Ortaçağ Yüksek Almancası", "gn": "Guarani Dili", "goh": "Eski Yüksek Almanca", "gom": "Goa Konkanicesi", "gon": "Gondi", "gor": "Gorontalo", "got": "Gotça", "grb": "Grebo", "grc": "Antik Yunanca", "gsw": "İsviçre Almancası", "gu": "Güceratça", "guc": "Wayuu", "gur": "Frafra", "guz": "Gusii", "gv": "Manks", "gwi": "Gwichʼin", "ha": "Hausa", "hai": "Haida", "hak": "Hakka Çincesi", "haw": "Hawaii Dili", "he": "İbranice", "hi": "Hintçe", "hif": "Fiji Hintçesi", "hil": "Hiligaynon", "hit": "Hititçe", "hmn": "Hmong", "ho": "Hiri Motu", "hr": "Hırvatça", "hsb": "Yukarı Sorbça", "hsn": "Xiang Çincesi", "ht": "Haiti Dili", "hu": "Macarca", "hup": "Hupa", "hy": "Ermenice", "hz": "Herero", "ia": "Interlingua", "iba": "Iban", "ibb": "Ibibio", "id": "Endonezce", "ie": "Interlingue", "ig": "İbo Dili", "ii": "Sichuan Yi", "ik": "Inupiak", "ilo": "Iloko", "inh": "İnguşça", "io": "Ido", "is": "İzlandaca", "it": "İtalyanca", "iu": "Inuktitut", "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", "kaj": "Jju", "kam": "Kamba", "kaw": "Kawi", "kbd": "Kabardeyce", "kbl": "Kanembu", "kcg": "Tyap", "kde": "Makonde", "kea": "Kabuverdianu", "ken": "Kenyang", "kfo": "Koro", "kg": "Kongo", "kgp": "Kaingang", "kha": "Khasi", "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", "ko": "Korece", "koi": "Komi-Permyak", "kok": "Konkani", "kos": "Kosraean", "kpe": "Kpelle", "kr": "Kanuri", "krc": "Karaçay-Balkarca", "kri": "Krio", "krj": "Kinaray-a", "krl": "Karelyaca", "kru": "Kurukh", "ks": "Keşmirce", "ksb": "Shambala", "ksf": "Bafia", "ksh": "Köln Diyalekti", "ku": "Kürtçe", "kum": "Kumukça", "kut": "Kutenai", "kv": "Komi", "kw": "Kernevekçe", "ky": "Kırgızca", "la": "Latince", "lad": "Ladino", "lag": "Langi", "lah": "Lahnda", "lam": "Lamba", "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": "Laoca", "lol": "Mongo", "loz": "Lozi", "lt": "Litvanyaca", "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", "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", "mn": "Moğolca", "mnc": "Mançurya Dili", "mni": "Manipuri", "moh": "Mohavk Dili", "mos": "Mossi", "mr": "Marathi", "mrj": "Ova Çirmişçesi", "ms": "Malayca", "mt": "Maltaca", "mua": "Mundang", "mul": "Birden Fazla Dil", "mus": "Creek", "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", "ne": "Nepalce", "new": "Nevari", "ng": "Ndonga", "nia": "Nias", "niu": "Niuean", "njo": "Ao Naga", "nl": "Hollandaca", "nl_BE": "Flamanca", "nmg": "Kwasio", "nn": "Norveççe Nynorsk", "nnh": "Ngiemboon", "no": "Norveççe", "nog": "Nogayca", "non": "Eski Norse", "nov": "Novial", "nqo": "N’Ko", "nr": "Güney Ndebele", "nso": "Kuzey Sotho", "nus": "Nuer", "nv": "Navaho Dili", "nwc": "Klasik Nevari", "ny": "Nyanja", "nym": "Nyamvezi", "nyn": "Nyankole", "nyo": "Nyoro", "nzi": "Nzima", "oc": "Occitan", "oj": "Ojibva Dili", "om": "Oromo", "or": "Oriya Dili", "os": "Osetçe", "osa": "Osage", "ota": "Osmanlı Türkçesi", "pa": "Pencapça", "pag": "Pangasinan", "pal": "Pehlevi Dili", "pam": "Pampanga", "pap": "Papiamento", "pau": "Palau Dili", "pcd": "Picard 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çuvaca", "quc": "Kiçece", "qug": "Chimborazo Highland Quichua", "raj": "Rajasthani", "rap": "Rapanui", "rar": "Rarotongan", "rgn": "Romanyolca", "rif": "Rif Berbericesi", "rm": "Romanşça", "rn": "Kirundi", "ro": "Romence", "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çe", "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": "Scots", "sd": "Sindhi", "sdc": "Sassari Sarduca", "se": "Kuzey Sami", "see": "Seneca", "seh": "Sena", "sei": "Seri", "sel": "Selkup", "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", "sk": "Slovakça", "sl": "Slovence", "sli": "Aşağı Silezyaca", "sly": "Selayar", "sm": "Samoa Dili", "sma": "Güney Sami", "smj": "Lule Sami", "smn": "Inari Sami", "sms": "Skolt Sami", "sn": "Shona", "snk": "Soninke", "so": "Somalice", "sog": "Sogdiana Dili", "sq": "Arnavutça", "sr": "Sırpça", "srn": "Sranan Tongo", "srr": "Serer", "ss": "Sisvati", "ssy": "Saho", "st": "Güney Sotho", "stq": "Saterland Frizcesi", "su": "Sunda Dili", "suk": "Sukuma", "sus": "Susu", "sux": "Sümerce", "sv": "İsveççe", "sw": "Svahili", "swb": "Komorca", "swc": "Kongo Svahili", "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", "tkr": "Sahurca", "tl": "Takalotça", "tlh": "Klingonca", "tli": "Tlingit", "tly": "Talışça", "tmh": "Tamaşek", "tn": "Setsvana", "to": "Tongaca", "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": "Tuvalu", "tw": "Tvi", "twq": "Tasawaq", "ty": "Tahiti Dili", "tyv": "Tuvaca", "tzm": "Orta Fas 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", "vec": "Venedikçe", "vep": "Veps", "vi": "Vietnamca", "vls": "Batı Flamanca", "vmf": "Main Frankonya Dili", "vo": "Volapük", "vot": "Votic", "vro": "Võro", "vun": "Vunjo", "wa": "Valonca", "wae": "Walser", "wal": "Valamo", "war": "Varay", "was": "Vaşo", "wo": "Volofça", "wuu": "Wu Çincesi", "xal": "Kalmıkça", "xh": "Zosa", "xmf": "Megrelce", "xog": "Soga", "yao": "Yao", "yap": "Yapça", "yav": "Yangben", "ybb": "Yemba", "yi": "Yidiş", "yo": "Yorubaca", "yrl": "Nheengatu", "yue": "Kantonca", "za": "Zhuang", "zap": "Zapotek Dili", "zbl": "Blis Sembolleri", "zea": "Zelandaca", "zen": "Zenaga", "zgh": "Standart Berberi Dili Tamazight", "zh": "Çince", "zh_Hans": "Basitleştirilmiş Çince", "zh_Hant": "Geleneksel Çince", "zu": "Zuluca", "zun": "Zuni", "zxx": "Dilbilim içeriği yok", "zza": "Zazaca" } } src/Symfony/Component/Intl/Resources/data/languages/ug.json000066400000000000000000000445771266465517700243640ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "سىۋالىچە", "swb": "كومورىچە", "swc": "كونگو سىۋالىچە", "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": "زازاچە" } } src/Symfony/Component/Intl/Resources/data/languages/uk.json000066400000000000000000000432311266465517700243520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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_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": "іспанська", "es_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": "кабардинська", "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": "лозі", "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": "голландська", "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": "палауанська", "peo": "давньоперська", "phn": "фінікійсько-пунічна", "pi": "палі", "pl": "польська", "pon": "понапе", "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": "сіндхі", "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": "суахілі", "swb": "коморська", "swc": "конгійське суахілі", "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": "китайська", "zu": "зулуська", "zun": "зуньї", "zxx": "немає мовного вмісту", "zza": "зазакі" } } src/Symfony/Component/Intl/Resources/data/languages/ur.json000066400000000000000000000177001266465517700243630ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "ابقازیان", "ach": "اکولی", "af": "ایفریکانز", "agq": "اغم", "ak": "اکان", "am": "امہاری", "ar": "عربی", "ar_001": "ماڈرن اسٹینڈرڈ عربی", "arn": "ماپوچے", "as": "آسامی", "asa": "آسو", "ay": "ایمارا", "az": "آزربائیجانی", "ba": "باشکیر", "be": "بیلاروسی", "bem": "بیمبا", "bez": "بینا", "bg": "بلغاری", "bm": "بمبارا", "bn": "بنگالی", "bo": "تبتی", "br": "بریٹن", "brx": "بوڈو", "bs": "بوسنی", "ca": "کاٹالانین", "cgg": "چیگا", "chr": "چیروکی", "ckb": "سورانی کردش", "co": "کوراسیکن", "cs": "چیک", "cy": "ویلش", "da": "ڈینش", "dav": "تائتا", "de": "جرمن", "de_AT": "آسٹریائی جرمن", "de_CH": "سوئس ہائی جرمن", "dje": "زرما", "dsb": "ذیلی سربیائی", "dua": "دوالا", "dv": "ڈیویہی", "dyo": "جولا فونيا", "dz": "ژونگکھا", "ebu": "امبو", "ee": "ایو", "efi": "ایفِک", "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": "آئیرِش", "gaa": "گا", "gag": "غاغاوز", "gd": "سکاٹ گیلِک", "gl": "گالیشیائی", "gn": "گُارانی", "gsw": "سوئس جرمن", "gu": "گجراتی", "guz": "گسی", "gv": "مینکس", "ha": "ہؤسا", "haw": "ہوائی", "he": "عبرانی", "hi": "ہندی", "hr": "کراتی", "hsb": "اپر سربیائی", "ht": "ہیتی", "hu": "ہنگیرین", "hy": "ارمینی", "ia": "بین لسانیات", "id": "انڈونیثیائی", "ig": "اِگبو", "ii": "سچوان ای", "is": "آئس لینڈک", "it": "اطالوی", "iu": "انیوکتیتت", "ja": "جاپانی", "jgo": "گومبا", "jmc": "ماشیم", "jv": "جاوی", "ka": "جارجی", "kab": "قبائلی", "kam": "کامبا", "kde": "ماكونده", "kea": "كابويرديانو", "kg": "کانگو", "khq": "كويرا شيني", "ki": "کیکو", "kk": "قزاخ", "kl": "كالاليست", "kln": "كالينجين", "km": "خمیر", "kn": "کنّاڈا", "ko": "کوریائی", "koi": "کومی پرمیاک", "kok": "کونکنی", "ks": "کشمیری", "ksb": "شامبالا", "ksf": "بافيا", "ku": "کردش", "kw": "کورنش", "ky": "کرغیزی", "la": "لاطینی", "lag": "لانگی", "lb": "لگژمبرگ کا باشندہ", "lg": "گینڈا", "lkt": "لاکوٹا", "ln": "لِنگَلا", "lo": "لاؤ", "loz": "لوزی", "lt": "لتھُواینین", "lu": "لبا-كاتانجا", "lua": "لیوبا لولوآ", "luo": "لو", "luy": "لویا", "lv": "لیٹوین", "mas": "ماسای", "mer": "میرو", "mfe": "موریسیین", "mg": "ملاگاسی", "mgh": "ماخاوا-ميتو", "mgo": "میٹا", "mi": "ماؤری", "mk": "مقدونیائی", "ml": "مالایالم", "mn": "منگؤلی", "moh": "موہاوک", "mr": "مراٹهی", "ms": "مالائی", "mt": "مالٹی", "mua": "منڈانگ", "my": "برمی", "naq": "ناما", "nb": "نارویجین بوکمل", "nd": "شمالی دبیل", "ne": "نیپالی", "nl": "ڈچ", "nl_BE": "فلیمِش", "nmg": "كوايسو", "nn": "نورویجینی نینورسک", "no": "نارویجین", "nqo": "اینکو", "nso": "شمالی سوتھو", "nus": "نویر", "ny": "نیانجا", "nyn": "نینکول", "oc": "آكسیٹان", "om": "اورومو", "or": "اورِیا", "os": "اوسیٹک", "pa": "پنجابی", "pl": "پولستانی", "ps": "پشتو", "pt": "پُرتگالی", "pt_BR": "برازیلی پرتگالی", "pt_PT": "یورپی پرتگالی", "qu": "کویچوآ", "quc": "كيشی", "rm": "رومانش", "rn": "رونڈی", "ro": "رومنی", "rof": "رومبو", "ru": "روسی", "rw": "کینیاروانڈا", "rwk": "rwk", "sa": "سَنسکرِت", "saq": "سامبورو", "sbp": "سانگو", "sd": "سندھی", "se": "شمالی سامی", "seh": "سینا", "ses": "كويرابورو سينی", "sg": "سانغو", "sh": "سربو-کروئیشین", "shi": "تشلحيت", "si": "سنہالا", "sk": "سلوواک", "sl": "سلووینیائی", "sm": "ساموآن", "sma": "جنوبی سامی", "smj": "لول سامی", "smn": "اناری سامی", "sms": "اسکولٹ سامی", "sn": "شونا", "so": "صومالی", "sq": "البانی", "sr": "صربی", "ss": "سواتی", "st": "جنوبی سوتھو", "su": "سنڈانیز", "sv": "سویڈش", "sw": "سواحلی", "swc": "کانگو سواحلی", "ta": "تمل", "te": "تیلگو", "teo": "تیسو", "tet": "ٹیٹم", "tg": "تاجک", "th": "تھائی", "ti": "ٹگرینیا", "tk": "ترکمان", "tlh": "کلنگن", "tn": "سوانا", "to": "ٹونگن", "tpi": "ٹوک پِسِن", "tr": "ترکی", "ts": "زونگا", "tt": "تاتار", "tum": "ٹمبوکا", "twq": "تاساواق", "ty": "تاہیتی", "tzm": "سینٹرل ایٹلس ٹمازائٹ", "ug": "یوئگہر", "uk": "یوکرینیائی", "und": "نامعلوم زبان", "ur": "اردو", "uz": "ازبیک", "vai": "وائی", "ve": "وینڈا", "vi": "ویتنامی", "vun": "اونجو", "wo": "وولوف", "xh": "ژوسا", "xog": "سوگا", "yi": "یدش", "yo": "یوروبا", "zgh": "اسٹینڈرڈ مغربی امازیقی", "zh": "چینی", "zh_Hans": "چینی (آسان کردہ)", "zh_Hant": "روایتی چینی", "zu": "زولو", "zxx": "کوئی لسانی مواد نہیں" } } src/Symfony/Component/Intl/Resources/data/languages/ur_IN.json000066400000000000000000000025411266465517700247460ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "af": "افریقی", "ar_001": "جدید معیاری عربی", "arn": "مابوتشی", "bm": "بامبرا", "ca": "کتالان", "cgg": "شیغا", "co": "کارسیکائی", "dav": "تیتا", "dje": "زرمہ", "dsb": "لوئر صوربی", "dua": "ديولا", "et": "اسٹونی", "fo": "فارويز", "fy": "مغربی فریسیائی", "gv": "مانوی", "hsb": "بالائی صوربی", "ii": "سشوان ی", "iu": "اينكتيتت", "jgo": "نگومبا", "ki": "کیکویو", "kn": "کنڑ", "koi": "کومی-پرمیاک", "ku": "کرد", "kw": "کورنوالی", "lb": "لکسمبرگی", "lv": "لٹويای", "moh": "موہوک", "mua": "مڈدانگ", "nl_BE": "فیلنڈری", "nqo": "نکو", "ro": "رومانوی", "rwk": "روا", "sg": "سانجو", "sms": "سکولٹ سامی", "su": "سوڈانی", "tzm": "وسطی اٹلس تمازغت", "ug": "آئغور", "vun": "ونجو", "zgh": "اسٹینڈرڈ مراقشی تمازیقی", "zh_Hans": "آسان چینی" } } src/Symfony/Component/Intl/Resources/data/languages/uz.json000066400000000000000000000144761266465517700244020ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "ab": "abxazcha", "af": "afrikancha", "agq": "ag‘emcha", "ak": "akancha", "am": "amxarcha", "ar": "arabcha", "ar_001": "zamonavij standart arabcha", "arn": "mapuchiycha", "as": "assamcha", "asa": "asucha", "az": "ozarbayjoncha", "ba": "boshqircha", "be": "belaruscha", "bem": "bembacha", "bez": "benacha", "bg": "bolgarcha", "bm": "bambarcha", "bn": "bengalcha", "bo": "tibetcha", "br": "bretoncha", "brx": "bodocha", "bs": "bosniycha", "ca": "katalancha", "cgg": "chigcha", "chr": "cherokcha", "ckb": "sorani kurd tili", "co": "korsiancha", "cs": "chexcha", "cy": "uelscha", "da": "datcha", "dav": "taitcha", "de": "nemischa", "de_AT": "Avstriya olmonchasi", "de_CH": "Shvesariya olmonchasi", "dje": "zarmacha", "dsb": "quyi sorbcha", "dua": "dualcha", "dyo": "yola-fonyicha", "dz": "yovoncha", "ebu": "embucha", "ee": "ivicha", "el": "yunoncha", "en": "inglizcha", "en_AU": "Avstraliya inglizchasi", "en_CA": "Kanada inglizchasi", "en_GB": "Britaniya inglizchasi", "eo": "esperantocha", "es": "ispancha", "es_419": "Lotin Amerika ispanchasi", "es_ES": "Yevropa ispanchasi", "es_MX": "Meksika ispanchasi", "et": "estoncha", "eu": "baskcha", "fa": "forscha", "fi": "fincha", "fil": "filipincha", "fj": "fijcha", "fo": "farercha", "fr": "fransuzcha", "fr_CA": "Kanada fransuzchasi", "fr_CH": "Shvesariya fransuzchasi", "fy": "gʻarbiy friziancha", "ga": "irlandcha", "gag": "gagozcha", "gl": "galitsiycha", "gn": "gorancha", "gsw": "shveysariya nemischasi", "gu": "gujoratcha", "guz": "guzcha", "gv": "mencha", "ha": "xauscha", "haw": "gavaycha", "he": "ibroniy", "hi": "hindcha", "hr": "xorvatcha", "hsb": "yuqori sorbcha", "ht": "gaitcha", "hu": "vengrcha", "hy": "armancha", "id": "indoneyzcha", "ig": "igbocha", "ii": "zichuan yicha", "is": "islandcha", "it": "italyancha", "iu": "inuktitutcha", "ja": "yaponcha", "jgo": "ngombcha", "jmc": "machamcha", "jv": "yavancha", "ka": "gruzincha", "kab": "qobilcha", "kam": "kambcha", "kde": "maqondiy", "kea": "kabuverdiancha", "khq": "qoyra-chincha", "ki": "kikuycha", "kk": "qozoqcha", "kl": "kalallisutcha", "kln": "kalenjincha", "km": "xmercha", "kn": "kannadcha", "ko": "koreyscha", "koi": "komi-permyakcha", "kok": "konkancha", "ks": "kashmircha", "ksb": "shambalacha", "ksf": "bafiycha", "ku": "kurdcha", "kw": "kornishcha", "ky": "qirgʻizcha", "la": "lotincha", "lag": "langcha", "lb": "lyuksemburgcha", "lg": "gandcha", "lkt": "lakotcha", "ln": "lingalcha", "lo": "laoscha", "lt": "litovcha", "lu": "luba-katangcha", "luo": "luocha", "luy": "luycha", "lv": "latishcha", "mas": "masaycha", "mer": "merucha", "mfe": "morisyencha", "mg": "malagasiycha", "mgh": "makuva-mittocha", "mgo": "metacha", "mi": "maoriycha", "mk": "makedoncha", "ml": "malayamcha", "mn": "mo‘g‘ulcha", "moh": "mohaukcha", "mr": "maratcha", "ms": "malaycha", "mt": "maltacha", "mua": "mundangcha", "my": "birmancha", "naq": "namacha", "nb": "norvegcha bokmal", "nd": "shimoliy ndebelcha", "ne": "nepalcha", "nl": "gollandcha", "nl_BE": "flamandcha", "nmg": "kvaziycha", "nn": "norvegcha ninorsk", "nqo": "nqoancha", "nus": "noyrcha", "nyn": "nyankolcha", "om": "oromocha", "or": "oriycha", "pa": "panjobcha", "pl": "polyakcha", "ps": "pushtu tili", "pt": "portugalcha", "pt_BR": "Braziliya portugalchasi", "pt_PT": "Yevropa portugalchasi", "qu": "qvechuancha", "quc": "qichiancha", "rm": "romancha", "rn": "rundcha", "ro": "rumincha", "ro_MD": "moldovan rumincha", "rof": "rombacha", "ru": "ruscha", "rw": "kinyarvandcha", "rwk": "ruandcha", "sa": "sanskritcha", "saq": "samburcha", "sbp": "sanguancha", "sd": "sindxiycha", "se": "shimoliy semiycha", "seh": "seniycha", "ses": "koryaboro senniycha", "sg": "sangoancha", "shi": "tachilgitcha", "si": "sinholcha", "sk": "slovakcha", "sl": "slovencha", "sma": "janubiy semiycha", "smj": "luli semiycha", "smn": "inari semiycha", "sms": "shkolt semiycha", "sn": "shoniycha", "so": "somalicha", "sq": "albancha", "sr": "serbcha", "su": "sundancha", "sv": "shvedcha", "sw": "svahilcha", "swc": "kongo svahiliycha", "ta": "tamilcha", "te": "telugvancha", "teo": "tesoancha", "tg": "tojikcha", "th": "taycha", "ti": "tigrincha", "tk": "turkmancha", "to": "tongocha", "tr": "turkcha", "tt": "tatarcha", "twq": "tosovoqcha", "tzm": "markaziy atlas vaqt zonasi", "ug": "uygʻurcha", "uk": "ukraincha", "und": "nomaʼlum til", "ur": "urducha", "uz": "oʻzbekcha", "vai": "vayancha", "vi": "vyetnamcha", "vun": "vunjoancha", "wo": "volofcha", "xh": "xosancha", "xog": "sogancha", "yo": "yorubcha", "zgh": "standart marokash tamazit", "zh": "xitoycha", "zh_Hans": "soddalashtirilgan xitoycha", "zh_Hant": "anʼanaviy xitoycha", "zu": "zuluancha", "zxx": "til tarkibi yoʻq" } } src/Symfony/Component/Intl/Resources/data/languages/uz_Arab.json000066400000000000000000000002031266465517700253060ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "fa": "دری", "ps": "پشتو", "uz": "اوزبیک" } } src/Symfony/Component/Intl/Resources/data/languages/uz_Cyrl.json000066400000000000000000000076351266465517700253720ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "ab": "Абхазча", "af": "Африканча", "am": "Амхарча", "ar": "Арабча", "as": "Ассамча", "az": "Озарбайжонча", "be": "Беларусча", "bg": "Болгарча", "bn": "Бенгалча", "bo": "Тибетча", "bs": "Боснияча", "ca": "Каталанча", "cs": "Чехча", "cy": "Уэлсча", "da": "Данияча", "de": "Олмонча", "el": "Грекча", "en": "Инглизча", "eo": "Эсперанто", "es": "Испанча", "es_419": "Лотин Америка испанчаси", "et": "Эстонча", "eu": "Баскча", "fa": "Форсча", "fi": "Финча", "fil": "Филипино", "fj": "Фижича", "fo": "Фарэрча", "fr": "Французча", "fy": "Ғарбий фризианча", "ga": "Ирландча", "gl": "Галицийча", "gn": "Гуарани", "gsw": "Швейцария немисчаси", "gu": "Гужарати", "ha": "Хауса", "haw": "Гавайча", "he": "Иброний", "hi": "Ҳиндча", "hr": "Хорватча", "ht": "Гаитианча", "hu": "Венгрча", "hy": "Арманча", "id": "Индонезияча", "ig": "Игбо", "is": "Исландча", "it": "Италянча", "ja": "Японча", "jv": "Яванча", "ka": "Грузинча", "kk": "Қозоқча", "km": "Хмерча", "kn": "Каннада", "ko": "Корейсча", "ks": "Кашмирча", "ku": "Курдча", "ky": "Қирғизча", "la": "Лотинча", "lb": "Люксембургча", "lo": "Лао", "lt": "Литвача", "lv": "Латишча", "mg": "Малагаси", "mi": "Маори", "mk": "Македонча", "ml": "Малайалам", "mr": "Марати", "ms": "Малайча", "mt": "Мальтача", "my": "Бирманча", "nb": "Норвегча Бокмал", "ne": "Непалча", "nl": "Голландча", "nl_BE": "Фламандча", "nn": "Норвегча Нинорск", "or": "Ория", "pa": "Панжобча", "pl": "Полякча", "ps": "Пушту", "pt": "Португалча", "qu": "Квечуа", "rm": "Романча", "ro": "Руминча", "ru": "Русча", "sa": "Санскритча", "sd": "Синдхи", "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": "Йоруба", "zgh": "Стандарт Марокаш Тамазит", "zh": "Хитойча", "zu": "Зулу", "zxx": "Тил таркиби йўқ" } } src/Symfony/Component/Intl/Resources/data/languages/vi.json000066400000000000000000000417071266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 Nam Phi", "afh": "Tiếng Afrihili", "agq": "Tiếng Aghem", "ain": "Tiếng Ainu", "ak": "Tiếng Akan", "akk": "Tiếng Akkadia", "ale": "Tiếng Aleut", "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 Araucanian", "arp": "Tiếng Arapaho", "arw": "Tiếng Arawak", "as": "Tiếng Assam", "asa": "Tiếng Asu", "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", "bas": "Tiếng Basaa", "bax": "Tiếng Bamun", "bbj": "Tiếng Ghomala", "be": "Tiếng Belarus", "bej": "Tiếng Beja", "bem": "Tiếng Bemba", "bez": "Tiếng Bena", "bfd": "Tiếng Bafut", "bg": "Tiếng Bulgaria", "bho": "Tiếng Bhojpuri", "bi": "Tiếng Bislama", "bik": "Tiếng Bikol", "bin": "Tiếng Bini", "bkm": "Tiếng Kom", "bla": "Tiếng Siksika", "bm": "Tiếng Bambara", "bn": "Tiếng Bengali", "bo": "Tiếng Tây Tạng", "br": "Tiếng Breton", "bra": "Tiếng Braj", "brx": "Tiếng Bodo", "bs": "Tiếng Nam Tư", "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 Sorani", "co": "Tiếng Corsica", "cop": "Tiếng Coptic", "cr": "Tiếng Cree", "crh": "Tiếng Thổ Nhĩ Kỳ Crimean", "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", "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", "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)", "et": "Tiếng Estonia", "eu": "Tiếng Basque", "ewo": "Tiếng Ewondo", "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 Philipin", "fj": "Tiếng Fiji", "fo": "Tiếng Faore", "fon": "Tiếng Fon", "fr": "Tiếng Pháp", "frm": "Tiếng Pháp Trung cổ", "fro": "Tiếng Pháp cổ", "frr": "Tiếng Frisian Miền Bắc", "frs": "Tiếng Frisian Miền Đông", "fur": "Tiếng Friulian", "fy": "Tiếng Frisia", "ga": "Tiếng Ai-len", "gaa": "Tiếng Ga", "gag": "Tiếng Gagauz", "gay": "Tiếng Gayo", "gba": "Tiếng Gbaya", "gd": "Tiếng Xentơ (Xcốt len)", "gez": "Tiếng Geez", "gil": "Tiếng Gilbert", "gl": "Tiếng Galician", "gmh": "Tiếng Thượng Giéc-man Trung cổ", "gn": "Tiếng Guarani", "goh": "Tiếng Thượng Giéc-man cổ", "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", "guz": "Tiếng Gusii", "gv": "Tiếng Manx", "gwi": "Tiếng Gwichʼin", "ha": "Tiếng Hausa", "hai": "Tiếng Haida", "haw": "Tiếng Hawaii", "he": "Tiếng Do Thái", "hi": "Tiếng 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", "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", "ja": "Tiếng Nhật", "jbo": "Tiếng Lojban", "jgo": "Tiếng Ngomba", "jmc": "Tiếng Machame", "jpr": "Tiếng Judeo-Ba Tư", "jrb": "Tiếng Judeo-Ả Rập", "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 Kashmiri", "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", "lt": "Tiếng Lít-va", "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 Manchu", "mni": "Tiếng Manipuri", "moh": "Tiếng Mohawk", "mos": "Tiếng Mossi", "mr": "Tiếng Marathi", "ms": "Tiếng Malaysia", "mt": "Tiếng Malt", "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", "na": "Tiếng Nauru", "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", "ne": "Tiếng Nepal", "new": "Tiếng Newari", "ng": "Tiếng Ndonga", "nia": "Tiếng Nias", "niu": "Tiếng Niuean", "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": "Bắc Sotho", "nus": "Tiếng Nuer", "nv": "Tiếng Navajo", "nwc": "Tiếng Newari Cổ điển", "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 Oriya", "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", "peo": "Tiếng Ba Tư cổ", "phn": "Tiếng Phoenicia", "pi": "Tiếng Pali", "pl": "Tiếng Ba Lan", "pon": "Tiếng Pohnpeian", "pro": "Tiếng Provençal cổ", "ps": "Tiếng Pashto", "pt": "Tiếng Bồ Đào Nha", "pt_BR": "Tiếng Bồ Đào Nha (Braxin)", "qu": "Tiếng Quechua", "quc": "Tiếng Kʼicheʼ", "raj": "Tiếng Rajasthani", "rap": "Tiếng Rapanui", "rar": "Tiếng Rarotongan", "rm": "Tiếng Romansh", "rn": "Tiếng Rundi", "ro": "Tiếng Rumani", "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", "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 Xéc bi - 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 An-ba-ni", "sr": "Tiếng Serbia", "srn": "Tiếng Sranan Tongo", "srr": "Tiếng Serer", "ss": "Tiếng Swati", "ssy": "Tiếng Saho", "st": "Tiếng Sesotho", "su": "Tiếng Sudan", "suk": "Tiếng Sukuma", "sus": "Tiếng Susu", "sux": "Tiếng Sumeria", "sv": "Tiếng Thụy Điển", "sw": "Tiếng Swahili", "swb": "Tiếng Cômo", "swc": "Tiếng Swahili Congo", "syc": "Tiếng Syria Cổ điển", "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": "Tetum", "tg": "Tiếng Tajik", "th": "Tiếng Thái", "ti": "Tiếng Tigrigya", "tig": "Tiếng Tigre", "tiv": "Tiếng Tiv", "tk": "Tiếng Turk", "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 Uyghur", "uga": "Tiếng Ugaritic", "uk": "Tiếng Ucraina", "umb": "Tiếng Umbundu", "und": "Ngôn ngữ không xác định", "ur": "Tiếng Uđu", "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", "wo": "Tiếng Wolof", "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 Y-đit", "yo": "Tiếng Yoruba", "yue": "Tiếng Quảng Đông", "za": "Tiếng Zhuang", "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" } } src/Symfony/Component/Intl/Resources/data/languages/yi.json000066400000000000000000000125221266465517700243530ustar00rootroot00000000000000{ "Version": "2.1.7.41", "Names": { "aa": "אַפֿאַר", "af": "אַפֿריקאַנס", "akk": "אַקאַדיש", "am": "אַמהאַריש", "an": "אַראַגאניש", "ang": "אַלט ענגליש", "ar": "אַראַביש", "arc": "אַראַמיש", "as": "אַסאַמיש", "az": "אַזערביידזשאַניש", "azb": "דרום אַזערביידזשאַניש", "ban": "באַלינעזיש", "bar": "בײַעריש", "be": "בעלאַרוסיש", "bg": "בולגאַריש", "bn": "בענגאַליש", "bo": "טיבעטיש", "br": "ברעטאניש", "bs": "באסניש", "ca": "קאַטאַלאניש", "ceb": "סעבואַניש", "crh": "קרים־טערקיש", "cs": "טשעכיש", "csb": "קאַשוביש", "cu": "קלויסטער־סלאַוויש", "cy": "וועלשיש", "da": "דעניש", "de": "דײַטש", "dsb": "אונטער־סארביש", "dyo": "זשאלא־פֿאני", "el": "גריכיש", "en": "ענגליש", "enm": "מיטל ענגליש", "eo": "עספּעראַנטא", "es": "שפּאַניש", "es_ES": "שפּאַניש (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": "סוואַהיליש", "swb": "קאמאריש", "swc": "קאנגא־סוואַהיליש", "szl": "שלעזיש", "ta": "טאַמיל", "tig": "טיגרע", "tk": "טורקמעניש", "tl": "טאַגאַלאג", "tt": "טאָטעריש", "uk": "אוקראַאיניש", "und": "אומבאַוואוסטע שפּראַך", "ur": "אורדו", "uz": "אוזבעקיש", "vi": "וויעטנאַמעזיש", "vls": "מערב פֿלעמיש", "vo": "וואלאַפּוק", "yi": "ייִדיש", "zh": "כינעזיש", "zu": "זולו" } } src/Symfony/Component/Intl/Resources/data/languages/yo.json000066400000000000000000000061011266465517700243550ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/languages/yo_BJ.json000066400000000000000000000005071266465517700247340ustar00rootroot00000000000000{ "Version": "2.1.8.19", "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" } } src/Symfony/Component/Intl/Resources/data/languages/zh.json000066400000000000000000000372601266465517700243610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "加文", "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": "国际文字(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": "洛兹文", "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": "荷兰文", "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": "帕劳文", "peo": "古老波斯文", "phn": "腓尼基文", "pi": "巴利文", "pl": "波兰文", "pon": "波纳佩文", "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": "信德文", "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": "斯瓦希里文", "swb": "科摩罗文", "swc": "刚果斯瓦希里文", "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": "扎扎文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_HK.json000066400000000000000000000005411266465517700247330ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "br": "布里多尼文", "de_CH": "瑞士德語", "eo": "世界語", "gl": "加里西亞文", "it": "意大利文", "lol": "蒙古語", "pt_BR": "巴西葡萄牙語", "sd": "信德語", "zgh": "摩洛哥標準塔馬齊格特文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_Hans_HK.json000066400000000000000000000003231266465517700257020ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ast": "阿斯图里亚思文", "es_ES": "伊比利亚西班牙文", "om": "奥罗莫文", "pt_PT": "伊比利亚葡萄牙文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_Hans_MO.json000066400000000000000000000003571266465517700257220ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ast": "阿斯图里亚思文", "es_ES": "伊比利亚西班牙文", "mdr": "曼达尔", "om": "奥罗莫文", "pt_PT": "伊比利亚葡萄牙文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_Hans_SG.json000066400000000000000000000003551266465517700257160ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "en_GB": "英国英文", "en_US": "美国英文", "es_ES": "伊比利亚西班牙文", "om": "奥罗莫文", "pt_PT": "伊比利亚葡萄牙文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_Hant.json000066400000000000000000000445521266465517700253350ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "亞塞拜然文", "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_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": "洛齊文", "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": "曼德文字 (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": "庇卡底文", "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": "薩丁尼亞-薩薩里文", "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": "扎扎文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_Hant_HK.json000066400000000000000000000005411266465517700257050ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "br": "布里多尼文", "de_CH": "瑞士德語", "eo": "世界語", "gl": "加里西亞文", "it": "意大利文", "lol": "蒙古語", "pt_BR": "巴西葡萄牙語", "sd": "信德語", "zgh": "摩洛哥標準塔馬齊格特文" } } src/Symfony/Component/Intl/Resources/data/languages/zh_SG.json000066400000000000000000000003551266465517700247450ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "en_GB": "英国英文", "en_US": "美国英文", "es_ES": "伊比利亚西班牙文", "om": "奥罗莫文", "pt_PT": "伊比利亚葡萄牙文" } } src/Symfony/Component/Intl/Resources/data/languages/zu.json000066400000000000000000000166351266465517700244010ustar00rootroot00000000000000{ "Version": "2.1.8.18", "Names": { "ab": "isi-Abkhazian", "ach": "Isi-Acoli", "af": "isi-Afrikaans", "agq": "isi-Aghem", "ak": "isi-Akan", "am": "isi-Amharic", "ar": "isi-Arabic", "ar_001": "Isi-Arabic Esijwayelekile Samanje", "arn": "isi-Mapuche", "as": "isi-Assamese", "asa": "asa", "ay": "isi-Aymara", "az": "isi-Azerbaijani", "ba": "isi-Bashkir", "be": "isi-Belarusian", "bem": "Isi-Bemba", "bez": "isi-Bena", "bg": "isi-Bulgari", "bm": "isi-Bambara", "bn": "isi-Bengali", "bo": "isi-Tibetan", "br": "Isi-Breton", "brx": "isi-Bodo", "bs": "isi-Bosnian", "ca": "isi-Catalan", "cgg": "isi-Chiga", "chr": "Isi-Cherokee", "ckb": "Isi-Sorani Kurdish", "co": "isi-Corsican", "cs": "isi-Czech", "cy": "isi-Welsh", "da": "isi-Danish", "dav": "isi-Taita", "de": "isi-German", "de_AT": "isi-Austrian German", "de_CH": "isi-Swiss High German", "dje": "isi-Zarma", "dsb": "isi-Lower Sorbian", "dua": "isi-Duala", "dv": "isi-Divehi", "dyo": "isi-Jola-Fonyl", "dz": "isi-Dzongkha", "ebu": "isi-Embu", "ee": "Isi-Ewe", "efi": "isi-Efik", "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_MX": "isi-Mexican Spanish", "et": "isi-Estonia", "eu": "isi-Basque", "fa": "isi-Persian", "fi": "isi-Finnish", "fil": "isi-Filipino", "fj": "isi-Fijian", "fo": "isi-Faroese", "fr": "isi-French", "fr_CA": "isi-Canadian French", "fr_CH": "isi-Swiss French", "fy": "isi-Western Frisian", "ga": "isi-Irish", "gaa": "Isi-Ga", "gag": "isi-Gagauz", "gd": "i-Scottish Gaelic", "gl": "isi-Galicia", "gn": "isi-Guarani", "gsw": "isi-Swiss German", "gu": "isi-Gujarati", "guz": "isi-Gusli", "gv": "isi-Manx", "ha": "isi-Hausa", "haw": "isi-Hawaiian", "he": "isi-Hebrew", "hi": "isi-Hindi", "hr": "isi-Croatian", "hsb": "isi-Upper Sorbian", "ht": "isi-Haitian", "hu": "isi-Hungarian", "hy": "isi-Armenia", "ia": "Izilimi ezihlangene", "id": "isi-Indonesian", "ig": "isi-Igbo", "ii": "isi-Sichuan Yi", "is": "isi-Icelandic", "it": "isi-Italian", "iu": "isi-Inuktitut", "ja": "isi-Japanese", "jgo": "isi-Ngomba", "jmc": "isi-Machame", "jv": "isi-Javanese", "ka": "isi-Georgian", "kab": "isi-Kabyle", "kam": "isi-Kamba", "kde": "isi-Makonde", "kea": "isi-Kabuverdianu", "kg": "Isi-Kongo", "khq": "isi-Koyra Chiini", "ki": "isi-Kikuyu", "kk": "isi-Kazakh", "kl": "isi-Kalaallisut", "kln": "isi-Kalenjin", "km": "isi-Khmer", "kn": "isi-Kannada", "ko": "isi-Korean", "koi": "isi-Komi-Permyak", "kok": "isi-Konkani", "ks": "isi-Kashmiri", "ksb": "isi-Shambala", "ksf": "isi-Bafia", "ku": "isi-Kurdish", "kw": "isi-Cornish", "ky": "isi-Kyrgyz", "la": "isi-Latin", "lag": "isi-Langi", "lb": "isi-Luxembourgish", "lg": "Isi-Ganda", "lkt": "isi-Lakota", "ln": "isi-Lingala", "lo": "i-Lao", "loz": "Isi-Lozi", "lt": "isi-Lithuanian", "lu": "isi-Luba-Katanga", "lua": "Isi-Luba-Lulua", "luo": "isi-Luo", "luy": "isi-Luyia", "lv": "isi-Latvian", "mas": "isi-Masai", "mer": "isi-Meru", "mfe": "Isi-Morisyen", "mg": "isi-Malagasy", "mgh": "isi-Makhuwa-Meetto", "mgo": "isi-Meta’", "mi": "isi-Maori", "mk": "isi-Macedonian", "ml": "isi-Malayalam", "mn": "isi-Mongolian", "moh": "isi-Mohawk", "mr": "isi-Marathi", "ms": "isi-Malay", "mt": "isi-Maltese", "mua": "isi-Mundang", "my": "isi-Burmese", "naq": "isi-Nama", "nb": "isi-Norwegian Bokmål", "nd": "isi-North Ndebele", "ne": "isi-Nepali", "nl": "isi-Dutch", "nl_BE": "isi-Flemish", "nmg": "isi-Kwasio", "nn": "i-Norwegian Nynorsk", "nqo": "isi-N’Ko", "nso": "isi-Northern Sotho", "nus": "isi-Nuer", "ny": "isi-Nyanja", "nyn": "Isi-Nyankole", "oc": "Isi-Osithani", "om": "Isi-Oromo", "or": "isi-Oriya", "os": "isi-Ossetic", "pa": "isi-Punjabi", "pl": "isi-Polish", "ps": "isi-Pashto", "pt": "isi-Portuguese", "pt_BR": "isi-Brazillian Portuguese", "pt_PT": "isi-European Portuguese", "qu": "isi-Quechua", "quc": "isi-Kʼicheʼ", "rm": "isi-Romansh", "rn": "isi-Rundi", "ro": "isi-Romanian", "ro_MD": "isi-Moldavian", "rof": "isi-Rombo", "ru": "isi-Russian", "rw": "isi-Kinyarwanda", "rwk": "isi-Rwa", "sa": "isi-Sanskrit", "saq": "isi-Samburu", "sbp": "isi-Sangu", "sd": "isi-Sindhi", "se": "isi-Northern Sami", "seh": "isi-Sena", "ses": "isi-Koyraboro Senni", "sg": "isi-Sango", "shi": "isi-Tachelhit", "si": "i-Sinhala", "sk": "isi-Slovak", "sl": "isi-Slovenian", "sm": "isi-Samoan", "sma": "isi-Southern Sami", "smj": "isi-Lule Sami", "smn": "isi-Inari Sami", "sms": "isi-Skolt Sami", "sn": "isi-Shona", "so": "isi-Somali", "sq": "isi-Albania", "sr": "isi-Serbian", "ss": "isiSwati", "st": "isiSuthu", "su": "isi-Sundanese", "sv": "isi-Swedish", "sw": "isi-Swahili", "swc": "isi-Congo Swahili", "ta": "isi-Tamil", "te": "isi-Telugu", "teo": "isi-Teso", "tet": "isi-Tetum", "tg": "isi-Tajik", "th": "isi-Thai", "ti": "isi-Tigrinya", "tk": "isi-Turkmen", "tlh": "Isi-Klingon", "tn": "isi-Tswana", "to": "Isi-Tongan", "tpi": "isi-Tok Pisin", "tr": "isi-Turkish", "ts": "isi-Tsonga", "tt": "isi-Tatar", "tum": "Isi-Tumbuka", "twq": "isi-Tasawaq", "ty": "isi-Tahitian", "tzm": "isi-Central Atlas Tamazight", "ug": "isi-Uighur", "uk": "isi-Ukrainian", "und": "Ulimi olungaziwa", "ur": "isi-Urdu", "uz": "isi-Uzbek", "vai": "isi-Vai", "ve": "isi-Venda", "vi": "isi-Vietnamese", "vun": "isi-Vunjo", "wo": "isi-Wolof", "xh": "isiXhosa", "xog": "isi-Soga", "yi": "Isi-Yidish", "yo": "isi-Yoruba", "zgh": "isi-Standard Moroccan Tamazight", "zh": "isi-Chinese", "zh_Hans": "isi-Sipmlified Chinese", "zh_Hant": "isi-Traditional Chinese", "zu": "isiZulu", "zxx": "Akukho okuqukethwe kolimi" } } src/Symfony/Component/Intl/Resources/data/locales/000077500000000000000000000000001266465517700225115ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/locales/af.json000066400000000000000000000513421266465517700237770ustar00rootroot00000000000000{ "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": "Wit-Russies", "be_BY": "Wit-Russies (Belarus)", "bg": "Bulgaars", "bg_BG": "Bulgaars (Bulgarye)", "bm": "Bambara", "bm_Latn": "Bambara (Latyn)", "bm_Latn_ML": "Bambara (Latyn, 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ë)", "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_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_AU": "Engels (Australië)", "en_BB": "Engels (Barbados)", "en_BE": "Engels (België)", "en_BM": "Engels (Bermuda)", "en_BS": "Engels (Bahamas)", "en_BW": "Engels (Botswana)", "en_BZ": "Engels (Belize)", "en_CA": "Engels (Kanada)", "en_CC": "Engels (Cocos- (Keeling) eilande)", "en_CK": "Engels (Cookeilande)", "en_CM": "Engels (Kameroen)", "en_CX": "Engels (Kerseiland)", "en_DG": "Engels (Diego Garcia)", "en_DM": "Engels (Dominica)", "en_ER": "Engels (Eritrea)", "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_IM": "Engels (Eiland Man)", "en_IN": "Engels (Indië)", "en_IO": "Engels (Britse Indiese Oseaangebied)", "en_JE": "Engels (Jersey)", "en_JM": "Engels (Jamaika)", "en_KE": "Engels (Kenia)", "en_KI": "Engels (Kiribati)", "en_KN": "Engels (Sint Kitts en Nevis)", "en_KY": "Engels (Kaaimanseilande)", "en_LC": "Engels (Sint 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 (Noordelike Mariana-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_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 (Solomoneilande)", "en_SC": "Engels (Seychelle)", "en_SD": "Engels (Soedan)", "en_SG": "Engels (Singapoer)", "en_SH": "Engels (Sint Helena)", "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 (Sint 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_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)", "fi": "Fins", "fi_FI": "Fins (Finland)", "fo": "Faroees", "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 (Republiek van die Kongo)", "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 (Sint 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 (Sint 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_Latn": "Hausa (Latyn)", "ha_Latn_GH": "Hausa (Latyn, Ghana)", "ha_Latn_NE": "Hausa (Latyn, Niger)", "ha_Latn_NG": "Hausa (Latyn, Nigerië)", "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_Cyrl": "Kazaks (Sirillies)", "kk_Cyrl_KZ": "Kazaks (Sirillies, Kazakstan)", "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_Arab": "Kasjmirs (Arabies)", "ks_Arab_IN": "Kasjmirs (Arabies, Indië)", "ks_IN": "Kasjmirs (Indië)", "kw": "Kornies", "kw_GB": "Kornies (Verenigde Koninkryk)", "ky": "Kirgisies", "ky_Cyrl": "Kirgisies (Sirillies)", "ky_Cyrl_KG": "Kirgisies (Sirillies, Kirgisië)", "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 (Republiek van die Kongo)", "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_Cyrl": "Mongools (Sirillies)", "mn_Cyrl_MN": "Mongools (Sirillies, Mongolië)", "mn_MN": "Mongools (Mongolië)", "mr": "Marathi", "mr_IN": "Marathi (Indië)", "ms": "Maleis", "ms_BN": "Maleis (Broenei)", "ms_Latn": "Maleis (Latyn)", "ms_Latn_BN": "Maleis (Latyn, Broenei)", "ms_Latn_MY": "Maleis (Latyn, Maleisië)", "ms_Latn_SG": "Maleis (Latyn, Singapoer)", "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ë)", "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_CV": "Portugees (Kaap Verde)", "pt_GW": "Portugees (Guinee-Bissau)", "pt_MO": "Portugees (Macau SAS Sjina)", "pt_MZ": "Portugees (Mosambiek)", "pt_PT": "Portugees (Portugal)", "pt_ST": "Portugees (Sao Tome en Principe)", "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": "Noordelike Sami", "se_FI": "Noordelike Sami (Finland)", "se_NO": "Noordelike Sami (Noorweë)", "se_SE": "Noordelike Sami (Swede)", "sg": "Sango", "sg_CF": "Sango (Sentraal-Afrikaanse Republiek)", "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_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": "Telugu", "te_IN": "Telugu (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_Arab": "Uighur (Arabies)", "ug_Arab_CN": "Uighur (Arabies, Sjina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ak.json000066400000000000000000000271231266465517700240040ustar00rootroot00000000000000{ "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_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_AU": "Borɔfo (Ɔstrelia)", "en_BB": "Borɔfo (Baabados)", "en_BE": "Borɔfo (Bɛlgyium)", "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_CK": "Borɔfo (Kook Nsupɔw)", "en_CM": "Borɔfo (Kamɛrun)", "en_DM": "Borɔfo (Dɔmeneka)", "en_ER": "Borɔfo (Ɛritrea)", "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_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_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_SG": "Borɔfo (Singapɔ)", "en_SH": "Borɔfo (Saint Helena)", "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_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_CV": "Pɔɔtugal kasa (Kepvɛdfo Islands)", "pt_GW": "Pɔɔtugal kasa (Gini Bisaw)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/am.json000066400000000000000000000703011266465517700240020ustar00rootroot00000000000000{ "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_Latn": "ባምባርኛ (ላቲን)", "bm_Latn_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": "ካታላንኛ (ጣሊያን)", "cs": "ቼክኛ", "cs_CZ": "ቼክኛ (ቼክ ሪፑብሊክ)", "cy": "ወልሽ", "cy_GB": "ወልሽ (እንግሊዝ)", "da": "ዴኒሽ", "da_DK": "ዴኒሽ (ዴንማርክ)", "da_GL": "ዴኒሽ (ግሪንላንድ)", "de": "ጀርመን", "de_AT": "ጀርመን (ኦስትሪያ)", "de_BE": "ጀርመን (ቤልጄም)", "de_CH": "ጀርመን (ስዊዘርላንድ)", "de_DE": "ጀርመን (ጀርመን)", "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_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": "እንግሊዝኛ (ሆንግ ኮንግ SAR ቻይና)", "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_MY": "እንግሊዝኛ (ማሌዢያ)", "en_NA": "እንግሊዝኛ (ናሚቢያ)", "en_NF": "እንግሊዝኛ (ኖርፎልክ ደሴት)", "en_NG": "እንግሊዝኛ (ናይጄሪያ)", "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_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_VC": "እንግሊዝኛ (ቅዱስ ቪንሴንት እና ግሬናዲንስ)", "en_VG": "እንግሊዝኛ (የእንግሊዝ ቨርጂን ደሴቶች)", "en_VI": "እንግሊዝኛ (የአሜሪካ ቨርጂን ደሴቶች)", "en_VU": "እንግሊዝኛ (ቫኑአቱ)", "en_WS": "እንግሊዝኛ (ሳሞአ)", "en_ZA": "እንግሊዝኛ (ደቡብ አፍሪካ)", "en_ZM": "እንግሊዝኛ (ዛምቢያ)", "en_ZW": "እንግሊዝኛ (ዚምቧቤ)", "eo": "ኤስፐራንቶ", "es": "ስፓኒሽ", "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": "ባስክኛ (ስፔን)", "fa": "ፐርሺያኛ", "fa_AF": "ፐርሺያኛ (አፍጋኒስታን)", "fa_IR": "ፐርሺያኛ (ኢራን)", "fi": "ፊኒሽ", "fi_FI": "ፊኒሽ (ፊንላንድ)", "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": "ፈረንሳይኛ (ሜይኦቴ)", "fy": "የምዕራብ ፍሪስኛ", "fy_NL": "የምዕራብ ፍሪስኛ (ኔዘርላንድ)", "ga": "አይሪሽ", "ga_IE": "አይሪሽ (አየርላንድ)", "gd": "እስኮትስ ጌልክኛ", "gd_GB": "እስኮትስ ጌልክኛ (እንግሊዝ)", "gl": "ጋሊሺያ", "gl_ES": "ጋሊሺያ (ስፔን)", "gu": "ጉጃርቲኛ", "gu_IN": "ጉጃርቲኛ (ህንድ)", "gv": "ማንክስኛ", "gv_IM": "ማንክስኛ (አይል ኦፍ ማን)", "ha": "ሃውሳኛ", "ha_GH": "ሃውሳኛ (ጋና)", "ha_Latn": "ሃውሳኛ (ላቲን)", "ha_Latn_GH": "ሃውሳኛ (ላቲን, ጋና)", "ha_Latn_NE": "ሃውሳኛ (ላቲን, ኒጀር)", "ha_Latn_NG": "ሃውሳኛ (ላቲን, ናይጄሪያ)", "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_Cyrl": "ካዛክኛ (ሲይሪልክ)", "kk_Cyrl_KZ": "ካዛክኛ (ሲይሪልክ, ካዛኪስታን)", "kk_KZ": "ካዛክኛ (ካዛኪስታን)", "kl": "ካላሊሱትኛ", "kl_GL": "ካላሊሱትኛ (ግሪንላንድ)", "km": "ክመርኛ ማእከላዊ", "km_KH": "ክመርኛ ማእከላዊ (ካምቦዲያ)", "kn": "ካናዳኛ", "kn_IN": "ካናዳኛ (ህንድ)", "ko": "ኮሪያኛ", "ko_KP": "ኮሪያኛ (ሰሜን ኮሪያ)", "ko_KR": "ኮሪያኛ (ደቡብ ኮሪያ)", "ks": "ካሽሚርኛ", "ks_Arab": "ካሽሚርኛ (ዓረብኛ)", "ks_Arab_IN": "ካሽሚርኛ (ዓረብኛ, ህንድ)", "ks_IN": "ካሽሚርኛ (ህንድ)", "kw": "ኮርኒሽ", "kw_GB": "ኮርኒሽ (እንግሊዝ)", "ky": "ኪርጊዝኛ", "ky_Cyrl": "ኪርጊዝኛ (ሲይሪልክ)", "ky_Cyrl_KG": "ኪርጊዝኛ (ሲይሪልክ, ኪርጊስታን)", "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_Cyrl": "ሞንጎላዊኛ (ሲይሪልክ)", "mn_Cyrl_MN": "ሞንጎላዊኛ (ሲይሪልክ, ሞንጎሊያ)", "mn_MN": "ሞንጎላዊኛ (ሞንጎሊያ)", "mr": "ማራቲኛ", "mr_IN": "ማራቲኛ (ህንድ)", "ms": "ማላይኛ", "ms_BN": "ማላይኛ (ብሩኒ)", "ms_Latn": "ማላይኛ (ላቲን)", "ms_Latn_BN": "ማላይኛ (ላቲን, ብሩኒ)", "ms_Latn_MY": "ማላይኛ (ላቲን, ማሌዢያ)", "ms_Latn_SG": "ማላይኛ (ላቲን, ሲንጋፖር)", "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_CV": "ፖርቹጋልኛ (ኬፕ ቬርዴ)", "pt_GW": "ፖርቹጋልኛ (ጊኒ ቢሳኦ)", "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_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_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": "ኡዝቤክኛ (ኡዝቤኪስታን)", "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": "ቻይንኛ (ቀለል ያለ, ማካኡ ልዩ የአስተዳደር ክልል ቻይና)", "zh_Hans_SG": "ቻይንኛ (ቀለል ያለ, ሲንጋፖር)", "zh_Hant": "ቻይንኛ (ባህላዊ)", "zh_Hant_HK": "ቻይንኛ (ባህላዊ, ሆንግ ኮንግ SAR ቻይና)", "zh_Hant_MO": "ቻይንኛ (ባህላዊ, ማካኡ ልዩ የአስተዳደር ክልል ቻይና)", "zh_Hant_TW": "ቻይንኛ (ባህላዊ, ታይዋን)", "zh_MO": "ቻይንኛ (ማካኡ ልዩ የአስተዳደር ክልል ቻይና)", "zh_SG": "ቻይንኛ (ሲንጋፖር)", "zh_TW": "ቻይንኛ (ታይዋን)", "zu": "ዙሉኛ", "zu_ZA": "ዙሉኛ (ደቡብ አፍሪካ)" } } src/Symfony/Component/Intl/Resources/data/locales/ar.json000066400000000000000000000747641266465517700240300ustar00rootroot00000000000000{ "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_Latn": "البامبارا (اللاتينية)", "bm_Latn_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": "الكتالانية (إيطاليا)", "cs": "التشيكية", "cs_CZ": "التشيكية (جمهورية التشيك)", "cy": "الولزية", "cy_GB": "الولزية (المملكة المتحدة)", "da": "الدانماركية", "da_DK": "الدانماركية (الدانمرك)", "da_GL": "الدانماركية (غرينلاند)", "de": "الألمانية", "de_AT": "الألمانية (النمسا)", "de_BE": "الألمانية (بلجيكا)", "de_CH": "الألمانية (سويسرا)", "de_DE": "الألمانية (ألمانيا)", "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_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_MY": "الإنجليزية (ماليزيا)", "en_NA": "الإنجليزية (ناميبيا)", "en_NF": "الإنجليزية (جزيرة نورفوك)", "en_NG": "الإنجليزية (نيجيريا)", "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_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_VC": "الإنجليزية (سانت فنسنت وغرنادين)", "en_VG": "الإنجليزية (جزر فرجين البريطانية)", "en_VI": "الإنجليزية (جزر فرجين الأمريكية)", "en_VU": "الإنجليزية (فانواتو)", "en_WS": "الإنجليزية (ساموا)", "en_ZA": "الإنجليزية (جنوب أفريقيا)", "en_ZM": "الإنجليزية (زامبيا)", "en_ZW": "الإنجليزية (زيمبابوي)", "eo": "الإسبرانتو", "es": "الإسبانية", "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": "لغة الباسك (إسبانيا)", "fa": "الفارسية", "fa_AF": "الفارسية (أفغانستان)", "fa_IR": "الفارسية (إيران)", "ff": "الفلة", "ff_CM": "الفلة (الكاميرون)", "ff_GN": "الفلة (غينيا)", "ff_MR": "الفلة (موريتانيا)", "ff_SN": "الفلة (السنغال)", "fi": "الفنلندية", "fi_FI": "الفنلندية (فنلندا)", "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": "الفرنسية (مايوت)", "fy": "الفريزيان", "fy_NL": "الفريزيان (هولندا)", "ga": "الأيرلندية", "ga_IE": "الأيرلندية (أيرلندا)", "gd": "الغيلية الأسكتلندية", "gd_GB": "الغيلية الأسكتلندية (المملكة المتحدة)", "gl": "الجاليكية", "gl_ES": "الجاليكية (إسبانيا)", "gu": "الغوجاراتية", "gu_IN": "الغوجاراتية (الهند)", "gv": "المنكية", "gv_IM": "المنكية (جزيرة مان)", "ha": "الهوسا", "ha_GH": "الهوسا (غانا)", "ha_Latn": "الهوسا (اللاتينية)", "ha_Latn_GH": "الهوسا (اللاتينية, غانا)", "ha_Latn_NE": "الهوسا (اللاتينية, النيجر)", "ha_Latn_NG": "الهوسا (اللاتينية, نيجيريا)", "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_Cyrl": "الكازاخستانية (السيريلية)", "kk_Cyrl_KZ": "الكازاخستانية (السيريلية, كازاخستان)", "kk_KZ": "الكازاخستانية (كازاخستان)", "kl": "الكالاليست", "kl_GL": "الكالاليست (غرينلاند)", "km": "الخميرية", "km_KH": "الخميرية (كمبوديا)", "kn": "الكانادا", "kn_IN": "الكانادا (الهند)", "ko": "الكورية", "ko_KP": "الكورية (كوريا الشمالية)", "ko_KR": "الكورية (كوريا الجنوبية)", "ks": "الكشميرية", "ks_Arab": "الكشميرية (العربية)", "ks_Arab_IN": "الكشميرية (العربية, الهند)", "ks_IN": "الكشميرية (الهند)", "kw": "الكورنية", "kw_GB": "الكورنية (المملكة المتحدة)", "ky": "القرغيزية", "ky_Cyrl": "القرغيزية (السيريلية)", "ky_Cyrl_KG": "القرغيزية (السيريلية, قرغيزستان)", "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_Cyrl": "المنغولية (السيريلية)", "mn_Cyrl_MN": "المنغولية (السيريلية, منغوليا)", "mn_MN": "المنغولية (منغوليا)", "mr": "الماراثي", "mr_IN": "الماراثي (الهند)", "ms": "لغة الملايو", "ms_BN": "لغة الملايو (بروناي)", "ms_Latn": "لغة الملايو (اللاتينية)", "ms_Latn_BN": "لغة الملايو (اللاتينية, بروناي)", "ms_Latn_MY": "لغة الملايو (اللاتينية, ماليزيا)", "ms_Latn_SG": "لغة الملايو (اللاتينية, سنغافورة)", "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_CV": "البرتغالية (الرأس الأخضر)", "pt_GW": "البرتغالية (غينيا بيساو)", "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_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_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": "الأوزباكية (أوزبكستان)", "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": "الزولو (جنوب أفريقيا)" } } src/Symfony/Component/Intl/Resources/data/locales/ar_EG.json000066400000000000000000000037521266465517700243700ustar00rootroot00000000000000{ "Names": { "as": "الأساميزية", "as_IN": "الأساميزية (الهند)", "be": "البيلاروسية", "be_BY": "البيلاروسية (روسيا البيضاء)", "cy": "الولشية", "cy_GB": "الولشية (المملكة المتحدة)", "da": "الدنماركية", "da_DK": "الدنماركية (الدانمرك)", "da_GL": "الدنماركية (غرينلاند)", "kn": "الكانادية", "kn_IN": "الكانادية (الهند)", "ky": "الكيرغزستانية", "ky_Cyrl": "الكيرغزستانية (السيريلية)", "ky_Cyrl_KG": "الكيرغزستانية (السيريلية, قرغيزستان)", "ky_KG": "الكيرغزستانية (قرغيزستان)", "mr": "الماراثية", "mr_IN": "الماراثية (الهند)", "sh": "صربية-كرواتية", "sh_BA": "صربية-كرواتية (البوسنة والهرسك)", "ti": "التيغرينية", "ti_ER": "التيغرينية (أريتريا)", "ti_ET": "التيغرينية (إثيوبيا)", "ug": "الأويغورية", "ug_Arab": "الأويغورية (العربية)", "ug_Arab_CN": "الأويغورية (العربية, الصين)", "ug_CN": "الأويغورية (الصين)", "uz": "الأوزبكية", "uz_AF": "الأوزبكية (أفغانستان)", "uz_Arab": "الأوزبكية (العربية)", "uz_Arab_AF": "الأوزبكية (العربية, أفغانستان)", "uz_Cyrl": "الأوزبكية (السيريلية)", "uz_Cyrl_UZ": "الأوزبكية (السيريلية, أوزبكستان)", "uz_Latn": "الأوزبكية (اللاتينية)", "uz_Latn_UZ": "الأوزبكية (اللاتينية, أوزبكستان)", "uz_UZ": "الأوزبكية (أوزبكستان)" } } src/Symfony/Component/Intl/Resources/data/locales/as.json000066400000000000000000000001701266465517700240050ustar00rootroot00000000000000{ "Names": { "as": "অসমীয়া", "as_IN": "অসমীয়া (ভাৰত)" } } src/Symfony/Component/Intl/Resources/data/locales/az.json000066400000000000000000000522461266465517700240270ustar00rootroot00000000000000{ "Names": { "af": "afrikaans", "af_NA": "afrikaans (Namibiya)", "af_ZA": "afrikaans (Cənub Afrika)", "ak": "akanca", "ak_GH": "akanca (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 Sahara)", "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 (Qatar)", "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 (Bolqariya)", "bm": "bambara", "bm_Latn": "bambara (latın)", "bm_Latn_ML": "bambara (latın, Mali)", "bn": "benqal", "bn_BD": "benqal (Banqladeş)", "bn_IN": "benqal (Hindistan)", "bo": "tibet", "bo_CN": "tibet (Çin)", "bo_IN": "tibet (Hindistan)", "br": "Bretonca", "br_FR": "Bretonca (Fransa)", "bs": "bosniak", "bs_BA": "bosniak (Bosniya və Hersoqovina)", "bs_Cyrl": "bosniak (kiril)", "bs_Cyrl_BA": "bosniak (kiril, Bosniya və Hersoqovina)", "bs_Latn": "bosniak (latın)", "bs_Latn_BA": "bosniak (latın, Bosniya və Hersoqovina)", "ca": "katalan", "ca_AD": "katalan (Andorra)", "ca_ES": "katalan (İspaniya)", "ca_FR": "katalan (Fransa)", "ca_IT": "katalan (İtaliya)", "cs": "çex", "cs_CZ": "çex (Çexiya)", "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_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 (Angila)", "en_AS": "ingilis (Amerika Samoası)", "en_AU": "ingilis (Avstraliya)", "en_BB": "ingilis (Barbados)", "en_BE": "ingilis (Belçika)", "en_BM": "ingilis (Bermuda)", "en_BS": "ingilis (Baham Adaları)", "en_BW": "ingilis (Botsvana)", "en_BZ": "ingilis (Beliz)", "en_CA": "ingilis (Kanada)", "en_CC": "ingilis (Kokos Adaları)", "en_CK": "ingilis (Kuk Adaları)", "en_CM": "ingilis (Kamerun)", "en_CX": "ingilis (Milad Adası)", "en_DG": "ingilis (Dieqo Qarsiya)", "en_DM": "ingilis (Dominika)", "en_ER": "ingilis (Eritreya)", "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 (Gernsey)", "en_GH": "ingilis (Qana)", "en_GI": "ingilis (Gibraltar)", "en_GM": "ingilis (Qambiya)", "en_GU": "ingilis (Quam)", "en_GY": "ingilis (Qviyana)", "en_HK": "ingilis (Honq Konq Xüsusi İnzibati Ərazi Çin)", "en_IE": "ingilis (İrlandiya)", "en_IM": "ingilis (Men Adası)", "en_IN": "ingilis (Hindistan)", "en_IO": "ingilis (Britaniya Hind Okeanı Ərazisi)", "en_JE": "ingilis (Cersi)", "en_JM": "ingilis (Yamayka)", "en_KE": "ingilis (Keniya)", "en_KI": "ingilis (Kiribati)", "en_KN": "ingilis (San Kits və Nevis)", "en_KY": "ingilis (Kayman Adaları)", "en_LC": "ingilis (San Lüsiya)", "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 Mariana 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_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_SG": "ingilis (Sinqapur)", "en_SH": "ingilis (Müqəddəs Yelena)", "en_SL": "ingilis (Siera Leon)", "en_SS": "ingilis (Cənubi Sudan)", "en_SX": "ingilis (Sint Maarten)", "en_SZ": "ingilis (Svazilend)", "en_TC": "ingilis (Turks və Kaikos 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 (Birləşmiş Ştatlar Uzaq Adalar)", "en_US": "ingilis (Amerika Birləşmiş Ştatları)", "en_VC": "ingilis (San Vinsent və Qrenada)", "en_VG": "ingilis (Britaniya Vircin Adaları)", "en_VI": "ingilis (ABŞ Vircin 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_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 dili", "ff_CM": "fula dili (Kamerun)", "ff_GN": "fula dili (Qvineya)", "ff_MR": "fula dili (Mavritaniya)", "ff_SN": "fula dili (Seneqal)", "fi": "fin", "fi_FI": "fin (Finlandiya)", "fo": "farer", "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 (San Bartolomey)", "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 (Fil Dişi Sahili)", "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 (Fransız Qviyanası)", "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 (San 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 (Fransız Polineziyası)", "fr_PM": "fransız (San Pier və Mikelon)", "fr_RE": "fransız (Reunion)", "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 (Uolis və Futuna)", "fr_YT": "fransız (Mayot)", "fy": "qərbi friz", "fy_NL": "qərbi friz (Niderland)", "ga": "irland", "ga_IE": "irland (İrlandiya)", "gd": "skot gaelik dili", "gd_GB": "skot gaelik dili (Birləşmiş Krallıq)", "gl": "qalisian", "gl_ES": "qalisian (İspaniya)", "gu": "qucarat", "gu_IN": "qucarat (Hindistan)", "gv": "manks", "gv_IM": "manks (Men Adası)", "ha": "hausa", "ha_GH": "hausa (Qana)", "ha_Latn": "hausa (latın)", "ha_Latn_GH": "hausa (latın, Qana)", "ha_Latn_NE": "hausa (latın, Niger)", "ha_Latn_NG": "hausa (latın, Nigeriya)", "ha_NE": "hausa (Niger)", "ha_NG": "hausa (Nigeriya)", "he": "ivrit", "he_IL": "ivrit (İsrail)", "hi": "hindi", "hi_IN": "hindi (Hindistan)", "hr": "xorvat", "hr_BA": "xorvat (Bosniya və Hersoqovina)", "hr_HR": "xorvat (Xorvatiya)", "hu": "macar", "hu_HU": "macar (Macarıstan)", "hy": "erməni", "hy_AM": "erməni (Ermənistan)", "id": "indonez", "id_ID": "indonez (İ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_Cyrl": "qazax (kiril)", "kk_Cyrl_KZ": "qazax (kiril, Qazaxıstan)", "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": "kaşmir", "ks_Arab": "kaşmir (ərəb)", "ks_Arab_IN": "kaşmir (ərəb, Hindistan)", "ks_IN": "kaşmir (Hindistan)", "kw": "korn", "kw_GB": "korn (Birləşmiş Krallıq)", "ky": "qırğız", "ky_Cyrl": "qırğız (kiril)", "ky_Cyrl_KG": "qırğız (kiril, Qırğızıstan)", "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_Cyrl": "monqol (kiril)", "mn_Cyrl_MN": "monqol (kiril, Monqoliya)", "mn_MN": "monqol (Monqoliya)", "mr": "marati", "mr_IN": "marati (Hindistan)", "ms": "malay", "ms_BN": "malay (Bruney)", "ms_Latn": "malay (latın)", "ms_Latn_BN": "malay (latın, Bruney)", "ms_Latn_MY": "malay (latın, Malayziya)", "ms_Latn_SG": "malay (latın, Sinqapur)", "ms_MY": "malay (Malayziya)", "ms_SG": "malay (Sinqapur)", "mt": "malta", "mt_MT": "malta (Malta)", "my": "birma", "my_MM": "birma (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 Maarten)", "nn": "nünorsk norveç", "nn_NO": "nünorsk norveç (Norveç)", "no": "norveç dili", "no_NO": "norveç dili (Norveç)", "om": "oromo", "om_ET": "oromo (Efiopiya)", "om_KE": "oromo (Keniya)", "or": "oriya", "or_IN": "oriya (Hindistan)", "os": "osetik dili", "os_GE": "osetik dili (Gürcüstan)", "os_RU": "osetik dili (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_CV": "portuqal (Kape Verde)", "pt_GW": "portuqal (Qvineya-Bisau)", "pt_MO": "portuqal (Makao Xüsusi İnzibati Ərazi Çin)", "pt_MZ": "portuqal (Mozambik)", "pt_PT": "portuqal (Portuqal)", "pt_ST": "portuqal (Sao Tome və Prinsip)", "pt_TL": "portuqal (Şərqi Timor)", "qu": "keçua", "qu_BO": "keçua (Boliviya)", "qu_EC": "keçua (Ekvador)", "qu_PE": "keçua (Peru)", "rm": "retoroman", "rm_CH": "retoroman (İ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-xorvatca", "sh_BA": "serb-xorvatca (Bosniya və Hersoqovina)", "si": "sinhal", "si_LK": "sinhal (Ş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ə Hersoqovina)", "sr_Cyrl": "serb (kiril)", "sr_Cyrl_BA": "serb (kiril, Bosniya və Hersoqovina)", "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ə Hersoqovina)", "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_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 (Tayland)", "ti": "tiqrin", "ti_ER": "tiqrin (Eritreya)", "ti_ET": "tiqrin (Efiopiya)", "tl": "taqaloq dili", "tl_PH": "taqaloq dili (Filippin)", "to": "tonqa", "to_TO": "tonqa (Tonqa)", "tr": "türk", "tr_CY": "türk (Kipr)", "tr_TR": "türk (Türkiya)", "ug": "uyğur", "ug_Arab": "uyğur (ərəb)", "ug_Arab_CN": "uyğur (ərəb, Çin)", "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": "Yahudi dili", "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ş han)", "zh_Hans_CN": "çin (sadələşmiş han, Çin)", "zh_Hans_HK": "çin (sadələşmiş han, Honq Konq Xüsusi İnzibati Ərazi Çin)", "zh_Hans_MO": "çin (sadələşmiş han, Makao Xüsusi İnzibati Ərazi Çin)", "zh_Hans_SG": "çin (sadələşmiş han, Sinqapur)", "zh_Hant": "çin (ənənəvi han)", "zh_Hant_HK": "çin (ənənəvi han, Honq Konq Xüsusi İnzibati Ərazi Çin)", "zh_Hant_MO": "çin (ənənəvi han, Makao Xüsusi İnzibati Ərazi Çin)", "zh_Hant_TW": "çin (ənənəvi han, 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)" } } src/Symfony/Component/Intl/Resources/data/locales/az_AZ.json000066400000000000000000000000401266465517700244020ustar00rootroot00000000000000{ "%%ALIAS": "az_Latn_AZ" } src/Symfony/Component/Intl/Resources/data/locales/az_Cyrl.json000066400000000000000000000305431266465517700250140ustar00rootroot00000000000000{ "Names": { "as_IN": "assam (Һиндистан)", "az": "Азәрбајҹан", "az_AZ": "Азәрбајҹан (Азәрбајҹан)", "az_Cyrl": "Азәрбајҹан (kiril)", "az_Cyrl_AZ": "Азәрбајҹан (kiril, Азәрбајҹан)", "az_Latn": "Азәрбајҹан (latın)", "az_Latn_AZ": "Азәрбајҹан (latın, Азәрбајҹан)", "bn_IN": "benqal (Һиндистан)", "bo_CN": "tibet (Чин)", "bo_IN": "tibet (Һиндистан)", "br_FR": "Bretonca (Франса)", "ca_FR": "katalan (Франса)", "ca_IT": "katalan (Италија)", "de": "алманҹа", "de_AT": "алманҹа (Avstriya)", "de_BE": "алманҹа (Belçika)", "de_CH": "алманҹа (İsveçrə)", "de_DE": "алманҹа (Алманија)", "de_LI": "алманҹа (Lixtenşteyn)", "de_LU": "алманҹа (Lüksemburq)", "en": "инҝилисҹә", "en_AG": "инҝилисҹә (Antiqua və Barbuda)", "en_AI": "инҝилисҹә (Angila)", "en_AS": "инҝилисҹә (Amerika Samoası)", "en_AU": "инҝилисҹә (Avstraliya)", "en_BB": "инҝилисҹә (Barbados)", "en_BE": "инҝилисҹә (Belçika)", "en_BM": "инҝилисҹә (Bermuda)", "en_BS": "инҝилисҹә (Baham Adaları)", "en_BW": "инҝилисҹә (Botsvana)", "en_BZ": "инҝилисҹә (Beliz)", "en_CA": "инҝилисҹә (Kanada)", "en_CC": "инҝилисҹә (Kokos Adaları)", "en_CK": "инҝилисҹә (Kuk Adaları)", "en_CM": "инҝилисҹә (Kamerun)", "en_CX": "инҝилисҹә (Milad Adası)", "en_DG": "инҝилисҹә (Dieqo Qarsiya)", "en_DM": "инҝилисҹә (Dominika)", "en_ER": "инҝилисҹә (Eritreya)", "en_FJ": "инҝилисҹә (Fici)", "en_FK": "инҝилисҹә (Folklend Adaları)", "en_FM": "инҝилисҹә (Mikroneziya)", "en_GB": "инҝилисҹә (Birləşmiş Krallıq)", "en_GD": "инҝилисҹә (Qrenada)", "en_GG": "инҝилисҹә (Gernsey)", "en_GH": "инҝилисҹә (Qana)", "en_GI": "инҝилисҹә (Gibraltar)", "en_GM": "инҝилисҹә (Qambiya)", "en_GU": "инҝилисҹә (Quam)", "en_GY": "инҝилисҹә (Qviyana)", "en_HK": "инҝилисҹә (Honq Konq Xüsusi İnzibati Ərazi Çin)", "en_IE": "инҝилисҹә (İrlandiya)", "en_IM": "инҝилисҹә (Men Adası)", "en_IN": "инҝилисҹә (Һиндистан)", "en_IO": "инҝилисҹә (Britaniya Hind Okeanı Ərazisi)", "en_JE": "инҝилисҹә (Cersi)", "en_JM": "инҝилисҹә (Yamayka)", "en_KE": "инҝилисҹә (Keniya)", "en_KI": "инҝилисҹә (Kiribati)", "en_KN": "инҝилисҹә (San Kits və Nevis)", "en_KY": "инҝилисҹә (Kayman Adaları)", "en_LC": "инҝилисҹә (San Lüsiya)", "en_LR": "инҝилисҹә (Liberiya)", "en_LS": "инҝилисҹә (Lesoto)", "en_MG": "инҝилисҹә (Madaqaskar)", "en_MH": "инҝилисҹә (Marşal Adaları)", "en_MO": "инҝилисҹә (Makao Xüsusi İnzibati Ərazi Çin)", "en_MP": "инҝилисҹә (Şimali Mariana Adaları)", "en_MS": "инҝилисҹә (Monserat)", "en_MT": "инҝилисҹә (Malta)", "en_MU": "инҝилисҹә (Mavriki)", "en_MW": "инҝилисҹә (Malavi)", "en_MY": "инҝилисҹә (Malayziya)", "en_NA": "инҝилисҹә (Namibiya)", "en_NF": "инҝилисҹә (Norfolk Adası)", "en_NG": "инҝилисҹә (Nigeriya)", "en_NR": "инҝилисҹә (Nauru)", "en_NU": "инҝилисҹә (Niue)", "en_NZ": "инҝилисҹә (Yeni Zelandiya)", "en_PG": "инҝилисҹә (Papua Yeni Qvineya)", "en_PH": "инҝилисҹә (Filippin)", "en_PK": "инҝилисҹә (Pakistan)", "en_PN": "инҝилисҹә (Pitkern Adaları)", "en_PR": "инҝилисҹә (Puerto Riko)", "en_PW": "инҝилисҹә (Palau)", "en_RW": "инҝилисҹә (Ruanda)", "en_SB": "инҝилисҹә (Solomon Adaları)", "en_SC": "инҝилисҹә (Seyşel Adaları)", "en_SD": "инҝилисҹә (Sudan)", "en_SG": "инҝилисҹә (Sinqapur)", "en_SH": "инҝилисҹә (Müqəddəs Yelena)", "en_SL": "инҝилисҹә (Siera Leon)", "en_SS": "инҝилисҹә (Cənubi Sudan)", "en_SX": "инҝилисҹә (Sint Maarten)", "en_SZ": "инҝилисҹә (Svazilend)", "en_TC": "инҝилисҹә (Turks və Kaikos Adaları)", "en_TK": "инҝилисҹә (Tokelau)", "en_TO": "инҝилисҹә (Tonqa)", "en_TT": "инҝилисҹә (Trinidad və Tobaqo)", "en_TV": "инҝилисҹә (Tuvalu)", "en_TZ": "инҝилисҹә (Tanzaniya)", "en_UG": "инҝилисҹә (Uqanda)", "en_UM": "инҝилисҹә (Birləşmiş Ştatlar Uzaq Adalar)", "en_US": "инҝилисҹә (Америка Бирләшмиш Штатлары)", "en_VC": "инҝилисҹә (San Vinsent və Qrenada)", "en_VG": "инҝилисҹә (Britaniya Vircin Adaları)", "en_VI": "инҝилисҹә (ABŞ Vircin Adaları)", "en_VU": "инҝилисҹә (Vanuatu)", "en_WS": "инҝилисҹә (Samoa)", "en_ZA": "инҝилисҹә (Cənub Afrika)", "en_ZM": "инҝилисҹә (Zambiya)", "en_ZW": "инҝилисҹә (Zimbabve)", "es": "испанҹа", "es_AR": "испанҹа (Argentina)", "es_BO": "испанҹа (Boliviya)", "es_CL": "испанҹа (Çili)", "es_CO": "испанҹа (Kolumbiya)", "es_CR": "испанҹа (Kosta Rika)", "es_CU": "испанҹа (Kuba)", "es_DO": "испанҹа (Dominikan Respublikası)", "es_EA": "испанҹа (Seuta və Melilya)", "es_EC": "испанҹа (Ekvador)", "es_ES": "испанҹа (İspaniya)", "es_GQ": "испанҹа (Ekvatorial Qvineya)", "es_GT": "испанҹа (Qvatemala)", "es_HN": "испанҹа (Honduras)", "es_IC": "испанҹа (Kanar Adaları)", "es_MX": "испанҹа (Meksika)", "es_NI": "испанҹа (Nikaraqua)", "es_PA": "испанҹа (Panama)", "es_PE": "испанҹа (Peru)", "es_PH": "испанҹа (Filippin)", "es_PR": "испанҹа (Puerto Riko)", "es_PY": "испанҹа (Paraqvay)", "es_SV": "испанҹа (Salvador)", "es_US": "испанҹа (Америка Бирләшмиш Штатлары)", "es_UY": "испанҹа (Uruqvay)", "es_VE": "испанҹа (Venesuela)", "fr": "франсызҹа", "fr_BE": "франсызҹа (Belçika)", "fr_BF": "франсызҹа (Burkina Faso)", "fr_BI": "франсызҹа (Burundi)", "fr_BJ": "франсызҹа (Benin)", "fr_BL": "франсызҹа (San Bartolomey)", "fr_CA": "франсызҹа (Kanada)", "fr_CD": "франсызҹа (Konqo - Kinşasa)", "fr_CF": "франсызҹа (Mərkəzi Afrika Respublikası)", "fr_CG": "франсызҹа (Konqo - Brazzavil)", "fr_CH": "франсызҹа (İsveçrə)", "fr_CI": "франсызҹа (Fil Dişi Sahili)", "fr_CM": "франсызҹа (Kamerun)", "fr_DJ": "франсызҹа (Cibuti)", "fr_DZ": "франсызҹа (Əlcəzair)", "fr_FR": "франсызҹа (Франса)", "fr_GA": "франсызҹа (Qabon)", "fr_GF": "франсызҹа (Fransız Qviyanası)", "fr_GN": "франсызҹа (Qvineya)", "fr_GP": "франсызҹа (Qvadelupa)", "fr_GQ": "франсызҹа (Ekvatorial Qvineya)", "fr_HT": "франсызҹа (Haiti)", "fr_KM": "франсызҹа (Komor Adaları)", "fr_LU": "франсызҹа (Lüksemburq)", "fr_MA": "франсызҹа (Mərakeş)", "fr_MC": "франсызҹа (Monako)", "fr_MF": "франсызҹа (San Martin)", "fr_MG": "франсызҹа (Madaqaskar)", "fr_ML": "франсызҹа (Mali)", "fr_MQ": "франсызҹа (Martinik)", "fr_MR": "франсызҹа (Mavritaniya)", "fr_MU": "франсызҹа (Mavriki)", "fr_NC": "франсызҹа (Yeni Kaledoniya)", "fr_NE": "франсызҹа (Niger)", "fr_PF": "франсызҹа (Fransız Polineziyası)", "fr_PM": "франсызҹа (San Pier və Mikelon)", "fr_RE": "франсызҹа (Reunion)", "fr_RW": "франсызҹа (Ruanda)", "fr_SC": "франсызҹа (Seyşel Adaları)", "fr_SN": "франсызҹа (Seneqal)", "fr_SY": "франсызҹа (Suriya)", "fr_TD": "франсызҹа (Çad)", "fr_TG": "франсызҹа (Toqo)", "fr_TN": "франсызҹа (Tunis)", "fr_VU": "франсызҹа (Vanuatu)", "fr_WF": "франсызҹа (Uolis və Futuna)", "fr_YT": "франсызҹа (Mayot)", "gu_IN": "qucarat (Һиндистан)", "hi_IN": "hindi (Һиндистан)", "ii_CN": "siçuan yi (Чин)", "it": "италјанҹа", "it_CH": "италјанҹа (İsveçrə)", "it_IT": "италјанҹа (Италија)", "it_SM": "италјанҹа (San Marino)", "ja": "јапонҹа", "ja_JP": "јапонҹа (Јапонија)", "kn_IN": "kannada (Һиндистан)", "ks_Arab_IN": "kaşmir (ərəb, Һиндистан)", "ks_IN": "kaşmir (Һиндистан)", "ml_IN": "malayalam (Һиндистан)", "mr_IN": "marati (Һиндистан)", "ne_IN": "nepal (Һиндистан)", "or_IN": "oriya (Һиндистан)", "os_RU": "osetik dili (Русија)", "pa_Guru_IN": "pəncab (qurmuxi, Һиндистан)", "pa_IN": "pəncab (Һиндистан)", "pt": "португалҹа", "pt_AO": "португалҹа (Anqola)", "pt_BR": "португалҹа (Бразилија)", "pt_CV": "португалҹа (Kape Verde)", "pt_GW": "португалҹа (Qvineya-Bisau)", "pt_MO": "португалҹа (Makao Xüsusi İnzibati Ərazi Çin)", "pt_MZ": "португалҹа (Mozambik)", "pt_PT": "португалҹа (Portuqal)", "pt_ST": "португалҹа (Sao Tome və Prinsip)", "pt_TL": "португалҹа (Şərqi Timor)", "ru": "русҹа", "ru_BY": "русҹа (Belarus)", "ru_KG": "русҹа (Qırğızıstan)", "ru_KZ": "русҹа (Qazaxıstan)", "ru_MD": "русҹа (Moldova)", "ru_RU": "русҹа (Русија)", "ru_UA": "русҹа (Ukrayna)", "ta_IN": "tamil (Һиндистан)", "te_IN": "teluqu (Һиндистан)", "ug_Arab_CN": "uyğur (ərəb, Чин)", "ug_CN": "uyğur (Чин)", "ur_IN": "urdu (Һиндистан)", "zh": "чинҹә", "zh_CN": "чинҹә (Чин)", "zh_HK": "чинҹә (Honq Konq Xüsusi İnzibati Ərazi Çin)", "zh_Hans": "чинҹә (sadələşmiş han)", "zh_Hans_CN": "чинҹә (sadələşmiş han, Чин)", "zh_Hans_HK": "чинҹә (sadələşmiş han, Honq Konq Xüsusi İnzibati Ərazi Çin)", "zh_Hans_MO": "чинҹә (sadələşmiş han, Makao Xüsusi İnzibati Ərazi Çin)", "zh_Hans_SG": "чинҹә (sadələşmiş han, Sinqapur)", "zh_Hant": "чинҹә (ənənəvi han)", "zh_Hant_HK": "чинҹә (ənənəvi han, Honq Konq Xüsusi İnzibati Ərazi Çin)", "zh_Hant_MO": "чинҹә (ənənəvi han, Makao Xüsusi İnzibati Ərazi Çin)", "zh_Hant_TW": "чинҹә (ənənəvi han, Tayvan)", "zh_MO": "чинҹә (Makao Xüsusi İnzibati Ərazi Çin)", "zh_SG": "чинҹә (Sinqapur)", "zh_TW": "чинҹә (Tayvan)" } } src/Symfony/Component/Intl/Resources/data/locales/be.json000066400000000000000000000647161266465517700240100ustar00rootroot00000000000000{ "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_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": "бенгальская (Індыя)", "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_LI": "нямецкая (Ліхтэнштэйн)", "de_LU": "нямецкая (Люксембург)", "el": "грэцкая", "el_CY": "грэцкая (Кіпр)", "el_GR": "грэцкая (Грэцыя)", "en": "англійская", "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_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_MY": "англійская (Малайзія)", "en_NA": "англійская (Намібія)", "en_NF": "англійская (Востраў Норфалк)", "en_NG": "англійская (Нігерыя)", "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_SG": "англійская (Сінгапур)", "en_SH": "англійская (Святой Алены, Востраў)", "en_SL": "англійская (Сьера-Леонэ)", "en_SZ": "англійская (Свазіленд)", "en_TC": "англійская (Цёркс і Кайкас)", "en_TK": "англійская (Такелау)", "en_TO": "англійская (Тонга)", "en_TT": "англійская (Трынідад і Табага)", "en_TV": "англійская (Тувалу)", "en_TZ": "англійская (Танзанія)", "en_UG": "англійская (Уганда)", "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_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": "фарсі (Іран)", "fi": "фінская", "fi_FI": "фінская (Фінляндыя)", "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_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": "гуяраці (Індыя)", "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": "казахская", "kk_Cyrl": "казахская (кірылічны)", "kk_Cyrl_KZ": "казахская (кірылічны, Казахстан)", "kk_KZ": "казахская (Казахстан)", "kn": "каннада", "kn_IN": "каннада (Індыя)", "ko": "карэйская", "ko_KP": "карэйская (Паўночная Карэя)", "ko_KR": "карэйская (Паўднёвая Карэя)", "ln": "лінгала", "ln_AO": "лінгала (Ангола)", "ln_CD": "лінгала (Конга, Дэмакратычная Рэспубліка)", "ln_CF": "лінгала (Цэнтральна-Афрыканская Рэспубліка)", "ln_CG": "лінгала (Конга)", "lo": "лаоская", "lo_LA": "лаоская (Лаос)", "lt": "літоўская", "lt_LT": "літоўская (Літва)", "lv": "латышская", "lv_LV": "латышская (Латвія)", "mk": "македонская", "mk_MK": "македонская (Македонія, БЮР)", "ml": "малаяламская", "ml_IN": "малаяламская (Індыя)", "mn": "мангольская", "mn_Cyrl": "мангольская (кірылічны)", "mn_Cyrl_MN": "мангольская (кірылічны, Манголія)", "mn_MN": "мангольская (Манголія)", "mr": "маратхі", "mr_IN": "маратхі (Індыя)", "ms": "малайская", "ms_BN": "малайская (Бруней)", "ms_Latn": "малайская (лацінскі)", "ms_Latn_BN": "малайская (лацінскі, Бруней)", "ms_Latn_MY": "малайская (лацінскі, Малайзія)", "ms_Latn_SG": "малайская (лацінскі, Сінгапур)", "ms_MY": "малайская (Малайзія)", "ms_SG": "малайская (Сінгапур)", "mt": "мальтыйская", "mt_MT": "мальтыйская (Мальта)", "nb": "нарвэская букмал", "nb_NO": "нарвэская букмал (Нарвегія)", "nb_SJ": "нарвэская букмал (Свальбард (Паўночна-Усходняя Зямля) і Ян-Маен)", "ne": "непальская", "ne_IN": "непальская (Індыя)", "ne_NP": "непальская (Непал)", "nl": "галандская", "nl_AW": "галандская (Аруба)", "nl_BE": "галандская (Бельгія)", "nl_CW": "галандская (Востраў Кюрасаа)", "nl_NL": "галандская (Нідэрланды)", "nl_SR": "галандская (Сурынам)", "nn": "нарвежская (нюнорск)", "nn_NO": "нарвежская (Нарвегія)", "no": "нарвежская", "no_NO": "нарвежская (Нарвегія)", "pa": "панджабі", "pa_Arab": "панджабі (арабскае)", "pa_Arab_PK": "панджабі (арабскае, Пакістан)", "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": "партугальская (Усходні Тымор)", "ro": "румынская", "ro_MD": "румынская (Малдова)", "ro_RO": "румынская (Румынія)", "ru": "руская", "ru_BY": "руская (Беларусь)", "ru_KG": "руская (Кыргызстан)", "ru_KZ": "руская (Казахстан)", "ru_MD": "руская (Малдова)", "ru_RU": "руская (Расія)", "ru_UA": "руская (Украіна)", "sh": "сербска-харвацкая", "sh_BA": "сербска-харвацкая (Боснія і Герцагавіна)", "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_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": "тыгрынья (Эфіопія)", "tr": "турэцкая", "tr_CY": "турэцкая (Кіпр)", "tr_TR": "турэцкая (Турцыя)", "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": "узбекская (Узбекістан)", "vi": "в’етнамская", "vi_VN": "в’етнамская (В’етнам)", "yi": "ідыш", "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": "зулу (Паўднёва-Афрыканская Рэспубліка)" } } src/Symfony/Component/Intl/Resources/data/locales/bg.json000066400000000000000000000741001266465517700237760ustar00rootroot00000000000000{ "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_Latn": "бамбара (латиница)", "bm_Latn_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": "каталонски (Италия)", "cs": "чешки", "cs_CZ": "чешки (Чехия)", "cy": "уелски", "cy_GB": "уелски (Великобритания)", "da": "датски", "da_DK": "датски (Дания)", "da_GL": "датски (Гренландия)", "de": "немски", "de_AT": "немски (Австрия)", "de_BE": "немски (Белгия)", "de_CH": "немски (Швейцария)", "de_DE": "немски (Германия)", "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_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_MY": "английски (Малайзия)", "en_NA": "английски (Намибия)", "en_NF": "английски (остров Норфолк)", "en_NG": "английски (Нигерия)", "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_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_VC": "английски (Сейнт Винсънт и Гренадини)", "en_VG": "английски (Британски Вирджински острови)", "en_VI": "английски (Американски Вирджински острови)", "en_VU": "английски (Вануату)", "en_WS": "английски (Самоа)", "en_ZA": "английски (Южна Африка)", "en_ZM": "английски (Замбия)", "en_ZW": "английски (Зимбабве)", "eo": "есперанто", "es": "испански", "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": "баски (Испания)", "fa": "персийски", "fa_AF": "персийски (Афганистан)", "fa_IR": "персийски (Иран)", "ff": "фула", "ff_CM": "фула (Камерун)", "ff_GN": "фула (Гвинея)", "ff_MR": "фула (Мавритания)", "ff_SN": "фула (Сенегал)", "fi": "фински", "fi_FI": "фински (Финландия)", "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": "френски (Майот)", "fy": "фризийски", "fy_NL": "фризийски (Нидерландия)", "ga": "ирландски", "ga_IE": "ирландски (Ирландия)", "gd": "шотландски галски", "gd_GB": "шотландски галски (Великобритания)", "gl": "галисийски", "gl_ES": "галисийски (Испания)", "gu": "гуджарати", "gu_IN": "гуджарати (Индия)", "gv": "манкски", "gv_IM": "манкски (остров Ман)", "ha": "хауза", "ha_GH": "хауза (Гана)", "ha_Latn": "хауза (латиница)", "ha_Latn_GH": "хауза (латиница, Гана)", "ha_Latn_NE": "хауза (латиница, Нигер)", "ha_Latn_NG": "хауза (латиница, Нигерия)", "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_Cyrl": "казахски (кирилица)", "kk_Cyrl_KZ": "казахски (кирилица, Казахстан)", "kk_KZ": "казахски (Казахстан)", "kl": "гренландски", "kl_GL": "гренландски (Гренландия)", "km": "кхмерски", "km_KH": "кхмерски (Камбоджа)", "kn": "каннада", "kn_IN": "каннада (Индия)", "ko": "корейски", "ko_KP": "корейски (Северна Корея)", "ko_KR": "корейски (Южна Корея)", "ks": "кашмирски", "ks_Arab": "кашмирски (арабска)", "ks_Arab_IN": "кашмирски (арабска, Индия)", "ks_IN": "кашмирски (Индия)", "kw": "корнуолски", "kw_GB": "корнуолски (Великобритания)", "ky": "киргизки", "ky_Cyrl": "киргизки (кирилица)", "ky_Cyrl_KG": "киргизки (кирилица, Киргизстан)", "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_Cyrl": "монголски (кирилица)", "mn_Cyrl_MN": "монголски (кирилица, Монголия)", "mn_MN": "монголски (Монголия)", "mr": "марати", "mr_IN": "марати (Индия)", "ms": "малайски", "ms_BN": "малайски (Бруней Дарусалам)", "ms_Latn": "малайски (латиница)", "ms_Latn_BN": "малайски (латиница, Бруней Дарусалам)", "ms_Latn_MY": "малайски (латиница, Малайзия)", "ms_Latn_SG": "малайски (латиница, Сингапур)", "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_CV": "португалски (Кабо Верде)", "pt_GW": "португалски (Гвинея-Бисау)", "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_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_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": "узбекски (Узбекистан)", "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": "зулуски (Южна Африка)" } } src/Symfony/Component/Intl/Resources/data/locales/bm.json000066400000000000000000000277111266465517700240120ustar00rootroot00000000000000{ "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", "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_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_AU": "angilɛkan (Ositirali)", "en_BB": "angilɛkan (Barbadi)", "en_BE": "angilɛkan (Bɛliziki)", "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_CK": "angilɛkan (Kuki Gun)", "en_CM": "angilɛkan (Kameruni)", "en_DM": "angilɛkan (Dɔminiki)", "en_ER": "angilɛkan (Eritere)", "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_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_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_SG": "angilɛkan (Sɛngapuri)", "en_SH": "angilɛkan (Ɛlɛni Senu)", "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_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_CV": "pɔritigalikan (Capivɛrdi)", "pt_GW": "pɔritigalikan (Gine Bisawo)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/bn.json000066400000000000000000001127741266465517700240170ustar00rootroot00000000000000{ "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_Latn": "বামবারা (ল্যাটিন)", "bm_Latn_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": "কাতালান (ইতালী)", "cs": "চেক", "cs_CZ": "চেক (চেক প্রজাতন্ত্র)", "cy": "ওয়েলশ", "cy_GB": "ওয়েলশ (যুক্তরাজ্য)", "da": "ডেনিশ", "da_DK": "ডেনিশ (ডেনমার্ক)", "da_GL": "ডেনিশ (গ্রীনল্যান্ড)", "de": "জার্মান", "de_AT": "জার্মান (অস্ট্রিয়া)", "de_BE": "জার্মান (বেলজিয়াম)", "de_CH": "জার্মান (সুইজারল্যান্ড)", "de_DE": "জার্মান (জার্মানি)", "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_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_MY": "ইংরেজি (মালয়েশিয়া)", "en_NA": "ইংরেজি (নামিবিয়া)", "en_NF": "ইংরেজি (নিরফোক দ্বীপ)", "en_NG": "ইংরেজি (নাইজেরিয়া)", "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_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_VC": "ইংরেজি (সেন্ট ভিনসেন্ট ও দ্যা গ্রেনাডিনস)", "en_VG": "ইংরেজি (ব্রিটিশ ভার্জিন দ্বীপপুঞ্জ)", "en_VI": "ইংরেজি (মার্কিন ভার্জিন দ্বীপপুঞ্জ)", "en_VU": "ইংরেজি (ভানুয়াটু)", "en_WS": "ইংরেজি (সামোয়া)", "en_ZA": "ইংরেজি (দক্ষিণ আফ্রিকা)", "en_ZM": "ইংরেজি (জাম্বিয়া)", "en_ZW": "ইংরেজি (জিম্বাবোয়ে)", "eo": "এস্পেরান্তো", "es": "স্প্যানিশ", "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": "বাস্ক (স্পেন)", "fa": "ফার্সি", "fa_AF": "ফার্সি (আফগানিস্তান)", "fa_IR": "ফার্সি (ইরান)", "ff": "ফুলাহ্", "ff_CM": "ফুলাহ্ (ক্যামেরুন)", "ff_GN": "ফুলাহ্ (গিনি)", "ff_MR": "ফুলাহ্ (মরিতানিয়া)", "ff_SN": "ফুলাহ্ (সেনেগাল)", "fi": "ফিনিশ", "fi_FI": "ফিনিশ (ফিনল্যান্ড)", "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": "ফরাসি (মায়োত্তে)", "fy": "পশ্চিম ফ্রিসিয়", "fy_NL": "পশ্চিম ফ্রিসিয় (নেদারল্যান্ডস)", "ga": "আইরিশ", "ga_IE": "আইরিশ (আয়ারল্যান্ড)", "gd": "স্কটস-গ্যেলিক", "gd_GB": "স্কটস-গ্যেলিক (যুক্তরাজ্য)", "gl": "গ্যালিশিয়", "gl_ES": "গ্যালিশিয় (স্পেন)", "gu": "গুজরাটি", "gu_IN": "গুজরাটি (ভারত)", "gv": "ম্যাঙ্কস", "gv_IM": "ম্যাঙ্কস (আইল অফ ম্যান)", "ha": "হাউসা", "ha_GH": "হাউসা (ঘানা)", "ha_Latn": "হাউসা (ল্যাটিন)", "ha_Latn_GH": "হাউসা (ল্যাটিন, ঘানা)", "ha_Latn_NE": "হাউসা (ল্যাটিন, নাইজার)", "ha_Latn_NG": "হাউসা (ল্যাটিন, নাইজেরিয়া)", "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_Cyrl": "কাজাখ (সিরিলিক)", "kk_Cyrl_KZ": "কাজাখ (সিরিলিক, কাজাকস্থান)", "kk_KZ": "কাজাখ (কাজাকস্থান)", "kl": "ক্যালাল্লিসুট", "kl_GL": "ক্যালাল্লিসুট (গ্রীনল্যান্ড)", "km": "খমের", "km_KH": "খমের (কম্বোডিয়া)", "kn": "কান্নাড়ী", "kn_IN": "কান্নাড়ী (ভারত)", "ko": "কোরিয়ান", "ko_KP": "কোরিয়ান (উত্তর কোরিয়া)", "ko_KR": "কোরিয়ান (দক্ষিণ কোরিয়া)", "ks": "কাশ্মীরী", "ks_Arab": "কাশ্মীরী (আরবি)", "ks_Arab_IN": "কাশ্মীরী (আরবি, ভারত)", "ks_IN": "কাশ্মীরী (ভারত)", "kw": "কর্ণিশ", "kw_GB": "কর্ণিশ (যুক্তরাজ্য)", "ky": "কির্গিজ", "ky_Cyrl": "কির্গিজ (সিরিলিক)", "ky_Cyrl_KG": "কির্গিজ (সিরিলিক, কির্গিজিয়া)", "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_Cyrl": "মঙ্গোলিয় (সিরিলিক)", "mn_Cyrl_MN": "মঙ্গোলিয় (সিরিলিক, মঙ্গোলিয়া)", "mn_MN": "মঙ্গোলিয় (মঙ্গোলিয়া)", "mr": "মারাঠি", "mr_IN": "মারাঠি (ভারত)", "ms": "মালয়", "ms_BN": "মালয় (ব্রুনেই)", "ms_Latn": "মালয় (ল্যাটিন)", "ms_Latn_BN": "মালয় (ল্যাটিন, ব্রুনেই)", "ms_Latn_MY": "মালয় (ল্যাটিন, মালয়েশিয়া)", "ms_Latn_SG": "মালয় (ল্যাটিন, সিঙ্গাপুর)", "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_CV": "পর্তুগীজ (কেপভার্দে)", "pt_GW": "পর্তুগীজ (গিনি-বিসাউ)", "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_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_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": "উজবেকীয় (উজবেকিস্তান)", "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": "জুলু (দক্ষিণ আফ্রিকা)" } } src/Symfony/Component/Intl/Resources/data/locales/bn_IN.json000066400000000000000000000013471266465517700243760ustar00rootroot00000000000000{ "Names": { "en_GD": "ইংরেজি (গ্রেনেডা)", "en_JM": "ইংরেজি (জামাইকা)", "es_GT": "স্প্যানিশ (গোয়াতেমালা)", "or": "উড়িয়া", "or_IN": "উড়িয়া (ভারত)", "zh_Hant": "চীনা (ঐতিহ্যবাহী)", "zh_Hant_HK": "চীনা (ঐতিহ্যবাহী, হংকং এসএআর চীনা)", "zh_Hant_MO": "চীনা (ঐতিহ্যবাহী, ম্যাকাও এস এ আর চায়না)", "zh_Hant_TW": "চীনা (ঐতিহ্যবাহী, তাইওয়ান)" } } src/Symfony/Component/Intl/Resources/data/locales/bo.json000066400000000000000000000015731266465517700240120ustar00rootroot00000000000000{ "Names": { "bo": "བོད་སྐད་", "bo_CN": "བོད་སྐད་ (རྒྱ་ནག)", "bo_IN": "བོད་སྐད་ (རྒྱ་གར་)", "dz": "རྫོང་ཁ", "hi": "ཧིན་དི", "hi_IN": "ཧིན་དི (རྒྱ་གར་)", "ja": "རི་པིན་སྐད་", "ja_JP": "རི་པིན་སྐད་ (རི་པིན་)", "ne": "ནེ་པ་ལི", "ne_IN": "ནེ་པ་ལི (རྒྱ་གར་)", "ne_NP": "ནེ་པ་ལི (བར་ཡུལ་)", "ru": "ཨུ་རུ་སུ་སྐད་", "ru_RU": "ཨུ་རུ་སུ་སྐད་ (ཨུ་རུ་སུ་)", "zh": "རྒྱ་སྐད་", "zh_CN": "རྒྱ་སྐད་ (རྒྱ་ནག)" } } src/Symfony/Component/Intl/Resources/data/locales/br.json000066400000000000000000000512041266465517700240110ustar00rootroot00000000000000{ "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": "azeri", "az_AZ": "azeri (Azerbaidjan)", "az_Cyrl": "azeri (kirillek)", "az_Cyrl_AZ": "azeri (kirillek, Azerbaidjan)", "az_Latn": "azeri (latin)", "az_Latn_AZ": "azeri (latin, Azerbaidjan)", "be": "belaruseg", "be_BY": "belaruseg (Belarus)", "bg": "bulgareg", "bg_BG": "bulgareg (Bulgaria)", "bm": "bambara", "bm_Latn": "bambara (latin)", "bm_Latn_ML": "bambara (latin, 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)", "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_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_AU": "saozneg (Aostralia)", "en_BB": "saozneg (Barbados)", "en_BE": "saozneg (Belgia)", "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_CK": "saozneg (Inizi Cook)", "en_CM": "saozneg (Kameroun)", "en_CX": "saozneg (Enez Christmas)", "en_DG": "saozneg (Diego Garcia)", "en_DM": "saozneg (Dominica)", "en_ER": "saozneg (Eritrea)", "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_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_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 (Salomon)", "en_SC": "saozneg (Sechelez)", "en_SD": "saozneg (Soudan)", "en_SG": "saozneg (Singapour)", "en_SH": "saozneg (Saint-Helena)", "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_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_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 (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_Latn": "haousa (latin)", "ha_Latn_GH": "haousa (latin, Ghana)", "ha_Latn_NE": "haousa (latin, Niger)", "ha_Latn_NG": "haousa (latin, Nigeria)", "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_Cyrl": "kazak (kirillek)", "kk_Cyrl_KZ": "kazak (kirillek, Kazakstan)", "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_Arab": "kashmiri (arabek)", "ks_Arab_IN": "kashmiri (arabek, India)", "ks_IN": "kashmiri (India)", "kw": "kerneveureg", "kw_GB": "kerneveureg (Rouantelezh-Unanet)", "ky": "kirgiz", "ky_Cyrl": "kirgiz (kirillek)", "ky_Cyrl_KG": "kirgiz (kirillek, Kyrgyzstan)", "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_Cyrl": "mongoleg (kirillek)", "mn_Cyrl_MN": "mongoleg (kirillek, Mongolia)", "mn_MN": "mongoleg (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malayseg", "ms_BN": "malayseg (Brunei)", "ms_Latn": "malayseg (latin)", "ms_Latn_BN": "malayseg (latin, Brunei)", "ms_Latn_MY": "malayseg (latin, Malaysia)", "ms_Latn_SG": "malayseg (latin, Singapour)", "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 (Nederlandat Karib)", "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_CV": "portugaleg (Kab Glas)", "pt_GW": "portugaleg (Ginea-Bissau)", "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_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_Arab": "ouigoureg (arabek)", "ug_Arab_CN": "ouigoureg (arabek, Sina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/bs.json000066400000000000000000000540101266465517700240100ustar00rootroot00000000000000{ "Names": { "af": "afrikanerski", "af_NA": "afrikanerski (Namibija)", "af_ZA": "afrikanerski (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": "asemijski", "as_IN": "asemijski (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_Latn": "bambara (latinica)", "bm_Latn_ML": "bambara (latinica, 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)", "cs": "češki", "cs_CZ": "češki (Češka)", "cy": "cy", "cy_GB": "cy (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_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_AU": "engleski (Australija)", "en_BB": "engleski (Barbados)", "en_BE": "engleski (Belgija)", "en_BM": "engleski (Bermuda)", "en_BS": "engleski (Bahami)", "en_BW": "engleski (Bocvana)", "en_BZ": "engleski (Belize)", "en_CA": "engleski (Kanada)", "en_CC": "engleski (Kokos (Keling) Ostrva)", "en_CK": "engleski (Kukova Ostrva)", "en_CM": "engleski (Kamerun)", "en_CX": "engleski (Božićna Ostrva)", "en_DG": "engleski (Dijego Garsija)", "en_DM": "engleski (Dominika)", "en_ER": "engleski (Eritreja)", "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 (S. A. R. Kina))", "en_IE": "engleski (Irska)", "en_IM": "engleski (Ostrvo Man)", "en_IN": "engleski (Indija)", "en_IO": "engleski (Britanska Territorija u Indijskom Okeanu)", "en_JE": "engleski (Džersi)", "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 (Sent Lucija)", "en_LR": "engleski (Liberija)", "en_LS": "engleski (Lesoto)", "en_MG": "engleski (Madagaskar)", "en_MH": "engleski (Maršalska Ostrva)", "en_MO": "engleski (Makao (S. A. R. Kina))", "en_MP": "engleski (Sjeverna Marijanska Ostrva)", "en_MS": "engleski (Monserat)", "en_MT": "engleski (Malta)", "en_MU": "engleski (Mauricius)", "en_MW": "engleski (Malavi)", "en_MY": "engleski (Malezija)", "en_NA": "engleski (Namibija)", "en_NF": "engleski (Norfolk Ostrvo)", "en_NG": "engleski (Nigerija)", "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 (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_SG": "engleski (Singapur)", "en_SH": "engleski (Sveta Helena)", "en_SL": "engleski (Sijera Leone)", "en_SS": "engleski (Južni Sudan)", "en_SX": "engleski (Sint Marten)", "en_SZ": "engleski (Svazilend)", "en_TC": "engleski (Turks i Kajkos Ostrva)", "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 (Manja Udaljena Ostrva SAD)", "en_US": "engleski (Sjedinjene Američke Države)", "en_VC": "engleski (Sent Vinsent i Grenadini)", "en_VG": "engleski (Britanska Djevičanska Ostrva)", "en_VI": "engleski (Djevičanska Ostrva SAD)", "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_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_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 (Sv. 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 (Gvadelupe)", "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 (Mauricius)", "fr_NC": "francuski (Nova Kaledonija)", "fr_NE": "francuski (Niger)", "fr_PF": "francuski (Francuska Polinezija)", "fr_PM": "francuski (Sen Pjer i Mikelon)", "fr_RE": "francuski (Rejunion)", "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 Ostrva)", "fr_YT": "francuski (Majote)", "fy": "frizijski", "fy_NL": "frizijski (Holandija)", "ga": "irski", "ga_IE": "irski (Irska)", "gd": "škotski galski", "gd_GB": "škotski galski (Velika Britanija)", "gl": "galski", "gl_ES": "galski (Španija)", "gu": "gudžarati", "gu_IN": "gudžarati (Indija)", "gv": "manks", "gv_IM": "manks (Ostrvo Man)", "ha": "hausa", "ha_GH": "hausa (Gana)", "ha_Latn": "hausa (latinica)", "ha_Latn_GH": "hausa (latinica, Gana)", "ha_Latn_NE": "hausa (latinica, Niger)", "ha_Latn_NG": "hausa (latinica, Nigerija)", "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": "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": "italijanski", "it_CH": "italijanski (Švicarska)", "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_Cyrl": "kazački (ćirilica)", "kk_Cyrl_KZ": "kazački (ćirilica, Kazahstan)", "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šmiri", "ks_Arab": "kašmiri (arapsko pismo)", "ks_Arab_IN": "kašmiri (arapsko pismo, Indija)", "ks_IN": "kašmiri (Indija)", "kw": "korniški", "kw_GB": "korniški (Velika Britanija)", "ky": "kirgiski", "ky_Cyrl": "kirgiski (ćirilica)", "ky_Cyrl_KG": "kirgiski (ćirilica, Kirgizstan)", "ky_KG": "kirgiski (Kirgizstan)", "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": "letonski", "lv_LV": "letonski (Letonija)", "mg": "malagazijski", "mg_MG": "malagazijski (Madagaskar)", "mk": "makedonski", "mk_MK": "makedonski (Makedonija)", "ml": "malajalam", "ml_IN": "malajalam (Indija)", "mn": "mongolski", "mn_Cyrl": "mongolski (ćirilica)", "mn_Cyrl_MN": "mongolski (ćirilica, Mongolija)", "mn_MN": "mongolski (Mongolija)", "mr": "marati", "mr_IN": "marati (Indija)", "ms": "malajski", "ms_BN": "malajski (Brunej)", "ms_Latn": "malajski (latinica)", "ms_Latn_BN": "malajski (latinica, Brunej)", "ms_Latn_MY": "malajski (latinica, Malezija)", "ms_Latn_SG": "malajski (latinica, Singapur)", "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 bokmal (Norveška)", "nb_SJ": "norveški bokmal (Svalbard i Janmajen Ostrva)", "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 njorsk", "nn_NO": "norveški njorsk (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žabski", "pa_Arab": "pandžabski (arapsko pismo)", "pa_Arab_PK": "pandžabski (arapsko pismo, Pakistan)", "pa_Guru": "pandžabski (gurmuki pismo)", "pa_Guru_IN": "pandžabski (gurmuki pismo, Indija)", "pa_IN": "pandžabski (Indija)", "pa_PK": "pandžabski (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_CV": "portugalski (Kape Verde)", "pt_GW": "portugalski (Gvineja-Bisao)", "pt_MO": "portugalski (Makao (S. A. R. Kina))", "pt_MZ": "portugalski (Mozambik)", "pt_PT": "portugalski (Portugal)", "pt_ST": "portugalski (Sao Tome i Principe)", "pt_TL": "portugalski (Timor Leste)", "qu": "kvenča", "qu_BO": "kvenča (Bolivija)", "qu_EC": "kvenča (Ekvador)", "qu_PE": "kvenča (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 (Kirgizstan)", "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": "singaleski", "si_LK": "singaleski (Š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 (Alandska Ostrva)", "sv_FI": "švedski (Finska)", "sv_SE": "švedski (Švedska)", "sw": "svahili", "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": "tagalski", "tl_PH": "tagalski (Filipini)", "to": "tonga", "to_TO": "tonga (Tonga)", "tr": "turski", "tr_CY": "turski (Kipar)", "tr_TR": "turski (Turska)", "ug": "ujgurski", "ug_Arab": "ujgurski (arapsko pismo)", "ug_Arab_CN": "ujgurski (arapsko pismo, Kina)", "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 (S. A. R. Kina))", "zh_Hans": "kineski (pojednostavljeno kinesko pismo)", "zh_Hans_CN": "kineski (pojednostavljeno kinesko pismo, Kina)", "zh_Hans_HK": "kineski (pojednostavljeno kinesko pismo, Hong Kong (S. A. R. Kina))", "zh_Hans_MO": "kineski (pojednostavljeno kinesko pismo, Makao (S. A. R. Kina))", "zh_Hans_SG": "kineski (pojednostavljeno kinesko pismo, Singapur)", "zh_Hant": "kineski (tradicionalno kinesko pismo)", "zh_Hant_HK": "kineski (tradicionalno kinesko pismo, Hong Kong (S. A. R. Kina))", "zh_Hant_MO": "kineski (tradicionalno kinesko pismo, Makao (S. A. R. Kina))", "zh_Hant_TW": "kineski (tradicionalno kinesko pismo, Tajvan)", "zh_MO": "kineski (Makao (S. A. R. Kina))", "zh_SG": "kineski (Singapur)", "zh_TW": "kineski (Tajvan)", "zu": "zulu", "zu_ZA": "zulu (Južnoafrička Republika)" } } src/Symfony/Component/Intl/Resources/data/locales/bs_BA.json000066400000000000000000000000401266465517700243440ustar00rootroot00000000000000{ "%%ALIAS": "bs_Latn_BA" } src/Symfony/Component/Intl/Resources/data/locales/bs_Cyrl.json000066400000000000000000000745451266465517700250200ustar00rootroot00000000000000{ "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_Latn": "бамбара (Латиница)", "bm_Latn_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": "каталонски (Италија)", "cs": "чешки", "cs_CZ": "чешки (Чешка)", "cy": "велшки", "cy_GB": "велшки (Велика Британија)", "da": "дански", "da_DK": "дански (Данска)", "da_GL": "дански (Гренланд)", "de": "немачки", "de_AT": "немачки (Аустрија)", "de_BE": "немачки (Белгија)", "de_CH": "немачки (Швајцарска)", "de_DE": "немачки (Немачка)", "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_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_MY": "енглески (Малезија)", "en_NA": "енглески (Намибија)", "en_NF": "енглески (Норфолк Острво)", "en_NG": "енглески (Нигерија)", "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_SG": "енглески (Сингапур)", "en_SH": "енглески (Света Јелена)", "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_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_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_Latn": "хауса (Латиница)", "ha_Latn_GH": "хауса (Латиница, Гана)", "ha_Latn_NE": "хауса (Латиница, Нигер)", "ha_Latn_NG": "хауса (Латиница, Нигерија)", "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_Cyrl": "козачки (Ћирилица)", "kk_Cyrl_KZ": "козачки (Ћирилица, Казахстан)", "kk_KZ": "козачки (Казахстан)", "kl": "калалисут", "kl_GL": "калалисут (Гренланд)", "km": "кмерски", "km_KH": "кмерски (Камбоџа)", "kn": "канада", "kn_IN": "канада (Индија)", "ko": "корејски", "ko_KP": "корејски (Северна Кореја)", "ko_KR": "корејски (Јужна Кореја)", "ks": "кашмирски", "ks_Arab": "кашмирски (арапско писмо)", "ks_Arab_IN": "кашмирски (арапско писмо, Индија)", "ks_IN": "кашмирски (Индија)", "kw": "корнишки", "kw_GB": "корнишки (Велика Британија)", "ky": "киргиски", "ky_Cyrl": "киргиски (Ћирилица)", "ky_Cyrl_KG": "киргиски (Ћирилица, Киргизстан)", "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_Cyrl": "монголски (Ћирилица)", "mn_Cyrl_MN": "монголски (Ћирилица, Монголија)", "mn_MN": "монголски (Монголија)", "mr": "марати", "mr_IN": "марати (Индија)", "ms": "малајски", "ms_BN": "малајски (Брунеј)", "ms_Latn": "малајски (Латиница)", "ms_Latn_BN": "малајски (Латиница, Брунеј)", "ms_Latn_MY": "малајски (Латиница, Малезија)", "ms_Latn_SG": "малајски (Латиница, Сингапур)", "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_CV": "португалски (Капе Верде)", "pt_GW": "португалски (Гвинеја-Бисао)", "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_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_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": "узбечки (Узбекистан)", "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": "зулу (Јужноафричка Република)" } } src/Symfony/Component/Intl/Resources/data/locales/ca.json000066400000000000000000000522571266465517700240020ustar00rootroot00000000000000{ "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 (Palestina)", "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 (Bielorússia)", "bg": "búlgar", "bg_BG": "búlgar (Bulgària)", "bm": "bambara", "bm_Latn": "bambara (llatí)", "bm_Latn_ML": "bambara (llatí, 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)", "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_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_AU": "anglès (Austràlia)", "en_BB": "anglès (Barbados)", "en_BE": "anglès (Bèlgica)", "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_CK": "anglès (illes Cook)", "en_CM": "anglès (Camerun)", "en_CX": "anglès (illa Christmas)", "en_DG": "anglès (Diego Garcia)", "en_DM": "anglès (Dominica)", "en_ER": "anglès (Eritrea)", "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_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_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_SG": "anglès (Singapur)", "en_SH": "anglès (Saint Helena)", "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_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_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ó oriental", "fy_NL": "frisó oriental (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_Latn": "haussa (llatí)", "ha_Latn_GH": "haussa (llatí, Ghana)", "ha_Latn_NE": "haussa (llatí, Níger)", "ha_Latn_NG": "haussa (llatí, Nigèria)", "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_Cyrl": "kazakh (ciríl·lic)", "kk_Cyrl_KZ": "kazakh (ciríl·lic, Kazakhstan)", "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_Arab": "caixmiri (àrab)", "ks_Arab_IN": "caixmiri (àrab, Índia)", "ks_IN": "caixmiri (Índia)", "kw": "còrnic", "kw_GB": "còrnic (Regne Unit)", "ky": "kirguís", "ky_Cyrl": "kirguís (ciríl·lic)", "ky_Cyrl_KG": "kirguís (ciríl·lic, Kirguizistan)", "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_Cyrl": "mongol (ciríl·lic)", "mn_Cyrl_MN": "mongol (ciríl·lic, Mongòlia)", "mn_MN": "mongol (Mongòlia)", "mr": "marathi", "mr_IN": "marathi (Índia)", "ms": "malai", "ms_BN": "malai (Brunei)", "ms_Latn": "malai (llatí)", "ms_Latn_BN": "malai (llatí, Brunei)", "ms_Latn_MY": "malai (llatí, Malàisia)", "ms_Latn_SG": "malai (llatí, Singapur)", "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": "osset", "os_GE": "osset (Geòrgia)", "os_RU": "osset (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_CV": "portuguès (Cap Verd)", "pt_GW": "portuguès (Guinea Bissau)", "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 (Bielorússia)", "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_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": "tagàlog", "tl_PH": "tagàlog (Filipines)", "to": "tongalès", "to_TO": "tongalès (Tonga)", "tr": "turc", "tr_CY": "turc (Xipre)", "tr_TR": "turc (Turquia)", "ug": "uigur", "ug_Arab": "uigur (àrab)", "ug_Arab_CN": "uigur (àrab, Xina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/cs.json000066400000000000000000000574701266465517700240260ustar00rootroot00000000000000{ "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_Latn": "bambarština (latinka)", "bm_Latn_ML": "bambarština (latinka, 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)", "cs": "čeština", "cs_CZ": "čeština (Česká republika)", "cy": "velština", "cy_GB": "velština (Velká Británie)", "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_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_AU": "angličtina (Austrálie)", "en_BB": "angličtina (Barbados)", "en_BE": "angličtina (Belgie)", "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_CK": "angličtina (Cookovy ostrovy)", "en_CM": "angličtina (Kamerun)", "en_CX": "angličtina (Vánoční ostrov)", "en_DG": "angličtina (Diego García)", "en_DM": "angličtina (Dominika)", "en_ER": "angličtina (Eritrea)", "en_FJ": "angličtina (Fidži)", "en_FK": "angličtina (Falklandské ostrovy)", "en_FM": "angličtina (Mikronésie)", "en_GB": "angličtina (Velká Británie)", "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_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_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_SG": "angličtina (Singapur)", "en_SH": "angličtina (Svatá Helena)", "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_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_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", "fy_NL": "fríština (Nizozemsko)", "ga": "irština", "ga_IE": "irština (Irsko)", "gd": "skotská gaelština", "gd_GB": "skotská gaelština (Velká Británie)", "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_Latn": "hauština (latinka)", "ha_Latn_GH": "hauština (latinka, Ghana)", "ha_Latn_NE": "hauština (latinka, Niger)", "ha_Latn_NG": "hauština (latinka, Nigérie)", "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": "s’-čchuan i", "ii_CN": "s’-čchuan i (Čí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_Cyrl": "kazaština (cyrilice)", "kk_Cyrl_KZ": "kazaština (cyrilice, Kazachstán)", "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_Arab": "kašmírština (arabské)", "ks_Arab_IN": "kašmírština (arabské, Indie)", "ks_IN": "kašmírština (Indie)", "kw": "kornština", "kw_GB": "kornština (Velká Británie)", "ky": "kyrgyzština", "ky_Cyrl": "kyrgyzština (cyrilice)", "ky_Cyrl_KG": "kyrgyzština (cyrilice, Kyrgyzstán)", "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_Cyrl": "mongolština (cyrilice)", "mn_Cyrl_MN": "mongolština (cyrilice, Mongolsko)", "mn_MN": "mongolština (Mongolsko)", "mr": "maráthština", "mr_IN": "maráthština (Indie)", "ms": "malajština", "ms_BN": "malajština (Brunej)", "ms_Latn": "malajština (latinka)", "ms_Latn_BN": "malajština (latinka, Brunej)", "ms_Latn_MY": "malajština (latinka, Malajsie)", "ms_Latn_SG": "malajština (latinka, Singapur)", "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_CV": "portugalština (Kapverdy)", "pt_GW": "portugalština (Guinea-Bissau)", "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_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_Arab": "ujgurština (arabské)", "ug_Arab_CN": "ujgurština (arabské, Čína)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/cy.json000066400000000000000000000517661266465517700240360ustar00rootroot00000000000000{ "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_Latn": "Bambareg (Lladin)", "bm_Latn_ML": "Bambareg (Lladin, 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)", "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_LI": "Almaeneg (Liechtenstein)", "de_LU": "Almaeneg (Lwcsembwrg)", "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_AU": "Saesneg (Awstralia)", "en_BB": "Saesneg (Barbados)", "en_BE": "Saesneg (Gwlad Belg)", "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_CK": "Saesneg (Ynysoedd Cook)", "en_CM": "Saesneg (Camerŵn)", "en_CX": "Saesneg (Ynys y Nadolig)", "en_DG": "Saesneg (Diego Garcia)", "en_DM": "Saesneg (Dominica)", "en_ER": "Saesneg (Eritrea)", "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_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_NR": "Saesneg (Nauru)", "en_NU": "Saesneg (Niue)", "en_NZ": "Saesneg (Seland Newydd)", "en_PG": "Saesneg (Papua Guinea Newydd)", "en_PH": "Saesneg (Pilipinas)", "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_SG": "Saesneg (Singapore)", "en_SH": "Saesneg (Saint Helena)", "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_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 (Pilipinas)", "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 (Sénégal)", "fi": "Ffinneg", "fi_FI": "Ffinneg (Y Ffindir)", "fo": "Ffaröeg", "fo_FO": "Ffaröeg (Føroyar)", "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 (Sénégal)", "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_Latn": "Hawsa (Lladin)", "ha_Latn_GH": "Hawsa (Lladin, Ghana)", "ha_Latn_NE": "Hawsa (Lladin, Niger)", "ha_Latn_NG": "Hawsa (Lladin, Nigeria)", "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": "ki", "ki_KE": "ki (Kenya)", "kk": "Casacheg", "kk_Cyrl": "Casacheg (Cyrilig)", "kk_Cyrl_KZ": "Casacheg (Cyrilig, Kazakstan)", "kk_KZ": "Casacheg (Kazakstan)", "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_Arab": "Cashmireg (Arabaidd)", "ks_Arab_IN": "Cashmireg (Arabaidd, India)", "ks_IN": "Cashmireg (India)", "kw": "Cernyweg", "kw_GB": "Cernyweg (Y Deyrnas Unedig)", "ky": "Cirgiseg", "ky_Cyrl": "Cirgiseg (Cyrilig)", "ky_Cyrl_KG": "Cirgiseg (Cyrilig, Kyrgyzstan)", "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)", "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_Cyrl": "Mongoleg (Cyrilig)", "mn_Cyrl_MN": "Mongoleg (Cyrilig, Mongolia)", "mn_MN": "Mongoleg (Mongolia)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Maleieg", "ms_BN": "Maleieg (Brunei)", "ms_Latn": "Maleieg (Lladin)", "ms_Latn_BN": "Maleieg (Lladin, Brunei)", "ms_Latn_MY": "Maleieg (Lladin, Malaysia)", "ms_Latn_SG": "Maleieg (Lladin, Singapore)", "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_CV": "Portiwgeeg (Cabo Verde)", "pt_GW": "Portiwgeeg (Guiné-Bissau)", "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": "Romaunsch", "rm_CH": "Romaunsch (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)", "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_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 (Pilipinas)", "to": "Tongeg", "to_TO": "Tongeg (Tonga)", "tr": "Tyrceg", "tr_CY": "Tyrceg (Cyprus)", "tr_TR": "Tyrceg (Twrci)", "ug": "Uighur", "ug_Arab": "Uighur (Arabaidd)", "ug_Arab_CN": "Uighur (Arabaidd, Tsieina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/da.json000066400000000000000000000520131266465517700237710ustar00rootroot00000000000000{ "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 (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_Latn": "bambara (latinsk)", "bm_Latn_ML": "bambara (latinsk, 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)", "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_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_AU": "engelsk (Australien)", "en_BB": "engelsk (Barbados)", "en_BE": "engelsk (Belgien)", "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_CK": "engelsk (Cookøerne)", "en_CM": "engelsk (Cameroun)", "en_CX": "engelsk (Juleøen)", "en_DG": "engelsk (Diego Garcia)", "en_DM": "engelsk (Dominica)", "en_ER": "engelsk (Eritrea)", "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 (Hongkong SAR)", "en_IE": "engelsk (Irland)", "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 (Macao SAR)", "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øen)", "en_NG": "engelsk (Nigeria)", "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_SG": "engelsk (Singapore)", "en_SH": "engelsk (St. Helena)", "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_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_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 (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 Caledonien)", "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_Latn": "hausa (latinsk)", "ha_Latn_GH": "hausa (latinsk, Ghana)", "ha_Latn_NE": "hausa (latinsk, Niger)", "ha_Latn_NG": "hausa (latinsk, Nigeria)", "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_Cyrl": "kasakhisk (kyrillisk)", "kk_Cyrl_KZ": "kasakhisk (kyrillisk, Kasakhstan)", "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_Arab": "kashmiri (arabisk)", "ks_Arab_IN": "kashmiri (arabisk, Indien)", "ks_IN": "kashmiri (Indien)", "kw": "cornisk", "kw_GB": "cornisk (Storbritannien)", "ky": "kirgisisk", "ky_Cyrl": "kirgisisk (kyrillisk)", "ky_Cyrl_KG": "kirgisisk (kyrillisk, Kirgisistan)", "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 (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_Cyrl": "mongolsk (kyrillisk)", "mn_Cyrl_MN": "mongolsk (kyrillisk, Mongoliet)", "mn_MN": "mongolsk (Mongoliet)", "mr": "marathisk", "mr_IN": "marathisk (Indien)", "ms": "malay", "ms_BN": "malay (Brunei)", "ms_Latn": "malay (latinsk)", "ms_Latn_BN": "malay (latinsk, Brunei)", "ms_Latn_MY": "malay (latinsk, Malaysia)", "ms_Latn_SG": "malay (latinsk, Singapore)", "ms_MY": "malay (Malaysia)", "ms_SG": "malay (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 (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": "punjabi", "pa_Arab": "punjabi (arabisk)", "pa_Arab_PK": "punjabi (arabisk, Pakistan)", "pa_Guru": "punjabi (gurmukhi)", "pa_Guru_IN": "punjabi (gurmukhi, Indien)", "pa_IN": "punjabi (Indien)", "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 (Brasilien)", "pt_CV": "portugisisk (Kap Verde)", "pt_GW": "portugisisk (Guinea-Bissau)", "pt_MO": "portugisisk (Macao SAR)", "pt_MZ": "portugisisk (Mozambique)", "pt_PT": "portugisisk (Portugal)", "pt_ST": "portugisisk (Sao Tome og Principe)", "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 (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 (Ålandsøerne)", "sv_FI": "svensk (Finland)", "sv_SE": "svensk (Sverige)", "sw": "swahili", "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": "thailandsk", "th_TH": "thailandsk (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_Arab": "uygurisk (arabisk)", "ug_Arab_CN": "uygurisk (arabisk, Kina)", "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 (Hongkong SAR)", "zh_Hans": "kinesisk (forenklet)", "zh_Hans_CN": "kinesisk (forenklet, Kina)", "zh_Hans_HK": "kinesisk (forenklet, Hongkong SAR)", "zh_Hans_MO": "kinesisk (forenklet, Macao SAR)", "zh_Hans_SG": "kinesisk (forenklet, Singapore)", "zh_Hant": "kinesisk (traditionelt)", "zh_Hant_HK": "kinesisk (traditionelt, Hongkong SAR)", "zh_Hant_MO": "kinesisk (traditionelt, Macao SAR)", "zh_Hant_TW": "kinesisk (traditionelt, Taiwan)", "zh_MO": "kinesisk (Macao SAR)", "zh_SG": "kinesisk (Singapore)", "zh_TW": "kinesisk (Taiwan)", "zu": "zulu", "zu_ZA": "zulu (Sydafrika)" } } src/Symfony/Component/Intl/Resources/data/locales/de.json000066400000000000000000000551261266465517700240050ustar00rootroot00000000000000{ "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-Sprache", "bm_Latn": "Bambara-Sprache (Lateinisch)", "bm_Latn_ML": "Bambara-Sprache (Lateinisch, 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)", "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_LI": "Deutsch (Liechtenstein)", "de_LU": "Deutsch (Luxemburg)", "dz": "Bhutanisch", "dz_BT": "Bhutanisch (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_AU": "Englisch (Australien)", "en_BB": "Englisch (Barbados)", "en_BE": "Englisch (Belgien)", "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_CK": "Englisch (Cookinseln)", "en_CM": "Englisch (Kamerun)", "en_CX": "Englisch (Weihnachtsinsel)", "en_DG": "Englisch (Diego Garcia)", "en_DM": "Englisch (Dominica)", "en_ER": "Englisch (Eritrea)", "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_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_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_SG": "Englisch (Singapur)", "en_SH": "Englisch (St. Helena)", "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 (Amerikanisch-Ozeanien)", "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_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_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": "Galizisch", "gl_ES": "Galizisch (Spanien)", "gu": "Gujarati", "gu_IN": "Gujarati (Indien)", "gv": "Manx", "gv_IM": "Manx (Isle of Man)", "ha": "Hausa", "ha_GH": "Hausa (Ghana)", "ha_Latn": "Hausa (Lateinisch)", "ha_Latn_GH": "Hausa (Lateinisch, Ghana)", "ha_Latn_NE": "Hausa (Lateinisch, Niger)", "ha_Latn_NG": "Hausa (Lateinisch, Nigeria)", "ha_NE": "Hausa (Niger)", "ha_NG": "Hausa (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_Cyrl": "Kasachisch (Kyrillisch)", "kk_Cyrl_KZ": "Kasachisch (Kyrillisch, Kasachstan)", "kk_KZ": "Kasachisch (Kasachstan)", "kl": "Grönländisch", "kl_GL": "Grönländisch (Grönland)", "km": "Kambodschanisch", "km_KH": "Kambodschanisch (Kambodscha)", "kn": "Kannada", "kn_IN": "Kannada (Indien)", "ko": "Koreanisch", "ko_KP": "Koreanisch (Demokratische Volksrepublik Korea)", "ko_KR": "Koreanisch (Republik Korea)", "ks": "Kaschmirisch", "ks_Arab": "Kaschmirisch (Arabisch)", "ks_Arab_IN": "Kaschmirisch (Arabisch, Indien)", "ks_IN": "Kaschmirisch (Indien)", "kw": "Kornisch", "kw_GB": "Kornisch (Vereinigtes Königreich)", "ky": "Kirgisisch", "ky_Cyrl": "Kirgisisch (Kyrillisch)", "ky_Cyrl_KG": "Kirgisisch (Kyrillisch, Kirgisistan)", "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_Cyrl": "Mongolisch (Kyrillisch)", "mn_Cyrl_MN": "Mongolisch (Kyrillisch, Mongolei)", "mn_MN": "Mongolisch (Mongolei)", "mr": "Marathi", "mr_IN": "Marathi (Indien)", "ms": "Malaiisch", "ms_BN": "Malaiisch (Brunei Darussalam)", "ms_Latn": "Malaiisch (Lateinisch)", "ms_Latn_BN": "Malaiisch (Lateinisch, Brunei Darussalam)", "ms_Latn_MY": "Malaiisch (Lateinisch, Malaysia)", "ms_Latn_SG": "Malaiisch (Lateinisch, Singapur)", "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 (Svalbard und Jan Mayen)", "nd": "Nord-Ndebele-Sprache", "nd_ZW": "Nord-Ndebele-Sprache (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 (Karibische Niederlande)", "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 (Russische Föderation)", "pa": "Panjabi", "pa_Arab": "Panjabi (Arabisch)", "pa_Arab_PK": "Panjabi (Arabisch, Pakistan)", "pa_Guru": "Panjabi (Gurmukhi)", "pa_Guru_IN": "Panjabi (Gurmukhi, Indien)", "pa_IN": "Panjabi (Indien)", "pa_PK": "Panjabi (Pakistan)", "pl": "Polnisch", "pl_PL": "Polnisch (Polen)", "ps": "Paschtu", "ps_AF": "Paschtu (Afghanistan)", "pt": "Portugiesisch", "pt_AO": "Portugiesisch (Angola)", "pt_BR": "Portugiesisch (Brasilien)", "pt_CV": "Portugiesisch (Kap Verde)", "pt_GW": "Portugiesisch (Guinea-Bissau)", "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 (Timor-Leste)", "qu": "Quechua", "qu_BO": "Quechua (Bolivien)", "qu_EC": "Quechua (Ecuador)", "qu_PE": "Quechua (Peru)", "rm": "Rätoromanisch", "rm_CH": "Rätoromanisch (Schweiz)", "rn": "Rundi-Sprache", "rn_BI": "Rundi-Sprache (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 (Russische Föderation)", "ru_UA": "Russisch (Ukraine)", "rw": "Ruandisch", "rw_RW": "Ruandisch (Ruanda)", "se": "Nord-Samisch", "se_FI": "Nord-Samisch (Finnland)", "se_NO": "Nord-Samisch (Norwegen)", "se_SE": "Nord-Samisch (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 (Åland-Inseln)", "sv_FI": "Schwedisch (Finnland)", "sv_SE": "Schwedisch (Schweden)", "sw": "Suaheli", "sw_KE": "Suaheli (Kenia)", "sw_TZ": "Suaheli (Tansania)", "sw_UG": "Suaheli (Uganda)", "ta": "Tamilisch", "ta_IN": "Tamilisch (Indien)", "ta_LK": "Tamilisch (Sri Lanka)", "ta_MY": "Tamilisch (Malaysia)", "ta_SG": "Tamilisch (Singapur)", "te": "Telugu", "te_IN": "Telugu (Indien)", "th": "Thailändisch", "th_TH": "Thailändisch (Thailand)", "ti": "Tigrinja", "ti_ER": "Tigrinja (Eritrea)", "ti_ET": "Tigrinja (Ä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_Arab": "Uigurisch (Arabisch)", "ug_Arab_CN": "Uigurisch (Arabisch, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/de_CH.json000066400000000000000000000021131266465517700243430ustar00rootroot00000000000000{ "Names": { "ar_DJ": "Arabisch (Djibouti)", "be": "Weissrussisch", "be_BY": "Weissrussisch (Weissrussland)", "bn_BD": "Bengalisch (Bangladesh)", "cy_GB": "Walisisch (Grossbritannien)", "en_BW": "Englisch (Botswana)", "en_GB": "Englisch (Grossbritannien)", "en_MH": "Englisch (Marshall-Inseln)", "en_RW": "Englisch (Rwanda)", "en_SB": "Englisch (Salomon-Inseln)", "en_ZW": "Englisch (Zimbabwe)", "fr_DJ": "Französisch (Djibouti)", "fr_RW": "Französisch (Rwanda)", "gd_GB": "Schottisches Gälisch (Grossbritannien)", "kw_GB": "Kornisch (Grossbritannien)", "ms_BN": "Malaiisch (Brunei)", "ms_Latn_BN": "Malaiisch (Lateinisch, Brunei)", "nd_ZW": "Nord-Ndebele-Sprache (Zimbabwe)", "pt_CV": "Portugiesisch (Kapverden)", "pt_ST": "Portugiesisch (Sao Tomé und Principe)", "ru_BY": "Russisch (Weissrussland)", "rw_RW": "Ruandisch (Rwanda)", "sn_ZW": "Shona (Zimbabwe)", "so_DJ": "Somali (Djibouti)" } } src/Symfony/Component/Intl/Resources/data/locales/dz.json000066400000000000000000001175501266465517700240320ustar00rootroot00000000000000{ "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_LI": "ཇཱར་མཱན་ཁ (ལིཀ་ཏནས་ཏ་ཡིན)", "de_LU": "ཇཱར་མཱན་ཁ (ལག་ཛམ་བོརྒ)", "dz": "རྫོང་ཁ", "dz_BT": "རྫོང་ཁ (འབྲུག)", "el": "གྲིཀ་ཁ", "el_CY": "གྲིཀ་ཁ (སཱའི་པྲས)", "el_GR": "གྲིཀ་ཁ (གིརིས྄)", "en": "ཨིང་ལིཤ་ཁ", "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_MY": "ཨིང་ལིཤ་ཁ (མ་ལེ་ཤི་ཡ)", "en_NA": "ཨིང་ལིཤ་ཁ (ན་མི་བི་ཡ)", "en_NF": "ཨིང་ལིཤ་ཁ (ནོར་ཕོལཀ་མཚོ་གླིང༌)", "en_NG": "ཨིང་ལིཤ་ཁ (ནཱའི་ཇི་རི་ཡ)", "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_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_VC": "ཨིང་ལིཤ་ཁ (སེནཊ་ཝིན་སེནཌ྄ ཨེནཌ་ གི་རེ་ན་དིནས྄)", "en_VG": "ཨིང་ལིཤ་ཁ (ཝརཇིན་གླིང་ཚོམ་ བྲཱི་ཊིཤ་མངའ་ཁོངས)", "en_VI": "ཨིང་ལིཤ་ཁ (ཝརཇིན་གླིང་ཚོམ་ ཡུ་ཨེས་ཨེ་མངའ་ཁོངས)", "en_VU": "ཨིང་ལིཤ་ཁ (ཝ་ནུ་ཨ་ཏུ)", "en_WS": "ཨིང་ལིཤ་ཁ (ས་མོ་ཨ)", "en_ZA": "ཨིང་ལིཤ་ཁ (སཱའུཐ་ ཨཕ་རི་ཀ)", "en_ZM": "ཨིང་ལིཤ་ཁ (ཛམ་བྷི་ཡ)", "en_ZW": "ཨིང་ལིཤ་ཁ (ཛིམ་བྷབ་ཝེ)", "eo": "ཨེས་པ་རཱན་ཏོ་ཁ", "es": "ཨིས་པེ་ནིཤ་ཁ", "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": "བཱསཀ་ཁ (ཨིས་པེན)", "fa": "པར་ཤི་ཡཱན་ཁ", "fa_AF": "པར་ཤི་ཡཱན་ཁ (ཨཕ་གྷ་ནི་སཏཱན)", "fa_IR": "པར་ཤི་ཡཱན་ཁ (ཨི་རཱན)", "fi": "ཕི་ནིཤ་ཁ", "fi_FI": "ཕི་ནིཤ་ཁ (ཕིན་ལེནཌ)", "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": "ཕྲནཅ་ཁ (མེ་ཡོཊ)", "fy": "ནུབ་ཕྼི་སི་ཡན་ཁ", "fy_NL": "ནུབ་ཕྼི་སི་ཡན་ཁ (ནེ་དར་ལནཌས྄)", "ga": "ཨཱའི་རིཤ་ཁ", "ga_IE": "ཨཱའི་རིཤ་ཁ (ཨཱ་ཡ་ལེནཌ)", "gl": "གལ་ཨིས་ཨི་ཡན་ཁ", "gl_ES": "གལ་ཨིས་ཨི་ཡན་ཁ (ཨིས་པེན)", "gu": "གུ་ཇ་ར་ཏི་ཁ", "gu_IN": "གུ་ཇ་ར་ཏི་ཁ (རྒྱ་གར)", "ha": "ཧཝ་ས་ཁ", "ha_GH": "ཧཝ་ས་ཁ (གྷ་ན)", "ha_Latn": "ཧཝ་ས་ཁ (ལེ་ཊིན་ཡིག་གུ)", "ha_Latn_GH": "ཧཝ་ས་ཁ (ལེ་ཊིན་ཡིག་གུ, གྷ་ན)", "ha_Latn_NE": "ཧཝ་ས་ཁ (ལེ་ཊིན་ཡིག་གུ, ནཱའི་ཇཱ)", "ha_Latn_NG": "ཧཝ་ས་ཁ (ལེ་ཊིན་ཡིག་གུ, ནཱའི་ཇི་རི་ཡ)", "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_Cyrl": "ཀ་ཛགས་ཁ (སིརིལ་ལིཀ་ཡིག་གུ)", "kk_Cyrl_KZ": "ཀ་ཛགས་ཁ (སིརིལ་ལིཀ་ཡིག་གུ, ཀ་ཛགས་སཏཱན)", "kk_KZ": "ཀ་ཛགས་ཁ (ཀ་ཛགས་སཏཱན)", "km": "ཁེ་མེར་ཁ", "km_KH": "ཁེ་མེར་ཁ (ཀམ་བྷོ་ཌི་ཡ)", "kn": "ཀ་ན་ཌ་ཁ", "kn_IN": "ཀ་ན་ཌ་ཁ (རྒྱ་གར)", "ko": "ཀོ་རི་ཡཱན་ཁ", "ko_KP": "ཀོ་རི་ཡཱན་ཁ (བྱང་ ཀོ་རི་ཡ)", "ko_KR": "ཀོ་རི་ཡཱན་ཁ (ལྷོ་ ཀོ་རི་ཡ)", "ks": "ཀཱཤ་མི་རི་ཁ", "ks_Arab": "ཀཱཤ་མི་རི་ཁ (ཨེ་ར་བིཀ་ཡིག་གུ)", "ks_Arab_IN": "ཀཱཤ་མི་རི་ཁ (ཨེ་ར་བིཀ་ཡིག་གུ, རྒྱ་གར)", "ks_IN": "ཀཱཤ་མི་རི་ཁ (རྒྱ་གར)", "ky": "ཀིར་གིས་ཁ", "ky_Cyrl": "ཀིར་གིས་ཁ (སིརིལ་ལིཀ་ཡིག་གུ)", "ky_Cyrl_KG": "ཀིར་གིས་ཁ (སིརིལ་ལིཀ་ཡིག་གུ, ཀིར་གིས་སཏཱན)", "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_Latn": "མ་ལེ་ཁ (ལེ་ཊིན་ཡིག་གུ)", "ms_Latn_BN": "མ་ལེ་ཁ (ལེ་ཊིན་ཡིག་གུ, བྷྲུ་ནའི)", "ms_Latn_MY": "མ་ལེ་ཁ (ལེ་ཊིན་ཡིག་གུ, མ་ལེ་ཤི་ཡ)", "ms_Latn_SG": "མ་ལེ་ཁ (ལེ་ཊིན་ཡིག་གུ, སིང་ག་པོར)", "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_CV": "པོར་ཅུ་གིས་ཁ (ཀེཔ་བཱཌ)", "pt_GW": "པོར་ཅུ་གིས་ཁ (གྷི་ནི་ བྷི་སཱའུ)", "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_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_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": "ཨུས་བེཀ་ཁ (ཨུས་བེག་གི་སཏཱན)", "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": "ཟུ་ལུ་ཁ (སཱའུཐ་ ཨཕ་རི་ཀ)" } } src/Symfony/Component/Intl/Resources/data/locales/ee.json000066400000000000000000000573561266465517700240150ustar00rootroot00000000000000{ "Names": { "af": "afrikaangbe", "af_NA": "afrikaangbe (Namibia nutome)", "af_ZA": "afrikaangbe (Anyiehe Afrika 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 (syrilliagbeŋɔŋlɔ)", "az_Cyrl_AZ": "azerbaijangbe (syrilliagbeŋɔŋ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_Latn": "bambaragbe (latingbeŋɔŋlɔ)", "bm_Latn_ML": "bambaragbe (latingbeŋɔŋlɔ, Mali nutome)", "bn": "bengalgbe", "bn_BD": "bengalgbe (Bangladesh nutome)", "bn_IN": "bengalgbe (India nutome)", "bo": "tibetagbe", "bo_CN": "tibetagbe (Tsaina nutome)", "bo_IN": "tibetagbe (India nutome)", "br": "bretongbe", "br_FR": "bretongbe (Frans nutome)", "bs": "bosniagbe", "bs_BA": "bosniagbe (Bosnia kple Herzergovina nutome)", "bs_Cyrl": "bosniagbe (syrilliagbeŋɔŋlɔ)", "bs_Cyrl_BA": "bosniagbe (syrilliagbeŋɔŋ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 (Spania nutome)", "ca_FR": "katalagbe (Frans 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_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 (Grisi nutome)", "en": "yevugbe", "en_AG": "yevugbe (́Antigua kple Barbuda nutome)", "en_AI": "yevugbe (Anguilla nutome)", "en_AS": "yevugbe (Amerika Samoa nutome)", "en_AU": "yevugbe (Australia nutome)", "en_BB": "yevugbe (Barbados nutome)", "en_BE": "yevugbe (Belgium nutome)", "en_BM": "yevugbe (Bermuda nutome)", "en_BS": "yevugbe (Bahamas nutome)", "en_BW": "yevugbe (Botswana nutome)", "en_BZ": "yevugbe (Belize nutome)", "en_CA": "yevugbe (Kanada nutome)", "en_CC": "yevugbe (Kokos (Kiling) fudomekpo nutome)", "en_CK": "yevugbe (Kook ƒudomekpo nutome)", "en_CM": "yevugbe (Kamerun nutome)", "en_CX": "yevugbe (Kristmas ƒudomekpo nutome)", "en_DG": "yevugbe (Diego Garsia nutome)", "en_DM": "yevugbe (Dominika nutome)", "en_ER": "yevugbe (Eritrea 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_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_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_SG": "yevugbe (Singapɔr nutome)", "en_SH": "yevugbe (Saint Helena 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 Afrika nutome)", "en_ZM": "yevugbe (Zambia nutome)", "en_ZW": "yevugbe (Zimbabwe nutome)", "eo": "esperantogbe", "es": "spaniagbe", "es_AR": "spaniagbe (Argentina nutome)", "es_BO": "spaniagbe (Bolivia nutome)", "es_CL": "spaniagbe (Tsile nutome)", "es_CO": "spaniagbe (Kolombia nutome)", "es_CR": "spaniagbe (Kosta Rika nutome)", "es_CU": "spaniagbe (Kuba nutome)", "es_DO": "spaniagbe (Dominika repɔblik nutome)", "es_EA": "spaniagbe (Keuta and Melilla nutome)", "es_EC": "spaniagbe (Ekuadɔ nutome)", "es_ES": "spaniagbe (Spania nutome)", "es_GQ": "spaniagbe (Ekuatorial Guini nutome)", "es_GT": "spaniagbe (Guatemala nutome)", "es_HN": "spaniagbe (Hondurasdu)", "es_IC": "spaniagbe (Kanari ƒudomekpowo nutome)", "es_MX": "spaniagbe (Meksico nutome)", "es_NI": "spaniagbe (Nicaraguadukɔ)", "es_PA": "spaniagbe (Panama nutome)", "es_PE": "spaniagbe (Peru nutome)", "es_PH": "spaniagbe (Filipini nutome)", "es_PR": "spaniagbe (Puerto Riko nutome)", "es_PY": "spaniagbe (Paragua nutome)", "es_SV": "spaniagbe (El Salvadɔ nutome)", "es_US": "spaniagbe (USA nutome)", "es_UY": "spaniagbe (uruguaydukɔ)", "es_VE": "spaniagbe (Venezuela nutome)", "et": "estoniagbe", "et_EE": "estoniagbe (Estonia nutome)", "eu": "basqugbe", "eu_ES": "basqugbe (Spania 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 (Kanada 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 (Frans 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 (Spania nutome)", "gu": "gujarati", "gu_IN": "gujarati (India nutome)", "ha": "hausagbe", "ha_GH": "hausagbe (Ghana nutome)", "ha_Latn": "hausagbe (latingbeŋɔŋlɔ)", "ha_Latn_GH": "hausagbe (latingbeŋɔŋlɔ, Ghana nutome)", "ha_Latn_NE": "hausagbe (latingbeŋɔŋlɔ, Niger nutome)", "ha_Latn_NG": "hausagbe (latingbeŋɔŋlɔ, Nigeria 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": "dzapangbe", "ja_JP": "dzapangbe (Dzapan nutome)", "ka": "gɔgiagbe", "ka_GE": "gɔgiagbe (Georgia nutome)", "kk": "kazakhstangbe", "kk_Cyrl": "kazakhstangbe (syrilliagbeŋɔŋlɔ)", "kk_Cyrl_KZ": "kazakhstangbe (syrilliagbeŋɔŋlɔ, Kazakstan nutome)", "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_Arab": "kashmirgbe (arabiagbeŋɔŋlɔ)", "ks_Arab_IN": "kashmirgbe (arabiagbeŋɔŋlɔ, India nutome)", "ks_IN": "kashmirgbe (India nutome)", "ky": "kirghistangbe", "ky_Cyrl": "kirghistangbe (syrilliagbeŋɔŋlɔ)", "ky_Cyrl_KG": "kirghistangbe (syrilliagbeŋɔŋlɔ, Kirgizstan nutome)", "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_Cyrl": "mongoliagbe (syrilliagbeŋɔŋlɔ)", "mn_Cyrl_MN": "mongoliagbe (syrilliagbeŋɔŋlɔ, Mongolia nutome)", "mn_MN": "mongoliagbe (Mongolia nutome)", "mr": "marathiagbe", "mr_IN": "marathiagbe (India nutome)", "ms": "malaygbe", "ms_BN": "malaygbe (Brunei nutome)", "ms_Latn": "malaygbe (latingbeŋɔŋlɔ)", "ms_Latn_BN": "malaygbe (latingbeŋɔŋlɔ, Brunei nutome)", "ms_Latn_MY": "malaygbe (latingbeŋɔŋlɔ, Malaysia nutome)", "ms_Latn_SG": "malaygbe (latingbeŋɔŋlɔ, Singapɔr 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": "hɔlandgbe", "nl_AW": "hɔlandgbe (Aruba nutome)", "nl_BE": "hɔlandgbe (Belgium nutome)", "nl_NL": "hɔlandgbe (Nedalands nutome)", "nl_SR": "hɔlandgbe (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": "polandgbe", "pl_PL": "polandgbe (Poland nutome)", "ps": "pashtogbe", "ps_AF": "pashtogbe (Afghanistan nutome)", "pt": "pɔtugalgbe", "pt_AO": "pɔtugalgbe (Angola nutome)", "pt_BR": "pɔtugalgbe (Brazil nutome)", "pt_CV": "pɔtugalgbe (Kape Verde nutome)", "pt_GW": "pɔtugalgbe (Gini-Bisao nutome)", "pt_MO": "pɔtugalgbe (Macau SAR Tsaina nutome)", "pt_MZ": "pɔtugalgbe (Mozambiki nutome)", "pt_PT": "pɔtugalgbe (Portugal nutome)", "pt_ST": "pɔtugalgbe (São Tomé kple Príncipe nutome)", "pt_TL": "pɔtugalgbe (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": "rɔtsiagbe", "ru_BY": "rɔtsiagbe (Belarus nutome)", "ru_KG": "rɔtsiagbe (Kirgizstan nutome)", "ru_KZ": "rɔtsiagbe (Kazakstan nutome)", "ru_MD": "rɔtsiagbe (Moldova nutome)", "ru_RU": "rɔtsiagbe (Russia nutome)", "ru_UA": "rɔtsiagbe (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 (syrilliagbeŋɔŋlɔ)", "sr_Cyrl_BA": "serbiagbe (syrilliagbeŋɔŋlɔ, Bosnia kple Herzergovina nutome)", "sr_Cyrl_ME": "serbiagbe (syrilliagbeŋɔŋ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_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": "tailandgbe", "th_TH": "tailandgbe (Tailand 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": "tɛkigbe", "tr_CY": "tɛkigbe (Saiprus nutome)", "tr_TR": "tɛkigbe (Tɛki nutome)", "ug": "uighurgbe", "ug_Arab": "uighurgbe (arabiagbeŋɔŋlɔ)", "ug_Arab_CN": "uighurgbe (arabiagbeŋɔŋlɔ, Tsaina nutome)", "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 (syrilliagbeŋɔŋlɔ)", "uz_Cyrl_UZ": "uzbekistangbe (syrilliagbeŋɔŋ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": "kinagbe", "zh_CN": "kinagbe (Tsaina nutome)", "zh_HK": "kinagbe (Hɔng Kɔng SAR Tsaina nutome)", "zh_Hans": "kinagbe (tsainagbeŋɔŋlɔ)", "zh_Hans_CN": "kinagbe (tsainagbeŋɔŋlɔ, Tsaina nutome)", "zh_Hans_HK": "kinagbe (tsainagbeŋɔŋlɔ, Hɔng Kɔng SAR Tsaina nutome)", "zh_Hans_MO": "kinagbe (tsainagbeŋɔŋlɔ, Macau SAR Tsaina nutome)", "zh_Hans_SG": "kinagbe (tsainagbeŋɔŋlɔ, Singapɔr nutome)", "zh_Hant": "kinagbe (blema tsainagbeŋɔŋlɔ)", "zh_Hant_HK": "kinagbe (blema tsainagbeŋɔŋlɔ, Hɔng Kɔng SAR Tsaina nutome)", "zh_Hant_MO": "kinagbe (blema tsainagbeŋɔŋlɔ, Macau SAR Tsaina nutome)", "zh_Hant_TW": "kinagbe (blema tsainagbeŋɔŋlɔ, Taiwan nutome)", "zh_MO": "kinagbe (Macau SAR Tsaina nutome)", "zh_SG": "kinagbe (Singapɔr nutome)", "zh_TW": "kinagbe (Taiwan nutome)", "zu": "zulugbe", "zu_ZA": "zulugbe (Anyiehe Afrika nutome)" } } src/Symfony/Component/Intl/Resources/data/locales/el.json000066400000000000000000000752111266465517700240120ustar00rootroot00000000000000{ "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_Latn": "Μπαμπάρα (Λατινικό)", "bm_Latn_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": "Καταλανικά (Ιταλία)", "cs": "Τσεχικά", "cs_CZ": "Τσεχικά (Τσεχική Δημοκρατία)", "cy": "Ουαλικά", "cy_GB": "Ουαλικά (Ηνωμένο Βασίλειο)", "da": "Δανικά", "da_DK": "Δανικά (Δανία)", "da_GL": "Δανικά (Γροιλανδία)", "de": "Γερμανικά", "de_AT": "Γερμανικά (Αυστρία)", "de_BE": "Γερμανικά (Βέλγιο)", "de_CH": "Γερμανικά (Ελβετία)", "de_DE": "Γερμανικά (Γερμανία)", "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_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_MY": "Αγγλικά (Μαλαισία)", "en_NA": "Αγγλικά (Ναμίμπια)", "en_NF": "Αγγλικά (Νήσος Νόρφολκ)", "en_NG": "Αγγλικά (Νιγηρία)", "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_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_VC": "Αγγλικά (Άγιος Βικέντιος και Γρεναδίνες)", "en_VG": "Αγγλικά (Βρετανικές Παρθένοι Νήσοι)", "en_VI": "Αγγλικά (Αμερικανικές Παρθένοι Νήσοι)", "en_VU": "Αγγλικά (Βανουάτου)", "en_WS": "Αγγλικά (Σαμόα)", "en_ZA": "Αγγλικά (Νότια Αφρική)", "en_ZM": "Αγγλικά (Ζάμπια)", "en_ZW": "Αγγλικά (Ζιμπάμπουε)", "eo": "Εσπεράντο", "es": "Ισπανικά", "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": "Βασκικά (Ισπανία)", "fa": "Περσικά", "fa_AF": "Περσικά (Αφγανιστάν)", "fa_IR": "Περσικά (Ιράν)", "ff": "Φουλάχ", "ff_CM": "Φουλάχ (Καμερούν)", "ff_GN": "Φουλάχ (Γουινέα)", "ff_MR": "Φουλάχ (Μαυριτανία)", "ff_SN": "Φουλάχ (Σενεγάλη)", "fi": "Φινλανδικά", "fi_FI": "Φινλανδικά (Φινλανδία)", "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": "Γαλλικά (Μαγιότ)", "fy": "Δυτικά Φριζιανά", "fy_NL": "Δυτικά Φριζιανά (Ολλανδία)", "ga": "Ιρλανδικά", "ga_IE": "Ιρλανδικά (Ιρλανδία)", "gd": "Σκωτικά Κελτικά", "gd_GB": "Σκωτικά Κελτικά (Ηνωμένο Βασίλειο)", "gl": "Γαλικιανά", "gl_ES": "Γαλικιανά (Ισπανία)", "gu": "Γκουγιαράτι", "gu_IN": "Γκουγιαράτι (Ινδία)", "gv": "Μανξ", "gv_IM": "Μανξ (Νήσος Μαν)", "ha": "Χάουσα", "ha_GH": "Χάουσα (Γκάνα)", "ha_Latn": "Χάουσα (Λατινικό)", "ha_Latn_GH": "Χάουσα (Λατινικό, Γκάνα)", "ha_Latn_NE": "Χάουσα (Λατινικό, Νίγηρας)", "ha_Latn_NG": "Χάουσα (Λατινικό, Νιγηρία)", "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_Cyrl": "Καζακικά (Κυριλλικό)", "kk_Cyrl_KZ": "Καζακικά (Κυριλλικό, Καζακστάν)", "kk_KZ": "Καζακικά (Καζακστάν)", "kl": "Καλαάλισουτ", "kl_GL": "Καλαάλισουτ (Γροιλανδία)", "km": "Καμποτζιανά", "km_KH": "Καμποτζιανά (Καμπότζη)", "kn": "Κανάντα", "kn_IN": "Κανάντα (Ινδία)", "ko": "Κορεατικά", "ko_KP": "Κορεατικά (Βόρεια Κορέα)", "ko_KR": "Κορεατικά (Νότια Κορέα)", "ks": "Κασμίρι", "ks_Arab": "Κασμίρι (Αραβικό)", "ks_Arab_IN": "Κασμίρι (Αραβικό, Ινδία)", "ks_IN": "Κασμίρι (Ινδία)", "kw": "Κόρνις", "kw_GB": "Κόρνις (Ηνωμένο Βασίλειο)", "ky": "Κυργιζικά", "ky_Cyrl": "Κυργιζικά (Κυριλλικό)", "ky_Cyrl_KG": "Κυργιζικά (Κυριλλικό, Κιργιστάν)", "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_Cyrl": "Μογγολικά (Κυριλλικό)", "mn_Cyrl_MN": "Μογγολικά (Κυριλλικό, Μογγολία)", "mn_MN": "Μογγολικά (Μογγολία)", "mr": "Μαράθι", "mr_IN": "Μαράθι (Ινδία)", "ms": "Μαλάι", "ms_BN": "Μαλάι (Μπρουνέι)", "ms_Latn": "Μαλάι (Λατινικό)", "ms_Latn_BN": "Μαλάι (Λατινικό, Μπρουνέι)", "ms_Latn_MY": "Μαλάι (Λατινικό, Μαλαισία)", "ms_Latn_SG": "Μαλάι (Λατινικό, Σιγκαπούρη)", "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_CV": "Πορτογαλικά (Πράσινο Ακρωτήριο)", "pt_GW": "Πορτογαλικά (Γουινέα Μπισάου)", "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_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_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": "Ουζμπεκικά (Ουζμπεκιστάν)", "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": "Ζουλού (Νότια Αφρική)" } } src/Symfony/Component/Intl/Resources/data/locales/en.json000066400000000000000000000514731266465517700240200ustar00rootroot00000000000000{ "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_Latn": "Bambara (Latin)", "bm_Latn_ML": "Bambara (Latin, Mali)", "bn": "Bengali", "bn_BD": "Bengali (Bangladesh)", "bn_IN": "Bengali (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)", "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_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_AU": "English (Australia)", "en_BB": "English (Barbados)", "en_BE": "English (Belgium)", "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_CK": "English (Cook Islands)", "en_CM": "English (Cameroon)", "en_CX": "English (Christmas Island)", "en_DG": "English (Diego Garcia)", "en_DM": "English (Dominica)", "en_ER": "English (Eritrea)", "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_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_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_SG": "English (Singapore)", "en_SH": "English (St. Helena)", "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_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_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_Latn": "Hausa (Latin)", "ha_Latn_GH": "Hausa (Latin, Ghana)", "ha_Latn_NE": "Hausa (Latin, Niger)", "ha_Latn_NG": "Hausa (Latin, Nigeria)", "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_Cyrl": "Kazakh (Cyrillic)", "kk_Cyrl_KZ": "Kazakh (Cyrillic, Kazakhstan)", "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_Arab": "Kashmiri (Arabic)", "ks_Arab_IN": "Kashmiri (Arabic, India)", "ks_IN": "Kashmiri (India)", "kw": "Cornish", "kw_GB": "Cornish (United Kingdom)", "ky": "Kyrgyz", "ky_Cyrl": "Kyrgyz (Cyrillic)", "ky_Cyrl_KG": "Kyrgyz (Cyrillic, Kyrgyzstan)", "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_Cyrl": "Mongolian (Cyrillic)", "mn_Cyrl_MN": "Mongolian (Cyrillic, Mongolia)", "mn_MN": "Mongolian (Mongolia)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Malay", "ms_BN": "Malay (Brunei)", "ms_Latn": "Malay (Latin)", "ms_Latn_BN": "Malay (Latin, Brunei)", "ms_Latn_MY": "Malay (Latin, Malaysia)", "ms_Latn_SG": "Malay (Latin, Singapore)", "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": "Oriya", "or_IN": "Oriya (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_CV": "Portuguese (Cape Verde)", "pt_GW": "Portuguese (Guinea-Bissau)", "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_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_Arab": "Uyghur (Arabic)", "ug_Arab_CN": "Uyghur (Arabic, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/en_AU.json000066400000000000000000000002211266465517700243660ustar00rootroot00000000000000{ "Names": { "en_UM": "English (U.S. Minor Outlying Islands)", "en_VC": "English (Saint Vincent and the Grenadines)" } } src/Symfony/Component/Intl/Resources/data/locales/en_GB.json000066400000000000000000000022121266465517700243530ustar00rootroot00000000000000{ "Names": { "bs_BA": "Bosnian (Bosnia and Herzegovina)", "bs_Cyrl_BA": "Bosnian (Cyrillic, Bosnia and Herzegovina)", "bs_Latn_BA": "Bosnian (Latin, Bosnia and Herzegovina)", "en_AG": "English (Antigua and Barbuda)", "en_KN": "English (Saint Kitts and Nevis)", "en_LC": "English (Saint Lucia)", "en_SH": "English (Saint Helena)", "en_TC": "English (Turks and Caicos Islands)", "en_TT": "English (Trinidad and Tobago)", "es_EA": "Spanish (Ceuta and Melilla)", "fr_BL": "French (Saint Barthélemy)", "fr_MF": "French (Saint Martin)", "fr_PM": "French (Saint Pierre and Miquelon)", "fr_WF": "French (Wallis and Futuna)", "hr_BA": "Croatian (Bosnia and Herzegovina)", "nb_SJ": "Norwegian Bokmål (Svalbard and Jan Mayen)", "pt_ST": "Portuguese (São Tomé and Príncipe)", "sh_BA": "Serbo-Croatian (Bosnia and Herzegovina)", "sr_BA": "Serbian (Bosnia and Herzegovina)", "sr_Cyrl_BA": "Serbian (Cyrillic, Bosnia and Herzegovina)", "sr_Latn_BA": "Serbian (Latin, Bosnia and Herzegovina)" } } src/Symfony/Component/Intl/Resources/data/locales/en_NH.json000066400000000000000000000000331266465517700243670ustar00rootroot00000000000000{ "%%ALIAS": "en_VU" } src/Symfony/Component/Intl/Resources/data/locales/en_RH.json000066400000000000000000000000331266465517700243730ustar00rootroot00000000000000{ "%%ALIAS": "en_ZW" } src/Symfony/Component/Intl/Resources/data/locales/eo.json000066400000000000000000000362221266465517700240140ustar00rootroot00000000000000{ "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 Emirlandos)", "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_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_AU": "angla (Aŭstralio)", "en_BB": "angla (Barbado)", "en_BE": "angla (Belgujo)", "en_BM": "angla (Bermudoj)", "en_BS": "angla (Bahamoj)", "en_BW": "angla (Bocvano)", "en_BZ": "angla (Belizo)", "en_CA": "angla (Kanado)", "en_CK": "angla (Kukinsuloj)", "en_CM": "angla (Kameruno)", "en_DM": "angla (Dominiko)", "en_ER": "angla (Eritreo)", "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_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_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_SG": "angla (Singapuro)", "en_SH": "angla (Sent-Heleno)", "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_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_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_CV": "portugala (Kabo-Verdo)", "pt_GW": "portugala (Gvineo-Bisaŭo)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/es.json000066400000000000000000000523441266465517700240230ustar00rootroot00000000000000{ "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 (Iraq)", "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": "azerí", "az_AZ": "azerí (Azerbaiyán)", "az_Cyrl": "azerí (cirílico)", "az_Cyrl_AZ": "azerí (cirílico, Azerbaiyán)", "az_Latn": "azerí (latín)", "az_Latn_AZ": "azerí (latín, Azerbaiyán)", "be": "bielorruso", "be_BY": "bielorruso (Bielorrusia)", "bg": "búlgaro", "bg_BG": "búlgaro (Bulgaria)", "bm": "bambara", "bm_Latn": "bambara (latín)", "bm_Latn_ML": "bambara (latín, 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 (latín)", "bs_Latn_BA": "bosnio (latín, 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)", "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_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_AU": "inglés (Australia)", "en_BB": "inglés (Barbados)", "en_BE": "inglés (Bélgica)", "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_CK": "inglés (Islas Cook)", "en_CM": "inglés (Camerún)", "en_CX": "inglés (Isla Christmas)", "en_DG": "inglés (Diego García)", "en_DM": "inglés (Dominica)", "en_ER": "inglés (Eritrea)", "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_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_NR": "inglés (Nauru)", "en_NU": "inglés (Isla 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 (Palau)", "en_RW": "inglés (Ruanda)", "en_SB": "inglés (Islas Salomón)", "en_SC": "inglés (Seychelles)", "en_SD": "inglés (Sudán)", "en_SG": "inglés (Singapur)", "en_SH": "inglés (Santa Elena)", "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_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 (islas 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_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 (Costa de Marfil)", "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": "gujarati", "gu_IN": "gujarati (India)", "gv": "gaélico manés", "gv_IM": "gaélico manés (Isla de Man)", "ha": "hausa", "ha_GH": "hausa (Ghana)", "ha_Latn": "hausa (latín)", "ha_Latn_GH": "hausa (latín, Ghana)", "ha_Latn_NE": "hausa (latín, Níger)", "ha_Latn_NG": "hausa (latín, Nigeria)", "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_Cyrl": "kazajo (cirílico)", "kk_Cyrl_KZ": "kazajo (cirílico, Kazajistán)", "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_Arab": "cachemiro (árabe)", "ks_Arab_IN": "cachemiro (árabe, India)", "ks_IN": "cachemiro (India)", "kw": "córnico", "kw_GB": "córnico (Reino Unido)", "ky": "kirguís", "ky_Cyrl": "kirguís (cirílico)", "ky_Cyrl_KG": "kirguís (cirílico, Kirguistán)", "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": "laosiano", "lo_LA": "laosiano (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_Cyrl": "mongol (cirílico)", "mn_Cyrl_MN": "mongol (cirílico, Mongolia)", "mn_MN": "mongol (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malayo", "ms_BN": "malayo (Brunéi)", "ms_Latn": "malayo (latín)", "ms_Latn_BN": "malayo (latín, Brunéi)", "ms_Latn_MY": "malayo (latín, Malasia)", "ms_Latn_SG": "malayo (latín, Singapur)", "ms_MY": "malayo (Malasia)", "ms_SG": "malayo (Singapur)", "mt": "maltés", "mt_MT": "maltés (Malta)", "my": "birmano", "my_MM": "birmano (Myanmar (Birmania))", "nb": "bokmal noruego", "nb_NO": "bokmal noruego (Noruega)", "nb_SJ": "bokmal noruego (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": "nynorsk noruego", "nn_NO": "nynorsk noruego (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": "punjabí", "pa_Arab": "punjabí (árabe)", "pa_Arab_PK": "punjabí (árabe, Pakistán)", "pa_Guru": "punjabí (gurmuji)", "pa_Guru_IN": "punjabí (gurmuji, India)", "pa_IN": "punjabí (India)", "pa_PK": "punjabí (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_CV": "portugués (Cabo Verde)", "pt_GW": "portugués (Guinea-Bisáu)", "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 Oriental)", "qu": "quechua", "qu_BO": "quechua (Bolivia)", "qu_EC": "quechua (Ecuador)", "qu_PE": "quechua (Perú)", "rm": "retorrománico", "rm_CH": "retorrománico (Suiza)", "rn": "kiroundi", "rn_BI": "kiroundi (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 (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)", "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": "swahili", "sw_KE": "swahili (Kenia)", "sw_TZ": "swahili (Tanzania)", "sw_UG": "swahili (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_Arab": "uigur (árabe)", "ug_Arab_CN": "uigur (árabe, China)", "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 (latín)", "uz_Latn_UZ": "uzbeko (latín, Uzbekistán)", "uz_UZ": "uzbeko (Uzbekistán)", "vi": "vietnamita", "vi_VN": "vietnamita (Vietnam)", "yi": "yídish", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/es_419.json000066400000000000000000000017011266465517700244070ustar00rootroot00000000000000{ "Names": { "ar_IQ": "árabe (Irak)", "az": "azerbaiyano", "az_AZ": "azerbaiyano (Azerbaiyán)", "az_Cyrl": "azerbaiyano (cirílico)", "az_Cyrl_AZ": "azerbaiyano (cirílico, Azerbaiyán)", "az_Latn": "azerbaiyano (latín)", "az_Latn_AZ": "azerbaiyano (latín, Azerbaiyán)", "bs_BA": "bosnio (Bosnia y Herzegovina)", "bs_Cyrl_BA": "bosnio (cirílico, Bosnia y Herzegovina)", "bs_Latn_BA": "bosnio (latín, Bosnia y Herzegovina)", "en_NU": "inglés (Niue)", "eu": "vasco", "eu_ES": "vasco (España)", "hr_BA": "croata (Bosnia y Herzegovina)", "mr": "maratí", "mr_IN": "maratí (India)", "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 (latín, Bosnia y Herzegovina)" } } src/Symfony/Component/Intl/Resources/data/locales/es_CL.json000066400000000000000000000001071266465517700243670ustar00rootroot00000000000000{ "Names": { "ar_EH": "árabe (Sahara Occidental)" } } src/Symfony/Component/Intl/Resources/data/locales/es_MX.json000066400000000000000000000046031266465517700244220ustar00rootroot00000000000000{ "Names": { "ar_QA": "árabe (Qatar)", "bn_BD": "bengalí (Bangladesh)", "en_CC": "inglés (Islas Cocos (Keeling))", "en_CX": "inglés (Isla de Navidad)", "en_GG": "inglés (Guernsey)", "en_HK": "inglés (Región Administrativa Especial de Hong Kong de la República Popular China)", "en_MO": "inglés (Región Administrativa Especial de Macao de la República Popular China)", "en_PW": "inglés (Palaos)", "en_UM": "inglés (Islas UltramarinasMenores de Estados Unidos)", "en_VI": "inglés (Islas Vírgenes de los Estados Unidos)", "es_IC": "español (Islas Canarias)", "fr_CG": "francés (Congo Brazzaville)", "gv": "manés", "gv_IM": "manés (Isla de Man)", "ln_CG": "lingala (Congo Brazzaville)", "nd": "sindebele", "nd_ZW": "sindebele (Zimbabue)", "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)", "pt_GW": "portugués (Guinea-Bissau)", "pt_MO": "portugués (Región Administrativa Especial de Macao de la República Popular China)", "rm": "romanche", "rm_CH": "romanche (Suiza)", "rn": "rundi", "rn_BI": "rundi (Burundi)", "zh_HK": "chino (Región Administrativa Especial de Hong Kong de la República Popular China)", "zh_Hans": "chino (han simplificado)", "zh_Hans_CN": "chino (han simplificado, China)", "zh_Hans_HK": "chino (han simplificado, Región Administrativa Especial de Hong Kong de la República Popular China)", "zh_Hans_MO": "chino (han simplificado, Región Administrativa Especial de Macao de la República Popular China)", "zh_Hans_SG": "chino (han simplificado, Singapur)", "zh_Hant": "chino (han tradicional)", "zh_Hant_HK": "chino (han tradicional, Región Administrativa Especial de Hong Kong de la República Popular China)", "zh_Hant_MO": "chino (han tradicional, Región Administrativa Especial de Macao de la República Popular China)", "zh_Hant_TW": "chino (han tradicional, Taiwán)", "zh_MO": "chino (Región Administrativa Especial de Macao de la República Popular China)" } } src/Symfony/Component/Intl/Resources/data/locales/et.json000066400000000000000000000524261266465517700240250ustar00rootroot00000000000000{ "Names": { "af": "afrikaani", "af_NA": "afrikaani (Namiibia)", "af_ZA": "afrikaani (Lõuna-Aafrika Vabariik)", "ak": "akani", "ak_GH": "akani (Ghana)", "am": "amhari", "am_ET": "amhari (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_Latn": "bambara (ladina)", "bm_Latn_ML": "bambara (ladina, 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)", "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_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_AU": "inglise (Austraalia)", "en_BB": "inglise (Barbados)", "en_BE": "inglise (Belgia)", "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_CK": "inglise (Cooki saared)", "en_CM": "inglise (Kamerun)", "en_CX": "inglise (Jõulusaar)", "en_DG": "inglise (Diego Garcia)", "en_DM": "inglise (Dominica)", "en_ER": "inglise (Eritrea)", "en_FJ": "inglise (Fidži)", "en_FK": "inglise (Falklandi saared)", "en_FM": "inglise (Mikroneesia Liiduriigid)", "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 (Hongkong - Hiina erihalduspiirkond)", "en_IE": "inglise (Iirimaa)", "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 (Kenya)", "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 - Hiina 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_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_SG": "inglise (Singapur)", "en_SH": "inglise (Saint Helena)", "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_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": "fulbe", "ff_CM": "fulbe (Kamerun)", "ff_GN": "fulbe (Guinea)", "ff_MR": "fulbe (Mauritaania)", "ff_SN": "fulbe (Senegal)", "fi": "soome", "fi_FI": "soome (Soome)", "fo": "fääri", "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-Brazzaville)", "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_Latn": "hausa (ladina)", "ha_Latn_GH": "hausa (ladina, Ghana)", "ha_Latn_NE": "hausa (ladina, Niger)", "ha_Latn_NG": "hausa (ladina, Nigeeria)", "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 (Kenya)", "kk": "kasahhi", "kk_Cyrl": "kasahhi (kirillitsa)", "kk_Cyrl_KZ": "kasahhi (kirillitsa, Kasahstan)", "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_Arab": "kašmiiri (araabia)", "ks_Arab_IN": "kašmiiri (araabia, India)", "ks_IN": "kašmiiri (India)", "kw": "korni", "kw_GB": "korni (Suurbritannia)", "ky": "kirgiisi", "ky_Cyrl": "kirgiisi (kirillitsa)", "ky_Cyrl_KG": "kirgiisi (kirillitsa, Kõrgõzstan)", "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-Brazzaville)", "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_Cyrl": "mongoli (kirillitsa)", "mn_Cyrl_MN": "mongoli (kirillitsa, Mongoolia)", "mn_MN": "mongoli (Mongoolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malai", "ms_BN": "malai (Brunei)", "ms_Latn": "malai (ladina)", "ms_Latn_BN": "malai (ladina, Brunei)", "ms_Latn_MY": "malai (ladina, Malaisia)", "ms_Latn_SG": "malai (ladina, Singapur)", "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": "norra nynorsk", "nn_NO": "norra nynorsk (Norra)", "no": "norra", "no_NO": "norra (Norra)", "om": "oromo", "om_ET": "oromo (Etioopia)", "om_KE": "oromo (Kenya)", "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_CV": "portugali (Roheneemesaared)", "pt_GW": "portugali (Guinea-Bissau)", "pt_MO": "portugali (Macau - Hiina 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": "retoromaani", "rm_CH": "retoromaani (Š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 (Kenya)", "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_KE": "suahiili (Kenya)", "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_Arab": "uiguuri (araabia)", "ug_Arab_CN": "uiguuri (araabia, Hiina)", "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 (Hongkong - Hiina erihalduspiirkond)", "zh_Hans": "hiina (hiina lihtsustatud)", "zh_Hans_CN": "hiina (hiina lihtsustatud, Hiina)", "zh_Hans_HK": "hiina (hiina lihtsustatud, Hongkong - Hiina erihalduspiirkond)", "zh_Hans_MO": "hiina (hiina lihtsustatud, Macau - Hiina erihalduspiirkond)", "zh_Hans_SG": "hiina (hiina lihtsustatud, Singapur)", "zh_Hant": "hiina (hiina traditsiooniline)", "zh_Hant_HK": "hiina (hiina traditsiooniline, Hongkong - Hiina erihalduspiirkond)", "zh_Hant_MO": "hiina (hiina traditsiooniline, Macau - Hiina erihalduspiirkond)", "zh_Hant_TW": "hiina (hiina traditsiooniline, Taiwan)", "zh_MO": "hiina (Macau - Hiina erihalduspiirkond)", "zh_SG": "hiina (Singapur)", "zh_TW": "hiina (Taiwan)", "zu": "suulu", "zu_ZA": "suulu (Lõuna-Aafrika Vabariik)" } } src/Symfony/Component/Intl/Resources/data/locales/eu.json000066400000000000000000000535771266465517700240360ustar00rootroot00000000000000{ "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 Emirrerri 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_Latn": "bambarera (latina)", "bm_Latn_ML": "bambarera (latina, 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)", "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_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_AU": "ingelesa (Australia)", "en_BB": "ingelesa (Barbados)", "en_BE": "ingelesa (Belgika)", "en_BM": "ingelesa (Bermuda)", "en_BS": "ingelesa (Bahamak)", "en_BW": "ingelesa (Botswana)", "en_BZ": "ingelesa (Belize)", "en_CA": "ingelesa (Kanada)", "en_CC": "ingelesa (Cocos (Keeling) uharteak)", "en_CK": "ingelesa (Cook uharteak)", "en_CM": "ingelesa (Kamerun)", "en_CX": "ingelesa (Christmas uhartea)", "en_DG": "ingelesa (Diego Garcia)", "en_DM": "ingelesa (Dominika)", "en_ER": "ingelesa (Eritrea)", "en_FJ": "ingelesa (Fiji)", "en_FK": "ingelesa (Malvinak)", "en_FM": "ingelesa (Mikronesia)", "en_GB": "ingelesa (Erresuma Batua)", "en_GD": "ingelesa (Grenada)", "en_GG": "ingelesa (Guernsey)", "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_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_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_SG": "ingelesa (Singapur)", "en_SH": "ingelesa (Saint Helena)", "en_SL": "ingelesa (Sierra Leona)", "en_SS": "ingelesa (Hego Sudan)", "en_SX": "ingelesa (Sint Maarten)", "en_SZ": "ingelesa (Swazilandia)", "en_TC": "ingelesa (Turk eta Caicos 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_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)", "fi": "finlandiera", "fi_FI": "finlandiera (Finlandia)", "fo": "faroera", "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 (San Bartolome)", "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 (Saint 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_Latn": "hausa (latina)", "ha_Latn_GH": "hausa (latina, Ghana)", "ha_Latn_NE": "hausa (latina, Niger)", "ha_Latn_NG": "hausa (latina, Nigeria)", "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_Cyrl": "kazakhera (zirilikoa)", "kk_Cyrl_KZ": "kazakhera (zirilikoa, Kazakhstan)", "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_Arab": "kashmirera (arabiarra)", "ks_Arab_IN": "kashmirera (arabiarra, India)", "ks_IN": "kashmirera (India)", "kw": "kornubiera", "kw_GB": "kornubiera (Erresuma Batua)", "ky": "kirgizera", "ky_Cyrl": "kirgizera (zirilikoa)", "ky_Cyrl_KG": "kirgizera (zirilikoa, Kirgizistan)", "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_Cyrl": "mongoliera (zirilikoa)", "mn_Cyrl_MN": "mongoliera (zirilikoa, Mongolia)", "mn_MN": "mongoliera (Mongolia)", "mr": "marathera", "mr_IN": "marathera (India)", "ms": "malaysiera", "ms_BN": "malaysiera (Brunei)", "ms_Latn": "malaysiera (latina)", "ms_Latn_BN": "malaysiera (latina, Brunei)", "ms_Latn_MY": "malaysiera (latina, Malaysia)", "ms_Latn_SG": "malaysiera (latina, Singapur)", "ms_MY": "malaysiera (Malaysia)", "ms_SG": "malaysiera (Singapur)", "mt": "maltera", "mt_MT": "maltera (Malta)", "my": "burmatarra", "my_MM": "burmatarra (Myanmar)", "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": "oriyera", "or_IN": "oriyera (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_CV": "portugesa (Cabo Verde)", "pt_GW": "portugesa (Ginea-Bissau)", "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_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_Arab": "uigurrera (arabiarra)", "ug_Arab_CN": "uigurrera (arabiarra, Txina)", "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": "Jiddisha", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/fa.json000066400000000000000000000670221266465517700240010ustar00rootroot00000000000000{ "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_Latn": "بامبارایی (لاتینی)", "bm_Latn_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": "کاتالان (ایتالیا)", "cs": "چکی", "cs_CZ": "چکی (جمهوری چک)", "cy": "ویلزی", "cy_GB": "ویلزی (بریتانیا)", "da": "دانمارکی", "da_DK": "دانمارکی (دانمارک)", "da_GL": "دانمارکی (گرینلند)", "de": "آلمانی", "de_AT": "آلمانی (اتریش)", "de_BE": "آلمانی (بلژیک)", "de_CH": "آلمانی (سوئیس)", "de_DE": "آلمانی (آلمان)", "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_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_MY": "انگلیسی (مالزی)", "en_NA": "انگلیسی (نامیبیا)", "en_NF": "انگلیسی (جزیره نورفک)", "en_NG": "انگلیسی (نیجریه)", "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_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_VC": "انگلیسی (سنت وینسنت و گرنادین‌ها)", "en_VG": "انگلیسی (جزایر ویرجین بریتانیا)", "en_VI": "انگلیسی (جزایر ویرجین ایالات متحده)", "en_VU": "انگلیسی (وانواتو)", "en_WS": "انگلیسی (ساموآ)", "en_ZA": "انگلیسی (افریقای جنوبی)", "en_ZM": "انگلیسی (زامبیا)", "en_ZW": "انگلیسی (زیمبابوه)", "eo": "اسپرانتو", "es": "اسپانیایی", "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": "باسکی (اسپانیا)", "fa": "فارسی", "fa_AF": "فارسی (افغانستان)", "fa_IR": "فارسی (ایران)", "ff": "فولایی", "ff_CM": "فولایی (کامرون)", "ff_GN": "فولایی (گینه)", "ff_MR": "فولایی (موریتانی)", "ff_SN": "فولایی (سنگال)", "fi": "فنلاندی", "fi_FI": "فنلاندی (فنلاند)", "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": "فرانسوی (مایوت)", "fy": "فریزی غربی", "fy_NL": "فریزی غربی (هلند)", "ga": "ایرلندی", "ga_IE": "ایرلندی (ایرلند)", "gd": "گیلی اسکاتلندی", "gd_GB": "گیلی اسکاتلندی (بریتانیا)", "gl": "گالیسیایی", "gl_ES": "گالیسیایی (اسپانیا)", "gu": "گجراتی", "gu_IN": "گجراتی (هند)", "gv": "مانی", "gv_IM": "مانی (جزیرهٔ من)", "ha": "هوسیایی", "ha_GH": "هوسیایی (غنا)", "ha_Latn": "هوسیایی (لاتینی)", "ha_Latn_GH": "هوسیایی (لاتینی, غنا)", "ha_Latn_NE": "هوسیایی (لاتینی, نیجر)", "ha_Latn_NG": "هوسیایی (لاتینی, نیجریه)", "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_Cyrl": "قزاقی (سیریلی)", "kk_Cyrl_KZ": "قزاقی (سیریلی, قزاقستان)", "kk_KZ": "قزاقی (قزاقستان)", "kl": "گرینلندی", "kl_GL": "گرینلندی (گرینلند)", "km": "خمری", "km_KH": "خمری (کامبوج)", "kn": "کاناده‌ای", "kn_IN": "کاناده‌ای (هند)", "ko": "کره‌ای", "ko_KP": "کره‌ای (کرهٔ شمالی)", "ko_KR": "کره‌ای (کرهٔ جنوبی)", "ks": "کشمیری", "ks_Arab": "کشمیری (عربی)", "ks_Arab_IN": "کشمیری (عربی, هند)", "ks_IN": "کشمیری (هند)", "kw": "کرنوالی", "kw_GB": "کرنوالی (بریتانیا)", "ky": "قرقیزی", "ky_Cyrl": "قرقیزی (سیریلی)", "ky_Cyrl_KG": "قرقیزی (سیریلی, قرقیزستان)", "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_Cyrl": "مغولی (سیریلی)", "mn_Cyrl_MN": "مغولی (سیریلی, مغولستان)", "mn_MN": "مغولی (مغولستان)", "mr": "مراتی", "mr_IN": "مراتی (هند)", "ms": "مالایی", "ms_BN": "مالایی (برونئی)", "ms_Latn": "مالایی (لاتینی)", "ms_Latn_BN": "مالایی (لاتینی, برونئی)", "ms_Latn_MY": "مالایی (لاتینی, مالزی)", "ms_Latn_SG": "مالایی (لاتینی, سنگاپور)", "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_CV": "پرتغالی (کیپ‌ورد)", "pt_GW": "پرتغالی (گینهٔ بیسائو)", "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_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_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": "ازبکی (ازبکستان)", "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": "زولویی (افریقای جنوبی)" } } src/Symfony/Component/Intl/Resources/data/locales/fa_AF.json000066400000000000000000000252301266465517700243420ustar00rootroot00000000000000{ "Names": { "am_ET": "امهری (ایتوپیا)", "ar_ER": "عربی (اریتریا)", "ar_LY": "عربی (لیبیا)", "ar_MR": "عربی (موریتانیا)", "ar_SO": "عربی (سومالیه)", "be_BY": "بلوروسی (روسیهٔ سفید)", "bg_BG": "بلغاری (بلغاریا)", "bn_BD": "بنگالی (بنگله‌دیش)", "bs_BA": "بوسنیایی (بوسنیا و هرزه‌گوینا)", "bs_Cyrl_BA": "بوسنیایی (سیریلی, بوسنیا و هرزه‌گوینا)", "bs_Latn_BA": "بوسنیایی (لاتینی, بوسنیا و هرزه‌گوینا)", "ca_AD": "کاتالان (اندورا)", "ca_ES": "کاتالان (هسپانیه)", "da_DK": "دانمارکی (دنمارک)", "de_BE": "آلمانی (بلجیم)", "de_CH": "آلمانی (سویس)", "en_AG": "انگلیسی (انتیگوا و باربودا)", "en_AU": "انگلیسی (آسترالیا)", "en_BE": "انگلیسی (بلجیم)", "en_BS": "انگلیسی (بهاماس)", "en_ER": "انگلیسی (اریتریا)", "en_FM": "انگلیسی (میکرونزیا)", "en_GD": "انگلیسی (گرینادا)", "en_GY": "انگلیسی (گیانا)", "en_IE": "انگلیسی (آیرلند)", "en_KE": "انگلیسی (کینیا)", "en_KN": "انگلیسی (سنت کیتس و نیویس)", "en_LS": "انگلیسی (لیسوتو)", "en_MG": "انگلیسی (مادغاسکر)", "en_MT": "انگلیسی (مالتا)", "en_MY": "انگلیسی (مالیزیا)", "en_NG": "انگلیسی (نیجریا)", "en_NZ": "انگلیسی (زیلاند جدید)", "en_PG": "انگلیسی (پاپوا نیو گینیا)", "en_RW": "انگلیسی (روآندا)", "en_SB": "انگلیسی (جزایر سلومون)", "en_SG": "انگلیسی (سینگاپور)", "en_SL": "انگلیسی (سیرالیون)", "en_VC": "انگلیسی (سنت وینسنت و گرینادین)", "en_ZW": "انگلیسی (زیمبابوی)", "es": "هسپانوی", "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_EE": "استونیایی (استونیا)", "eu_ES": "باسکی (هسپانیه)", "fa": "دری", "fa_AF": "دری (افغانستان)", "fa_IR": "دری (ایران)", "ff_GN": "فولایی (گینیا)", "ff_MR": "فولایی (موریتانیا)", "ff_SN": "فولایی (سینیگال)", "fi": "فنلندی", "fi_FI": "فنلندی (فنلند)", "fr_BE": "فرانسوی (بلجیم)", "fr_CD": "فرانسوی (جمهوری دموکراتیک کانگو)", "fr_CF": "فرانسوی (افریقای مرکزی)", "fr_CG": "فرانسوی (کانگو)", "fr_CH": "فرانسوی (سویس)", "fr_GN": "فرانسوی (گینیا)", "fr_GQ": "فرانسوی (گینیا استوایی)", "fr_HT": "فرانسوی (هایتی)", "fr_MG": "فرانسوی (مادغاسکر)", "fr_MR": "فرانسوی (موریتانیا)", "fr_RW": "فرانسوی (روآندا)", "fr_SN": "فرانسوی (سینیگال)", "fy_NL": "فریزی غربی (هالند)", "ga": "آیرلندی", "ga_IE": "آیرلندی (آیرلند)", "gl_ES": "گالیسیایی (هسپانیه)", "ha_Latn_NG": "هوسیایی (لاتینی, نیجریا)", "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_Cyrl": "قرغزی (سیریلی)", "ky_Cyrl_KG": "قرغزی (سیریلی, قرغزستان)", "ky_KG": "قرغزی (قرغزستان)", "ln_AO": "لینگالا (انگولا)", "ln_CD": "لینگالا (جمهوری دموکراتیک کانگو)", "ln_CF": "لینگالا (افریقای مرکزی)", "ln_CG": "لینگالا (کانگو)", "lt_LT": "لیتوانیایی (لتوانیا)", "lu_CD": "لوبایی‐کاتانگا (جمهوری دموکراتیک کانگو)", "lv_LV": "لتونیایی (لاتویا)", "mg_MG": "مالاگاسیایی (مادغاسکر)", "mn": "مغلی", "mn_Cyrl": "مغلی (سیریلی)", "mn_Cyrl_MN": "مغلی (سیریلی, منگولیا)", "mn_MN": "مغلی (منگولیا)", "ms_BN": "مالایی (برونی)", "ms_Latn_BN": "مالایی (لاتینی, برونی)", "ms_Latn_MY": "مالایی (لاتینی, مالیزیا)", "ms_Latn_SG": "مالایی (لاتینی, سینگاپور)", "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_CV": "پرتگالی (کیپ‌ورد)", "pt_GW": "پرتگالی (گینیا بیسائو)", "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": "سامی شمالی (سویدن)", "sg_CF": "سانگویی (افریقای مرکزی)", "sh_BA": "صرب و کرواتی (بوسنیا و هرزه‌گوینا)", "si_LK": "سینهالی (سریلانکا)", "sk_SK": "اسلواکی (سلواکیا)", "sl_SI": "اسلووینیایی (سلونیا)", "sn_ZW": "شونایی (زیمبابوی)", "so_ET": "سومالیایی (ایتوپیا)", "so_KE": "سومالیایی (کینیا)", "so_SO": "سومالیایی (سومالیه)", "sq_AL": "آلبانیایی (البانیا)", "sr_BA": "صربی (بوسنیا و هرزه‌گوینا)", "sr_Cyrl_BA": "صربی (سیریلی, بوسنیا و هرزه‌گوینا)", "sr_Latn_BA": "صربی (لاتینی, بوسنیا و هرزه‌گوینا)", "sv": "سویدنی", "sv_AX": "سویدنی (جزایر اُلند)", "sv_FI": "سویدنی (فنلند)", "sv_SE": "سویدنی (سویدن)", "sw_KE": "سواحلی (کینیا)", "ta_LK": "تامیلی (سریلانکا)", "ta_MY": "تامیلی (مالیزیا)", "ta_SG": "تامیلی (سینگاپور)", "ti_ER": "تیگرینیایی (اریتریا)", "ti_ET": "تیگرینیایی (ایتوپیا)", "uk_UA": "اوکراینی (اکراین)", "yo_NG": "یوروبایی (نیجریا)", "zh_Hans_SG": "چینی (ساده‌شده, سینگاپور)", "zh_SG": "چینی (سینگاپور)" } } src/Symfony/Component/Intl/Resources/data/locales/ff.json000066400000000000000000000274571266465517700240160ustar00rootroot00000000000000{ "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_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_AU": "Engeleere (Ostaraalii)", "en_BB": "Engeleere (Barbadoos)", "en_BE": "Engeleere (Beljik)", "en_BM": "Engeleere (Bermudaa)", "en_BS": "Engeleere (Bahamaas)", "en_BW": "Engeleere (Botswaana)", "en_BZ": "Engeleere (Beliise)", "en_CA": "Engeleere (Kanadaa)", "en_CK": "Engeleere (Duuɗe Kuuk)", "en_CM": "Engeleere (Kameruun)", "en_DM": "Engeleere (Dominika)", "en_ER": "Engeleere (Eriteree)", "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_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_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_SG": "Engeleere (Sinngapuur)", "en_SH": "Engeleere (Sent Helen)", "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_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_CV": "Purtugeere (Duuɗe Kap Weer)", "pt_GW": "Purtugeere (Gine-Bisaawo)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/fi.json000066400000000000000000000523671266465517700240170ustar00rootroot00000000000000{ "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_Latn": "bambara (latinalainen)", "bm_Latn_ML": "bambara (latinalainen, 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)", "cs": "tšekki", "cs_CZ": "tšekki (Tšekki)", "cy": "kymri", "cy_GB": "kymri (Yhdistynyt kuningaskunta)", "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_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_AU": "englanti (Australia)", "en_BB": "englanti (Barbados)", "en_BE": "englanti (Belgia)", "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_CK": "englanti (Cookinsaaret)", "en_CM": "englanti (Kamerun)", "en_CX": "englanti (Joulusaari)", "en_DG": "englanti (Diego Garcia)", "en_DM": "englanti (Dominica)", "en_ER": "englanti (Eritrea)", "en_FJ": "englanti (Fidži)", "en_FK": "englanti (Falklandinsaaret)", "en_FM": "englanti (Mikronesian liittovaltio)", "en_GB": "englanti (Yhdistynyt kuningaskunta)", "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_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_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_SG": "englanti (Singapore)", "en_SH": "englanti (Saint Helena)", "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_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_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 (Yhdistynyt kuningaskunta)", "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_Latn": "hausa (latinalainen)", "ha_Latn_GH": "hausa (latinalainen, Ghana)", "ha_Latn_NE": "hausa (latinalainen, Niger)", "ha_Latn_NG": "hausa (latinalainen, Nigeria)", "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_Cyrl": "kazakki (kyrillinen)", "kk_Cyrl_KZ": "kazakki (kyrillinen, Kazakstan)", "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_Arab": "kašmiri (arabialainen)", "ks_Arab_IN": "kašmiri (arabialainen, Intia)", "ks_IN": "kašmiri (Intia)", "kw": "korni", "kw_GB": "korni (Yhdistynyt kuningaskunta)", "ky": "kirgiisi", "ky_Cyrl": "kirgiisi (kyrillinen)", "ky_Cyrl_KG": "kirgiisi (kyrillinen, Kirgisia)", "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_Cyrl": "mongoli (kyrillinen)", "mn_Cyrl_MN": "mongoli (kyrillinen, Mongolia)", "mn_MN": "mongoli (Mongolia)", "mr": "marathi", "mr_IN": "marathi (Intia)", "ms": "malaiji", "ms_BN": "malaiji (Brunei)", "ms_Latn": "malaiji (latinalainen)", "ms_Latn_BN": "malaiji (latinalainen, Brunei)", "ms_Latn_MY": "malaiji (latinalainen, Malesia)", "ms_Latn_SG": "malaiji (latinalainen, Singapore)", "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 (Surinam)", "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_CV": "portugali (Kap Verde)", "pt_GW": "portugali (Guinea-Bissau)", "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_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_Arab": "uiguuri (arabialainen)", "ug_Arab_CN": "uiguuri (arabialainen, Kiina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/fo.json000066400000000000000000000445471266465517700240260ustar00rootroot00000000000000{ "Names": { "af": "afríska", "af_NA": "afríska (Namibia)", "af_ZA": "afríska (Suðurafrikalýðveldið)", "am": "amhariskt", "am_ET": "amhariskt (Etiopia)", "ar": "arabiskt", "ar_AE": "arabiskt (Sameindu Emirríkini)", "ar_BH": "arabiskt (Bahrain)", "ar_DJ": "arabiskt (Djibouti)", "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 (Jordania)", "ar_KM": "arabiskt (Komorooyggjarnar)", "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 territorium)", "ar_QA": "arabiskt (Katar)", "ar_SA": "arabiskt (Saudi-Arábia)", "ar_SD": "arabiskt (Norðursudan)", "ar_SO": "arabiskt (Somalia)", "ar_SS": "arabiskt (Suðursudan)", "ar_SY": "arabiskt (Syria)", "ar_TD": "arabiskt (Kjad)", "ar_TN": "arabiskt (Tunesia)", "ar_YE": "arabiskt (Jemen)", "as": "assamesiskt", "as_IN": "assamesiskt (India)", "az": "azerbaijaniskt", "az_AZ": "azerbaijaniskt (Aserbajdsjan)", "az_Latn": "azerbaijaniskt (latinske)", "az_Latn_AZ": "azerbaijaniskt (latinske, Aserbajdsjan)", "be": "hvitarussiskt", "be_BY": "hvitarussiskt (Hvítarussland)", "bg": "bulgarskt", "bg_BG": "bulgarskt (Bulgaria)", "bm": "bambara", "bm_Latn": "bambara (latinske)", "bm_Latn_ML": "bambara (latinske, Mali)", "bn": "bengaliskt", "bn_BD": "bengaliskt (Bangladesj)", "bn_IN": "bengaliskt (India)", "bo": "tibetanskt", "bo_CN": "tibetanskt (Kina)", "bo_IN": "tibetanskt (India)", "br": "bretonskt", "br_FR": "bretonskt (Frakland)", "bs": "bosniskt", "bs_BA": "bosniskt (Bosnia-Hersegovina)", "bs_Latn": "bosniskt (latinske)", "bs_Latn_BA": "bosniskt (latinske, Bosnia-Hersegovina)", "ca": "katalanskt", "ca_AD": "katalanskt (Andorra)", "ca_ES": "katalanskt (Spania)", "ca_FR": "katalanskt (Frakland)", "ca_IT": "katalanskt (Italia)", "cs": "kekkiskt", "cs_CZ": "kekkiskt (Kekkia)", "cy": "valisiskt", "cy_GB": "valisiskt (Stóra Bretland)", "da": "danskt", "da_DK": "danskt (Danmørk)", "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_LI": "týskt (Liktenstein)", "de_LU": "týskt (Luksemborg)", "dz": "dzongkha", "dz_BT": "dzongkha (Butan)", "el": "grikiskt", "el_CY": "grikiskt (Kýpros)", "el_GR": "grikiskt (Grikkaland)", "en": "enskt", "en_AG": "enskt (Antigua og Barbuda)", "en_AI": "enskt (Anguilla)", "en_AS": "enskt (Amerikanska Sámoa)", "en_AU": "enskt (Avstralia)", "en_BB": "enskt (Barbados)", "en_BE": "enskt (Belgia)", "en_BM": "enskt (Bermuda)", "en_BS": "enskt (Bahamas)", "en_BW": "enskt (Botsvana)", "en_BZ": "enskt (Belis)", "en_CA": "enskt (Kanada)", "en_CC": "enskt (Kokosoyggjarnar)", "en_CK": "enskt (Cooksoyggjarnar)", "en_CM": "enskt (Kamerun)", "en_CX": "enskt (Jólaoyggjin)", "en_DG": "enskt (Diego Garcia)", "en_DM": "enskt (Dominika)", "en_ER": "enskt (Eritrea)", "en_FJ": "enskt (Fiji)", "en_FK": "enskt (Falklandsoyggjarnar)", "en_FM": "enskt (Mikronesia)", "en_GB": "enskt (Stóra Bretland)", "en_GD": "enskt (Grenada)", "en_GG": "enskt (Guernsey)", "en_GH": "enskt (Ghana)", "en_GI": "enskt (Gibraltar)", "en_GM": "enskt (Gambia)", "en_GU": "enskt (Guam)", "en_GY": "enskt (Gujana)", "en_HK": "enskt (Hongkong)", "en_IE": "enskt (Írland)", "en_IM": "enskt (Mann)", "en_IN": "enskt (India)", "en_IO": "enskt (Bretsku Indiahavsoyggjarnar)", "en_JE": "enskt (Jersey)", "en_JM": "enskt (Jameika)", "en_KE": "enskt (Kenja)", "en_KI": "enskt (Kiribati)", "en_KN": "enskt (Saint Kitts og Nevis)", "en_KY": "enskt (Caymanoyggjarnar)", "en_LC": "enskt (Saint Lusia)", "en_LR": "enskt (Liberia)", "en_LS": "enskt (Lesoto)", "en_MG": "enskt (Madagaskar)", "en_MH": "enskt (Marshalloyggjarnar)", "en_MO": "enskt (Makao)", "en_MP": "enskt (Norðurmarianoyggjarnar)", "en_MS": "enskt (Montserrat)", "en_MT": "enskt (Malta)", "en_MU": "enskt (Móritius)", "en_MW": "enskt (Malavi)", "en_MY": "enskt (Maleisia)", "en_NA": "enskt (Namibia)", "en_NF": "enskt (Norfolkoyggjin)", "en_NG": "enskt (Nigeria)", "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 (Pitcairn)", "en_PR": "enskt (Puerto Rico)", "en_PW": "enskt (Palau)", "en_RW": "enskt (Ruanda)", "en_SB": "enskt (Sálomonoyggjarnar)", "en_SC": "enskt (Seyskelloyggjarnar)", "en_SD": "enskt (Norðursudan)", "en_SG": "enskt (Singapor)", "en_SH": "enskt (Saint Helena)", "en_SL": "enskt (Sierra Leone)", "en_SS": "enskt (Suðursudan)", "en_SX": "enskt (Niðurlonds Saint Martin)", "en_SZ": "enskt (Svasiland)", "en_TC": "enskt (Turks- og Caicosoyggjarnar)", "en_TK": "enskt (Tokelau)", "en_TO": "enskt (Tonga)", "en_TT": "enskt (Trinidad og Tobago)", "en_TV": "enskt (Tuvalu)", "en_TZ": "enskt (Tansania)", "en_UG": "enskt (Uganda)", "en_US": "enskt (Sambandsríki Amerika)", "en_VC": "enskt (Saint Vinsent og Grenadinoyggjar)", "en_VG": "enskt (Stóra Bretlands Jómfrúoyggjarnar)", "en_VI": "enskt (Sambandsríki Amerikas Jómfrúoyggjarnar)", "en_VU": "enskt (Vanuatu)", "en_WS": "enskt (Sámoa)", "en_ZA": "enskt (Suðurafrikalýðveldið)", "en_ZM": "enskt (Sambia)", "en_ZW": "enskt (Simbabvi)", "eo": "esperanto", "es": "spanskt", "es_AR": "spanskt (Argentina)", "es_BO": "spanskt (Bolivia)", "es_CL": "spanskt (Kili)", "es_CO": "spanskt (Kolombia)", "es_CR": "spanskt (Kosta Rika)", "es_CU": "spanskt (Kuba)", "es_DO": "spanskt (Domingo lýðveldið)", "es_EA": "spanskt (Ceuta og Melilla)", "es_EC": "spanskt (Ekvador)", "es_ES": "spanskt (Spania)", "es_GQ": "spanskt (Ekvator Guinea)", "es_GT": "spanskt (Guatemala)", "es_HN": "spanskt (Honduras)", "es_IC": "spanskt (Kanaríoyggjarnar)", "es_MX": "spanskt (Meksiko)", "es_NI": "spanskt (Nikaragua)", "es_PA": "spanskt (Panama)", "es_PE": "spanskt (Perú)", "es_PH": "spanskt (Filipsoyggjar)", "es_PR": "spanskt (Puerto Rico)", "es_PY": "spanskt (Paraguei)", "es_SV": "spanskt (El Salvador)", "es_US": "spanskt (Sambandsríki Amerika)", "es_UY": "spanskt (Uruguei)", "es_VE": "spanskt (Venesuela)", "et": "estlendskt", "et_EE": "estlendskt (Estland)", "eu": "baskiskt", "eu_ES": "baskiskt (Spania)", "fa": "persiskt", "fa_AF": "persiskt (Afganistan)", "fa_IR": "persiskt (Iran)", "fi": "finskt", "fi_FI": "finskt (Finnland)", "fo": "føroyskt", "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 (Saint Barthélemy)", "fr_CA": "franskt (Kanada)", "fr_CD": "franskt (Kongo-Kinshasa)", "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 (Djibouti)", "fr_DZ": "franskt (Algeria)", "fr_FR": "franskt (Frakland)", "fr_GA": "franskt (Gabon)", "fr_GF": "franskt (Fransk Gujana)", "fr_GN": "franskt (Guinea)", "fr_GP": "franskt (Guadeloupe)", "fr_GQ": "franskt (Ekvator Guinea)", "fr_HT": "franskt (Haiti)", "fr_KM": "franskt (Komorooyggjarnar)", "fr_LU": "franskt (Luksemborg)", "fr_MA": "franskt (Marokko)", "fr_MC": "franskt (Monako)", "fr_MF": "franskt (Fransk Saint 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ý-Kaledonia)", "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 (Seyskelloyggjarnar)", "fr_SN": "franskt (Senegal)", "fr_SY": "franskt (Syria)", "fr_TD": "franskt (Kjad)", "fr_TG": "franskt (Togo)", "fr_TN": "franskt (Tunesia)", "fr_VU": "franskt (Vanuatu)", "fr_WF": "franskt (Wallis og Futuna)", "fr_YT": "franskt (Mayotte)", "fy": "vestfrisikt", "fy_NL": "vestfrisikt (Niðurlond)", "ga": "írskt", "ga_IE": "írskt (Írland)", "gd": "skotskt gæliskt", "gd_GB": "skotskt gæliskt (Stóra Bretland)", "gl": "galisiskt", "gl_ES": "galisiskt (Spania)", "gu": "gujariti", "gu_IN": "gujariti (India)", "ha": "haussa", "ha_GH": "haussa (Ghana)", "ha_Latn": "haussa (latinske)", "ha_Latn_GH": "haussa (latinske, Ghana)", "ha_Latn_NE": "haussa (latinske, Niger)", "ha_Latn_NG": "haussa (latinske, Nigeria)", "ha_NE": "haussa (Niger)", "ha_NG": "haussa (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)", "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)", "kk": "kazakiskt", "kk_KZ": "kazakiskt (Kasakstan)", "km": "kambodjanskt", "km_KH": "kambodjanskt (Kambodja)", "kn": "kannada", "kn_IN": "kannada (India)", "ko": "koreanskt", "ko_KP": "koreanskt (Norður-Korea)", "ko_KR": "koreanskt (Suður-Korea)", "ks": "kashmiriskt", "ks_IN": "kashmiriskt (India)", "ky": "kirgisikt", "ky_KG": "kirgisikt (Kirgisia)", "lb": "luxemburgiskt", "lb_LU": "luxemburgiskt (Luksemborg)", "ln": "lingala", "ln_AO": "lingala (Angola)", "ln_CD": "lingala (Kongo-Kinshasa)", "ln_CF": "lingala (Miðafrikalýðveldið)", "ln_CG": "lingala (Kongo)", "lo": "laotiskt", "lo_LA": "laotiskt (Laos)", "lt": "litavskt", "lt_LT": "litavskt (Litava)", "lv": "latviskt", "lv_LV": "latviskt (Lettland)", "mg": "malagasiskt", "mg_MG": "malagasiskt (Madagaskar)", "mk": "makedonskt", "mk_MK": "makedonskt (Makedónia)", "ml": "malayalam", "ml_IN": "malayalam (India)", "mn": "mongoliskt", "mn_MN": "mongoliskt (Mongolia)", "mr": "marathiskt", "mr_IN": "marathiskt (India)", "ms": "malajiskt", "ms_BN": "malajiskt (Brunei)", "ms_Latn": "malajiskt (latinske)", "ms_Latn_BN": "malajiskt (latinske, Brunei)", "ms_Latn_MY": "malajiskt (latinske, Maleisia)", "ms_Latn_SG": "malajiskt (latinske, Singapor)", "ms_MY": "malajiskt (Maleisia)", "ms_SG": "malajiskt (Singapor)", "mt": "maltesiskt", "mt_MT": "maltesiskt (Malta)", "my": "burmesiskt", "my_MM": "burmesiskt (Burma)", "nb": "norskt bokmál", "nb_NO": "norskt bokmál (Noreg)", "nb_SJ": "norskt bokmál (Svalbard og Jan Mayen)", "ne": "nepalskt", "ne_IN": "nepalskt (India)", "ne_NP": "nepalskt (Nepal)", "nl": "hollendskt", "nl_AW": "hollendskt (Aruba)", "nl_BE": "hollendskt (Belgia)", "nl_BQ": "hollendskt (Niðurlonds Karibia)", "nl_CW": "hollendskt (Curaçao)", "nl_NL": "hollendskt (Niðurlond)", "nl_SR": "hollendskt (Surinam)", "nl_SX": "hollendskt (Niðurlonds Saint Martin)", "nn": "nýnorskt", "nn_NO": "nýnorskt (Noreg)", "no": "norskt", "no_NO": "norskt (Noreg)", "or": "oriya", "or_IN": "oriya (India)", "os": "ossetiskt", "os_GE": "ossetiskt (Georgia)", "os_RU": "ossetiskt (Russland)", "pa": "punjabiskt", "pa_IN": "punjabiskt (India)", "pa_PK": "punjabiskt (Pakistan)", "pl": "polskt", "pl_PL": "polskt (Pólland)", "ps": "afghanskt", "ps_AF": "afghanskt (Afganistan)", "pt": "portugisiskt", "pt_AO": "portugisiskt (Angola)", "pt_BR": "portugisiskt (Brasilia)", "pt_CV": "portugisiskt (Grønhøvdaoyggjarnar)", "pt_GW": "portugisiskt (Guinea Bissau)", "pt_MO": "portugisiskt (Makao)", "pt_MZ": "portugisiskt (Mosambik)", "pt_PT": "portugisiskt (Portugal)", "pt_ST": "portugisiskt (Sao Tome og Prinsipi)", "pt_TL": "portugisiskt (Eystur-Timor)", "qu": "quechua", "qu_BO": "quechua (Bolivia)", "qu_EC": "quechua (Ekvador)", "qu_PE": "quechua (Perú)", "rm": "romansh", "rm_CH": "romansh (Sveis)", "rn": "rundi", "rn_BI": "rundi (Burundi)", "ro": "romanskt", "ro_MD": "romanskt (Moldova)", "ro_RO": "romanskt (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 (Ukreina)", "rw": "ruanda", "rw_RW": "ruanda (Ruanda)", "sg": "sango", "sg_CF": "sango (Miðafrikalýðveldið)", "sh": "serbokroatiskt", "sh_BA": "serbokroatiskt (Bosnia-Hersegovina)", "si": "sinhalesiskt", "si_LK": "sinhalesiskt (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 (Djibouti)", "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_Latn": "serbiskt (latinske)", "sr_Latn_BA": "serbiskt (latinske, Bosnia-Hersegovina)", "sr_Latn_ME": "serbiskt (latinske, Montenegro)", "sr_Latn_RS": "serbiskt (latinske, Serbia)", "sr_Latn_XK": "serbiskt (latinske, 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_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 (Maleisia)", "ta_SG": "tamilskt (Singapor)", "te": "telugiskt", "te_IN": "telugiskt (India)", "th": "thailendskt", "th_TH": "thailendskt (Teiland)", "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": "uighur", "ug_CN": "uighur (Kina)", "uk": "ukrainskt", "uk_UA": "ukrainskt (Ukreina)", "ur": "urdu", "ur_IN": "urdu (India)", "ur_PK": "urdu (Pakistan)", "uz": "uzbekiskt", "uz_AF": "uzbekiskt (Afganistan)", "uz_Latn": "uzbekiskt (latinske)", "uz_Latn_UZ": "uzbekiskt (latinske, Usbekistan)", "uz_UZ": "uzbekiskt (Usbekistan)", "vi": "vietnamesiskt", "vi_VN": "vietnamesiskt (Vietnam)", "yi": "jiddiskt", "yo": "yoruba", "yo_BJ": "yoruba (Benin)", "yo_NG": "yoruba (Nigeria)", "zh": "kinesiskt", "zh_CN": "kinesiskt (Kina)", "zh_HK": "kinesiskt (Hongkong)", "zh_MO": "kinesiskt (Makao)", "zh_SG": "kinesiskt (Singapor)", "zh_TW": "kinesiskt (Teivan)", "zu": "sulu", "zu_ZA": "sulu (Suðurafrikalýðveldið)" } } src/Symfony/Component/Intl/Resources/data/locales/fr.json000066400000000000000000000527601266465517700240250ustar00rootroot00000000000000{ "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_Latn": "bambara (latin)", "bm_Latn_ML": "bambara (latin, 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)", "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_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_AU": "anglais (Australie)", "en_BB": "anglais (Barbade)", "en_BE": "anglais (Belgique)", "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_CK": "anglais (Îles Cook)", "en_CM": "anglais (Cameroun)", "en_CX": "anglais (Île Christmas)", "en_DG": "anglais (Diego Garcia)", "en_DM": "anglais (Dominique)", "en_ER": "anglais (Érythrée)", "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_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_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 (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_SG": "anglais (Singapour)", "en_SH": "anglais (Sainte-Hélène)", "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 (Tokelau)", "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_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_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 (partie française))", "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": "gujarati", "gu_IN": "gujarati (Inde)", "gv": "manx", "gv_IM": "manx (Île de Man)", "ha": "haoussa", "ha_GH": "haoussa (Ghana)", "ha_Latn": "haoussa (latin)", "ha_Latn_GH": "haoussa (latin, Ghana)", "ha_Latn_NE": "haoussa (latin, Niger)", "ha_Latn_NG": "haoussa (latin, Nigéria)", "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_Cyrl": "kazakh (cyrillique)", "kk_Cyrl_KZ": "kazakh (cyrillique, Kazakhstan)", "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_Arab": "kashmiri (arabe)", "ks_Arab_IN": "kashmiri (arabe, Inde)", "ks_IN": "kashmiri (Inde)", "kw": "cornique", "kw_GB": "cornique (Royaume-Uni)", "ky": "kirghize", "ky_Cyrl": "kirghize (cyrillique)", "ky_Cyrl_KG": "kirghize (cyrillique, Kirghizistan)", "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_Cyrl": "mongol (cyrillique)", "mn_Cyrl_MN": "mongol (cyrillique, Mongolie)", "mn_MN": "mongol (Mongolie)", "mr": "marathe", "mr_IN": "marathe (Inde)", "ms": "malais", "ms_BN": "malais (Brunéi Darussalam)", "ms_Latn": "malais (latin)", "ms_Latn_BN": "malais (latin, Brunéi Darussalam)", "ms_Latn_MY": "malais (latin, Malaisie)", "ms_Latn_SG": "malais (latin, Singapour)", "ms_MY": "malais (Malaisie)", "ms_SG": "malais (Singapour)", "mt": "maltais", "mt_MT": "maltais (Malte)", "my": "birman", "my_MM": "birman (Myanmar)", "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_CV": "portugais (Cap-Vert)", "pt_GW": "portugais (Guinée-Bissau)", "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_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_Arab": "ouïghour (arabe)", "ug_Arab_CN": "ouïghour (arabe, Chine)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/fr_CA.json000066400000000000000000000033121266465517700243550ustar00rootroot00000000000000{ "Names": { "be_BY": "biélorusse (Bélarus)", "en_CC": "anglais (Îles Cocos (Keeling))", "en_FM": "anglais (Micronésie)", "en_SX": "anglais (Saint-Martin (Pays-Bas))", "en_VC": "anglais (Saint-Vincent-et-les Grenadines)", "es_SV": "espagnol (Salvador)", "fr_MF": "français (Saint-Martin (France))", "fy": "frison", "fy_NL": "frison (Pays-Bas)", "gu": "goudjarâtî", "gu_IN": "goudjarâtî (Inde)", "ii": "yi de Sichuan", "ii_CN": "yi de Sichuan (Chine)", "nl_SX": "néerlandais (Saint-Martin (Pays-Bas))", "ru_BY": "russe (Bélarus)", "rw": "kinyarwanda", "rw_RW": "kinyarwanda (Rwanda)", "si": "cingalais", "si_LK": "cingalais (Sri Lanka)", "to": "tongan", "to_TO": "tongan (Tonga)", "ug": "ouïgour", "ug_Arab": "ouïgour (arabe)", "ug_Arab_CN": "ouïgour (arabe, Chine)", "ug_CN": "ouïgour (Chine)", "zh_Hans": "chinois (idéogrammes han simplifiés)", "zh_Hans_CN": "chinois (idéogrammes han simplifiés, Chine)", "zh_Hans_HK": "chinois (idéogrammes han simplifiés, R.A.S. chinoise de Hong Kong)", "zh_Hans_MO": "chinois (idéogrammes han simplifiés, R.A.S. chinoise de Macao)", "zh_Hans_SG": "chinois (idéogrammes han simplifiés, Singapour)", "zh_Hant": "chinois (idéogrammes han traditionnels)", "zh_Hant_HK": "chinois (idéogrammes han traditionnels, R.A.S. chinoise de Hong Kong)", "zh_Hant_MO": "chinois (idéogrammes han traditionnels, R.A.S. chinoise de Macao)", "zh_Hant_TW": "chinois (idéogrammes han traditionnels, Taïwan)" } } src/Symfony/Component/Intl/Resources/data/locales/fy.json000066400000000000000000000526001266465517700240250ustar00rootroot00000000000000{ "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_Latn": "Bambara (Latyn)", "bm_Latn_ML": "Bambara (Latyn, 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ë)", "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_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_AU": "Ingelsk (Australië)", "en_BB": "Ingelsk (Barbados)", "en_BE": "Ingelsk (België)", "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_CK": "Ingelsk (Cookeilannen)", "en_CM": "Ingelsk (Kameroen)", "en_CX": "Ingelsk (Krysteilan)", "en_DG": "Ingelsk (Diego Garcia)", "en_DM": "Ingelsk (Dominika)", "en_ER": "Ingelsk (Eritrea)", "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_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_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_SG": "Ingelsk (Singapore)", "en_SH": "Ingelsk (Sint-Helena)", "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_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_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_Latn": "Hausa (Latyn)", "ha_Latn_GH": "Hausa (Latyn, Ghana)", "ha_Latn_NE": "Hausa (Latyn, Niger)", "ha_Latn_NG": "Hausa (Latyn, Nigeria)", "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_Cyrl": "Kazachs (Syrillysk)", "kk_Cyrl_KZ": "Kazachs (Syrillysk, Kazachstan)", "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_Arab": "Kasjmiri (Arabysk)", "ks_Arab_IN": "Kasjmiri (Arabysk, India)", "ks_IN": "Kasjmiri (India)", "kw": "Cornish", "kw_GB": "Cornish (Verenigd Koninkrijk)", "ky": "Kirgizysk", "ky_Cyrl": "Kirgizysk (Syrillysk)", "ky_Cyrl_KG": "Kirgizysk (Syrillysk, Kirgizië)", "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_Cyrl": "Mongools (Syrillysk)", "mn_Cyrl_MN": "Mongools (Syrillysk, Mongolië)", "mn_MN": "Mongools (Mongolië)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Maleis", "ms_BN": "Maleis (Brunei)", "ms_Latn": "Maleis (Latyn)", "ms_Latn_BN": "Maleis (Latyn, Brunei)", "ms_Latn_MY": "Maleis (Latyn, Maleisië)", "ms_Latn_SG": "Maleis (Latyn, Singapore)", "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_CV": "Portugeesk (Kaapverdië)", "pt_GW": "Portugeesk (Guinee-Bissau)", "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_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_Arab": "Oeigoers (Arabysk)", "ug_Arab_CN": "Oeigoers (Arabysk, Sina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ga.json000066400000000000000000000564271266465517700240110ustar00rootroot00000000000000{ "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)", "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_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_AU": "Béarla (An Astráil)", "en_BB": "Béarla (Barbadós)", "en_BE": "Béarla (An Bheilg)", "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_CK": "Béarla (Oileáin Cook)", "en_CM": "Béarla (Camarún)", "en_CX": "Béarla (Oileán na Nollag)", "en_DG": "Béarla (Diego Garcia)", "en_DM": "Béarla (Doiminice)", "en_ER": "Béarla (An Eiritré)", "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_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_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_SG": "Béarla (Singeapór)", "en_SH": "Béarla (San Héilin)", "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_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_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_Latn": "Hásais (Laidineach)", "ha_Latn_GH": "Hásais (Laidineach, Gána)", "ha_Latn_NE": "Hásais (Laidineach, An Nígir)", "ha_Latn_NG": "Hásais (Laidineach, An Nigéir)", "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_Cyrl": "Casaicis (Coireallach)", "kk_Cyrl_KZ": "Casaicis (Coireallach, An Chasacstáin)", "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_Arab": "Caismíris (Arabach)", "ks_Arab_IN": "Caismíris (Arabach, An India)", "ks_IN": "Caismíris (An India)", "kw": "Coirnis", "kw_GB": "Coirnis (An Ríocht Aontaithe)", "ky": "Cirgisis", "ky_Cyrl": "Cirgisis (Coireallach)", "ky_Cyrl_KG": "Cirgisis (Coireallach, An Chirgeastáin)", "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_Cyrl": "Mongóilis (Coireallach)", "mn_Cyrl_MN": "Mongóilis (Coireallach, An Mhongóil)", "mn_MN": "Mongóilis (An Mhongóil)", "mr": "Maraitis", "mr_IN": "Maraitis (An India)", "ms": "Malaeis", "ms_BN": "Malaeis (Brúiné)", "ms_Latn": "Malaeis (Laidineach)", "ms_Latn_BN": "Malaeis (Laidineach, Brúiné)", "ms_Latn_MY": "Malaeis (Laidineach, An Mhalaeisia)", "ms_Latn_SG": "Malaeis (Laidineach, Singeapór)", "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_CV": "Portaingéilis (Rinn Verde)", "pt_GW": "Portaingéilis (Guine Bissau)", "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_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_Arab": "Uigiúiris (Arabach)", "ug_Arab_CN": "Uigiúiris (Arabach, An tSín)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/gd.json000066400000000000000000000551751266465517700240130ustar00rootroot00000000000000{ "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_Latn": "Bambara (Laideann)", "bm_Latn_ML": "Bambara (Laideann, Màili)", "bn": "Beangailis", "bn_BD": "Beangailis (Bangladais)", "bn_IN": "Beangailis (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àinn)", "ca_FR": "Catalanais (An Fhraing)", "ca_IT": "Catalanais (An Eadailt)", "cs": "Seacais", "cs_CZ": "Seacais (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_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 (Anguilla)", "en_AS": "Beurla (Samotha na h-Aimeireaga)", "en_AU": "Beurla (Astràilia)", "en_BB": "Beurla (Barbados)", "en_BE": "Beurla (A’ Bheilg)", "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 Cocos (Keeling))", "en_CK": "Beurla (Eileanan Cook)", "en_CM": "Beurla (Camarun)", "en_CX": "Beurla (Eilean na Nollaig)", "en_DG": "Beurla (Diego Garcia)", "en_DM": "Beurla (Doiminicea)", "en_ER": "Beurla (Eartra)", "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_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_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 (Eilean 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_SG": "Beurla (Singeapòr)", "en_SH": "Beurla (Eilean Naomh Eilidh)", "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 Stàitean Aonaichte)", "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 Aimeireagach na Maighdinn)", "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_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àinn)", "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àinn)", "fa": "Farsaidh", "fa_AF": "Farsaidh (Afghanastàn)", "fa_IR": "Farsaidh (Ioràn)", "fi": "Fionnlannais", "fi_FI": "Fionnlannais (An Fhionnlann)", "fo": "Fàrothais", "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 Siarach", "fy_NL": "Frìoslannais Siarach (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àinn)", "gu": "Gujarati", "gu_IN": "Gujarati (Na h-Innseachan)", "gv": "Gaelg", "gv_IM": "Gaelg (Eilean Mhanainn)", "ha": "Hausa", "ha_GH": "Hausa (Gàna)", "ha_Latn": "Hausa (Laideann)", "ha_Latn_GH": "Hausa (Laideann, Gàna)", "ha_Latn_NE": "Hausa (Laideann, Nìgeir)", "ha_Latn_NG": "Hausa (Laideann, Nigèiria)", "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 (Airmeinia)", "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_Cyrl": "Casachais (Cirilis)", "kk_Cyrl_KZ": "Casachais (Cirilis, Casachstàn)", "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 a Deas)", "ks": "Caismiris", "ks_Arab": "Caismiris (Arabais)", "ks_Arab_IN": "Caismiris (Arabais, Na h-Innseachan)", "ks_IN": "Caismiris (Na h-Innseachan)", "kw": "Còrnais", "kw_GB": "Còrnais (An Rìoghachd Aonaichte)", "ky": "Cìorgasais", "ky_Cyrl": "Cìorgasais (Cirilis)", "ky_Cyrl_KG": "Cìorgasais (Cirilis, Cìorgastan)", "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_Cyrl": "Mongolais (Cirilis)", "mn_Cyrl_MN": "Mongolais (Cirilis, Dùthaich nam Mongol)", "mn_MN": "Mongolais (Dùthaich nam Mongol)", "mr": "Marathi", "mr_IN": "Marathi (Na h-Innseachan)", "ms": "Malaidhis", "ms_BN": "Malaidhis (Brùnaigh)", "ms_Latn": "Malaidhis (Laideann)", "ms_Latn_BN": "Malaidhis (Laideann, Brùnaigh)", "ms_Latn_MY": "Malaidhis (Laideann, Malaidhsea)", "ms_Latn_SG": "Malaidhis (Laideann, Singeapòr)", "ms_MY": "Malaidhis (Malaidhsea)", "ms_SG": "Malaidhis (Singeapòr)", "mt": "Maltais", "mt_MT": "Maltais (Malta)", "my": "Burmais", "my_MM": "Burmais (Miànmar (Burma))", "nb": "Bokmål na Nirribhidh", "nb_NO": "Bokmål na Nirribhidh (An Nirribhidh)", "nb_SJ": "Bokmål na Nirribhidh (Svalbard agus Jan Mayen)", "nd": "Ndebele Thuathach", "nd_ZW": "Ndebele Thuathach (An t-Sìombab)", "ne": "Neapàilis", "ne_IN": "Neapàilis (Na h-Innseachan)", "ne_NP": "Neapàilis (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 (An Nirribhidh)", "no": "Nirribhis", "no_NO": "Nirribhis (An Nirribhidh)", "om": "Oromo", "om_ET": "Oromo (An Itiop)", "om_KE": "Oromo (Ceinia)", "or": "Oriya", "or_IN": "Oriya (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": "Pachtu", "ps_AF": "Pachtu (Afghanastàn)", "pt": "Portagailis", "pt_AO": "Portagailis (Angòla)", "pt_BR": "Portagailis (Braisil)", "pt_CV": "Portagailis (An Ceap Uaine)", "pt_GW": "Portagailis (Gini-Bioso)", "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": "Ceatsua", "qu_BO": "Ceatsua (Boilibhia)", "qu_EC": "Ceatsua (Eacuador)", "qu_PE": "Ceatsua (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 (An Nirribhidh)", "se_SE": "Sàmais Thuathach (An t-Suain)", "sg": "Sango", "sg_CF": "Sango (Poblachd Meadhan Afraga)", "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_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": "Tàidh", "th_TH": "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": "Tongais", "to_TO": "Tongais (Tonga)", "tr": "Turcais", "tr_CY": "Turcais (Cìopras)", "tr_TR": "Turcais (An Tuirc)", "ug": "Ùigiurais", "ug_Arab": "Ùigiurais (Arabais)", "ug_Arab_CN": "Ùigiurais (Arabais, An t-Sìn)", "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": "Ioruba", "yo_BJ": "Ioruba (Beinin)", "yo_NG": "Ioruba (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)" } } src/Symfony/Component/Intl/Resources/data/locales/gl.json000066400000000000000000000520441266465517700240130ustar00rootroot00000000000000{ "Names": { "af": "afrikaans", "af_NA": "afrikaans (Namibia)", "af_ZA": "afrikaans (Sudáfrica)", "ak": "akán", "ak_GH": "akán (Gana)", "am": "amárico", "am_ET": "amárico (Etiopía)", "ar": "árabe", "ar_AE": "árabe (Emiratos Árabes Unidos)", "ar_BH": "árabe (Bahrein)", "ar_DJ": "árabe (Xibuti)", "ar_DZ": "árabe (Arxelia)", "ar_EG": "árabe (Exipto)", "ar_EH": "árabe (Sahara 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": "assamés", "as_IN": "assamés (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": "bambara", "bm_Latn": "bambara (Latino)", "bm_Latn_ML": "bambara (Latino, Mali)", "bn": "bengalí", "bn_BD": "bengalí (Bangladesh)", "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 e Hercegovina)", "bs_Cyrl": "bosnio (Cirílico)", "bs_Cyrl_BA": "bosnio (Cirílico, Bosnia e Hercegovina)", "bs_Latn": "bosnio (Latino)", "bs_Latn_BA": "bosnio (Latino, Bosnia e 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)", "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 (Grenlandia)", "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_LI": "alemán (Liechtenstein)", "de_LU": "alemán (Luxemburgo)", "dz": "dzongkha", "dz_BT": "dzongkha (Bután)", "ee": "ewé", "ee_GH": "ewé (Gana)", "ee_TG": "ewé (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_AU": "inglés (Australia)", "en_BB": "inglés (Barbados)", "en_BE": "inglés (Bélxica)", "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_CK": "inglés (Illas Cook)", "en_CM": "inglés (Camerún)", "en_CX": "inglés (Illa Christmas)", "en_DG": "inglés (Diego García)", "en_DM": "inglés (Dominica)", "en_ER": "inglés (Eritrea)", "en_FJ": "inglés (Fixi)", "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 (Gana)", "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_IM": "inglés (Illa de Man)", "en_IN": "inglés (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 (Quenia)", "en_KI": "inglés (Kiribati)", "en_KN": "inglés (San Cristovo 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 (Lesotho)", "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_NR": "inglés (Nauru)", "en_NU": "inglés (Niue)", "en_NZ": "inglés (Nova Celandia)", "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_SG": "inglés (Singapur)", "en_SH": "inglés (Santa Helena)", "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 (Tokelau)", "en_TO": "inglés (Tonga)", "en_TT": "inglés (Trindade e Tobago)", "en_TV": "inglés (Tuvalu)", "en_TZ": "inglés (Tanzania)", "en_UG": "inglés (Uganda)", "en_UM": "inglés (Illas Menores Distantes dos EUA.)", "en_US": "inglés (Estados Unidos de América)", "en_VC": "inglés (San Vicente e 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 (Sudá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_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 (El 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)", "fi": "finés", "fi_FI": "finés (Finlandia)", "fo": "faroés", "fo_FO": "faroé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 (San Bartolomé)", "fr_CA": "francés (Canadá)", "fr_CD": "francés (República Democrática do Congo)", "fr_CF": "francés (República Africana Central)", "fr_CG": "francés (Congo)", "fr_CH": "francés (Suíza)", "fr_CI": "francés (Costa de Marfil)", "fr_CM": "francés (Camerún)", "fr_DJ": "francés (Xibuti)", "fr_DZ": "francés (Arxelia)", "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 (San Martiño)", "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 (Nova Caledonia)", "fr_NE": "francés (Níxer)", "fr_PF": "francés (Polinesia Francesa)", "fr_PM": "francés (San Pedro e Miguelón)", "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": "guxaratiano", "gu_IN": "guxaratiano (India)", "gv": "manx", "gv_IM": "manx (Illa de Man)", "ha": "hausa", "ha_GH": "hausa (Gana)", "ha_Latn": "hausa (Latino)", "ha_Latn_GH": "hausa (Latino, Gana)", "ha_Latn_NE": "hausa (Latino, Níxer)", "ha_Latn_NG": "hausa (Latino, Nixeria)", "ha_NE": "hausa (Níxer)", "ha_NG": "hausa (Nixeria)", "he": "hebreo", "he_IL": "hebreo (Israel)", "hi": "hindi", "hi_IN": "hindi (India)", "hr": "croata", "hr_BA": "croata (Bosnia e 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 (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 (Xapón)", "ka": "xeorxiano", "ka_GE": "xeorxiano (Xeorxia)", "ki": "kikuyu", "ki_KE": "kikuyu (Quenia)", "kk": "casaco", "kk_Cyrl": "casaco (Cirílico)", "kk_Cyrl_KZ": "casaco (Cirílico, Kazakhstan)", "kk_KZ": "casaco (Kazakhstan)", "kl": "groenlandés", "kl_GL": "groenlandés (Grenlandia)", "km": "cambodiano", "km_KH": "cambodiano (Cambodia)", "kn": "kannada", "kn_IN": "kannada (India)", "ko": "coreano", "ko_KP": "coreano (Corea do Norte)", "ko_KR": "coreano (Corea do Sur)", "ks": "cachemir", "ks_Arab": "cachemir (Árabe)", "ks_Arab_IN": "cachemir (Árabe, India)", "ks_IN": "cachemir (India)", "kw": "córnico", "kw_GB": "córnico (Reino Unido)", "ky": "quirguiz", "ky_Cyrl": "quirguiz (Cirílico)", "ky_Cyrl_KG": "quirguiz (Cirílico, Quirguicistán)", "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 Africana Central)", "ln_CG": "lingala (Congo)", "lo": "laotiano", "lo_LA": "laotiano (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 (India)", "mn": "mongol", "mn_Cyrl": "mongol (Cirílico)", "mn_Cyrl_MN": "mongol (Cirílico, Mongolia)", "mn_MN": "mongol (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malaio", "ms_BN": "malaio (Brunei)", "ms_Latn": "malaio (Latino)", "ms_Latn_BN": "malaio (Latino, Brunei)", "ms_Latn_MY": "malaio (Latino, Malaisia)", "ms_Latn_SG": "malaio (Latino, Singapur)", "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í (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 (Surinam)", "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 (Quenia)", "or": "oriya", "or_IN": "oriya (India)", "os": "osetio", "os_GE": "osetio (Xeorxia)", "os_RU": "osetio (Rusia)", "pa": "punjabi", "pa_Arab": "punjabi (Árabe)", "pa_Arab_PK": "punjabi (Árabe, Paquistán)", "pa_Guru": "punjabi (Gurmukhi)", "pa_Guru_IN": "punjabi (Gurmukhi, India)", "pa_IN": "punjabi (India)", "pa_PK": "punjabi (Paquistán)", "pl": "polaco", "pl_PL": "polaco (Polonia)", "ps": "paxtún", "ps_AF": "paxtún (Afganistán)", "pt": "portugués", "pt_AO": "portugués (Angola)", "pt_BR": "portugués (Brasil)", "pt_CV": "portugués (Cabo Verde)", "pt_GW": "portugués (Guinea-Bissau)", "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 (Moldova)", "ro_RO": "romanés (Romanía)", "ru": "ruso", "ru_BY": "ruso (Bielorrusia)", "ru_KG": "ruso (Quirguicistán)", "ru_KZ": "ruso (Kazakhstan)", "ru_MD": "ruso (Moldova)", "ru_RU": "ruso (Rusia)", "ru_UA": "ruso (Ucraína)", "rw": "ruandés", "rw_RW": "ruandés (Ruanda)", "se": "sami do norte", "se_FI": "sami do norte (Finlandia)", "se_NO": "sami do norte (Noruega)", "se_SE": "sami do norte (Suecia)", "sg": "sango", "sg_CF": "sango (República Africana Central)", "sh": "serbocroata", "sh_BA": "serbocroata (Bosnia e 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í (Xibuti)", "so_ET": "somalí (Etiopía)", "so_KE": "somalí (Quenia)", "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 e Hercegovina)", "sr_Cyrl": "serbio (Cirílico)", "sr_Cyrl_BA": "serbio (Cirílico, Bosnia e 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 e 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": "swahili", "sw_KE": "swahili (Quenia)", "sw_TZ": "swahili (Tanzania)", "sw_UG": "swahili (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": "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_Arab": "uigur (Árabe)", "ug_Arab_CN": "uigur (Árabe, China)", "ug_CN": "uigur (China)", "uk": "ucraíno", "uk_UA": "ucraíno (Ucraína)", "ur": "urdú", "ur_IN": "urdú (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": "ioruba", "yo_BJ": "ioruba (Benin)", "yo_NG": "ioruba (Nixeria)", "zh": "chinés", "zh_CN": "chinés (China)", "zh_HK": "chinés (Hong Kong RAE de China)", "zh_Hans": "chinés (Simplificado)", "zh_Hans_CN": "chinés (Simplificado, 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ú (Sudáfrica)" } } src/Symfony/Component/Intl/Resources/data/locales/gu.json000066400000000000000000001107771266465517700240340ustar00rootroot00000000000000{ "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_Latn": "બામ્બારા (લેટિન)", "bm_Latn_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": "કતલાન (ઇટાલી)", "cs": "ચેક", "cs_CZ": "ચેક (ચેક રીપબ્લિક)", "cy": "વેલ્શ", "cy_GB": "વેલ્શ (યુનાઇટેડ કિંગડમ)", "da": "ડેનિશ", "da_DK": "ડેનિશ (ડેનમાર્ક)", "da_GL": "ડેનિશ (ગ્રીનલેન્ડ)", "de": "જર્મન", "de_AT": "જર્મન (ઑસ્ટ્રિયા)", "de_BE": "જર્મન (બેલ્જીયમ)", "de_CH": "જર્મન (સ્વિટ્ઝર્લૅન્ડ)", "de_DE": "જર્મન (જર્મની)", "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_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": "અંગ્રેજી (હોંગકોંગ SAR ચીન)", "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": "અંગ્રેજી (મકાઉ SAR ચીન)", "en_MP": "અંગ્રેજી (ઉત્તરીય મારિયાના આઇલેન્ડ્સ)", "en_MS": "અંગ્રેજી (મોંટસેરાત)", "en_MT": "અંગ્રેજી (માલ્ટા)", "en_MU": "અંગ્રેજી (મોરિશિયસ)", "en_MW": "અંગ્રેજી (માલાવી)", "en_MY": "અંગ્રેજી (મલેશિયા)", "en_NA": "અંગ્રેજી (નામિબિયા)", "en_NF": "અંગ્રેજી (નોરફૉક આઇલેન્ડ)", "en_NG": "અંગ્રેજી (નાઇજીરીયા)", "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_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_VC": "અંગ્રેજી (સેન્ટ વિન્સેન્ટ એન્ડ ગ્રેનેડીન્સ)", "en_VG": "અંગ્રેજી (બ્રિટિશ વર્જિન આઇલેન્ડ્સ)", "en_VI": "અંગ્રેજી (યુ.એસ વર્જિન આઇલેન્ડ્સ)", "en_VU": "અંગ્રેજી (વાનુઆતુ)", "en_WS": "અંગ્રેજી (સમોઆ)", "en_ZA": "અંગ્રેજી (દક્ષિણ આફ્રિકા)", "en_ZM": "અંગ્રેજી (ઝામ્બિયા)", "en_ZW": "અંગ્રેજી (ઝિમ્બાબ્વે)", "eo": "એસ્પેરાન્ટો", "es": "સ્પેનિશ", "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": "બાસ્ક (સ્પેન)", "fa": "ફારસી", "fa_AF": "ફારસી (અફઘાનિસ્તાન)", "fa_IR": "ફારસી (ઈરાન)", "ff": "ફુલાહ", "ff_CM": "ફુલાહ (કૅમરૂન)", "ff_GN": "ફુલાહ (ગિની)", "ff_MR": "ફુલાહ (મૌરિટાનિયા)", "ff_SN": "ફુલાહ (સેનેગલ)", "fi": "ફિનિશ", "fi_FI": "ફિનિશ (ફિનલેન્ડ)", "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": "ફ્રેન્ચ (મેયોટ)", "fy": "પશ્ચિમી ફ્રિશિયન", "fy_NL": "પશ્ચિમી ફ્રિશિયન (નેધરલેન્ડ)", "ga": "આઇરિશ", "ga_IE": "આઇરિશ (આયર્લેંડ)", "gd": "સ્કોટ્સ ગેલિક", "gd_GB": "સ્કોટ્સ ગેલિક (યુનાઇટેડ કિંગડમ)", "gl": "ગેલિશિયન", "gl_ES": "ગેલિશિયન (સ્પેન)", "gu": "ગુજરાતી", "gu_IN": "ગુજરાતી (ભારત)", "gv": "માંક્સ", "gv_IM": "માંક્સ (આઈલ ઓફ મૅન)", "ha": "હૌસા", "ha_GH": "હૌસા (ઘાના)", "ha_Latn": "હૌસા (લેટિન)", "ha_Latn_GH": "હૌસા (લેટિન, ઘાના)", "ha_Latn_NE": "હૌસા (લેટિન, નાઇજર)", "ha_Latn_NG": "હૌસા (લેટિન, નાઇજીરીયા)", "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_Cyrl": "કઝાખ (સિરિલિક)", "kk_Cyrl_KZ": "કઝાખ (સિરિલિક, કઝાકિસ્તાન)", "kk_KZ": "કઝાખ (કઝાકિસ્તાન)", "kl": "કલાલ્લિસુત", "kl_GL": "કલાલ્લિસુત (ગ્રીનલેન્ડ)", "km": "ખ્મેર", "km_KH": "ખ્મેર (કંબોડિયા)", "kn": "કન્નડ", "kn_IN": "કન્નડ (ભારત)", "ko": "કોરિયન", "ko_KP": "કોરિયન (ઉત્તર કોરિયા)", "ko_KR": "કોરિયન (દક્ષિણ કોરિયા)", "ks": "કાશ્મીરી", "ks_Arab": "કાશ્મીરી (અરબી)", "ks_Arab_IN": "કાશ્મીરી (અરબી, ભારત)", "ks_IN": "કાશ્મીરી (ભારત)", "kw": "કોર્નિશ", "kw_GB": "કોર્નિશ (યુનાઇટેડ કિંગડમ)", "ky": "કિર્ગીઝ", "ky_Cyrl": "કિર્ગીઝ (સિરિલિક)", "ky_Cyrl_KG": "કિર્ગીઝ (સિરિલિક, કિર્ગિઝ્સ્તાન)", "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_Cyrl": "મોંગોલિયન (સિરિલિક)", "mn_Cyrl_MN": "મોંગોલિયન (સિરિલિક, મંગોલિયા)", "mn_MN": "મોંગોલિયન (મંગોલિયા)", "mr": "મરાઠી", "mr_IN": "મરાઠી (ભારત)", "ms": "મલય", "ms_BN": "મલય (બ્રુનેઇ)", "ms_Latn": "મલય (લેટિન)", "ms_Latn_BN": "મલય (લેટિન, બ્રુનેઇ)", "ms_Latn_MY": "મલય (લેટિન, મલેશિયા)", "ms_Latn_SG": "મલય (લેટિન, સિંગાપુર)", "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_CV": "પોર્ટુગીઝ (કૅપ વર્ડે)", "pt_GW": "પોર્ટુગીઝ (ગિની-બિસાઉ)", "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_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_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": "ઉઝ્બેક (ઉઝ્બેકિસ્તાન)", "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": "ઝુલુ (દક્ષિણ આફ્રિકા)" } } src/Symfony/Component/Intl/Resources/data/locales/gv.json000066400000000000000000000001301266465517700240120ustar00rootroot00000000000000{ "Names": { "gv": "Gaelg", "gv_IM": "Gaelg (Ellan Vannin)" } } src/Symfony/Component/Intl/Resources/data/locales/ha.json000066400000000000000000000272751266465517700240110ustar00rootroot00000000000000{ "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_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_AU": "Turanci (Ostareliya)", "en_BB": "Turanci (Barbadas)", "en_BE": "Turanci (Belgiyom)", "en_BM": "Turanci (Barmuda)", "en_BS": "Turanci (Bahamas)", "en_BW": "Turanci (Baswana)", "en_BZ": "Turanci (Beliz)", "en_CA": "Turanci (Kanada)", "en_CK": "Turanci (Tsibiran Kuku)", "en_CM": "Turanci (Kamaru)", "en_DM": "Turanci (Dominika)", "en_ER": "Turanci (Eritireya)", "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_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_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_SG": "Turanci (Singapur)", "en_SH": "Turanci (San Helena)", "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_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_CV": "Harshen Portugal (Tsibiran Kap Barde)", "pt_GW": "Harshen Portugal (Gini Bisau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ha_GH.json000066400000000000000000000000401266465517700243440ustar00rootroot00000000000000{ "%%ALIAS": "ha_Latn_GH" } src/Symfony/Component/Intl/Resources/data/locales/ha_NE.json000066400000000000000000000000401266465517700243500ustar00rootroot00000000000000{ "%%ALIAS": "ha_Latn_NE" } src/Symfony/Component/Intl/Resources/data/locales/ha_NG.json000066400000000000000000000000401266465517700243520ustar00rootroot00000000000000{ "%%ALIAS": "ha_Latn_NG" } src/Symfony/Component/Intl/Resources/data/locales/he.json000066400000000000000000000655551266465517700240200ustar00rootroot00000000000000{ "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_Latn": "במבארה (לטיני)", "bm_Latn_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": "קטלאנית (איטליה)", "cs": "צ׳כית", "cs_CZ": "צ׳כית (צ׳כיה)", "cy": "ולשית", "cy_GB": "ולשית (הממלכה המאוחדת)", "da": "דנית", "da_DK": "דנית (דנמרק)", "da_GL": "דנית (גרינלנד)", "de": "גרמנית", "de_AT": "גרמנית (אוסטריה)", "de_BE": "גרמנית (בלגיה)", "de_CH": "גרמנית (שווייץ)", "de_DE": "גרמנית (גרמניה)", "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_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_MY": "אנגלית (מלזיה)", "en_NA": "אנגלית (נמיביה)", "en_NF": "אנגלית (איי נורפוק)", "en_NG": "אנגלית (ניגריה)", "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_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_VC": "אנגלית (סנט וינסנט והגרנדינים)", "en_VG": "אנגלית (איי הבתולה הבריטיים)", "en_VI": "אנגלית (איי הבתולה האמריקניים)", "en_VU": "אנגלית (ונואטו)", "en_WS": "אנגלית (סמואה)", "en_ZA": "אנגלית (דרום אפריקה)", "en_ZM": "אנגלית (זמביה)", "en_ZW": "אנגלית (זימבאבווה)", "eo": "אספרנטו", "es": "ספרדית", "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": "בסקית (ספרד)", "fa": "פרסית", "fa_AF": "פרסית (אפגניסטן)", "fa_IR": "פרסית (איראן)", "ff": "פולה", "ff_CM": "פולה (קמרון)", "ff_GN": "פולה (גיניאה)", "ff_MR": "פולה (מאוריטניה)", "ff_SN": "פולה (סנגל)", "fi": "פינית", "fi_FI": "פינית (פינלנד)", "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": "צרפתית (מאיוט)", "fy": "פריזית", "fy_NL": "פריזית (הולנד)", "ga": "אירית", "ga_IE": "אירית (אירלנד)", "gd": "גאלית סקוטית", "gd_GB": "גאלית סקוטית (הממלכה המאוחדת)", "gl": "גליציאנית", "gl_ES": "גליציאנית (ספרד)", "gu": "גוג׳ראטית", "gu_IN": "גוג׳ראטית (הודו)", "gv": "מאנית", "gv_IM": "מאנית (האי מאן)", "ha": "האוסה", "ha_GH": "האוסה (גאנה)", "ha_Latn": "האוסה (לטיני)", "ha_Latn_GH": "האוסה (לטיני, גאנה)", "ha_Latn_NE": "האוסה (לטיני, ניז׳ר)", "ha_Latn_NG": "האוסה (לטיני, ניגריה)", "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_Cyrl": "קזחית (קירילי)", "kk_Cyrl_KZ": "קזחית (קירילי, קזחסטן)", "kk_KZ": "קזחית (קזחסטן)", "kl": "קאלאליסוטית", "kl_GL": "קאלאליסוטית (גרינלנד)", "km": "קמרית", "km_KH": "קמרית (קמבודיה)", "kn": "קנאדה", "kn_IN": "קנאדה (הודו)", "ko": "קוריאנית", "ko_KP": "קוריאנית (קוריאה הצפונית)", "ko_KR": "קוריאנית (קוריאה הדרומית)", "ks": "קשמירית", "ks_Arab": "קשמירית (ערבי)", "ks_Arab_IN": "קשמירית (ערבי, הודו)", "ks_IN": "קשמירית (הודו)", "kw": "קורנית", "kw_GB": "קורנית (הממלכה המאוחדת)", "ky": "קירגיזית", "ky_Cyrl": "קירגיזית (קירילי)", "ky_Cyrl_KG": "קירגיזית (קירילי, קירגיזסטן)", "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_Cyrl": "מונגולית (קירילי)", "mn_Cyrl_MN": "מונגולית (קירילי, מונגוליה)", "mn_MN": "מונגולית (מונגוליה)", "mr": "מרטהי", "mr_IN": "מרטהי (הודו)", "ms": "מלאית", "ms_BN": "מלאית (ברוניי)", "ms_Latn": "מלאית (לטיני)", "ms_Latn_BN": "מלאית (לטיני, ברוניי)", "ms_Latn_MY": "מלאית (לטיני, מלזיה)", "ms_Latn_SG": "מלאית (לטיני, סינגפור)", "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_CV": "פורטוגלית (כף ורדה)", "pt_GW": "פורטוגלית (גיניאה-ביסאו)", "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_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_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": "אוזבקית (אוזבקיסטן)", "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": "זולו (דרום אפריקה)" } } src/Symfony/Component/Intl/Resources/data/locales/hi.json000066400000000000000000001122541266465517700240110ustar00rootroot00000000000000{ "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_Latn": "बाम्बारा (लैटिन)", "bm_Latn_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": "कातालान (इटली)", "cs": "चेक", "cs_CZ": "चेक (चेक गणराज्य)", "cy": "वेल्श", "cy_GB": "वेल्श (यूनाइटेड किंगडम)", "da": "डेनिश", "da_DK": "डेनिश (डेनमार्क)", "da_GL": "डेनिश (ग्रीनलैंड)", "de": "जर्मन", "de_AT": "जर्मन (ऑस्ट्रिया)", "de_BE": "जर्मन (बेल्जियम)", "de_CH": "जर्मन (स्विट्ज़रलैंड)", "de_DE": "जर्मन (जर्मनी)", "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_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_MY": "अंग्रेज़ी (मलेशिया)", "en_NA": "अंग्रेज़ी (नामीबिया)", "en_NF": "अंग्रेज़ी (नॉरफ़ॉक द्वीप)", "en_NG": "अंग्रेज़ी (नाइजीरिया)", "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_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_VC": "अंग्रेज़ी (सेंट विंसेंट और ग्रेनाडाइंस)", "en_VG": "अंग्रेज़ी (ब्रिटिश वर्जिन द्वीपसमूह)", "en_VI": "अंग्रेज़ी (यू.एस. वर्जिन द्वीपसमूह)", "en_VU": "अंग्रेज़ी (वनुआतू)", "en_WS": "अंग्रेज़ी (समोआ)", "en_ZA": "अंग्रेज़ी (दक्षिण अफ़्रीका)", "en_ZM": "अंग्रेज़ी (ज़ाम्बिया)", "en_ZW": "अंग्रेज़ी (ज़िम्बाब्वे)", "eo": "एस्पेरेंतो", "es": "स्पेनी", "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": "बास्क (स्पेन)", "fa": "फ़ारसी", "fa_AF": "फ़ारसी (अफ़गानिस्तान)", "fa_IR": "फ़ारसी (ईरान)", "ff": "फुलाह", "ff_CM": "फुलाह (कैमरून)", "ff_GN": "फुलाह (गिनी)", "ff_MR": "फुलाह (मॉरिटानिया)", "ff_SN": "फुलाह (सेनेगल)", "fi": "फ़िनिश", "fi_FI": "फ़िनिश (फ़िनलैंड)", "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": "फ़्रेंच (मायोते)", "fy": "पश्चिमी फ़्रिसियाई", "fy_NL": "पश्चिमी फ़्रिसियाई (नीदरलैंड)", "ga": "आइरिश", "ga_IE": "आइरिश (आयरलैंड)", "gd": "स्काट्स् गायेलिक्", "gd_GB": "स्काट्स् गायेलिक् (यूनाइटेड किंगडम)", "gl": "गैलिशियन", "gl_ES": "गैलिशियन (स्पेन)", "gu": "गुजराती", "gu_IN": "गुजराती (भारत)", "gv": "मैंक्स", "gv_IM": "मैंक्स (आइल ऑफ़ मैन)", "ha": "हौसा", "ha_GH": "हौसा (घाना)", "ha_Latn": "हौसा (लैटिन)", "ha_Latn_GH": "हौसा (लैटिन, घाना)", "ha_Latn_NE": "हौसा (लैटिन, नाइजर)", "ha_Latn_NG": "हौसा (लैटिन, नाइजीरिया)", "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_Cyrl": "कज़ाख़ (सिरिलिक)", "kk_Cyrl_KZ": "कज़ाख़ (सिरिलिक, कज़ाखस्तान)", "kk_KZ": "कज़ाख़ (कज़ाखस्तान)", "kl": "ग्रीनलैंडिक", "kl_GL": "ग्रीनलैंडिक (ग्रीनलैंड)", "km": "खमेर", "km_KH": "खमेर (कंबोडिया)", "kn": "कन्नड़", "kn_IN": "कन्नड़ (भारत)", "ko": "कोरियाई", "ko_KP": "कोरियाई (उत्तर कोरिया)", "ko_KR": "कोरियाई (दक्षिण कोरिया)", "ks": "कश्मीरी", "ks_Arab": "कश्मीरी (अरबी)", "ks_Arab_IN": "कश्मीरी (अरबी, भारत)", "ks_IN": "कश्मीरी (भारत)", "kw": "कोर्निश", "kw_GB": "कोर्निश (यूनाइटेड किंगडम)", "ky": "किर्गीज़", "ky_Cyrl": "किर्गीज़ (सिरिलिक)", "ky_Cyrl_KG": "किर्गीज़ (सिरिलिक, किर्गिज़स्तान)", "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_Cyrl": "मंगोलीयाई (सिरिलिक)", "mn_Cyrl_MN": "मंगोलीयाई (सिरिलिक, मंगोलिया)", "mn_MN": "मंगोलीयाई (मंगोलिया)", "mr": "मराठी", "mr_IN": "मराठी (भारत)", "ms": "मलय", "ms_BN": "मलय (ब्रूनेई)", "ms_Latn": "मलय (लैटिन)", "ms_Latn_BN": "मलय (लैटिन, ब्रूनेई)", "ms_Latn_MY": "मलय (लैटिन, मलेशिया)", "ms_Latn_SG": "मलय (लैटिन, सिंगापुर)", "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_CV": "पुर्तगाली (केप वर्ड)", "pt_GW": "पुर्तगाली (गिनी-बिसाउ)", "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_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_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": "उज़्बेक (उज़्बेकिस्तान)", "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": "ज़ुलू (दक्षिण अफ़्रीका)" } } src/Symfony/Component/Intl/Resources/data/locales/hr.json000066400000000000000000000540021266465517700240160ustar00rootroot00000000000000{ "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 (Mauritanija)", "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_Latn": "bambara (latinica)", "bm_Latn_ML": "bambara (latinica, 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 (Španjolska)", "ca_FR": "katalonski (Francuska)", "ca_IT": "katalonski (Italija)", "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_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 (Antigua i Barbuda)", "en_AI": "engleski (Angvila)", "en_AS": "engleski (Američka Samoa)", "en_AU": "engleski (Australija)", "en_BB": "engleski (Barbados)", "en_BE": "engleski (Belgija)", "en_BM": "engleski (Bermuda)", "en_BS": "engleski (Bahami)", "en_BW": "engleski (Bocvana)", "en_BZ": "engleski (Belize)", "en_CA": "engleski (Kanada)", "en_CC": "engleski (Kokosovi (Keeling) Otoci)", "en_CK": "engleski (Cookovi Otoci)", "en_CM": "engleski (Kamerun)", "en_CX": "engleski (Božićni Otok)", "en_DG": "engleski (Diego Garcia)", "en_DM": "engleski (Dominika)", "en_ER": "engleski (Eritreja)", "en_FJ": "engleski (Fidži)", "en_FK": "engleski (Falklandski Otoci)", "en_FM": "engleski (Mikronezija)", "en_GB": "engleski (Velika Britanija)", "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 (Hong Kong PUP Kina)", "en_IE": "engleski (Irska)", "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 (Makao PUP Kina)", "en_MP": "engleski (Sjeverni Marijanski 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_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_SG": "engleski (Singapur)", "en_SH": "engleski (Sveta Helena)", "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_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": "fulah", "ff_CM": "fulah (Kamerun)", "ff_GN": "fulah (Gvineja)", "ff_MR": "fulah (Mauritanija)", "ff_SN": "fulah (Senegal)", "fi": "finski", "fi_FI": "finski (Finska)", "fo": "ferojski", "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 (Sveti Bartolomej)", "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 Gvajana)", "fr_GN": "francuski (Gvineja)", "fr_GP": "francuski (Guadalupa)", "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 (Sveti Martin)", "fr_MG": "francuski (Madagaskar)", "fr_ML": "francuski (Mali)", "fr_MQ": "francuski (Martinique)", "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 (Wallis i Futuna)", "fr_YT": "francuski (Mayotte)", "fy": "zapadnofrizijski", "fy_NL": "zapadnofrizijski (Nizozemska)", "ga": "irski", "ga_IE": "irski (Irska)", "gd": "škotski-galski", "gd_GB": "škotski-galski (Velika Britanija)", "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_Latn": "hausa (latinica)", "ha_Latn_GH": "hausa (latinica, Gana)", "ha_Latn_NE": "hausa (latinica, Niger)", "ha_Latn_NG": "hausa (latinica, Nigerija)", "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_Cyrl": "kazaški (ćirilica)", "kk_Cyrl_KZ": "kazaški (ćirilica, Kazahstan)", "kk_KZ": "kazaški (Kazahstan)", "kl": "kalaallisut", "kl_GL": "kalaallisut (Grenland)", "km": "kmerski", "km_KH": "kmerski (Kambodža)", "kn": "kannadski", "kn_IN": "kannadski (Indija)", "ko": "korejski", "ko_KP": "korejski (Sjeverna Koreja)", "ko_KR": "korejski (Južna Koreja)", "ks": "kašmirski", "ks_Arab": "kašmirski (arapsko pismo)", "ks_Arab_IN": "kašmirski (arapsko pismo, Indija)", "ks_IN": "kašmirski (Indija)", "kw": "kornski", "kw_GB": "kornski (Velika Britanija)", "ky": "kirgiški", "ky_Cyrl": "kirgiški (ćirilica)", "ky_Cyrl_KG": "kirgiški (ćirilica, Kirgistan)", "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 (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_Cyrl": "mongolski (ćirilica)", "mn_Cyrl_MN": "mongolski (ćirilica, Mongolija)", "mn_MN": "mongolski (Mongolija)", "mr": "marathski", "mr_IN": "marathski (Indija)", "ms": "malajski", "ms_BN": "malajski (Brunej)", "ms_Latn": "malajski (latinica)", "ms_Latn_BN": "malajski (latinica, Brunej)", "ms_Latn_MY": "malajski (latinica, Malezija)", "ms_Latn_SG": "malajski (latinica, Singapur)", "ms_MY": "malajski (Malezija)", "ms_SG": "malajski (Singapur)", "mt": "malteški", "mt_MT": "malteški (Malta)", "my": "burmanski", "my_MM": "burmanski (Mijanmar (Burma))", "nb": "književni norveški", "nb_NO": "književni norveški (Norveška)", "nb_SJ": "književni norveški (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": "novonorveški", "nn_NO": "novonorveški (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štu", "ps_AF": "paštu (Afganistan)", "pt": "portugalski", "pt_AO": "portugalski (Angola)", "pt_BR": "portugalski (Brazil)", "pt_CV": "portugalski (Zelenortska Republika)", "pt_GW": "portugalski (Gvineja Bisau)", "pt_MO": "portugalski (Makao PUP Kina)", "pt_MZ": "portugalski (Mozambik)", "pt_PT": "portugalski (Portugal)", "pt_ST": "portugalski (Sveti Toma i Princip)", "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š (Š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": "južni sami", "se_FI": "južni sami (Finska)", "se_NO": "južni sami (Norveška)", "se_SE": "južni 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 (Otoci Aland)", "sv_FI": "švedski (Finska)", "sv_SE": "švedski (Švedska)", "sw": "svahili", "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 (Cipar)", "tr_TR": "turski (Turska)", "ug": "ujgurski", "ug_Arab": "ujgurski (arapsko pismo)", "ug_Arab_CN": "ujgurski (arapsko pismo, Kina)", "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": "joruba", "yo_BJ": "joruba (Benin)", "yo_NG": "joruba (Nigerija)", "zh": "kineski", "zh_CN": "kineski (Kina)", "zh_HK": "kineski (Hong Kong PUP Kina)", "zh_Hans": "kineski (pojednostavljeno pismo)", "zh_Hans_CN": "kineski (pojednostavljeno pismo, Kina)", "zh_Hans_HK": "kineski (pojednostavljeno pismo, Hong Kong PUP Kina)", "zh_Hans_MO": "kineski (pojednostavljeno pismo, Makao PUP Kina)", "zh_Hans_SG": "kineski (pojednostavljeno pismo, Singapur)", "zh_Hant": "kineski (tradicionalno pismo)", "zh_Hant_HK": "kineski (tradicionalno pismo, Hong Kong PUP Kina)", "zh_Hant_MO": "kineski (tradicionalno pismo, Makao PUP Kina)", "zh_Hant_TW": "kineski (tradicionalno pismo, Tajvan)", "zh_MO": "kineski (Makao PUP Kina)", "zh_SG": "kineski (Singapur)", "zh_TW": "kineski (Tajvan)", "zu": "zulu", "zu_ZA": "zulu (Južnoafrička Republika)" } } src/Symfony/Component/Intl/Resources/data/locales/hu.json000066400000000000000000000522231266465517700240240ustar00rootroot00000000000000{ "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 Emirátus)", "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": "belorusz", "be_BY": "belorusz (Fehéroroszország)", "bg": "bolgár", "bg_BG": "bolgár (Bulgária)", "bm": "bambara", "bm_Latn": "bambara (Latin)", "bm_Latn_ML": "bambara (Latin, Mali)", "bn": "bengáli", "bn_BD": "bengáli (Banglades)", "bn_IN": "bengáli (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)", "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_LI": "német (Liechtenstein)", "de_LU": "német (Luxemburg)", "dz": "butáni", "dz_BT": "butáni (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_AU": "angol (Ausztrália)", "en_BB": "angol (Barbados)", "en_BE": "angol (Belgium)", "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-szigetek)", "en_CK": "angol (Cook-szigetek)", "en_CM": "angol (Kamerun)", "en_CX": "angol (Karácsony-sziget)", "en_DG": "angol (Diego Garcia)", "en_DM": "angol (Dominika)", "en_ER": "angol (Eritrea)", "en_FJ": "angol (Fidzsi-szigetek)", "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 SAR Kína)", "en_IE": "angol (Írország)", "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 (Santa Lucia)", "en_LR": "angol (Libéria)", "en_LS": "angol (Lesotho)", "en_MG": "angol (Madagaszkár)", "en_MH": "angol (Marshall-szigetek)", "en_MO": "angol (Makaó SAR Kína)", "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_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_SG": "angol (Szingapúr)", "en_SH": "angol (Szent Ilona)", "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 (Amerikai Csendes-óceáni Szigetek)", "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_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_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 (Reunion)", "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-szigetek)", "fr_YT": "francia (Mayotte)", "fy": "fríz", "fy_NL": "fríz (Hollandia)", "ga": "ír", "ga_IE": "ír (Írország)", "gd": "skót gael", "gd_GB": "skót gael (Egyesült Királyság)", "gl": "galíciai", "gl_ES": "galíciai (Spanyolország)", "gu": "gudzsarati", "gu_IN": "gudzsarati (India)", "gv": "man-szigeti", "gv_IM": "man-szigeti (Man-sziget)", "ha": "hausza", "ha_GH": "hausza (Ghána)", "ha_Latn": "hausza (Latin)", "ha_Latn_GH": "hausza (Latin, Ghána)", "ha_Latn_NE": "hausza (Latin, Niger)", "ha_Latn_NG": "hausza (Latin, Nigéria)", "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_Cyrl": "kazah (Cirill)", "kk_Cyrl_KZ": "kazah (Cirill, Kazahsztán)", "kk_KZ": "kazah (Kazahsztán)", "kl": "grönlandi", "kl_GL": "grönlandi (Grönland)", "km": "kambodzsai", "km_KH": "kambodzsai (Kambodzsa)", "kn": "kannada", "kn_IN": "kannada (India)", "ko": "koreai", "ko_KP": "koreai (Észak-Korea)", "ko_KR": "koreai (Dél-Korea)", "ks": "kásmíri", "ks_Arab": "kásmíri (Arab)", "ks_Arab_IN": "kásmíri (Arab, India)", "ks_IN": "kásmíri (India)", "kw": "korni", "kw_GB": "korni (Egyesült Királyság)", "ky": "kirgiz", "ky_Cyrl": "kirgiz (Cirill)", "ky_Cyrl_KG": "kirgiz (Cirill, Kirgizisztán)", "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": "laoszi", "lo_LA": "laoszi (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": "málgas", "mg_MG": "málgas (Madagaszkár)", "mk": "macedón", "mk_MK": "macedón (Macedónia)", "ml": "malajálam", "ml_IN": "malajálam (India)", "mn": "mongol", "mn_Cyrl": "mongol (Cirill)", "mn_Cyrl_MN": "mongol (Cirill, Mongólia)", "mn_MN": "mongol (Mongólia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "maláj", "ms_BN": "maláj (Brunei)", "ms_Latn": "maláj (Latin)", "ms_Latn_BN": "maláj (Latin, Brunei)", "ms_Latn_MY": "maláj (Latin, Malajzia)", "ms_Latn_SG": "maláj (Latin, Szingapúr)", "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 bokmal", "nb_NO": "norvég bokmal (Norvégia)", "nb_SJ": "norvég bokmal (Spitzbergák és Jan Mayen-szigetek)", "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 nynorsk", "nn_NO": "norvég nynorsk (Norvégia)", "no": "norvég", "no_NO": "norvég (Norvégia)", "om": "oromói", "om_ET": "oromói (Etiópia)", "om_KE": "oromói (Kenya)", "or": "orija", "or_IN": "orija (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_CV": "portugál (Zöld-foki Köztársaság)", "pt_GW": "portugál (Guinea-Bissau)", "pt_MO": "portugál (Makaó SAR Kína)", "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éto-román", "rm_CH": "réto-romá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 (Fehéroroszország)", "ru_KG": "orosz (Kirgizisztán)", "ru_KZ": "orosz (Kazahsztán)", "ru_MD": "orosz (Moldova)", "ru_RU": "orosz (Oroszország)", "ru_UA": "orosz (Ukrajna)", "rw": "kiruanda", "rw_RW": "kiruanda (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áliai", "so_DJ": "szomáliai (Dzsibuti)", "so_ET": "szomáliai (Etiópia)", "so_KE": "szomáliai (Kenya)", "so_SO": "szomáliai (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_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": "tigrinja", "ti_ER": "tigrinja (Eritrea)", "ti_ET": "tigrinja (Etiópia)", "tl": "tagalog", "tl_PH": "tagalog (Fülöp-szigetek)", "to": "tonga", "to_TO": "tonga (Tonga)", "tr": "török", "tr_CY": "török (Ciprus)", "tr_TR": "török (Törökország)", "ug": "ujgur", "ug_Arab": "ujgur (Arab)", "ug_Arab_CN": "ujgur (Arab, Kína)", "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 SAR Kína)", "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 SAR Kína)", "zh_Hans_MO": "kínai (Egyszerűsített, Makaó SAR Kína)", "zh_Hans_SG": "kínai (Egyszerűsített, Szingapúr)", "zh_Hant": "kínai (Hagyományos)", "zh_Hant_HK": "kínai (Hagyományos, Hongkong SAR Kína)", "zh_Hant_MO": "kínai (Hagyományos, Makaó SAR Kína)", "zh_Hant_TW": "kínai (Hagyományos, Tajvan)", "zh_MO": "kínai (Makaó SAR Kína)", "zh_SG": "kínai (Szingapúr)", "zh_TW": "kínai (Tajvan)", "zu": "zulu", "zu_ZA": "zulu (Dél-afrikai Köztársaság)" } } src/Symfony/Component/Intl/Resources/data/locales/hy.json000066400000000000000000000757011266465517700240360ustar00rootroot00000000000000{ "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_Latn": "բամբարա (լատինական)", "bm_Latn_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": "կատալաներեն (Իտալիա)", "cs": "չեխերեն", "cs_CZ": "չեխերեն (Չեխիա)", "cy": "ուելսերեն", "cy_GB": "ուելսերեն (Միացյալ Թագավորություն)", "da": "դանիերեն", "da_DK": "դանիերեն (Դանիա)", "da_GL": "դանիերեն (Գրենլանդիա)", "de": "գերմաներեն", "de_AT": "գերմաներեն (Ավստրիա)", "de_BE": "գերմաներեն (Բելգիա)", "de_CH": "գերմաներեն (Շվեյցարիա)", "de_DE": "գերմաներեն (Գերմանիա)", "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_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_MY": "անգլերեն (Մալայզիա)", "en_NA": "անգլերեն (Նամիբիա)", "en_NF": "անգլերեն (Նորֆոլկ կղզի)", "en_NG": "անգլերեն (Նիգերիա)", "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_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_VC": "անգլերեն (Սենթ Վիսենտ և Գրենադիններ)", "en_VG": "անգլերեն (Բրիտանական Վիրջինյան կղզիներ)", "en_VI": "անգլերեն (Ամերիկյան Վիրջինյան կղզիներ)", "en_VU": "անգլերեն (Վանուատու)", "en_WS": "անգլերեն (Սամոա)", "en_ZA": "անգլերեն (Հարավաֆրիկյան Հանրապետություն)", "en_ZM": "անգլերեն (Զամբիա)", "en_ZW": "անգլերեն (Զիմբաբվե)", "eo": "էսպերանտո", "es": "իսպաներեն", "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": "բասկերեն (Իսպանիա)", "fa": "պարսկերեն", "fa_AF": "պարսկերեն (Աֆղանստան)", "fa_IR": "պարսկերեն (Իրան)", "fi": "ֆիններեն", "fi_FI": "ֆիններեն (Ֆինլանդիա)", "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": "ֆրանսերեն (Մայոտ)", "fy": "արևմտյան ֆրիզերեն", "fy_NL": "արևմտյան ֆրիզերեն (Նիդերլանդեր)", "ga": "իռլանդերեն", "ga_IE": "իռլանդերեն (Իռլանդիա)", "gl": "գալիսերեն", "gl_ES": "գալիսերեն (Իսպանիա)", "gu": "գուջարաթի", "gu_IN": "գուջարաթի (Հնդկաստան)", "gv": "մեներեն", "gv_IM": "մեներեն (Մեն կղզի)", "ha": "հաուսա", "ha_GH": "հաուսա (Գանա)", "ha_Latn": "հաուսա (լատինական)", "ha_Latn_GH": "հաուսա (լատինական, Գանա)", "ha_Latn_NE": "հաուսա (լատինական, Նիգեր)", "ha_Latn_NG": "հաուսա (լատինական, Նիգերիա)", "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_Cyrl": "ղազախերեն (կյուրեղագիր)", "kk_Cyrl_KZ": "ղազախերեն (կյուրեղագիր, Ղազախստան)", "kk_KZ": "ղազախերեն (Ղազախստան)", "kl": "կալաալիսուտ", "kl_GL": "կալաալիսուտ (Գրենլանդիա)", "km": "քմերերեն", "km_KH": "քմերերեն (Կամբոջա)", "kn": "կաննադա", "kn_IN": "կաննադա (Հնդկաստան)", "ko": "կորեերեն", "ko_KP": "կորեերեն (Հյուսիսային Կորեա)", "ko_KR": "կորեերեն (Հարավային Կորեա)", "ks": "քաշմիրերեն", "ks_Arab": "քաշմիրերեն (արաբական)", "ks_Arab_IN": "քաշմիրերեն (արաբական, Հնդկաստան)", "ks_IN": "քաշմիրերեն (Հնդկաստան)", "kw": "կոռներեն", "kw_GB": "կոռներեն (Միացյալ Թագավորություն)", "ky": "ղրղզերեն", "ky_Cyrl": "ղրղզերեն (կյուրեղագիր)", "ky_Cyrl_KG": "ղրղզերեն (կյուրեղագիր, Ղրղզստան)", "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_Cyrl": "մոնղոլերեն (կյուրեղագիր)", "mn_Cyrl_MN": "մոնղոլերեն (կյուրեղագիր, Մոնղոլիա)", "mn_MN": "մոնղոլերեն (Մոնղոլիա)", "mr": "մարաթի", "mr_IN": "մարաթի (Հնդկաստան)", "ms": "մալայերեն", "ms_BN": "մալայերեն (Բրունեյ)", "ms_Latn": "մալայերեն (լատինական)", "ms_Latn_BN": "մալայերեն (լատինական, Բրունեյ)", "ms_Latn_MY": "մալայերեն (լատինական, Մալայզիա)", "ms_Latn_SG": "մալայերեն (լատինական, Սինգապուր)", "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_CV": "պորտուգալերեն (Կաբո Վերդե)", "pt_GW": "պորտուգալերեն (Գվինեա-Բիսաու)", "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_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_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": "ուզբեկերեն (Ուզբեկստան)", "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": "զուլուսերեն (Հարավաֆրիկյան Հանրապետություն)" } } src/Symfony/Component/Intl/Resources/data/locales/id.json000066400000000000000000000510411266465517700240010ustar00rootroot00000000000000{ "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": "Azerbaijan", "az_AZ": "Azerbaijan (Azerbaijan)", "az_Cyrl": "Azerbaijan (Sirilik)", "az_Cyrl_AZ": "Azerbaijan (Sirilik, Azerbaijan)", "az_Latn": "Azerbaijan (Latin)", "az_Latn_AZ": "Azerbaijan (Latin, Azerbaijan)", "be": "Belarusia", "be_BY": "Belarusia (Belarus)", "bg": "Bulgar", "bg_BG": "Bulgar (Bulgaria)", "bm": "Bambara", "bm_Latn": "Bambara (Latin)", "bm_Latn_ML": "Bambara (Latin, Mali)", "bn": "Bengali", "bn_BD": "Bengali (Bangladesh)", "bn_IN": "Bengali (India)", "bo": "Tibet", "bo_CN": "Tibet (China)", "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)", "cs": "Cheska", "cs_CZ": "Cheska (Republik Cheska)", "cy": "Welsh", "cy_GB": "Welsh (Inggris)", "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_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_AU": "Inggris (Australia)", "en_BB": "Inggris (Barbados)", "en_BE": "Inggris (Belgia)", "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)", "en_CK": "Inggris (Kepulauan Cook)", "en_CM": "Inggris (Kamerun)", "en_CX": "Inggris (Pulau Christmas)", "en_DG": "Inggris (Diego Garcia)", "en_DM": "Inggris (Dominika)", "en_ER": "Inggris (Eritrea)", "en_FJ": "Inggris (Fiji)", "en_FK": "Inggris (Kepulauan Malvinas)", "en_FM": "Inggris (Mikronesia)", "en_GB": "Inggris (Inggris)", "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 China)", "en_IE": "Inggris (Irlandia)", "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 China)", "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_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_SG": "Inggris (Singapura)", "en_SH": "Inggris (Saint Helena)", "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_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": "Bask", "eu_ES": "Bask (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": "Faro", "fo_FO": "Faro (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 Barthelemy)", "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)", "gl": "Galisia", "gl_ES": "Galisia (Spanyol)", "gu": "Gujarati", "gu_IN": "Gujarati (India)", "gv": "Manx", "gv_IM": "Manx (Pulau Man)", "ha": "Hausa", "ha_GH": "Hausa (Ghana)", "ha_Latn": "Hausa (Latin)", "ha_Latn_GH": "Hausa (Latin, Ghana)", "ha_Latn_NE": "Hausa (Latin, Niger)", "ha_Latn_NG": "Hausa (Latin, Nigeria)", "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": "Bahasa Indonesia", "id_ID": "Bahasa Indonesia (Indonesia)", "ig": "Igbo", "ig_NG": "Igbo (Nigeria)", "ii": "Sichuan Yi", "ii_CN": "Sichuan Yi (China)", "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_Cyrl": "Kazakh (Sirilik)", "kk_Cyrl_KZ": "Kazakh (Sirilik, Kazakstan)", "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_Arab": "Kashmir (Arab)", "ks_Arab_IN": "Kashmir (Arab, India)", "ks_IN": "Kashmir (India)", "kw": "Kornish", "kw_GB": "Kornish (Inggris)", "ky": "Kirgiz", "ky_Cyrl": "Kirgiz (Sirilik)", "ky_Cyrl_KG": "Kirgiz (Sirilik, Kirgistan)", "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_Cyrl": "Mongolia (Sirilik)", "mn_Cyrl_MN": "Mongolia (Sirilik, Mongolia)", "mn_MN": "Mongolia (Mongolia)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Melayu", "ms_BN": "Melayu (Brunei)", "ms_Latn": "Melayu (Latin)", "ms_Latn_BN": "Melayu (Latin, Brunei)", "ms_Latn_MY": "Melayu (Latin, Malaysia)", "ms_Latn_SG": "Melayu (Latin, Singapura)", "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_CV": "Portugis (Tanjung Verde)", "pt_GW": "Portugis (Guinea-Bissau)", "pt_MO": "Portugis (Makau SAR China)", "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_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_Arab": "Uyghur (Arab)", "ug_Arab_CN": "Uyghur (Arab, China)", "ug_CN": "Uyghur (China)", "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": "China", "zh_CN": "China (China)", "zh_HK": "China (Hong Kong SAR China)", "zh_Hans": "China (Sederhana)", "zh_Hans_CN": "China (Sederhana, China)", "zh_Hans_HK": "China (Sederhana, Hong Kong SAR China)", "zh_Hans_MO": "China (Sederhana, Makau SAR China)", "zh_Hans_SG": "China (Sederhana, Singapura)", "zh_Hant": "China (Tradisional)", "zh_Hant_HK": "China (Tradisional, Hong Kong SAR China)", "zh_Hant_MO": "China (Tradisional, Makau SAR China)", "zh_Hant_TW": "China (Tradisional, Taiwan)", "zh_MO": "China (Makau SAR China)", "zh_SG": "China (Singapura)", "zh_TW": "China (Taiwan)", "zu": "Zulu", "zu_ZA": "Zulu (Afrika Selatan)" } } src/Symfony/Component/Intl/Resources/data/locales/ig.json000066400000000000000000000030741266465517700240070ustar00rootroot00000000000000{ "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" } } src/Symfony/Component/Intl/Resources/data/locales/ii.json000066400000000000000000000016741266465517700240150ustar00rootroot00000000000000{ "Names": { "de": "ꄓꇩꉙ", "de_DE": "ꄓꇩꉙ (ꄓꇩ)", "en": "ꑱꇩꉙ", "en_GB": "ꑱꇩꉙ (ꑱꇩ)", "en_IN": "ꑱꇩꉙ (ꑴꄗ)", "en_US": "ꑱꇩꉙ (ꂰꇩ)", "es": "ꑭꀠꑸꉙ", "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": "ꍏꇩꉙ (ꀎꋏꉌꈲꁱꂷ)" } } src/Symfony/Component/Intl/Resources/data/locales/in.json000066400000000000000000000000301266465517700240030ustar00rootroot00000000000000{ "%%ALIAS": "id" } src/Symfony/Component/Intl/Resources/data/locales/in_ID.json000066400000000000000000000000331266465517700243620ustar00rootroot00000000000000{ "%%ALIAS": "id_ID" } src/Symfony/Component/Intl/Resources/data/locales/is.json000066400000000000000000000541151266465517700240250ustar00rootroot00000000000000{ "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_Latn": "bambara (latneskt)", "bm_Latn_ML": "bambara (latneskt, 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)", "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_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_AU": "enska (Ástralía)", "en_BB": "enska (Barbados)", "en_BE": "enska (Belgía)", "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_CK": "enska (Cooks-eyjar)", "en_CM": "enska (Kamerún)", "en_CX": "enska (Jólaey)", "en_DG": "enska (Diego Garcia)", "en_DM": "enska (Dóminíka)", "en_ER": "enska (Erítrea)", "en_FJ": "enska (Fídjieyjar)", "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_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_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_SG": "enska (Singapúr)", "en_SH": "enska (Sankti Helena)", "en_SL": "enska (Síerra Leóne)", "en_SS": "enska (Suður-Súdan)", "en_SX": "enska (Sint Maarten)", "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_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_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 (Saint Barthélemy)", "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 (Saint 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_Latn": "hása (latneskt)", "ha_Latn_GH": "hása (latneskt, Gana)", "ha_Latn_NE": "hása (latneskt, Níger)", "ha_Latn_NG": "hása (latneskt, Nígería)", "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_Cyrl": "kasakska (kyrillískt)", "kk_Cyrl_KZ": "kasakska (kyrillískt, Kasakstan)", "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_Arab": "kasmírska (arabískt)", "ks_Arab_IN": "kasmírska (arabískt, Indland)", "ks_IN": "kasmírska (Indland)", "kw": "kornbreska", "kw_GB": "kornbreska (Bretland)", "ky": "kirgiska", "ky_Cyrl": "kirgiska (kyrillískt)", "ky_Cyrl_KG": "kirgiska (kyrillískt, Kirgistan)", "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_Cyrl": "mongólska (kyrillískt)", "mn_Cyrl_MN": "mongólska (kyrillískt, Mongólía)", "mn_MN": "mongólska (Mongólía)", "mr": "maratí", "mr_IN": "maratí (Indland)", "ms": "malaíska", "ms_BN": "malaíska (Brúnei)", "ms_Latn": "malaíska (latneskt)", "ms_Latn_BN": "malaíska (latneskt, Brúnei)", "ms_Latn_MY": "malaíska (latneskt, Malasía)", "ms_Latn_SG": "malaíska (latneskt, Singapúr)", "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 (Sint Maarten)", "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_CV": "portúgalska (Grænhöfðaeyjar)", "pt_GW": "portúgalska (Gínea-Bissá)", "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_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_Arab": "úígúr (arabískt)", "ug_Arab_CN": "úígúr (arabískt, Kína)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/it.json000066400000000000000000000520211266465517700240200ustar00rootroot00000000000000{ "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 (Sudan del Sud)", "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_Latn": "bambara (latino)", "bm_Latn_ML": "bambara (latino, 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-Erzegovina)", "bs_Cyrl": "bosniaco (cirillico)", "bs_Cyrl_BA": "bosniaco (cirillico, Bosnia-Erzegovina)", "bs_Latn": "bosniaco (latino)", "bs_Latn_BA": "bosniaco (latino, Bosnia-Erzegovina)", "ca": "catalano", "ca_AD": "catalano (Andorra)", "ca_ES": "catalano (Spagna)", "ca_FR": "catalano (Francia)", "ca_IT": "catalano (Italia)", "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_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_AU": "inglese (Australia)", "en_BB": "inglese (Barbados)", "en_BE": "inglese (Belgio)", "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)", "en_CK": "inglese (Isole Cook)", "en_CM": "inglese (Camerun)", "en_CX": "inglese (Isola di Christmas)", "en_DG": "inglese (Diego Garcia)", "en_DM": "inglese (Dominica)", "en_ER": "inglese (Eritrea)", "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_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 (Malesia)", "en_NA": "inglese (Namibia)", "en_NF": "inglese (Isola Norfolk)", "en_NG": "inglese (Nigeria)", "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 Solomon)", "en_SC": "inglese (Seychelles)", "en_SD": "inglese (Sudan)", "en_SG": "inglese (Singapore)", "en_SH": "inglese (Sant’Elena)", "en_SL": "inglese (Sierra Leone)", "en_SS": "inglese (Sudan del Sud)", "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 (Isole minori lontane dagli USA)", "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_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_FO": "faroese (Isole Faroe)", "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 (Guiana 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 (Réunion)", "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": "manx", "gv_IM": "manx (Isola di Man)", "ha": "hausa", "ha_GH": "hausa (Ghana)", "ha_Latn": "hausa (latino)", "ha_Latn_GH": "hausa (latino, Ghana)", "ha_Latn_NE": "hausa (latino, Niger)", "ha_Latn_NG": "hausa (latino, Nigeria)", "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-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_Cyrl": "kazako (cirillico)", "kk_Cyrl_KZ": "kazako (cirillico, Kazakistan)", "kk_KZ": "kazako (Kazakistan)", "kl": "kalaallisut", "kl_GL": "kalaallisut (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_Arab": "kashmiri (arabo)", "ks_Arab_IN": "kashmiri (arabo, India)", "ks_IN": "kashmiri (India)", "kw": "cornico", "kw_GB": "cornico (Regno Unito)", "ky": "chirghiso", "ky_Cyrl": "chirghiso (cirillico)", "ky_Cyrl_KG": "chirghiso (cirillico, Kirghizistan)", "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_Cyrl": "mongolo (cirillico)", "mn_Cyrl_MN": "mongolo (cirillico, Mongolia)", "mn_MN": "mongolo (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malese", "ms_BN": "malese (Brunei)", "ms_Latn": "malese (latino)", "ms_Latn_BN": "malese (latino, Brunei)", "ms_Latn_MY": "malese (latino, Malesia)", "ms_Latn_SG": "malese (latino, Singapore)", "ms_MY": "malese (Malesia)", "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 (Federazione Russa)", "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_CV": "portoghese (Capo Verde)", "pt_GW": "portoghese (Guinea-Bissau)", "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 Est)", "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 (Federazione Russa)", "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-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-Erzegovina)", "sr_Cyrl": "serbo (cirillico)", "sr_Cyrl_BA": "serbo (cirillico, Bosnia-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-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 Aland)", "sv_FI": "svedese (Finlandia)", "sv_SE": "svedese (Svezia)", "sw": "swahili", "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 (Malesia)", "ta_SG": "tamil (Singapore)", "te": "telugu", "te_IN": "telugu (India)", "th": "thai", "th_TH": "thai (Tailandia)", "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_Arab": "uiguro (arabo)", "ug_Arab_CN": "uiguro (arabo, Cina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/iw.json000066400000000000000000000000301266465517700240140ustar00rootroot00000000000000{ "%%ALIAS": "he" } src/Symfony/Component/Intl/Resources/data/locales/iw_IL.json000066400000000000000000000000331266465517700244030ustar00rootroot00000000000000{ "%%ALIAS": "he_IL" } src/Symfony/Component/Intl/Resources/data/locales/ja.json000066400000000000000000000700411266465517700240000ustar00rootroot00000000000000{ "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_Latn": "バンバラ語 (ラテン文字)", "bm_Latn_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": "カタロニア語 (イタリア)", "cs": "チェコ語", "cs_CZ": "チェコ語 (チェコ共和国)", "cy": "ウェールズ語", "cy_GB": "ウェールズ語 (イギリス)", "da": "デンマーク語", "da_DK": "デンマーク語 (デンマーク)", "da_GL": "デンマーク語 (グリーンランド)", "de": "ドイツ語", "de_AT": "ドイツ語 (オーストリア)", "de_BE": "ドイツ語 (ベルギー)", "de_CH": "ドイツ語 (スイス)", "de_DE": "ドイツ語 (ドイツ)", "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_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_MY": "英語 (マレーシア)", "en_NA": "英語 (ナミビア)", "en_NF": "英語 (ノーフォーク島)", "en_NG": "英語 (ナイジェリア)", "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_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_VC": "英語 (セントビンセント・グレナディーン諸島)", "en_VG": "英語 (英領ヴァージン諸島)", "en_VI": "英語 (米領ヴァージン諸島)", "en_VU": "英語 (バヌアツ)", "en_WS": "英語 (サモア)", "en_ZA": "英語 (南アフリカ)", "en_ZM": "英語 (ザンビア)", "en_ZW": "英語 (ジンバブエ)", "eo": "エスペラント語", "es": "スペイン語", "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": "バスク語 (スペイン)", "fa": "ペルシア語", "fa_AF": "ペルシア語 (アフガニスタン)", "fa_IR": "ペルシア語 (イラン)", "ff": "フラニ語", "ff_CM": "フラニ語 (カメルーン)", "ff_GN": "フラニ語 (ギニア)", "ff_MR": "フラニ語 (モーリタニア)", "ff_SN": "フラニ語 (セネガル)", "fi": "フィンランド語", "fi_FI": "フィンランド語 (フィンランド)", "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": "フランス語 (マヨット島)", "fy": "西フリジア語", "fy_NL": "西フリジア語 (オランダ)", "ga": "アイルランド語", "ga_IE": "アイルランド語 (アイルランド)", "gd": "スコットランド・ゲール語", "gd_GB": "スコットランド・ゲール語 (イギリス)", "gl": "ガリシア語", "gl_ES": "ガリシア語 (スペイン)", "gu": "グジャラート語", "gu_IN": "グジャラート語 (インド)", "gv": "マン島語", "gv_IM": "マン島語 (マン島)", "ha": "ハウサ語", "ha_GH": "ハウサ語 (ガーナ)", "ha_Latn": "ハウサ語 (ラテン文字)", "ha_Latn_GH": "ハウサ語 (ラテン文字, ガーナ)", "ha_Latn_NE": "ハウサ語 (ラテン文字, ニジェール)", "ha_Latn_NG": "ハウサ語 (ラテン文字, ナイジェリア)", "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_Cyrl": "カザフ語 (キリル文字)", "kk_Cyrl_KZ": "カザフ語 (キリル文字, カザフスタン)", "kk_KZ": "カザフ語 (カザフスタン)", "kl": "グリーンランド語", "kl_GL": "グリーンランド語 (グリーンランド)", "km": "クメール語", "km_KH": "クメール語 (カンボジア)", "kn": "カンナダ語", "kn_IN": "カンナダ語 (インド)", "ko": "韓国語", "ko_KP": "韓国語 (朝鮮民主主義人民共和国)", "ko_KR": "韓国語 (大韓民国)", "ks": "カシミール語", "ks_Arab": "カシミール語 (アラビア文字)", "ks_Arab_IN": "カシミール語 (アラビア文字, インド)", "ks_IN": "カシミール語 (インド)", "kw": "コーンウォール語", "kw_GB": "コーンウォール語 (イギリス)", "ky": "キルギス語", "ky_Cyrl": "キルギス語 (キリル文字)", "ky_Cyrl_KG": "キルギス語 (キリル文字, キルギス)", "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_Cyrl": "モンゴル語 (キリル文字)", "mn_Cyrl_MN": "モンゴル語 (キリル文字, モンゴル)", "mn_MN": "モンゴル語 (モンゴル)", "mr": "マラーティー語", "mr_IN": "マラーティー語 (インド)", "ms": "マレー語", "ms_BN": "マレー語 (ブルネイ)", "ms_Latn": "マレー語 (ラテン文字)", "ms_Latn_BN": "マレー語 (ラテン文字, ブルネイ)", "ms_Latn_MY": "マレー語 (ラテン文字, マレーシア)", "ms_Latn_SG": "マレー語 (ラテン文字, シンガポール)", "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_CV": "ポルトガル語 (カーボベルデ)", "pt_GW": "ポルトガル語 (ギニアビサウ)", "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_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_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": "ウズベク語 (ウズベキスタン)", "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": "ズールー語 (南アフリカ)" } } src/Symfony/Component/Intl/Resources/data/locales/ka.json000066400000000000000000001202441266465517700240020ustar00rootroot00000000000000{ "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_Latn": "ბამბარა (ლათინური)", "bm_Latn_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": "კატალანური (იტალია)", "cs": "ჩეხური", "cs_CZ": "ჩეხური (ჩეხეთის რესპუბლიკა)", "cy": "უელსური", "cy_GB": "უელსური (დიდი ბრიტანეთი)", "da": "დანიური", "da_DK": "დანიური (დანია)", "da_GL": "დანიური (გრენლანდია)", "de": "გერმანული", "de_AT": "გერმანული (ავსტრია)", "de_BE": "გერმანული (ბელგია)", "de_CH": "გერმანული (შვეიცარია)", "de_DE": "გერმანული (გერმანია)", "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_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_MY": "ინგლისური (მალაიზია)", "en_NA": "ინგლისური (ნამიბია)", "en_NF": "ინგლისური (ნორფოლკის კუნძული)", "en_NG": "ინგლისური (ნიგერია)", "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_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_VC": "ინგლისური (სენტ-ვინსენტი და გრენადინები)", "en_VG": "ინგლისური (ბრიტანეთის ვირჯინიის კუნძულები)", "en_VI": "ინგლისური (აშშ-ის ვირჯინიის კუნძულები)", "en_VU": "ინგლისური (ვანუატუ)", "en_WS": "ინგლისური (სამოა)", "en_ZA": "ინგლისური (სამხრეთ აფრიკა)", "en_ZM": "ინგლისური (ზამბია)", "en_ZW": "ინგლისური (ზიმბაბვე)", "eo": "ესპერანტო", "es": "ესპანური", "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": "ბასკური (ესპანეთი)", "fa": "სპარსული", "fa_AF": "სპარსული (ავღანეთი)", "fa_IR": "სპარსული (ირანი)", "fi": "ფინური", "fi_FI": "ფინური (ფინეთი)", "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": "ფრანგული (მაიოტა)", "fy": "დასავლეთფრიზიული", "fy_NL": "დასავლეთფრიზიული (ნიდერლანდები)", "ga": "ირლანდიური", "ga_IE": "ირლანდიური (ირლანდია)", "gd": "შოტლანდიური გელური", "gd_GB": "შოტლანდიური გელური (დიდი ბრიტანეთი)", "gl": "გალისიური", "gl_ES": "გალისიური (ესპანეთი)", "gu": "გუჯარათი", "gu_IN": "გუჯარათი (ინდოეთი)", "gv": "მენური", "gv_IM": "მენური (მენის კუნძული)", "ha": "ჰაუსა", "ha_GH": "ჰაუსა (განა)", "ha_Latn": "ჰაუსა (ლათინური)", "ha_Latn_GH": "ჰაუსა (ლათინური, განა)", "ha_Latn_NE": "ჰაუსა (ლათინური, ნიგერი)", "ha_Latn_NG": "ჰაუსა (ლათინური, ნიგერია)", "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_Cyrl": "ყაზახური (კირილიცა)", "kk_Cyrl_KZ": "ყაზახური (კირილიცა, ყაზახეთი)", "kk_KZ": "ყაზახური (ყაზახეთი)", "kl": "დასავლეთ გრენლანდიური", "kl_GL": "დასავლეთ გრენლანდიური (გრენლანდია)", "km": "ქმერული", "km_KH": "ქმერული (კამბოჯა)", "kn": "კანადა", "kn_IN": "კანადა (ინდოეთი)", "ko": "კორეული", "ko_KP": "კორეული (ჩრდილოეთი კორეა)", "ko_KR": "კორეული (სამხრეთი კორეა)", "ks": "ქაშმირული", "ks_Arab": "ქაშმირული (არაბული)", "ks_Arab_IN": "ქაშმირული (არაბული, ინდოეთი)", "ks_IN": "ქაშმირული (ინდოეთი)", "kw": "კორნული", "kw_GB": "კორნული (დიდი ბრიტანეთი)", "ky": "ყირგიზული", "ky_Cyrl": "ყირგიზული (კირილიცა)", "ky_Cyrl_KG": "ყირგიზული (კირილიცა, ყირგიზეთი)", "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_Cyrl": "მონღოლური (კირილიცა)", "mn_Cyrl_MN": "მონღოლური (კირილიცა, მონღოლეთი)", "mn_MN": "მონღოლური (მონღოლეთი)", "mr": "მარათჰი", "mr_IN": "მარათჰი (ინდოეთი)", "ms": "მალაიური", "ms_BN": "მალაიური (ბრუნეი)", "ms_Latn": "მალაიური (ლათინური)", "ms_Latn_BN": "მალაიური (ლათინური, ბრუნეი)", "ms_Latn_MY": "მალაიური (ლათინური, მალაიზია)", "ms_Latn_SG": "მალაიური (ლათინური, სინგაპური)", "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_CV": "პორტუგალიური (კაბო-ვერდე)", "pt_GW": "პორტუგალიური (გვინეა-ბისაუ)", "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_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_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": "უზბეკური (უზბეკეთი)", "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": "ზულუ (სამხრეთ აფრიკა)" } } src/Symfony/Component/Intl/Resources/data/locales/ki.json000066400000000000000000000273661266465517700240250ustar00rootroot00000000000000{ "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_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_AU": "Gĩthungũ (Australia)", "en_BB": "Gĩthungũ (Babadosi)", "en_BE": "Gĩthungũ (Ubelgiji)", "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_CK": "Gĩthungũ (Visiwa vya Cook)", "en_CM": "Gĩthungũ (Kameruni)", "en_DM": "Gĩthungũ (Dominika)", "en_ER": "Gĩthungũ (Eritrea)", "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_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_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_SG": "Gĩthungũ (Singapoo)", "en_SH": "Gĩthungũ (Santahelena)", "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_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_CV": "Kireno (Kepuvede)", "pt_GW": "Kireno (Ginebisau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/kk.json000066400000000000000000000772301266465517700240220ustar00rootroot00000000000000{ "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_Latn": "бамбара (латын жазуы)", "bm_Latn_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": "каталан (Италия)", "cs": "чех тілі", "cs_CZ": "чех тілі (Чех Республикасы)", "cy": "валлий", "cy_GB": "валлий (Бірікккен Корольдік)", "da": "дат", "da_DK": "дат (Дания)", "da_GL": "дат (Гренландия)", "de": "неміс тілі", "de_AT": "неміс тілі (Австрия)", "de_BE": "неміс тілі (Бельгия)", "de_CH": "неміс тілі (Швейцария)", "de_DE": "неміс тілі (Германия)", "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_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_MY": "ағылшын тілі (Малайзия)", "en_NA": "ағылшын тілі (Намибия)", "en_NF": "ағылшын тілі (Норфолк аралы)", "en_NG": "ағылшын тілі (Нигерия)", "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_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_VC": "ағылшын тілі (Сент-Винсент және Гренадиндер)", "en_VG": "ағылшын тілі (Британдық Виргин аралдары)", "en_VI": "ағылшын тілі (АҚШ-тың Виргин аралдары)", "en_VU": "ағылшын тілі (Вануату)", "en_WS": "ағылшын тілі (Самоа)", "en_ZA": "ағылшын тілі (Оңтүстік Африка республикасы)", "en_ZM": "ағылшын тілі (Замбия)", "en_ZW": "ағылшын тілі (Зимбабве)", "eo": "эсперанто", "es": "испан тілі", "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": "баск (Испания)", "fa": "парсы тілі", "fa_AF": "парсы тілі (Ауғанстан)", "fa_IR": "парсы тілі (Иран)", "fi": "фин", "fi_FI": "фин (Финляндия)", "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": "француз тілі (Майотта)", "fy": "батыс фриз", "fy_NL": "батыс фриз (Голландия)", "ga": "ирланд тілі", "ga_IE": "ирланд тілі (Ирландия)", "gl": "гали", "gl_ES": "гали (Испания)", "gu": "гуджарати", "gu_IN": "гуджарати (Үндістан)", "gv": "мэнс", "gv_IM": "мэнс (Мэн аралы)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латын жазуы)", "ha_Latn_GH": "хауса (латын жазуы, Гана)", "ha_Latn_NE": "хауса (латын жазуы, Нигер)", "ha_Latn_NG": "хауса (латын жазуы, Нигерия)", "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_Cyrl": "қазақ тілі (кирилл жазуы)", "kk_Cyrl_KZ": "қазақ тілі (кирилл жазуы, Қазақстан)", "kk_KZ": "қазақ тілі (Қазақстан)", "kl": "калаалисут", "kl_GL": "калаалисут (Гренландия)", "km": "кхмер", "km_KH": "кхмер (Камбоджа)", "kn": "каннада", "kn_IN": "каннада (Үндістан)", "ko": "кәріс тілі", "ko_KP": "кәріс тілі (Оңтүстік Корея)", "ko_KR": "кәріс тілі (Солтүстік Корея)", "ks": "кашмир тілі", "ks_Arab": "кашмир тілі (араб жазуы)", "ks_Arab_IN": "кашмир тілі (араб жазуы, Үндістан)", "ks_IN": "кашмир тілі (Үндістан)", "kw": "корниш", "kw_GB": "корниш (Бірікккен Корольдік)", "ky": "қырғыз тілі", "ky_Cyrl": "қырғыз тілі (кирилл жазуы)", "ky_Cyrl_KG": "қырғыз тілі (кирилл жазуы, Қырғызстан)", "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_Cyrl": "моңғол тілі (кирилл жазуы)", "mn_Cyrl_MN": "моңғол тілі (кирилл жазуы, Моңғолия)", "mn_MN": "моңғол тілі (Моңғолия)", "mr": "маратхи", "mr_IN": "маратхи (Үндістан)", "ms": "малай", "ms_BN": "малай (Бруней)", "ms_Latn": "малай (латын жазуы)", "ms_Latn_BN": "малай (латын жазуы, Бруней)", "ms_Latn_MY": "малай (латын жазуы, Малайзия)", "ms_Latn_SG": "малай (латын жазуы, Сингапур)", "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_CV": "португал тілі (Кабо-Верде)", "pt_GW": "португал тілі (Гвинея-Бисау)", "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_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_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": "өзбек (Өзбекстан)", "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": "зулу (Оңтүстік Африка республикасы)" } } src/Symfony/Component/Intl/Resources/data/locales/kk_KZ.json000066400000000000000000000000401266465517700244070ustar00rootroot00000000000000{ "%%ALIAS": "kk_Cyrl_KZ" } src/Symfony/Component/Intl/Resources/data/locales/kl.json000066400000000000000000000001501266465517700240060ustar00rootroot00000000000000{ "Names": { "kl": "kalaallisut", "kl_GL": "kalaallisut (Kalaallit Nunaat)" } } src/Symfony/Component/Intl/Resources/data/locales/km.json000066400000000000000000001115011266465517700240120ustar00rootroot00000000000000{ "Names": { "af": "អាហ្វ្រីកាអាន", "af_NA": "អាហ្វ្រីកាអាន (ណាមីប៊ី)", "af_ZA": "អាហ្វ្រីកាអាន (អាព្រិក​ភាគ​ខាង​ត្បូង)", "ak": "Akan", "ak_GH": "Akan (ហ្គាណា)", "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_Latn": "បាម្បារា (ឡាតាំង)", "bm_Latn_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": "កាតាឡាន (អ៊ីតាលី)", "cs": "ឆេក", "cs_CZ": "ឆេក (សាធារណរដ្ឋឆេក)", "cy": "វេល", "cy_GB": "វេល (ចក្រភព​អង់គ្លេស)", "da": "ដាណឺម៉ាក", "da_DK": "ដាណឺម៉ាក (ដាណឺម៉ាក)", "da_GL": "ដាណឺម៉ាក (ហ្គ្រោអង់ឡង់)", "de": "អាល្លឺម៉ង់", "de_AT": "អាល្លឺម៉ង់ (អូទ្រីស)", "de_BE": "អាល្លឺម៉ង់ (បែលហ្ស៉ិក)", "de_CH": "អាល្លឺម៉ង់ (ស្វីស)", "de_DE": "អាល្លឺម៉ង់ (អាល្លឺម៉ង់)", "de_LI": "អាល្លឺម៉ង់ (លិចទេនស្តែន)", "de_LU": "អាល្លឺម៉ង់ (លុចហ្សំបួរ)", "dz": "ភាសាប៊ូតាន", "dz_BT": "ភាសាប៊ូតាន (ប៊ូតាន)", "ee": "Ewe", "ee_GH": "Ewe (ហ្គាណា)", "ee_TG": "Ewe (តូហ្គូ)", "el": "ក្រិច", "el_CY": "ក្រិច (ស៉ីពរ៍)", "el_GR": "ក្រិច (ក្រិច)", "en": "អង់គ្លេស", "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_MY": "អង់គ្លេស (ម៉ាឡេស៊ី)", "en_NA": "អង់គ្លេស (ណាមីប៊ី)", "en_NF": "អង់គ្លេស (កោះ​ណ័រហ្វក់)", "en_NG": "អង់គ្លេស (នីហ្សេរីយ៉ា)", "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_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_VC": "អង់គ្លេស (សាំង​វីនសេន និង​ឌឹ​ហ្គ្រីណាឌីនីស)", "en_VG": "អង់គ្លេស (កោះ​វឺជិន​ចក្រភព​អង់គ្លេស)", "en_VI": "អង់គ្លេស (កោះ​វឺជីន​អាមេរិក)", "en_VU": "អង់គ្លេស (វ៉ាន់ណៅទូ)", "en_WS": "អង់គ្លេស (សាមូអា)", "en_ZA": "អង់គ្លេស (អាព្រិក​ភាគ​ខាង​ត្បូង)", "en_ZM": "អង់គ្លេស (ហ្សាំប៊ី)", "en_ZW": "អង់គ្លេស (ហ្ស៊ីមបាបវ៉េ)", "eo": "អេស្ពេរ៉ាន់តូ", "es": "អេស្ប៉ាញ", "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": "បាស្កេ (អេស្ប៉ាញ)", "fa": "ភឺសៀន", "fa_AF": "ភឺសៀន (អាហ្វហ្គានីស្ថាន)", "fa_IR": "ភឺសៀន (អ៊ីរ៉ង់)", "fi": "ហ្វាំងឡង់", "fi_FI": "ហ្វាំងឡង់ (ហ្វាំងឡង់)", "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": "បារាំង (ម៉ាយុត)", "fy": "ហ្វ្រីស៊ានខាងលិច", "fy_NL": "ហ្វ្រីស៊ានខាងលិច (ហុល្លង់)", "ga": "អៀរឡង់", "ga_IE": "អៀរឡង់ (អៀរឡង់)", "gd": "ភាសាហ្កែលិគ (gd)", "gd_GB": "ភាសាហ្កែលិគ (ចក្រភព​អង់គ្លេស)", "gl": "ហ្គាលីស្យាន", "gl_ES": "ហ្គាលីស្យាន (អេស្ប៉ាញ)", "gu": "ហ្កុយ៉ារាទី", "gu_IN": "ហ្កុយ៉ារាទី (ឥណ្ឌា)", "gv": "Manx", "gv_IM": "Manx (អែលអុហ្វមែន)", "ha": "ហូសា", "ha_GH": "ហូសា (ហ្គាណា)", "ha_Latn": "ហូសា (ឡាតាំង)", "ha_Latn_GH": "ហូសា (ឡាតាំង, ហ្គាណា)", "ha_Latn_NE": "ហូសា (ឡាតាំង, នីហ្សេរ)", "ha_Latn_NG": "ហូសា (ឡាតាំង, នីហ្សេរីយ៉ា)", "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": "Sichuan Yi", "ii_CN": "Sichuan Yi (ចិន)", "is": "អ៊ីស្លង់", "is_IS": "អ៊ីស្លង់ (អ៊ីស្លង់)", "it": "អ៊ីតាលី", "it_CH": "អ៊ីតាលី (ស្វីស)", "it_IT": "អ៊ីតាលី (អ៊ីតាលី)", "it_SM": "អ៊ីតាលី (សាន​ម៉ារីណូ)", "ja": "ជប៉ុន", "ja_JP": "ជប៉ុន (ជប៉ុន)", "ka": "ហ្សក​ហ្ស៊ី", "ka_GE": "ហ្សក​ហ្ស៊ី (ហ្សកហ្ស៉ី)", "ki": "Kikuyu", "ki_KE": "Kikuyu (កេនយ៉ា)", "kk": "កាហ្សាក់ស្តង់់", "kk_Cyrl": "កាហ្សាក់ស្តង់់ (ស៊ីរី)", "kk_Cyrl_KZ": "កាហ្សាក់ស្តង់់ (ស៊ីរី, កាហ្សាក់ស្តាង់់)", "kk_KZ": "កាហ្សាក់ស្តង់់ (កាហ្សាក់ស្តាង់់)", "kl": "Kalaallisut", "kl_GL": "Kalaallisut (ហ្គ្រោអង់ឡង់)", "km": "ខ្មែរ", "km_KH": "ខ្មែរ (កម្ពុជា)", "kn": "កន្នដ", "kn_IN": "កន្នដ (ឥណ្ឌា)", "ko": "កូរ៉េ", "ko_KP": "កូរ៉េ (កូរ៉េ​ខាង​ជើង)", "ko_KR": "កូរ៉េ (កូរ៉េ​ខាង​ត្បូង)", "ks": "កាស្មៀរ", "ks_Arab": "កាស្មៀរ (អារ៉ាប់)", "ks_Arab_IN": "កាស្មៀរ (អារ៉ាប់, ឥណ្ឌា)", "ks_IN": "កាស្មៀរ (ឥណ្ឌា)", "kw": "Cornish", "kw_GB": "Cornish (ចក្រភព​អង់គ្លេស)", "ky": "គៀរហ្គីស្តង់", "ky_Cyrl": "គៀរហ្គីស្តង់ (ស៊ីរី)", "ky_Cyrl_KG": "គៀរហ្គីស្តង់ (ស៊ីរី, គៀរហ្គីស្តង់)", "ky_KG": "គៀរហ្គីស្តង់ (គៀរហ្គីស្តង់)", "lb": "លុចហ្សំបួរ", "lb_LU": "លុចហ្សំបួរ (លុចហ្សំបួរ)", "lg": "Ganda", "lg_UG": "Ganda (អ៊ូហ្កង់ដា)", "ln": "លីនកាឡា", "ln_AO": "លីនកាឡា (អង់ហ្គោឡា)", "ln_CD": "លីនកាឡា (កុងហ្គោ- គីនស្ហាសា)", "ln_CF": "លីនកាឡា (សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល)", "ln_CG": "លីនកាឡា (កុងហ្គោ - ប្រាហ្សាវីល)", "lo": "ឡាវ", "lo_LA": "ឡាវ (ឡាវ)", "lt": "លីទុយអានី", "lt_LT": "លីទុយអានី (លីទុយអានី)", "lu": "Luba-Katanga", "lu_CD": "Luba-Katanga (កុងហ្គោ- គីនស្ហាសា)", "lv": "ឡាតវីយ៉ា", "lv_LV": "ឡាតវីយ៉ា (ឡាតវីយ៉ា)", "mg": "ម៉ាឡាហ្គាស៊ី", "mg_MG": "ម៉ាឡាហ្គាស៊ី (ម៉ាដាហ្កាស្ការ)", "mk": "ម៉ាសេដូនី", "mk_MK": "ម៉ាសេដូនី (ម៉ាសេដន)", "ml": "មលយាល័ម", "ml_IN": "មលយាល័ម (ឥណ្ឌា)", "mn": "ម៉ុងហ្គោលី", "mn_Cyrl": "ម៉ុងហ្គោលី (ស៊ីរី)", "mn_Cyrl_MN": "ម៉ុងហ្គោលី (ស៊ីរី, ម៉ុងហ្គោលី)", "mn_MN": "ម៉ុងហ្គោលី (ម៉ុងហ្គោលី)", "mr": "មរាធិ", "mr_IN": "មរាធិ (ឥណ្ឌា)", "ms": "ម៉ាឡេស៊ី", "ms_BN": "ម៉ាឡេស៊ី (ព្រុយណេ)", "ms_Latn": "ម៉ាឡេស៊ី (ឡាតាំង)", "ms_Latn_BN": "ម៉ាឡេស៊ី (ឡាតាំង, ព្រុយណេ)", "ms_Latn_MY": "ម៉ាឡេស៊ី (ឡាតាំង, ម៉ាឡេស៊ី)", "ms_Latn_SG": "ម៉ាឡេស៊ី (ឡាតាំង, សិង្ហបុរី)", "ms_MY": "ម៉ាឡេស៊ី (ម៉ាឡេស៊ី)", "ms_SG": "ម៉ាឡេស៊ី (សិង្ហបុរី)", "mt": "ម៉ាល់តា", "mt_MT": "ម៉ាល់តា (ម៉ាល់តា)", "my": "ភូមា", "my_MM": "ភូមា (មីយ៉ាន់ម៉ា (ភូមា))", "nb": "ន័រវែស បុកម៉ាល់", "nb_NO": "ន័រវែស បុកម៉ាល់ (ន័រវែស)", "nb_SJ": "ន័រវែស បុកម៉ាល់ (ស្វាប៊ឺត និង​ហ្យង់ម៉ាយេន)", "nd": "North Ndebele", "nd_ZW": "North Ndebele (ហ្ស៊ីមបាបវ៉េ)", "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": "Oromo", "om_ET": "Oromo (អេត្យូពី)", "om_KE": "Oromo (កេនយ៉ា)", "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": "ព័រទុយហ្កាល់ (ទីម័រ)", "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": "Kinyarwanda", "rw_RW": "Kinyarwanda (រវ៉ាន់ដា)", "se": "Sami ភាគ​ខាង​ជើង", "se_FI": "Sami ភាគ​ខាង​ជើង (ហ្វាំងឡង់)", "se_NO": "Sami ភាគ​ខាង​ជើង (ន័រវែស)", "se_SE": "Sami ភាគ​ខាង​ជើង (ស៊ុយអែដ)", "sg": "Sango", "sg_CF": "Sango (សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល)", "si": "ស្រីលង្កា", "si_LK": "ស្រីលង្កា (ស្រីលង្កា)", "sk": "ស្លូវ៉ាគី", "sk_SK": "ស្លូវ៉ាគី (ស្លូវ៉ាគី)", "sl": "ស្លូវ៉ានី", "sl_SI": "ស្លូវ៉ានី (ស្លូវេនី)", "sn": "Shona", "sn_ZW": "Shona (ហ្ស៊ីមបាបវ៉េ)", "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_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_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": "អ៊ូហ្សបេគីស្តង់ (អ៊ូហ្សបេគីស្តង់)", "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": "សូលូ (អាព្រិក​ភាគ​ខាង​ត្បូង)" } } src/Symfony/Component/Intl/Resources/data/locales/kn.json000066400000000000000000001155261266465517700240260ustar00rootroot00000000000000{ "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_Latn": "ಬಂಬಾರಾ (ಲ್ಯಾಟಿನ್)", "bm_Latn_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": "ಕೆಟಲಾನ್ (ಇಟಲಿ)", "cs": "ಜೆಕ್", "cs_CZ": "ಜೆಕ್ (ಚೆಕ್ ರಿಪಬ್ಲಿಕ್)", "cy": "ವೆಲ್ಶ್", "cy_GB": "ವೆಲ್ಶ್ (ಬ್ರಿಟನ್\/ಇಂಗ್ಲೆಂಡ್)", "da": "ಡ್ಯಾನಿಶ್", "da_DK": "ಡ್ಯಾನಿಶ್ (ಡೆನ್ಮಾರ್ಕ್)", "da_GL": "ಡ್ಯಾನಿಶ್ (ಗ್ರೀನ್‌ಲ್ಯಾಂಡ್)", "de": "ಜರ್ಮನ್", "de_AT": "ಜರ್ಮನ್ (ಆಸ್ಟ್ರಿಯಾ)", "de_BE": "ಜರ್ಮನ್ (ಬೆಲ್ಜಿಯಮ್)", "de_CH": "ಜರ್ಮನ್ (ಸ್ವಿಟ್ಜರ್ಲ್ಯಾಂಡ್)", "de_DE": "ಜರ್ಮನ್ (ಜರ್ಮನಿ)", "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_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": "ಇಂಗ್ಲೀಷ್ (ಹಾಂಕ್‌ ಕಾಂಗ್ SAR ಚೈನಾ)", "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": "ಇಂಗ್ಲೀಷ್ (ಮಖಾವ್ (SAR) ಚೈನಾ)", "en_MP": "ಇಂಗ್ಲೀಷ್ (ಉತ್ತರ ಮರಿಯಾನಾ ದ್ವೀಪಗಳು)", "en_MS": "ಇಂಗ್ಲೀಷ್ (ಮಾಂಟ್‌ಸೆರೇಟ್)", "en_MT": "ಇಂಗ್ಲೀಷ್ (ಮಾಲ್ಟಾ)", "en_MU": "ಇಂಗ್ಲೀಷ್ (ಮಾರಿಶಿಯಸ್)", "en_MW": "ಇಂಗ್ಲೀಷ್ (ಮಲಾವಿ)", "en_MY": "ಇಂಗ್ಲೀಷ್ (ಮಲೇಶಿಯಾ)", "en_NA": "ಇಂಗ್ಲೀಷ್ (ನಮೀಬಿಯಾ)", "en_NF": "ಇಂಗ್ಲೀಷ್ (ನಾರ್ಫೋಕ್ ದ್ವೀಪ)", "en_NG": "ಇಂಗ್ಲೀಷ್ (ನೈಜೀರಿಯಾ)", "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_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_VC": "ಇಂಗ್ಲೀಷ್ (ಸೇಂಟ್. ವಿನ್ಸೆಂಟ್ ಮತ್ತು ಗ್ರೆನೆಡೈನ್ಸ್)", "en_VG": "ಇಂಗ್ಲೀಷ್ (ಬ್ರಿಟಿಷ್ ವರ್ಜಿನ್ ದ್ವೀಪಗಳು)", "en_VI": "ಇಂಗ್ಲೀಷ್ (ಯು.ಎಸ್. ವರ್ಜಿನ್ ದ್ವೀಪಗಳು)", "en_VU": "ಇಂಗ್ಲೀಷ್ (ವನೌಟು)", "en_WS": "ಇಂಗ್ಲೀಷ್ (ಸಮೋವಾ)", "en_ZA": "ಇಂಗ್ಲೀಷ್ (ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ)", "en_ZM": "ಇಂಗ್ಲೀಷ್ (ಝಾಂಬಿಯಾ)", "en_ZW": "ಇಂಗ್ಲೀಷ್ (ಜಿಂಬಾಬ್ವೆ)", "eo": "ಎಸ್ಪೆರಾಂಟೊ", "es": "ಸ್ಪ್ಯಾನಿಷ್", "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": "ಬಾಸ್ಕ್ (ಸ್ಪೇನ್)", "fa": "ಪರ್ಶಿಯನ್", "fa_AF": "ಪರ್ಶಿಯನ್ (ಅಫಘಾನಿಸ್ಥಾನ್)", "fa_IR": "ಪರ್ಶಿಯನ್ (ಇರಾನ್)", "ff": "ಫುಲಾಹ್", "ff_CM": "ಫುಲಾಹ್ (ಕ್ಯಾಮರೋನ್)", "ff_GN": "ಫುಲಾಹ್ (ಗಿನಿ)", "ff_MR": "ಫುಲಾಹ್ (ಮಾರಿಟೇನಿಯಾ)", "ff_SN": "ಫುಲಾಹ್ (ಸೆನೆಗಲ್)", "fi": "ಫಿನ್ನಿಶ್", "fi_FI": "ಫಿನ್ನಿಶ್ (ಫಿನ್‌ಲ್ಯಾಂಡ್)", "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": "ಫ್ರೆಂಚ್ (ಮಯೊಟ್ಟೆ)", "fy": "ಪಶ್ಚಿಮ ಫ್ರಿಸಿಯನ್", "fy_NL": "ಪಶ್ಚಿಮ ಫ್ರಿಸಿಯನ್ (ನೆದರ್‌ಲ್ಯಾಂಡ್ಸ್)", "ga": "ಐರಿಷ್", "ga_IE": "ಐರಿಷ್ (ಐರ್ಲೆಂಡ್)", "gd": "ಸ್ಕಾಟಿಶ್ ಗ್ಯಾಲಿಕ್", "gd_GB": "ಸ್ಕಾಟಿಶ್ ಗ್ಯಾಲಿಕ್ (ಬ್ರಿಟನ್\/ಇಂಗ್ಲೆಂಡ್)", "gl": "ಗ್ಯಾಲಿಶಿಯನ್", "gl_ES": "ಗ್ಯಾಲಿಶಿಯನ್ (ಸ್ಪೇನ್)", "gu": "ಗುಜರಾತಿ", "gu_IN": "ಗುಜರಾತಿ (ಭಾರತ)", "gv": "ಮ್ಯಾಂಕ್ಸ್", "gv_IM": "ಮ್ಯಾಂಕ್ಸ್ (ಐಲ್ ಆಫ್ ಮ್ಯಾನ್)", "ha": "ಹೌಸಾ", "ha_GH": "ಹೌಸಾ (ಘಾನಾ)", "ha_Latn": "ಹೌಸಾ (ಲ್ಯಾಟಿನ್)", "ha_Latn_GH": "ಹೌಸಾ (ಲ್ಯಾಟಿನ್, ಘಾನಾ)", "ha_Latn_NE": "ಹೌಸಾ (ಲ್ಯಾಟಿನ್, ನೈಜರ್)", "ha_Latn_NG": "ಹೌಸಾ (ಲ್ಯಾಟಿನ್, ನೈಜೀರಿಯಾ)", "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_Cyrl": "ಕಝಕ್ (ಸಿರಿಲಿಕ್)", "kk_Cyrl_KZ": "ಕಝಕ್ (ಸಿರಿಲಿಕ್, ಕಝಾಕಿಸ್ಥಾನ್)", "kk_KZ": "ಕಝಕ್ (ಕಝಾಕಿಸ್ಥಾನ್)", "kl": "ಕಲಾಲ್ಲಿಸುಟ್", "kl_GL": "ಕಲಾಲ್ಲಿಸುಟ್ (ಗ್ರೀನ್‌ಲ್ಯಾಂಡ್)", "km": "ಖಮೇರ್", "km_KH": "ಖಮೇರ್ (ಕಾಂಬೋಡಿಯಾ)", "kn": "ಕನ್ನಡ", "kn_IN": "ಕನ್ನಡ (ಭಾರತ)", "ko": "ಕೊರಿಯನ್", "ko_KP": "ಕೊರಿಯನ್ (ಉತ್ತರ ಕೋರಿಯಾ)", "ko_KR": "ಕೊರಿಯನ್ (ದಕ್ಷಿಣ ಕೋರಿಯಾ)", "ks": "ಕಾಶ್ಮೀರಿ", "ks_Arab": "ಕಾಶ್ಮೀರಿ (ಅರೇಬಿಕ್)", "ks_Arab_IN": "ಕಾಶ್ಮೀರಿ (ಅರೇಬಿಕ್, ಭಾರತ)", "ks_IN": "ಕಾಶ್ಮೀರಿ (ಭಾರತ)", "kw": "ಕೋರ್ನಿಷ್", "kw_GB": "ಕೋರ್ನಿಷ್ (ಬ್ರಿಟನ್\/ಇಂಗ್ಲೆಂಡ್)", "ky": "ಕಿರ್ಗಿಜ್", "ky_Cyrl": "ಕಿರ್ಗಿಜ್ (ಸಿರಿಲಿಕ್)", "ky_Cyrl_KG": "ಕಿರ್ಗಿಜ್ (ಸಿರಿಲಿಕ್, ಕಿರ್ಗಿಸ್ಥಾನ್)", "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_Cyrl": "ಮಂಗೋಲಿಯನ್ (ಸಿರಿಲಿಕ್)", "mn_Cyrl_MN": "ಮಂಗೋಲಿಯನ್ (ಸಿರಿಲಿಕ್, ಮೊಂಗೋಲಿಯಾ)", "mn_MN": "ಮಂಗೋಲಿಯನ್ (ಮೊಂಗೋಲಿಯಾ)", "mr": "ಮರಾಠಿ", "mr_IN": "ಮರಾಠಿ (ಭಾರತ)", "ms": "ಮಲಯ್", "ms_BN": "ಮಲಯ್ (ಬ್ರೂನಿ)", "ms_Latn": "ಮಲಯ್ (ಲ್ಯಾಟಿನ್)", "ms_Latn_BN": "ಮಲಯ್ (ಲ್ಯಾಟಿನ್, ಬ್ರೂನಿ)", "ms_Latn_MY": "ಮಲಯ್ (ಲ್ಯಾಟಿನ್, ಮಲೇಶಿಯಾ)", "ms_Latn_SG": "ಮಲಯ್ (ಲ್ಯಾಟಿನ್, ಸಿಂಗಾಪುರ್)", "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_CV": "ಪೋರ್ಚುಗೀಸ್ (ಕೇಪ್ ವರ್ಡೆ)", "pt_GW": "ಪೋರ್ಚುಗೀಸ್ (ಗಿನಿ-ಬಿಸ್ಸಾವ್)", "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_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_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": "ಉಜ್ಬೇಕ್ (ಉಜ್ಬೇಕಿಸ್ಥಾನ್)", "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": "ಜುಲು (ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ)" } } src/Symfony/Component/Intl/Resources/data/locales/ko.json000066400000000000000000000622071266465517700240240ustar00rootroot00000000000000{ "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_Latn": "밤바라어 (로마자)", "bm_Latn_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": "카탈로니아어 (이탈리아)", "cs": "체코어", "cs_CZ": "체코어 (체코)", "cy": "웨일스어", "cy_GB": "웨일스어 (영국)", "da": "덴마크어", "da_DK": "덴마크어 (덴마크)", "da_GL": "덴마크어 (그린란드)", "de": "독일어", "de_AT": "독일어 (오스트리아)", "de_BE": "독일어 (벨기에)", "de_CH": "독일어 (스위스)", "de_DE": "독일어 (독일)", "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_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_MY": "영어 (말레이시아)", "en_NA": "영어 (나미비아)", "en_NF": "영어 (노퍽섬)", "en_NG": "영어 (나이지리아)", "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_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_VC": "영어 (세인트빈센트그레나딘)", "en_VG": "영어 (영국령 버진 아일랜드)", "en_VI": "영어 (미국령 버진 아일랜드)", "en_VU": "영어 (바누아투)", "en_WS": "영어 (사모아)", "en_ZA": "영어 (남아프리카)", "en_ZM": "영어 (잠비아)", "en_ZW": "영어 (짐바브웨)", "eo": "에스페란토어", "es": "스페인어", "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": "바스크어 (스페인)", "fa": "페르시아어", "fa_AF": "페르시아어 (아프가니스탄)", "fa_IR": "페르시아어 (이란)", "ff": "풀라어", "ff_CM": "풀라어 (카메룬)", "ff_GN": "풀라어 (기니)", "ff_MR": "풀라어 (모리타니)", "ff_SN": "풀라어 (세네갈)", "fi": "핀란드어", "fi_FI": "핀란드어 (핀란드)", "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": "프랑스어 (마요티)", "fy": "프리지아어", "fy_NL": "프리지아어 (네덜란드)", "ga": "아일랜드어", "ga_IE": "아일랜드어 (아일랜드)", "gd": "스코틀랜드 게일어", "gd_GB": "스코틀랜드 게일어 (영국)", "gl": "갈리시아어", "gl_ES": "갈리시아어 (스페인)", "gu": "구자라트어", "gu_IN": "구자라트어 (인도)", "gv": "맹크스어", "gv_IM": "맹크스어 (맨 섬)", "ha": "하우사어", "ha_GH": "하우사어 (가나)", "ha_Latn": "하우사어 (로마자)", "ha_Latn_GH": "하우사어 (로마자, 가나)", "ha_Latn_NE": "하우사어 (로마자, 니제르)", "ha_Latn_NG": "하우사어 (로마자, 나이지리아)", "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_Cyrl": "카자흐어 (키릴 문자)", "kk_Cyrl_KZ": "카자흐어 (키릴 문자, 카자흐스탄)", "kk_KZ": "카자흐어 (카자흐스탄)", "kl": "그린란드어", "kl_GL": "그린란드어 (그린란드)", "km": "캄보디아어", "km_KH": "캄보디아어 (캄보디아)", "kn": "칸나다어", "kn_IN": "칸나다어 (인도)", "ko": "한국어", "ko_KP": "한국어 (조선 민주주의 인민 공화국)", "ko_KR": "한국어 (대한민국)", "ks": "카슈미르어", "ks_Arab": "카슈미르어 (아랍 문자)", "ks_Arab_IN": "카슈미르어 (아랍 문자, 인도)", "ks_IN": "카슈미르어 (인도)", "kw": "콘월어", "kw_GB": "콘월어 (영국)", "ky": "키르기스어", "ky_Cyrl": "키르기스어 (키릴 문자)", "ky_Cyrl_KG": "키르기스어 (키릴 문자, 키르기스스탄)", "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_Cyrl": "몽고어 (키릴 문자)", "mn_Cyrl_MN": "몽고어 (키릴 문자, 몽골)", "mn_MN": "몽고어 (몽골)", "mr": "마라티어", "mr_IN": "마라티어 (인도)", "ms": "말레이어", "ms_BN": "말레이어 (브루나이)", "ms_Latn": "말레이어 (로마자)", "ms_Latn_BN": "말레이어 (로마자, 브루나이)", "ms_Latn_MY": "말레이어 (로마자, 말레이시아)", "ms_Latn_SG": "말레이어 (로마자, 싱가포르)", "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_CV": "포르투갈어 (까뽀베르데)", "pt_GW": "포르투갈어 (기네비쏘)", "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_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_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": "우즈베크어 (우즈베키스탄)", "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": "줄루어 (남아프리카)" } } src/Symfony/Component/Intl/Resources/data/locales/ks.json000066400000000000000000000706201266465517700240260ustar00rootroot00000000000000{ "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_Latn": "بَمبارا (لیٹِن)", "bm_Latn_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": "کَتلان (اِٹلی)", "cs": "چیٚک", "cs_CZ": "چیٚک (چیک جَموٗرِیَت)", "cy": "ویٚلش", "cy_GB": "ویٚلش (یُنایٹِڑ کِنٛگڈَم)", "da": "ڈینِش", "da_DK": "ڈینِش (ڈینٛمارٕک)", "da_GL": "ڈینِش (گریٖنلینٛڑ)", "de": "جٔرمَن", "de_AT": "جٔرمَن (آسٹِیا)", "de_BE": "جٔرمَن (بیٛلجِیَم)", "de_CH": "جٔرمَن (سُوِزَرلینٛڑ)", "de_DE": "جٔرمَن (جرمٔنی)", "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_AU": "اَنٛگیٖزۍ (آسٹریلِیا)", "en_BB": "اَنٛگیٖزۍ (باربیڈاس)", "en_BE": "اَنٛگیٖزۍ (بیٛلجِیَم)", "en_BM": "اَنٛگیٖزۍ (بٔرمیوڈا)", "en_BS": "اَنٛگیٖزۍ (بَہامَس)", "en_BW": "اَنٛگیٖزۍ (بوتَسوانا)", "en_BZ": "اَنٛگیٖزۍ (بیلِج)", "en_CA": "اَنٛگیٖزۍ (کینَڑا)", "en_CC": "اَنٛگیٖزۍ (کوکَس کیٖلِنٛگ جٔزیٖرٕ)", "en_CK": "اَنٛگیٖزۍ (کُک جٔزیٖرٕ)", "en_CM": "اَنٛگیٖزۍ (کیٚمِروٗن)", "en_CX": "اَنٛگیٖزۍ (کرِسمَس جٔزیٖرٕ)", "en_DM": "اَنٛگیٖزۍ (ڈومِنِکا)", "en_ER": "اَنٛگیٖزۍ (اِرٕٹِیا)", "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_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_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_SG": "اَنٛگیٖزۍ (ٛسِنٛگاپوٗر)", "en_SH": "اَنٛگیٖزۍ (سینٛٹ ہٮ۪لِنا)", "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_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": "فَروس", "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_Latn": "ہاوسا (لیٹِن)", "ha_Latn_GH": "ہاوسا (لیٹِن, گانا)", "ha_Latn_NE": "ہاوسا (لیٹِن, نایجَر)", "ha_Latn_NG": "ہاوسا (لیٹِن, نایجیرِیا)", "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_Cyrl": "کازَخ (سَیرِلِک)", "kk_Cyrl_KZ": "کازَخ (سَیرِلِک, کَزاکِستان)", "kk_KZ": "کازَخ (کَزاکِستان)", "kl": "کَلالِسُت", "kl_GL": "کَلالِسُت (گریٖنلینٛڑ)", "km": "خَمیر", "km_KH": "خَمیر (کَمبوڑِیا)", "kn": "کَنَڑ", "kn_IN": "کَنَڑ (ہِنٛدوستان)", "ko": "کوریَن", "ko_KP": "کوریَن (شُمٲلی کورِیا)", "ko_KR": "کوریَن (جنوٗبی کورِیا)", "ks": "کٲشُر", "ks_Arab": "کٲشُر (اَربی)", "ks_Arab_IN": "کٲشُر (اَربی, ہِنٛدوستان)", "ks_IN": "کٲشُر (ہِنٛدوستان)", "kw": "کورنِش", "kw_GB": "کورنِش (یُنایٹِڑ کِنٛگڈَم)", "ky": "کِرگِز", "ky_Cyrl": "کِرگِز (سَیرِلِک)", "ky_Cyrl_KG": "کِرگِز (سَیرِلِک, کِرگِستان)", "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_Cyrl": "مَنٛگولی (سَیرِلِک)", "mn_Cyrl_MN": "مَنٛگولی (سَیرِلِک, مَنٛگولِیا)", "mn_MN": "مَنٛگولی (مَنٛگولِیا)", "mr": "مَرٲٹھۍ", "mr_IN": "مَرٲٹھۍ (ہِنٛدوستان)", "ms": "مَلَے", "ms_BN": "مَلَے (بُرنٔے)", "ms_Latn": "مَلَے (لیٹِن)", "ms_Latn_BN": "مَلَے (لیٹِن, بُرنٔے)", "ms_Latn_MY": "مَلَے (لیٹِن, مَلیشِیا)", "ms_Latn_SG": "مَلَے (لیٹِن, ٛسِنٛگاپوٗر)", "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_CV": "پُرتَگیٖز (کیپ ؤرڑی)", "pt_GW": "پُرتَگیٖز (گیٖنی بِساو)", "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_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": "زُلوٗ (جَنوٗبی اَفریٖکا)" } } src/Symfony/Component/Intl/Resources/data/locales/ks_IN.json000066400000000000000000000000401266465517700244010ustar00rootroot00000000000000{ "%%ALIAS": "ks_Arab_IN" } src/Symfony/Component/Intl/Resources/data/locales/kw.json000066400000000000000000000001401266465517700240200ustar00rootroot00000000000000{ "Names": { "kw": "kernewek", "kw_GB": "kernewek (Rywvaneth Unys)" } } src/Symfony/Component/Intl/Resources/data/locales/ky.json000066400000000000000000000720601266465517700240340ustar00rootroot00000000000000{ "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_Latn": "бамбарада (Латын)", "bm_Latn_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": "каталанча (Италия)", "cs": "чехче", "cs_CZ": "чехче (Чехия)", "cy": "уелшче", "cy_GB": "уелшче (Улуу Британия)", "da": "датча", "da_DK": "датча (Дания)", "da_GL": "датча (Гренландия)", "de": "немисче", "de_AT": "немисче (Австрия)", "de_BE": "немисче (Бельгия)", "de_CH": "немисче (Швейцария)", "de_DE": "немисче (Германия)", "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_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_MY": "англисче (Малайзия)", "en_NA": "англисче (Намибия)", "en_NF": "англисче (Норфолк аралы)", "en_NG": "англисче (Нигерия)", "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_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_VC": "англисче (Сент-Винсент жана Гренадиналар)", "en_VG": "англисче (Виргин аралдары (Британия))", "en_VI": "англисче (Виргин аралдары (АКШ))", "en_VU": "англисче (Вануату)", "en_WS": "англисче (Самоа)", "en_ZA": "англисче (Түштүк Африка Республикасы)", "en_ZM": "англисче (Замбия)", "en_ZW": "англисче (Зимбабве)", "eo": "эсперанто", "es": "испанча", "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": "баскча (Испания)", "fa": "фарсыча", "fa_AF": "фарсыча (Афганистан)", "fa_IR": "фарсыча (Иран)", "fi": "финче", "fi_FI": "финче (Финляндия)", "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": "французча (Майотта)", "fy": "батыш фризче", "fy_NL": "батыш фризче (Нидерланддар)", "ga": "ирландча", "ga_IE": "ирландча (Ирландия)", "gl": "галисияча", "gl_ES": "галисияча (Испания)", "gu": "гужаратча", "gu_IN": "гужаратча (Индия)", "gv": "манксыча", "gv_IM": "манксыча (Мэн аралы)", "ha": "хаусача", "ha_GH": "хаусача (Гана)", "ha_Latn": "хаусача (Латын)", "ha_Latn_GH": "хаусача (Латын, Гана)", "ha_Latn_NE": "хаусача (Латын, Нигер)", "ha_Latn_NG": "хаусача (Латын, Нигерия)", "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_Cyrl": "казакча (Кирилик)", "kk_Cyrl_KZ": "казакча (Кирилик, Казакстан)", "kk_KZ": "казакча (Казакстан)", "kl": "калаалисутча", "kl_GL": "калаалисутча (Гренландия)", "km": "кмерче", "km_KH": "кмерче (Камбоджа)", "kn": "каннадача", "kn_IN": "каннадача (Индия)", "ko": "корейче", "ko_KP": "корейче (Түндүк Корея)", "ko_KR": "корейче (Түштүк Корея)", "ks": "кашмирче", "ks_Arab": "кашмирче (Араб)", "ks_Arab_IN": "кашмирче (Араб, Индия)", "ks_IN": "кашмирче (Индия)", "kw": "корнишче", "kw_GB": "корнишче (Улуу Британия)", "ky": "кыргызча", "ky_Cyrl": "кыргызча (Кирилик)", "ky_Cyrl_KG": "кыргызча (Кирилик, Кыргызстан)", "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_Cyrl": "моңголчо (Кирилик)", "mn_Cyrl_MN": "моңголчо (Кирилик, Монголия)", "mn_MN": "моңголчо (Монголия)", "mr": "маратиче", "mr_IN": "маратиче (Индия)", "ms": "малайча", "ms_BN": "малайча (Бруней)", "ms_Latn": "малайча (Латын)", "ms_Latn_BN": "малайча (Латын, Бруней)", "ms_Latn_MY": "малайча (Латын, Малайзия)", "ms_Latn_SG": "малайча (Латын, Сингапур)", "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": "орияча (Индия)", "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": "португалча (Тимор-Лесте)", "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_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_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": "өзбекче (Өзбекстан)", "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": "зулуча (Түштүк Африка Республикасы)" } } src/Symfony/Component/Intl/Resources/data/locales/ky_KG.json000066400000000000000000000000401266465517700244020ustar00rootroot00000000000000{ "%%ALIAS": "ky_Cyrl_KG" } src/Symfony/Component/Intl/Resources/data/locales/lb.json000066400000000000000000000550641266465517700240130ustar00rootroot00000000000000{ "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_Latn": "Bambara-Sprooch (Laténgesch)", "bm_Latn_ML": "Bambara-Sprooch (Laténgesch, 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)", "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_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_AU": "Englesch (Australien)", "en_BB": "Englesch (Barbados)", "en_BE": "Englesch (Belsch)", "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_CK": "Englesch (Cookinselen)", "en_CM": "Englesch (Kamerun)", "en_CX": "Englesch (Chrëschtdagsinsel)", "en_DG": "Englesch (Diego Garcia)", "en_DM": "Englesch (Dominica)", "en_ER": "Englesch (Eritrea)", "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_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_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_SG": "Englesch (Singapur)", "en_SH": "Englesch (St. Helena)", "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_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_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 (Elfebeeküst)", "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_Latn": "Hausa (Laténgesch)", "ha_Latn_GH": "Hausa (Laténgesch, Ghana)", "ha_Latn_NE": "Hausa (Laténgesch, Niger)", "ha_Latn_NG": "Hausa (Laténgesch, Nigeria)", "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_Cyrl": "Kasachesch (Kyrillesch)", "kk_Cyrl_KZ": "Kasachesch (Kyrillesch, Kasachstan)", "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_Arab": "Kaschmiresch (Arabesch)", "ks_Arab_IN": "Kaschmiresch (Arabesch, Indien)", "ks_IN": "Kaschmiresch (Indien)", "kw": "Kornesch", "kw_GB": "Kornesch (Groussbritannien)", "ky": "Kirgisesch", "ky_Cyrl": "Kirgisesch (Kyrillesch)", "ky_Cyrl_KG": "Kirgisesch (Kyrillesch, Kirgisistan)", "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_Cyrl": "Mongolesch (Kyrillesch)", "mn_Cyrl_MN": "Mongolesch (Kyrillesch, Mongolei)", "mn_MN": "Mongolesch (Mongolei)", "mr": "Marathi", "mr_IN": "Marathi (Indien)", "ms": "Malaiesch", "ms_BN": "Malaiesch (Brunei)", "ms_Latn": "Malaiesch (Laténgesch)", "ms_Latn_BN": "Malaiesch (Laténgesch, Brunei)", "ms_Latn_MY": "Malaiesch (Laténgesch, Malaysia)", "ms_Latn_SG": "Malaiesch (Laténgesch, Singapur)", "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_CV": "Portugisesch (Kap Verde)", "pt_GW": "Portugisesch (Guinea-Bissau)", "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_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_Arab": "Uiguresch (Arabesch)", "ug_Arab_CN": "Uiguresch (Arabesch, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/lg.json000066400000000000000000000277141266465517700240210ustar00rootroot00000000000000{ "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_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_AU": "Lungereza (Awusitureliya)", "en_BB": "Lungereza (Barabadosi)", "en_BE": "Lungereza (Bubirigi)", "en_BM": "Lungereza (Beremuda)", "en_BS": "Lungereza (Bahamasi)", "en_BW": "Lungereza (Botiswana)", "en_BZ": "Lungereza (Belize)", "en_CA": "Lungereza (Kanada)", "en_CK": "Lungereza (Bizinga bya Kkuki)", "en_CM": "Lungereza (Kameruuni)", "en_DM": "Lungereza (Dominika)", "en_ER": "Lungereza (Eritureya)", "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_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_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_SG": "Lungereza (Singapowa)", "en_SH": "Lungereza (Senti Herena)", "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_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_CV": "Lupotugiizi (Bizinga by’e Kepu Veredi)", "pt_GW": "Lupotugiizi (Gini-Bisawu)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ln.json000066400000000000000000000306661266465517700240300ustar00rootroot00000000000000{ "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_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_AU": "lingɛlɛ́sa (Ositáli)", "en_BB": "lingɛlɛ́sa (Barɛbadɛ)", "en_BE": "lingɛlɛ́sa (Beleziki)", "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_CK": "lingɛlɛ́sa (Bisanga bya Kookɛ)", "en_CM": "lingɛlɛ́sa (Kamɛrune)", "en_DM": "lingɛlɛ́sa (Domínike)", "en_ER": "lingɛlɛ́sa (Elitelɛ)", "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_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_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_SG": "lingɛlɛ́sa (Singapurɛ)", "en_SH": "lingɛlɛ́sa (Sántu eleni)", "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_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ɛ́ (Repibiki demokratiki ya Kongó)", "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 (Repibiki demokratiki ya Kongó)", "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_CV": "lipulutugɛ́si (Bisanga bya Kapevɛrɛ)", "pt_GW": "lipulutugɛ́si (Ginɛbisau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/lo.json000066400000000000000000001062651266465517700240300ustar00rootroot00000000000000{ "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_Latn": "ບາມບາຣາ (ລາຕິນ)", "bm_Latn_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": "ຄາຕາລານ (ອິຕາລີ)", "cs": "ເຊກ", "cs_CZ": "ເຊກ (ສາທາລະນະລັດເຊກ)", "cy": "ເວວ", "cy_GB": "ເວວ (ສະຫະລາດຊະອະນາຈັກ)", "da": "ແດນິຊ", "da_DK": "ແດນິຊ (ເດນມາກ)", "da_GL": "ແດນິຊ (ກຣີນແລນ)", "de": "ເຢຍລະມັນ", "de_AT": "ເຢຍລະມັນ (ອອສເທຣຍ)", "de_BE": "ເຢຍລະມັນ (ເບວຢຽມ)", "de_CH": "ເຢຍລະມັນ (ສະວິດເຊີແລນ)", "de_DE": "ເຢຍລະມັນ (ເຢຍລະມັນ)", "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_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_MY": "ອັງກິດ (ມາເລເຊຍ)", "en_NA": "ອັງກິດ (ນາມີເບຍ)", "en_NF": "ອັງກິດ (ເກາະນໍໂຟກ)", "en_NG": "ອັງກິດ (ໄນຈີເຣຍ)", "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_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_VC": "ອັງກິດ (ເຊນ ວິນເຊນ & ເກຣເນດິນ)", "en_VG": "ອັງກິດ (ໝູ່ເກາະ ບຣິທິຊ ເວີຈິນ)", "en_VI": "ອັງກິດ (ໝູ່ເກາະ ຢູເອສ ເວີຈິນ)", "en_VU": "ອັງກິດ (ວານົວຕູ)", "en_WS": "ອັງກິດ (ຊາມົວ)", "en_ZA": "ອັງກິດ (ອາຟະລິກາໃຕ້)", "en_ZM": "ອັງກິດ (ແຊມເບຍ)", "en_ZW": "ອັງກິດ (ຊິມບັບເວ)", "eo": "ເອສເປີຣັນໂຕ", "es": "ສະແປນນິຊ", "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": "ບັສກີ (ສະເປນ)", "fa": "ເປີຊຽນ", "fa_AF": "ເປີຊຽນ (ອາຟການິສຖານ)", "fa_IR": "ເປີຊຽນ (ອີຣ່ານ)", "ff": "ຟູລາ", "ff_CM": "ຟູລາ (ຄາເມຣູນ)", "ff_GN": "ຟູລາ (ກິນີ)", "ff_MR": "ຟູລາ (ມົວຣິເທເນຍ)", "ff_SN": "ຟູລາ (ເຊນີໂກລ)", "fi": "ຟິນນິຊ", "fi_FI": "ຟິນນິຊ (ຟິນແລນ)", "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": "ຝຣັ່ງ (ມາຢັອດ)", "fy": "ເວສເທີນ ຟຣິຊຽນ", "fy_NL": "ເວສເທີນ ຟຣິຊຽນ (ເນເທີແລນ)", "ga": "ໄອຣິສ", "ga_IE": "ໄອຣິສ (ໄອຣ໌ແລນ)", "gd": "ສະກັອດເກລິກ", "gd_GB": "ສະກັອດເກລິກ (ສະຫະລາດຊະອະນາຈັກ)", "gl": "ກາລິຊຽນ", "gl_ES": "ກາລິຊຽນ (ສະເປນ)", "gu": "ກູຈາຣາຕິ", "gu_IN": "ກູຈາຣາຕິ (ອິນເດຍ)", "gv": "ແມງຊ໌", "gv_IM": "ແມງຊ໌ (ເອວ ອອບ ແມນ)", "ha": "ເຮົາຊາ", "ha_GH": "ເຮົາຊາ (ການາ)", "ha_Latn": "ເຮົາຊາ (ລາຕິນ)", "ha_Latn_GH": "ເຮົາຊາ (ລາຕິນ, ການາ)", "ha_Latn_NE": "ເຮົາຊາ (ລາຕິນ, ນິເຈີ)", "ha_Latn_NG": "ເຮົາຊາ (ລາຕິນ, ໄນຈີເຣຍ)", "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_Cyrl": "ຄາຊັກ (ຊີຣິວລິກ)", "kk_Cyrl_KZ": "ຄາຊັກ (ຊີຣິວລິກ, ຄາຊັກສະຖານ)", "kk_KZ": "ຄາຊັກ (ຄາຊັກສະຖານ)", "kl": "ກຣີນແລນລິດ", "kl_GL": "ກຣີນແລນລິດ (ກຣີນແລນ)", "km": "ຂະເໝນ", "km_KH": "ຂະເໝນ (ກຳປູເຈຍ)", "kn": "ຄັນນາດາ", "kn_IN": "ຄັນນາດາ (ອິນເດຍ)", "ko": "ເກົາຫລີ", "ko_KP": "ເກົາຫລີ (ເກົາຫລີເໜືອ)", "ko_KR": "ເກົາຫລີ (ເກົາຫລີໃຕ້)", "ks": "ຄັດຊະມີຣີ", "ks_Arab": "ຄັດຊະມີຣີ (ອາຣາບິກ)", "ks_Arab_IN": "ຄັດຊະມີຣີ (ອາຣາບິກ, ອິນເດຍ)", "ks_IN": "ຄັດຊະມີຣີ (ອິນເດຍ)", "kw": "ຄໍນິຊ", "kw_GB": "ຄໍນິຊ (ສະຫະລາດຊະອະນາຈັກ)", "ky": "ເກຍກີສ", "ky_Cyrl": "ເກຍກີສ (ຊີຣິວລິກ)", "ky_Cyrl_KG": "ເກຍກີສ (ຊີຣິວລິກ, ຄີກິສຖານ)", "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_Cyrl": "ມອງໂກເລຍ (ຊີຣິວລິກ)", "mn_Cyrl_MN": "ມອງໂກເລຍ (ຊີຣິວລິກ, ມອງໂກເລຍ)", "mn_MN": "ມອງໂກເລຍ (ມອງໂກເລຍ)", "mr": "ມາຣາທີ", "mr_IN": "ມາຣາທີ (ອິນເດຍ)", "ms": "ມາເລ", "ms_BN": "ມາເລ (ບຣູໄນ)", "ms_Latn": "ມາເລ (ລາຕິນ)", "ms_Latn_BN": "ມາເລ (ລາຕິນ, ບຣູໄນ)", "ms_Latn_MY": "ມາເລ (ລາຕິນ, ມາເລເຊຍ)", "ms_Latn_SG": "ມາເລ (ລາຕິນ, ສິງກະໂປ)", "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_CV": "ປໍຕູກີສ (ເຄບ ເວີດ)", "pt_GW": "ປໍຕູກີສ (ກິນີ-ບິສເຊົາ)", "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_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_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": "ອຸສເບກ (ອຸສເບກິສຖານ)", "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": "ຊູລູ (ອາຟະລິກາໃຕ້)" } } src/Symfony/Component/Intl/Resources/data/locales/lt.json000066400000000000000000000544111266465517700240300ustar00rootroot00000000000000{ "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_Latn": "bambarų (lotynų)", "bm_Latn_ML": "bambarų (lotynų, 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)", "cs": "čekų", "cs_CZ": "čekų (Čekija)", "cy": "valų", "cy_GB": "valų (Didžioji Britanija)", "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_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_AU": "anglų (Australija)", "en_BB": "anglų (Barbadosas)", "en_BE": "anglų (Belgija)", "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_CK": "anglų (Kuko Salos)", "en_CM": "anglų (Kamerūnas)", "en_CX": "anglų (Kalėdų Sala)", "en_DG": "anglų (Diego Garsija)", "en_DM": "anglų (Dominika)", "en_ER": "anglų (Eritrėja)", "en_FJ": "anglų (Fidžis)", "en_FK": "anglų (Folklando Salos)", "en_FM": "anglų (Mikronezija)", "en_GB": "anglų (Didžioji Britanija)", "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_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ų (Šventoji Liucija)", "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_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ų (Pitkernas)", "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_SG": "anglų (Singapūras)", "en_SH": "anglų (Šv. Elenos Sala)", "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_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_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ūzų 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 Futuna)", "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ų (Didžioji Britanija)", "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_Latn": "hausų (lotynų)", "ha_Latn_GH": "hausų (lotynų, Gana)", "ha_Latn_NE": "hausų (lotynų, Nigeris)", "ha_Latn_NG": "hausų (lotynų, Nigerija)", "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_Cyrl": "kazachų (kirilica)", "kk_Cyrl_KZ": "kazachų (kirilica, Kazachstanas)", "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_Arab": "kašmyrų (arabų)", "ks_Arab_IN": "kašmyrų (arabų, Indija)", "ks_IN": "kašmyrų (Indija)", "kw": "kornų", "kw_GB": "kornų (Didžioji Britanija)", "ky": "kirgizų", "ky_Cyrl": "kirgizų (kirilica)", "ky_Cyrl_KG": "kirgizų (kirilica, Kirgizija)", "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_Cyrl": "mongolų (kirilica)", "mn_Cyrl_MN": "mongolų (kirilica, Mongolija)", "mn_MN": "mongolų (Mongolija)", "mr": "maratų", "mr_IN": "maratų (Indija)", "ms": "malajiečių", "ms_BN": "malajiečių (Brunėjus)", "ms_Latn": "malajiečių (lotynų)", "ms_Latn_BN": "malajiečių (lotynų, Brunėjus)", "ms_Latn_MY": "malajiečių (lotynų, Malaizija)", "ms_Latn_SG": "malajiečių (lotynų, Singapūras)", "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": "Norvegijos rašytinė – būkmolų", "nb_NO": "Norvegijos rašytinė – būkmolų (Norvegija)", "nb_SJ": "Norvegijos rašytinė – būkmolų (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": "orijų", "or_IN": "orijų (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_CV": "portugalų (Žaliasis Kyšulys)", "pt_GW": "portugalų (Bisau Gvinėja)", "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_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_Arab": "uigūrų (arabų)", "ug_Arab_CN": "uigūrų (arabų, Kinija)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/lu.json000066400000000000000000000266571266465517700240440ustar00rootroot00000000000000{ "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_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_AU": "Lingelesa (Ositali)", "en_BB": "Lingelesa (Barebade)", "en_BE": "Lingelesa (Belejiki)", "en_BM": "Lingelesa (Bermuda)", "en_BS": "Lingelesa (Bahamase)", "en_BW": "Lingelesa (Mbotswana)", "en_BZ": "Lingelesa (Belize)", "en_CA": "Lingelesa (Kanada)", "en_CK": "Lingelesa (Lutanda lua Kookɛ)", "en_CM": "Lingelesa (Kamerune)", "en_DM": "Lingelesa (Duminiku)", "en_ER": "Lingelesa (Elitele)", "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_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_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_SG": "Lingelesa (Singapure)", "en_SH": "Lingelesa (Santu eleni)", "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_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_CV": "Mputulugɛsi (Lutanda lua Kapevele)", "pt_GW": "Mputulugɛsi (Nginebisau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/lv.json000066400000000000000000000536361266465517700240420ustar00rootroot00000000000000{ "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_Latn": "bambaru (latīņu)", "bm_Latn_ML": "bambaru (latīņu, 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)", "cs": "čehu", "cs_CZ": "čehu (Čehija)", "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_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 (Amerikāņu Samoa)", "en_AU": "angļu (Austrālija)", "en_BB": "angļu (Barbadosa)", "en_BE": "angļu (Beļģija)", "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 jeb Kīlinga salas)", "en_CK": "angļu (Kuka salas)", "en_CM": "angļu (Kamerūna)", "en_CX": "angļu (Ziemsvētku sala)", "en_DG": "angļu (Djego Garsijas atols)", "en_DM": "angļu (Dominika)", "en_ER": "angļu (Eritreja)", "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_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_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ērna)", "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 (Šeišelu salas)", "en_SD": "angļu (Sudāna)", "en_SG": "angļu (Singapūra)", "en_SH": "angļu (Sv.Helēnas sala)", "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 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_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_FO": "fēru (Fēru Salas)", "fr": "franču", "fr_BE": "franču (Beļģija)", "fr_BF": "franču (Burkinafaso)", "fr_BI": "franču (Burundi)", "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 (Franču 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 (Franču Polinēzija)", "fr_PM": "franču (Senpjēra un Mikelona)", "fr_RE": "franču (Reinjona)", "fr_RW": "franču (Ruanda)", "fr_SC": "franču (Šeiš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 Futuna)", "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_Latn": "hausu (latīņu)", "ha_Latn_GH": "hausu (latīņu, Gana)", "ha_Latn_NE": "hausu (latīņu, Nigēra)", "ha_Latn_NG": "hausu (latīņu, Nigērija)", "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_Cyrl": "kazahu (kirilica)", "kk_Cyrl_KZ": "kazahu (kirilica, Kazahstāna)", "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_Arab": "kašmiriešu (arābu)", "ks_Arab_IN": "kašmiriešu (arābu, Indija)", "ks_IN": "kašmiriešu (Indija)", "kw": "korniešu", "kw_GB": "korniešu (Lielbritānija)", "ky": "kirgīzu", "ky_Cyrl": "kirgīzu (kirilica)", "ky_Cyrl_KG": "kirgīzu (kirilica, Kirgizstāna)", "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_Cyrl": "mongoļu (kirilica)", "mn_Cyrl_MN": "mongoļu (kirilica, Mongolija)", "mn_MN": "mongoļu (Mongolija)", "mr": "maratu", "mr_IN": "maratu (Indija)", "ms": "malajiešu", "ms_BN": "malajiešu (Bruneja)", "ms_Latn": "malajiešu (latīņu)", "ms_Latn_BN": "malajiešu (latīņu, Bruneja)", "ms_Latn_MY": "malajiešu (latīņu, Malaizija)", "ms_Latn_SG": "malajiešu (latīņu, Singapūra)", "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_CV": "portugāļu (Kaboverde)", "pt_GW": "portugāļu (Gvineja-Bisava)", "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 (Burundi)", "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_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_Arab": "uiguru (arābu)", "ug_Arab_CN": "uiguru (arābu, Ķīna)", "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 (ķīniešu vienkāršotā)", "zh_Hans_CN": "ķīniešu (ķīniešu vienkāršotā, Ķīna)", "zh_Hans_HK": "ķīniešu (ķīniešu vienkāršotā, Ķīnas īpašās pārvaldes apgabals Honkonga)", "zh_Hans_MO": "ķīniešu (ķīniešu vienkāršotā, Ķīnas īpašās pārvaldes apgabals Makao)", "zh_Hans_SG": "ķīniešu (ķīniešu vienkāršotā, Singapūra)", "zh_Hant": "ķīniešu (ķīniešu tradicionālā)", "zh_Hant_HK": "ķīniešu (ķīniešu tradicionālā, Ķīnas īpašās pārvaldes apgabals Honkonga)", "zh_Hant_MO": "ķīniešu (ķīniešu tradicionālā, Ķīnas īpašās pārvaldes apgabals Makao)", "zh_Hant_TW": "ķīniešu (ķī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)" } } src/Symfony/Component/Intl/Resources/data/locales/meta.json000066400000000000000000000261341266465517700243400ustar00rootroot00000000000000{ "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_Latn", "bm_Latn_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", "cs", "cs_CZ", "cy", "cy_GB", "da", "da_DK", "da_GL", "de", "de_AT", "de_BE", "de_CH", "de_DE", "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_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_MY", "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", "fa", "fa_AF", "fa_IR", "ff", "ff_CM", "ff_GN", "ff_MR", "ff_SN", "fi", "fi_FI", "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", "fy", "fy_NL", "ga", "ga_IE", "gd", "gd_GB", "gl", "gl_ES", "gu", "gu_IN", "gv", "gv_IM", "ha", "ha_GH", "ha_Latn", "ha_Latn_GH", "ha_Latn_NE", "ha_Latn_NG", "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_Cyrl", "kk_Cyrl_KZ", "kk_KZ", "kl", "kl_GL", "km", "km_KH", "kn", "kn_IN", "ko", "ko_KP", "ko_KR", "ks", "ks_Arab", "ks_Arab_IN", "ks_IN", "kw", "kw_GB", "ky", "ky_Cyrl", "ky_Cyrl_KG", "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_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", "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_CV", "pt_GW", "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_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_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", "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", "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", "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", "ug_CN": "ug_Arab_CN", "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" } } src/Symfony/Component/Intl/Resources/data/locales/mg.json000066400000000000000000000264411266465517700240160ustar00rootroot00000000000000{ "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_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_AU": "Anglisy (Aostralia)", "en_BB": "Anglisy (Barbady)", "en_BE": "Anglisy (Belzika)", "en_BM": "Anglisy (Bermioda)", "en_BS": "Anglisy (Bahamas)", "en_BW": "Anglisy (Botsoana)", "en_BZ": "Anglisy (Belize)", "en_CA": "Anglisy (Kanada)", "en_CK": "Anglisy (Nosy Kook)", "en_CM": "Anglisy (Kamerona)", "en_DM": "Anglisy (Dominika)", "en_ER": "Anglisy (Eritrea)", "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_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_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_SG": "Anglisy (Singaporo)", "en_SH": "Anglisy (Sainte-Hélène)", "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_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_CV": "Portiogey (Nosy Cap-Vert)", "pt_GW": "Portiogey (Giné-Bisao)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/mk.json000066400000000000000000000756711266465517700240330ustar00rootroot00000000000000{ "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_Latn": "бамбара (латинично писмо)", "bm_Latn_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": "каталонски (Италија)", "cs": "чешки", "cs_CZ": "чешки (Република Чешка)", "cy": "велшки", "cy_GB": "велшки (Обединето Кралство)", "da": "дански", "da_DK": "дански (Данска)", "da_GL": "дански (Гренланд)", "de": "германски", "de_AT": "германски (Австрија)", "de_BE": "германски (Белгија)", "de_CH": "германски (Швајцарија)", "de_DE": "германски (Германија)", "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_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_MY": "англиски (Малезија)", "en_NA": "англиски (Намибија)", "en_NF": "англиски (Норфолшки Остров)", "en_NG": "англиски (Нигерија)", "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_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_VC": "англиски (Свети Винсент и Гренадините)", "en_VG": "англиски (Британски Девствени Острови)", "en_VI": "англиски (Американски Девствени Острови)", "en_VU": "англиски (Вануату)", "en_WS": "англиски (Самоа)", "en_ZA": "англиски (Јужноафриканска Република)", "en_ZM": "англиски (Замбија)", "en_ZW": "англиски (Зимбабве)", "eo": "есперанто", "es": "шпански", "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": "баскиски (Шпанија)", "fa": "персиски", "fa_AF": "персиски (Авганистан)", "fa_IR": "персиски (Иран)", "ff": "фула", "ff_CM": "фула (Камерун)", "ff_GN": "фула (Гвинеја)", "ff_MR": "фула (Мавританија)", "ff_SN": "фула (Сенегал)", "fi": "фински", "fi_FI": "фински (Финска)", "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": "француски (Мајот)", "fy": "западнофризиски", "fy_NL": "западнофризиски (Холандија)", "ga": "ирски", "ga_IE": "ирски (Ирска)", "gd": "шкотски гелски", "gd_GB": "шкотски гелски (Обединето Кралство)", "gl": "галициски", "gl_ES": "галициски (Шпанија)", "gu": "гуџарати", "gu_IN": "гуџарати (Индија)", "gv": "манкс", "gv_IM": "манкс (Остров Ман)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латинично писмо)", "ha_Latn_GH": "хауса (латинично писмо, Гана)", "ha_Latn_NE": "хауса (латинично писмо, Нигер)", "ha_Latn_NG": "хауса (латинично писмо, Нигерија)", "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_Cyrl": "казакстански (кирилско писмо)", "kk_Cyrl_KZ": "казакстански (кирилско писмо, Казахстан)", "kk_KZ": "казакстански (Казахстан)", "kl": "калалисут", "kl_GL": "калалисут (Гренланд)", "km": "кмерски", "km_KH": "кмерски (Камбоџа)", "kn": "каннада", "kn_IN": "каннада (Индија)", "ko": "корејски", "ko_KP": "корејски (Северна Кореја)", "ko_KR": "корејски (Јужна Кореја)", "ks": "кашмирски", "ks_Arab": "кашмирски (арапско писмо)", "ks_Arab_IN": "кашмирски (арапско писмо, Индија)", "ks_IN": "кашмирски (Индија)", "kw": "корнски", "kw_GB": "корнски (Обединето Кралство)", "ky": "киргиски", "ky_Cyrl": "киргиски (кирилско писмо)", "ky_Cyrl_KG": "киргиски (кирилско писмо, Киргистан)", "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_Cyrl": "монголски (кирилско писмо)", "mn_Cyrl_MN": "монголски (кирилско писмо, Монголија)", "mn_MN": "монголски (Монголија)", "mr": "марати", "mr_IN": "марати (Индија)", "ms": "малајски", "ms_BN": "малајски (Брунеј)", "ms_Latn": "малајски (латинично писмо)", "ms_Latn_BN": "малајски (латинично писмо, Брунеј)", "ms_Latn_MY": "малајски (латинично писмо, Малезија)", "ms_Latn_SG": "малајски (латинично писмо, Сингапур)", "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_CV": "португалски (Зелен ’Рт)", "pt_GW": "португалски (Гвинеја-Бисау)", "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_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_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": "узбекистански (Узбекистан)", "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": "зулу (Јужноафриканска Република)" } } src/Symfony/Component/Intl/Resources/data/locales/ml.json000066400000000000000000001143521266465517700240220ustar00rootroot00000000000000{ "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_Latn": "ബംബാറ (ലാറ്റിൻ)", "bm_Latn_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": "കറ്റാലാൻ (ഇറ്റലി)", "cs": "ചെക്ക്", "cs_CZ": "ചെക്ക് (ചെക്ക് റിപ്പബ്ലിക്)", "cy": "വെൽഷ്", "cy_GB": "വെൽഷ് (ബ്രിട്ടൻ)", "da": "ഡാനിഷ്", "da_DK": "ഡാനിഷ് (ഡെൻമാർക്ക്)", "da_GL": "ഡാനിഷ് (ഗ്രീൻലാൻറ്)", "de": "ജർമ്മൻ", "de_AT": "ജർമ്മൻ (ഓസ്ട്രിയ)", "de_BE": "ജർമ്മൻ (ബെൽജിയം)", "de_CH": "ജർമ്മൻ (സ്വിറ്റ്സർലാൻഡ്)", "de_DE": "ജർമ്മൻ (ജർമനി)", "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_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": "ഇംഗ്ലീഷ് (മക്കാവോ SAR ചൈന)", "en_MP": "ഇംഗ്ലീഷ് (ഉത്തര മറിയാനാ ദ്വീപുകൾ)", "en_MS": "ഇംഗ്ലീഷ് (മൊണ്ടെസരത്ത്)", "en_MT": "ഇംഗ്ലീഷ് (മാൾട്ട)", "en_MU": "ഇംഗ്ലീഷ് (മൗറീഷ്യസ്)", "en_MW": "ഇംഗ്ലീഷ് (മലാവി)", "en_MY": "ഇംഗ്ലീഷ് (മലേഷ്യ)", "en_NA": "ഇംഗ്ലീഷ് (നമീബിയ)", "en_NF": "ഇംഗ്ലീഷ് (നോർഫോക് ദ്വീപ്)", "en_NG": "ഇംഗ്ലീഷ് (നൈജീരിയ)", "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_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_VC": "ഇംഗ്ലീഷ് (സെന്റ് വിൻസെന്റും ഗ്രനെഡൈൻസും)", "en_VG": "ഇംഗ്ലീഷ് (ബ്രിട്ടീഷ് വെർജിൻ ദ്വീപുകൾ)", "en_VI": "ഇംഗ്ലീഷ് (യു.എസ്. വെർജിൻ ദ്വീപുകൾ)", "en_VU": "ഇംഗ്ലീഷ് (വന്വാതു)", "en_WS": "ഇംഗ്ലീഷ് (സമോവ)", "en_ZA": "ഇംഗ്ലീഷ് (ദക്ഷിണാഫ്രിക്ക)", "en_ZM": "ഇംഗ്ലീഷ് (സാംബിയ)", "en_ZW": "ഇംഗ്ലീഷ് (സിംബാബ്‌വേ)", "eo": "എസ്‌പരാന്റോ", "es": "സ്‌പാനിഷ്", "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": "ബാസ്‌ക് (സ്‌പെയിൻ)", "fa": "പേർഷ്യൻ", "fa_AF": "പേർഷ്യൻ (അഫ്‌ഗാനിസ്ഥാൻ)", "fa_IR": "പേർഷ്യൻ (ഇറാൻ)", "ff": "ഫുല", "ff_CM": "ഫുല (കാമറൂൺ)", "ff_GN": "ഫുല (ഗിനിയ)", "ff_MR": "ഫുല (മൗറിറ്റാനിയ)", "ff_SN": "ഫുല (സെനഗൽ)", "fi": "ഫിന്നിഷ്", "fi_FI": "ഫിന്നിഷ് (ഫിൻലാൻഡ്)", "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": "ഫ്രഞ്ച് (മയോട്ടി)", "fy": "പശ്ചിമ ഫ്രിഷിയൻ", "fy_NL": "പശ്ചിമ ഫ്രിഷിയൻ (നെതർലാൻഡ്‌സ്)", "ga": "ഐറിഷ്", "ga_IE": "ഐറിഷ് (അയർലാൻഡ്)", "gd": "സ്കോട്ടിഷ് ഗൈലിക്", "gd_GB": "സ്കോട്ടിഷ് ഗൈലിക് (ബ്രിട്ടൻ)", "gl": "ഗലീഷ്യൻ", "gl_ES": "ഗലീഷ്യൻ (സ്‌പെയിൻ)", "gu": "ഗുജറാത്തി", "gu_IN": "ഗുജറാത്തി (ഇന്ത്യ)", "gv": "മാൻസ്", "gv_IM": "മാൻസ് (ഐൽ ഓഫ് മാൻ)", "ha": "ഹൗസ", "ha_GH": "ഹൗസ (ഘാന)", "ha_Latn": "ഹൗസ (ലാറ്റിൻ)", "ha_Latn_GH": "ഹൗസ (ലാറ്റിൻ, ഘാന)", "ha_Latn_NE": "ഹൗസ (ലാറ്റിൻ, നൈജർ)", "ha_Latn_NG": "ഹൗസ (ലാറ്റിൻ, നൈജീരിയ)", "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_Cyrl": "കസാഖ് (സിറിലിക്)", "kk_Cyrl_KZ": "കസാഖ് (സിറിലിക്, കസാഖിസ്ഥാൻ)", "kk_KZ": "കസാഖ് (കസാഖിസ്ഥാൻ)", "kl": "കലാല്ലിസട്ട്", "kl_GL": "കലാല്ലിസട്ട് (ഗ്രീൻലാൻറ്)", "km": "ഖമെർ", "km_KH": "ഖമെർ (കംബോഡിയ)", "kn": "കന്നഡ", "kn_IN": "കന്നഡ (ഇന്ത്യ)", "ko": "കൊറിയൻ", "ko_KP": "കൊറിയൻ (ഉത്തരകൊറിയ)", "ko_KR": "കൊറിയൻ (ദക്ഷിണകൊറിയ)", "ks": "കാശ്‌മീരി", "ks_Arab": "കാശ്‌മീരി (അറബിക്)", "ks_Arab_IN": "കാശ്‌മീരി (അറബിക്, ഇന്ത്യ)", "ks_IN": "കാശ്‌മീരി (ഇന്ത്യ)", "kw": "കോർണിഷ്", "kw_GB": "കോർണിഷ് (ബ്രിട്ടൻ)", "ky": "കിർഗിസ്", "ky_Cyrl": "കിർഗിസ് (സിറിലിക്)", "ky_Cyrl_KG": "കിർഗിസ് (സിറിലിക്, കിർഗിസ്ഥാൻ)", "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_Cyrl": "മംഗോളിയൻ (സിറിലിക്)", "mn_Cyrl_MN": "മംഗോളിയൻ (സിറിലിക്, മംഗോളിയ)", "mn_MN": "മംഗോളിയൻ (മംഗോളിയ)", "mr": "മറാത്തി", "mr_IN": "മറാത്തി (ഇന്ത്യ)", "ms": "മലെയ്", "ms_BN": "മലെയ് (ബ്രൂണൈ)", "ms_Latn": "മലെയ് (ലാറ്റിൻ)", "ms_Latn_BN": "മലെയ് (ലാറ്റിൻ, ബ്രൂണൈ)", "ms_Latn_MY": "മലെയ് (ലാറ്റിൻ, മലേഷ്യ)", "ms_Latn_SG": "മലെയ് (ലാറ്റിൻ, സിംഗപ്പുർ)", "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_CV": "പോർച്ചുഗീസ് (കേപ്പ് വെർദെ)", "pt_GW": "പോർച്ചുഗീസ് (ഗിനിയ-ബിസൗ)", "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_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_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": "ഉസ്‌ബെക്ക് (ഉസ്‌ബെക്കിസ്ഥാൻ)", "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": "സുലു (ദക്ഷിണാഫ്രിക്ക)" } } src/Symfony/Component/Intl/Resources/data/locales/mn.json000066400000000000000000000647051266465517700240320ustar00rootroot00000000000000{ "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_Latn": "бамбара (латин)", "bm_Latn_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": "каталан (Итали)", "cs": "чех", "cs_CZ": "чех (Бүгд Найрамдах Чех Улс)", "cy": "уэлс", "cy_GB": "уэлс (Их Британи)", "da": "дани", "da_DK": "дани (Дани)", "da_GL": "дани (Гренланд)", "de": "герман", "de_AT": "герман (Австри)", "de_BE": "герман (Белги)", "de_CH": "герман (Швейцари)", "de_DE": "герман (Герман)", "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_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_MY": "англи (Малайз)", "en_NA": "англи (Намиби)", "en_NF": "англи (Норфолк Арлууд)", "en_NG": "англи (Нигери)", "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_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_VC": "англи (Сэнт Винсэнт ба Гренадин)", "en_VG": "англи (Британийн Виржиний Арлууд)", "en_VI": "англи (АНУ-ын Виржиний Арлууд)", "en_VU": "англи (Вануату)", "en_WS": "англи (Самоа)", "en_ZA": "англи (Өмнөд Африк тив)", "en_ZM": "англи (Замби)", "en_ZW": "англи (Зимбабве)", "eo": "эсперанто", "es": "испани", "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": "баск (Испани)", "fa": "перс", "fa_AF": "перс (Афганистан)", "fa_IR": "перс (Иран)", "fi": "финлянд", "fi_FI": "финлянд (Финланд)", "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": "франц (Майотте)", "fy": "баруун фризын", "fy_NL": "баруун фризын (Голланд)", "ga": "ирланд", "ga_IE": "ирланд (Ирланд)", "gd": "шотланд келт", "gd_GB": "шотланд келт (Их Британи)", "gl": "галик", "gl_ES": "галик (Испани)", "gu": "гужарати", "gu_IN": "гужарати (Энэтхэг)", "gv": "манкс", "gv_IM": "манкс (Мэн Арал)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латин)", "ha_Latn_GH": "хауса (латин, Гана)", "ha_Latn_NE": "хауса (латин, Нигер)", "ha_Latn_NG": "хауса (латин, Нигери)", "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_Cyrl": "хасаг (кирил)", "kk_Cyrl_KZ": "хасаг (кирил, Казахстан)", "kk_KZ": "хасаг (Казахстан)", "kl": "калалисут", "kl_GL": "калалисут (Гренланд)", "km": "камбож", "km_KH": "камбож (Камбож)", "kn": "каннада", "kn_IN": "каннада (Энэтхэг)", "ko": "солонгос", "ko_KP": "солонгос (Хойд Солонгос)", "ko_KR": "солонгос (Өмнөд Солонгос)", "ks": "кашмир", "ks_Arab": "кашмир (араб)", "ks_Arab_IN": "кашмир (араб, Энэтхэг)", "ks_IN": "кашмир (Энэтхэг)", "kw": "корны", "kw_GB": "корны (Их Британи)", "ky": "киргиз", "ky_Cyrl": "киргиз (кирил)", "ky_Cyrl_KG": "киргиз (кирил, Кыргызстан)", "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_Cyrl": "монгол (кирил)", "mn_Cyrl_MN": "монгол (кирил, Монгол)", "mn_MN": "монгол (Монгол)", "mr": "марати", "mr_IN": "марати (Энэтхэг)", "ms": "малай", "ms_BN": "малай (Бруней)", "ms_Latn": "малай (латин)", "ms_Latn_BN": "малай (латин, Бруней)", "ms_Latn_MY": "малай (латин, Малайз)", "ms_Latn_SG": "малай (латин, Сингапур)", "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": "ория (Энэтхэг)", "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": "португал (Тимор-Лесте)", "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_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_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": "узбек (Узбекистан)", "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": "зулу (Өмнөд Африк тив)" } } src/Symfony/Component/Intl/Resources/data/locales/mn_MN.json000066400000000000000000000000401266465517700244020ustar00rootroot00000000000000{ "%%ALIAS": "mn_Cyrl_MN" } src/Symfony/Component/Intl/Resources/data/locales/mo.json000066400000000000000000000000331266465517700240130ustar00rootroot00000000000000{ "%%ALIAS": "ro_MD" } src/Symfony/Component/Intl/Resources/data/locales/mr.json000066400000000000000000001074501266465517700240310ustar00rootroot00000000000000{ "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_Latn": "बाम्बारा (लॅटिन)", "bm_Latn_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": "कातालान (इटली)", "cs": "झेक", "cs_CZ": "झेक (झेक प्रजासत्ताक)", "cy": "वेल्श", "cy_GB": "वेल्श (युनायटेड किंगडम)", "da": "डॅनिश", "da_DK": "डॅनिश (डेन्मार्क)", "da_GL": "डॅनिश (ग्रीनलंड)", "de": "जर्मन", "de_AT": "जर्मन (ऑस्ट्रिया)", "de_BE": "जर्मन (बेल्जियम)", "de_CH": "जर्मन (स्वित्झर्लंड)", "de_DE": "जर्मन (जर्मनी)", "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_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_MY": "इंग्रजी (मलेशिया)", "en_NA": "इंग्रजी (नामिबिया)", "en_NF": "इंग्रजी (नॉरफॉक बेट)", "en_NG": "इंग्रजी (नायजेरिया)", "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_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_VC": "इंग्रजी (सेंट व्हिन्सेंट आणि ग्रेनडाइन्स)", "en_VG": "इंग्रजी (ब्रिटिश व्हर्जिन बेटे)", "en_VI": "इंग्रजी (यू.एस. व्हर्जिन बेटे)", "en_VU": "इंग्रजी (वानौटु)", "en_WS": "इंग्रजी (सामोआ)", "en_ZA": "इंग्रजी (दक्षिण आफ्रिका)", "en_ZM": "इंग्रजी (झाम्बिया)", "en_ZW": "इंग्रजी (झिम्बाब्वे)", "eo": "एस्परान्टो", "es": "स्पॅनिश", "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": "बास्क (स्पेन)", "fa": "फारसी", "fa_AF": "फारसी (अफगाणिस्तान)", "fa_IR": "फारसी (ईराण)", "ff": "फुलाह", "ff_CM": "फुलाह (कॅमेरून)", "ff_GN": "फुलाह (गिनी)", "ff_MR": "फुलाह (मॉरिटानिया)", "ff_SN": "फुलाह (सेनेगल)", "fi": "फिन्निश", "fi_FI": "फिन्निश (फिनलंड)", "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": "फ्रेंच (मायोट्टे)", "fy": "पश्चिमी फ्रिशियन", "fy_NL": "पश्चिमी फ्रिशियन (नेदरलँड)", "ga": "आयरिश", "ga_IE": "आयरिश (आयर्लंड)", "gd": "स्कॉट्स गेलिक", "gd_GB": "स्कॉट्स गेलिक (युनायटेड किंगडम)", "gl": "गॅलिशियन", "gl_ES": "गॅलिशियन (स्पेन)", "gu": "गुजराती", "gu_IN": "गुजराती (भारत)", "gv": "मांक्स", "gv_IM": "मांक्स (इस्ले ऑफ मॅन)", "ha": "हौसा", "ha_GH": "हौसा (घाना)", "ha_Latn": "हौसा (लॅटिन)", "ha_Latn_GH": "हौसा (लॅटिन, घाना)", "ha_Latn_NE": "हौसा (लॅटिन, नाइजर)", "ha_Latn_NG": "हौसा (लॅटिन, नायजेरिया)", "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_Cyrl": "कझाक (सीरिलिक)", "kk_Cyrl_KZ": "कझाक (सीरिलिक, कझाकस्तान)", "kk_KZ": "कझाक (कझाकस्तान)", "kl": "कलाल्लिसत", "kl_GL": "कलाल्लिसत (ग्रीनलंड)", "km": "ख्मेर", "km_KH": "ख्मेर (कंबोडिया)", "kn": "कन्नड", "kn_IN": "कन्नड (भारत)", "ko": "कोरियन", "ko_KP": "कोरियन (उत्तर कोरिया)", "ko_KR": "कोरियन (दक्षिण कोरिया)", "ks": "काश्मीरी", "ks_Arab": "काश्मीरी (अरबी)", "ks_Arab_IN": "काश्मीरी (अरबी, भारत)", "ks_IN": "काश्मीरी (भारत)", "kw": "कोर्निश", "kw_GB": "कोर्निश (युनायटेड किंगडम)", "ky": "किरगीझ", "ky_Cyrl": "किरगीझ (सीरिलिक)", "ky_Cyrl_KG": "किरगीझ (सीरिलिक, किरगिझस्तान)", "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_Cyrl": "मंगोलियन (सीरिलिक)", "mn_Cyrl_MN": "मंगोलियन (सीरिलिक, मंगोलिया)", "mn_MN": "मंगोलियन (मंगोलिया)", "mr": "मराठी", "mr_IN": "मराठी (भारत)", "ms": "मलय", "ms_BN": "मलय (ब्रुनेई)", "ms_Latn": "मलय (लॅटिन)", "ms_Latn_BN": "मलय (लॅटिन, ब्रुनेई)", "ms_Latn_MY": "मलय (लॅटिन, मलेशिया)", "ms_Latn_SG": "मलय (लॅटिन, सिंगापूर)", "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_CV": "पोर्तुगीज (केप व्हर्डे)", "pt_GW": "पोर्तुगीज (गिनी-बिसाउ)", "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_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_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": "उझ्बेक (उझबेकिस्तान)", "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": "झुलू (दक्षिण आफ्रिका)" } } src/Symfony/Component/Intl/Resources/data/locales/ms.json000066400000000000000000000511201266465517700240220ustar00rootroot00000000000000{ "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_Latn": "Bambara (Latin)", "bm_Latn_ML": "Bambara (Latin, 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)", "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_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 (Yunani)", "en": "Inggeris", "en_AG": "Inggeris (Antigua dan Barbuda)", "en_AI": "Inggeris (Anguilla)", "en_AS": "Inggeris (Samoa Amerika)", "en_AU": "Inggeris (Australia)", "en_BB": "Inggeris (Barbados)", "en_BE": "Inggeris (Belgium)", "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_CK": "Inggeris (Kepulauan Cook)", "en_CM": "Inggeris (Cameroon)", "en_CX": "Inggeris (Pulau Krismas)", "en_DG": "Inggeris (Diego Garcia)", "en_DM": "Inggeris (Dominica)", "en_ER": "Inggeris (Eritrea)", "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_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_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_SG": "Inggeris (Singapura)", "en_SH": "Inggeris (Saint Helena)", "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_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)", "fi": "Finland", "fi_FI": "Finland (Finland)", "fo": "Faroe", "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", "fy_NL": "Frisian (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_Latn": "Hausa (Latin)", "ha_Latn_GH": "Hausa (Latin, Ghana)", "ha_Latn_NE": "Hausa (Latin, Niger)", "ha_Latn_NG": "Hausa (Latin, Nigeria)", "ha_NE": "Hausa (Niger)", "ha_NG": "Hausa (Nigeria)", "he": "Ibrani", "he_IL": "Ibrani (Israel)", "hi": "Hindi", "hi_IN": "Hindi (India)", "hr": "Croat", "hr_BA": "Croat (Bosnia dan Herzegovina)", "hr_HR": "Croat (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_Cyrl": "Kazakhstan (Cyril)", "kk_Cyrl_KZ": "Kazakhstan (Cyril, 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_Arab": "Kashmir (Arab)", "ks_Arab_IN": "Kashmir (Arab, India)", "ks_IN": "Kashmir (India)", "kw": "Cornish", "kw_GB": "Cornish (United Kingdom)", "ky": "Kirghiz", "ky_Cyrl": "Kirghiz (Cyril)", "ky_Cyrl_KG": "Kirghiz (Cyril, Kyrgyzstan)", "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_Cyrl": "Mongolia (Cyril)", "mn_Cyrl_MN": "Mongolia (Cyril, Mongolia)", "mn_MN": "Mongolia (Mongolia)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Bahasa Melayu", "ms_BN": "Bahasa Melayu (Brunei)", "ms_Latn": "Bahasa Melayu (Latin)", "ms_Latn_BN": "Bahasa Melayu (Latin, Brunei)", "ms_Latn_MY": "Bahasa Melayu (Latin, Malaysia)", "ms_Latn_SG": "Bahasa Melayu (Latin, Singapura)", "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_CV": "Portugis (Cape Verde)", "pt_GW": "Portugis (Guinea Bissau)", "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_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_Arab": "Uyghur (Arab)", "ug_Arab_CN": "Uyghur (Arab, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ms_BN.json000066400000000000000000000000401266465517700243740ustar00rootroot00000000000000{ "%%ALIAS": "ms_Latn_BN" } src/Symfony/Component/Intl/Resources/data/locales/ms_MY.json000066400000000000000000000000401266465517700244220ustar00rootroot00000000000000{ "%%ALIAS": "ms_Latn_MY" } src/Symfony/Component/Intl/Resources/data/locales/ms_SG.json000066400000000000000000000000401266465517700244060ustar00rootroot00000000000000{ "%%ALIAS": "ms_Latn_SG" } src/Symfony/Component/Intl/Resources/data/locales/mt.json000066400000000000000000000505101266465517700240250ustar00rootroot00000000000000{ "Names": { "af": "Afrikans", "af_NA": "Afrikans (Namibja)", "af_ZA": "Afrikans (Afrika t’Isfel)", "ak": "Akan", "ak_GH": "Akan (Gana)", "am": "Amħariku", "am_ET": "Amħariku (Etijopja)", "ar": "Għarbi", "ar_AE": "Għarbi (Emirati Għarab Maqgħuda)", "ar_BH": "Għarbi (Baħrajn)", "ar_DJ": "Għarbi (Ġibuti)", "ar_DZ": "Għarbi (Alġerija)", "ar_EG": "Għarbi (Eġittu)", "ar_EH": "Għarbi (Sahara tal-Punent)", "ar_ER": "Għarbi (Eritreja)", "ar_IL": "Għarbi (Iżrael)", "ar_IQ": "Għarbi (Iraq)", "ar_JO": "Għarbi (Ġordan)", "ar_KM": "Għarbi (Komoros)", "ar_KW": "Għarbi (Kuwajt)", "ar_LB": "Għarbi (Libanu)", "ar_LY": "Għarbi (Libja)", "ar_MA": "Għarbi (Marokk)", "ar_MR": "Għarbi (Mawritanja)", "ar_OM": "Għarbi (Oman)", "ar_PS": "Għarbi (Territorju Palestinjan)", "ar_QA": "Għarbi (Qatar)", "ar_SA": "Għarbi (Għarabja Sawdita)", "ar_SD": "Għarbi (Sudan)", "ar_SO": "Għarbi (Somalja)", "ar_SY": "Għarbi (Sirja)", "ar_TD": "Għarbi (Ċad)", "ar_TN": "Għarbi (Tuneż)", "ar_YE": "Għarbi (Jemen)", "as": "Assamese", "as_IN": "Assamese (L-Indja)", "az": "Ażerbajġani", "az_AZ": "Ażerbajġani (Ażerbajġan)", "az_Cyrl": "Ażerbajġani (Ċirilliku)", "az_Cyrl_AZ": "Ażerbajġani (Ċirilliku, Ażerbajġan)", "az_Latn": "Ażerbajġani (Latin)", "az_Latn_AZ": "Ażerbajġani (Latin, Ażerbajġan)", "be": "Belarussu", "be_BY": "Belarussu (Bjelorussja)", "bg": "Bulgaru", "bg_BG": "Bulgaru (Bulgarija)", "bm": "Bambara", "bm_Latn": "Bambara (Latin)", "bm_Latn_ML": "Bambara (Latin, Mali)", "bn": "Bengali", "bn_BD": "Bengali (Bangladexx)", "bn_IN": "Bengali (L-Indja)", "bo": "Tibetjan", "bo_CN": "Tibetjan (Iċ-Ċina)", "bo_IN": "Tibetjan (L-Indja)", "br": "Brenton", "br_FR": "Brenton (Franza)", "bs": "Bosnijan", "bs_BA": "Bosnijan (Bożnija Ħerżegovina)", "bs_Cyrl": "Bosnijan (Ċirilliku)", "bs_Cyrl_BA": "Bosnijan (Ċirilliku, Bożnija Ħerżegovina)", "bs_Latn": "Bosnijan (Latin)", "bs_Latn_BA": "Bosnijan (Latin, Bożnija Ħerżegovina)", "ca": "Katalan", "ca_AD": "Katalan (Andorra)", "ca_ES": "Katalan (Spanja)", "ca_FR": "Katalan (Franza)", "ca_IT": "Katalan (L-Italja)", "cs": "Ċek", "cs_CZ": "Ċek (Repubblika Ċeka)", "cy": "Welx", "cy_GB": "Welx (L-Ingilterra)", "da": "Daniż", "da_DK": "Daniż (Danimarka)", "da_GL": "Daniż (Grinlandja)", "de": "Ġermaniż", "de_AT": "Ġermaniż (Awstrija)", "de_BE": "Ġermaniż (Belġju)", "de_CH": "Ġermaniż (Svizzera)", "de_DE": "Ġermaniż (Il-Ġermanja)", "de_LI": "Ġermaniż (Liechtenstein)", "de_LU": "Ġermaniż (Lussemburgu)", "dz": "Dżongka", "dz_BT": "Dżongka (Butan)", "ee": "Ewe", "ee_GH": "Ewe (Gana)", "ee_TG": "Ewe (Togo)", "el": "Grieg", "el_CY": "Grieg (Ċipru)", "el_GR": "Grieg (Greċja)", "en": "Ingliż", "en_AG": "Ingliż (Antigua and Barbuda)", "en_AI": "Ingliż (Angwilla)", "en_AS": "Ingliż (Samoa Amerikana)", "en_AU": "Ingliż (Awstralja)", "en_BB": "Ingliż (Barbados)", "en_BE": "Ingliż (Belġju)", "en_BM": "Ingliż (Bermuda)", "en_BS": "Ingliż (Baħamas)", "en_BW": "Ingliż (Botswana)", "en_BZ": "Ingliż (Beliże)", "en_CA": "Ingliż (Kanada)", "en_CC": "Ingliż (Cocos (Keeling) Islands)", "en_CK": "Ingliż (Cook Islands)", "en_CM": "Ingliż (Kamerun)", "en_CX": "Ingliż (Christmas Island)", "en_DM": "Ingliż (Dominika)", "en_ER": "Ingliż (Eritreja)", "en_FJ": "Ingliż (Fiġi)", "en_FK": "Ingliż (Falkland Islands)", "en_FM": "Ingliż (Mikronesja)", "en_GB": "Ingliż (L-Ingilterra)", "en_GD": "Ingliż (Grenada)", "en_GH": "Ingliż (Gana)", "en_GI": "Ingliż (Gibraltar)", "en_GM": "Ingliż (Gambja)", "en_GU": "Ingliż (Gwam)", "en_GY": "Ingliż (Gujana)", "en_HK": "Ingliż (Ħong Kong S.A.R. Ċina)", "en_IE": "Ingliż (Irlanda)", "en_IM": "Ingliż (Isle of Man)", "en_IN": "Ingliż (L-Indja)", "en_IO": "Ingliż (British Indian Ocean Territory)", "en_JM": "Ingliż (Ġamajka)", "en_KE": "Ingliż (Kenja)", "en_KI": "Ingliż (Kiribati)", "en_KN": "Ingliż (Saint Kitts and Nevis)", "en_KY": "Ingliż (Gżejjer Kajmani)", "en_LC": "Ingliż (Santa Luċija)", "en_LR": "Ingliż (Liberja)", "en_LS": "Ingliż (Lesoto)", "en_MG": "Ingliż (Madagaskar)", "en_MH": "Ingliż (Gżejjer ta’ Marshall)", "en_MO": "Ingliż (Macao S.A.R., China)", "en_MP": "Ingliż (Gżejjer Marjana ta’ Fuq)", "en_MS": "Ingliż (Montserrat)", "en_MT": "Ingliż (Malta)", "en_MU": "Ingliż (Mawrizju)", "en_MW": "Ingliż (Malawi)", "en_MY": "Ingliż (Malasja)", "en_NA": "Ingliż (Namibja)", "en_NF": "Ingliż (Norfolk Island)", "en_NG": "Ingliż (Niġerja)", "en_NR": "Ingliż (Nauru)", "en_NU": "Ingliż (Niue)", "en_NZ": "Ingliż (New Zealand)", "en_PG": "Ingliż (Papwa-Ginea Ġdida)", "en_PH": "Ingliż (Filippini)", "en_PK": "Ingliż (Pakistan)", "en_PN": "Ingliż (Pitcairn)", "en_PR": "Ingliż (Puerto Rico)", "en_PW": "Ingliż (Palau)", "en_RW": "Ingliż (Rwanda)", "en_SB": "Ingliż (Solomon Islands)", "en_SC": "Ingliż (Seychelles)", "en_SD": "Ingliż (Sudan)", "en_SG": "Ingliż (Singapor)", "en_SH": "Ingliż (Saint Helena)", "en_SL": "Ingliż (Sierra Leone)", "en_SZ": "Ingliż (Sważiland)", "en_TC": "Ingliż (Turks and Caicos Islands)", "en_TK": "Ingliż (Tokelaw)", "en_TO": "Ingliż (Tonga)", "en_TT": "Ingliż (Trinidad u Tobago)", "en_TV": "Ingliż (Tuvalu)", "en_TZ": "Ingliż (Tanżanija)", "en_UG": "Ingliż (Uganda)", "en_UM": "Ingliż (United States Minor Outlying Islands)", "en_US": "Ingliż (L-Istati Uniti)", "en_VC": "Ingliż (Saint Vincent and the Grenadines)", "en_VG": "Ingliż (British Virgin Islands)", "en_VI": "Ingliż (U.S. Virgin Islands)", "en_VU": "Ingliż (Vanwatu)", "en_WS": "Ingliż (Samoa)", "en_ZA": "Ingliż (Afrika t’Isfel)", "en_ZM": "Ingliż (Żambja)", "en_ZW": "Ingliż (Żimbabwe)", "eo": "Esperanto", "es": "Spanjol", "es_AR": "Spanjol (Arġentina)", "es_BO": "Spanjol (Bolivja)", "es_CL": "Spanjol (Ċili)", "es_CO": "Spanjol (Kolumbja)", "es_CR": "Spanjol (Kosta Rika)", "es_CU": "Spanjol (Kuba)", "es_DO": "Spanjol (Republikka Domenikana)", "es_EC": "Spanjol (Ekwador)", "es_ES": "Spanjol (Spanja)", "es_GQ": "Spanjol (Ginea Ekwatorjali)", "es_GT": "Spanjol (Gwatemala)", "es_HN": "Spanjol (Ħonduras)", "es_MX": "Spanjol (Messiku)", "es_NI": "Spanjol (Nikaragwa)", "es_PA": "Spanjol (Panama)", "es_PE": "Spanjol (Peru)", "es_PH": "Spanjol (Filippini)", "es_PR": "Spanjol (Puerto Rico)", "es_PY": "Spanjol (Paragwaj)", "es_SV": "Spanjol (El Salvador)", "es_US": "Spanjol (L-Istati Uniti)", "es_UY": "Spanjol (Urugwaj)", "es_VE": "Spanjol (Venezwela)", "et": "Estonjan", "et_EE": "Estonjan (Estonja)", "eu": "Bask", "eu_ES": "Bask (Spanja)", "fa": "Persjan", "fa_AF": "Persjan (Afganistan)", "fa_IR": "Persjan (Iran)", "ff": "Fulaħ", "ff_CM": "Fulaħ (Kamerun)", "ff_GN": "Fulaħ (Gineja)", "ff_MR": "Fulaħ (Mawritanja)", "ff_SN": "Fulaħ (Senegal)", "fi": "Finlandiż", "fi_FI": "Finlandiż (Finlandja)", "fo": "Fawriż", "fo_FO": "Fawriż (Gżejjer Faroe)", "fr": "Franċiż", "fr_BE": "Franċiż (Belġju)", "fr_BF": "Franċiż (Burkina Faso)", "fr_BI": "Franċiż (Burundi)", "fr_BJ": "Franċiż (Benin)", "fr_CA": "Franċiż (Kanada)", "fr_CD": "Franċiż (Democratic Republic of the Congo)", "fr_CF": "Franċiż (Repubblika Afrikana Ċentrali)", "fr_CG": "Franċiż (Kongo)", "fr_CH": "Franċiż (Svizzera)", "fr_CI": "Franċiż (Kosta ta’ l-Avorju)", "fr_CM": "Franċiż (Kamerun)", "fr_DJ": "Franċiż (Ġibuti)", "fr_DZ": "Franċiż (Alġerija)", "fr_FR": "Franċiż (Franza)", "fr_GA": "Franċiż (Gabon)", "fr_GF": "Franċiż (Gujana Franċiża)", "fr_GN": "Franċiż (Gineja)", "fr_GP": "Franċiż (Gwadelupe)", "fr_GQ": "Franċiż (Ginea Ekwatorjali)", "fr_HT": "Franċiż (Ħaiti)", "fr_KM": "Franċiż (Komoros)", "fr_LU": "Franċiż (Lussemburgu)", "fr_MA": "Franċiż (Marokk)", "fr_MC": "Franċiż (Monako)", "fr_MG": "Franċiż (Madagaskar)", "fr_ML": "Franċiż (Mali)", "fr_MQ": "Franċiż (Martinik)", "fr_MR": "Franċiż (Mawritanja)", "fr_MU": "Franċiż (Mawrizju)", "fr_NC": "Franċiż (New Caledonia)", "fr_NE": "Franċiż (Niġer)", "fr_PF": "Franċiż (Polinesja Franċiża)", "fr_PM": "Franċiż (Saint Pierre and Miquelon)", "fr_RE": "Franċiż (Réunion)", "fr_RW": "Franċiż (Rwanda)", "fr_SC": "Franċiż (Seychelles)", "fr_SN": "Franċiż (Senegal)", "fr_SY": "Franċiż (Sirja)", "fr_TD": "Franċiż (Ċad)", "fr_TG": "Franċiż (Togo)", "fr_TN": "Franċiż (Tuneż)", "fr_VU": "Franċiż (Vanwatu)", "fr_WF": "Franċiż (Wallis and Futuna)", "fr_YT": "Franċiż (Majotte)", "fy": "Friżjan", "fy_NL": "Friżjan (Olanda)", "ga": "Irlandiż", "ga_IE": "Irlandiż (Irlanda)", "gd": "Galliku Skoċċiż", "gd_GB": "Galliku Skoċċiż (L-Ingilterra)", "gl": "Gallegjan", "gl_ES": "Gallegjan (Spanja)", "gu": "Guġarati", "gu_IN": "Guġarati (L-Indja)", "gv": "Manks", "gv_IM": "Manks (Isle of Man)", "ha": "Ħawsa", "ha_GH": "Ħawsa (Gana)", "ha_Latn": "Ħawsa (Latin)", "ha_Latn_GH": "Ħawsa (Latin, Gana)", "ha_Latn_NE": "Ħawsa (Latin, Niġer)", "ha_Latn_NG": "Ħawsa (Latin, Niġerja)", "ha_NE": "Ħawsa (Niġer)", "ha_NG": "Ħawsa (Niġerja)", "he": "Ebrajk", "he_IL": "Ebrajk (Iżrael)", "hi": "Ħindi", "hi_IN": "Ħindi (L-Indja)", "hr": "Kroat", "hr_BA": "Kroat (Bożnija Ħerżegovina)", "hr_HR": "Kroat (Kroazja)", "hu": "Ungeriż", "hu_HU": "Ungeriż (Ungerija)", "hy": "Armenjan", "hy_AM": "Armenjan (Armenja)", "id": "Indoneżjan", "id_ID": "Indoneżjan (Indoneżja)", "ig": "Igbo", "ig_NG": "Igbo (Niġerja)", "ii": "Sichuan Yi", "ii_CN": "Sichuan Yi (Iċ-Ċina)", "is": "Iżlandiż", "is_IS": "Iżlandiż (Islanda)", "it": "Taljan", "it_CH": "Taljan (Svizzera)", "it_IT": "Taljan (L-Italja)", "it_SM": "Taljan (San Marino)", "ja": "Ġappuniż", "ja_JP": "Ġappuniż (Il-Ġappun)", "ka": "Ġorġjan", "ka_GE": "Ġorġjan (Ġorġja)", "ki": "Kikuju", "ki_KE": "Kikuju (Kenja)", "kk": "Każak", "kk_Cyrl": "Każak (Ċirilliku)", "kk_Cyrl_KZ": "Każak (Ċirilliku, Każakstan)", "kk_KZ": "Każak (Każakstan)", "kl": "Kalallisut", "kl_GL": "Kalallisut (Grinlandja)", "km": "Kmer", "km_KH": "Kmer (Kambodja)", "kn": "Kannada", "kn_IN": "Kannada (L-Indja)", "ko": "Korejan", "ko_KP": "Korejan (Koreja ta’ Fuq)", "ko_KR": "Korejan (Koreja t’Isfel)", "ks": "Kaxmiri", "ks_Arab": "Kaxmiri (Għarbi)", "ks_Arab_IN": "Kaxmiri (Għarbi, L-Indja)", "ks_IN": "Kaxmiri (L-Indja)", "kw": "Korniku", "kw_GB": "Korniku (L-Ingilterra)", "ky": "Kirgiż", "ky_Cyrl": "Kirgiż (Ċirilliku)", "ky_Cyrl_KG": "Kirgiż (Ċirilliku, Kirgistan)", "ky_KG": "Kirgiż (Kirgistan)", "lb": "Letżburgiż", "lb_LU": "Letżburgiż (Lussemburgu)", "lg": "Ganda", "lg_UG": "Ganda (Uganda)", "ln": "Lingaljan", "ln_AO": "Lingaljan (Angola)", "ln_CD": "Lingaljan (Democratic Republic of the Congo)", "ln_CF": "Lingaljan (Repubblika Afrikana Ċentrali)", "ln_CG": "Lingaljan (Kongo)", "lo": "Lao", "lo_LA": "Lao (Laos)", "lt": "Litwanjan", "lt_LT": "Litwanjan (Litwanja)", "lu": "Luba-Katanga", "lu_CD": "Luba-Katanga (Democratic Republic of the Congo)", "lv": "Latvjan", "lv_LV": "Latvjan (Latvja)", "mg": "Malagażi", "mg_MG": "Malagażi (Madagaskar)", "mk": "Maċedonjan", "mk_MK": "Maċedonjan (Maċedonja)", "ml": "Malajalam", "ml_IN": "Malajalam (L-Indja)", "mn": "Mongoljan", "mn_Cyrl": "Mongoljan (Ċirilliku)", "mn_Cyrl_MN": "Mongoljan (Ċirilliku, Mongolja)", "mn_MN": "Mongoljan (Mongolja)", "mr": "Marati", "mr_IN": "Marati (L-Indja)", "ms": "Malajan", "ms_BN": "Malajan (Brunej)", "ms_Latn": "Malajan (Latin)", "ms_Latn_BN": "Malajan (Latin, Brunej)", "ms_Latn_MY": "Malajan (Latin, Malasja)", "ms_Latn_SG": "Malajan (Latin, Singapor)", "ms_MY": "Malajan (Malasja)", "ms_SG": "Malajan (Singapor)", "mt": "Malti", "mt_MT": "Malti (Malta)", "my": "Burmiż", "my_MM": "Burmiż (Mjanmar)", "nb": "Bokmahal Norveġiż", "nb_NO": "Bokmahal Norveġiż (Norveġja)", "nb_SJ": "Bokmahal Norveġiż (Svalbard and Jan Mayen)", "nd": "Ndebele, ta’ Fuq", "nd_ZW": "Ndebele, ta’ Fuq (Żimbabwe)", "ne": "Nepaliż", "ne_IN": "Nepaliż (L-Indja)", "ne_NP": "Nepaliż (Nepal)", "nl": "Olandiż", "nl_AW": "Olandiż (Aruba)", "nl_BE": "Olandiż (Belġju)", "nl_NL": "Olandiż (Olanda)", "nl_SR": "Olandiż (Surinam)", "nn": "Ninorsk Norveġiż", "nn_NO": "Ninorsk Norveġiż (Norveġja)", "no": "Norveġiż", "no_NO": "Norveġiż (Norveġja)", "om": "Oromo (Afan)", "om_ET": "Oromo (Etijopja)", "om_KE": "Oromo (Kenja)", "or": "Orija", "or_IN": "Orija (L-Indja)", "os": "Ossettiku", "os_GE": "Ossettiku (Ġorġja)", "os_RU": "Ossettiku (Ir-Russja)", "pa": "Punġabi", "pa_Arab": "Punġabi (Għarbi)", "pa_Arab_PK": "Punġabi (Għarbi, Pakistan)", "pa_IN": "Punġabi (L-Indja)", "pa_PK": "Punġabi (Pakistan)", "pl": "Pollakk", "pl_PL": "Pollakk (Polonja)", "ps": "Paxtun", "ps_AF": "Paxtun (Afganistan)", "pt": "Portugiż", "pt_AO": "Portugiż (Angola)", "pt_BR": "Portugiż (Il-Brażil)", "pt_CV": "Portugiż (Kape Verde)", "pt_GW": "Portugiż (Ginea-Bissaw)", "pt_MO": "Portugiż (Macao S.A.R., China)", "pt_MZ": "Portugiż (Możambik)", "pt_PT": "Portugiż (Portugall)", "pt_ST": "Portugiż (Sao Tome and Principe)", "pt_TL": "Portugiż (Timor tal-Lvant)", "qu": "Keċwa", "qu_BO": "Keċwa (Bolivja)", "qu_EC": "Keċwa (Ekwador)", "qu_PE": "Keċwa (Peru)", "rm": "Reto-Romanz", "rm_CH": "Reto-Romanz (Svizzera)", "rn": "Rundi", "rn_BI": "Rundi (Burundi)", "ro": "Rumen", "ro_MD": "Rumen (Maldova)", "ro_RO": "Rumen (Rumanija)", "ru": "Russu", "ru_BY": "Russu (Bjelorussja)", "ru_KG": "Russu (Kirgistan)", "ru_KZ": "Russu (Każakstan)", "ru_MD": "Russu (Maldova)", "ru_RU": "Russu (Ir-Russja)", "ru_UA": "Russu (Ukraina)", "rw": "Kinjarwanda", "rw_RW": "Kinjarwanda (Rwanda)", "se": "Sami ta’ Fuq", "se_FI": "Sami ta’ Fuq (Finlandja)", "se_NO": "Sami ta’ Fuq (Norveġja)", "se_SE": "Sami ta’ Fuq (Żvezja)", "sg": "Sango", "sg_CF": "Sango (Repubblika Afrikana Ċentrali)", "sh": "Serbo-Kroat", "sh_BA": "Serbo-Kroat (Bożnija Ħerżegovina)", "si": "Sinħaliż", "si_LK": "Sinħaliż (Sri Lanka)", "sk": "Slovakk", "sk_SK": "Slovakk (Slovakkja)", "sl": "Sloven", "sl_SI": "Sloven (Slovenja)", "sn": "Xona", "sn_ZW": "Xona (Żimbabwe)", "so": "Somali", "so_DJ": "Somali (Ġibuti)", "so_ET": "Somali (Etijopja)", "so_KE": "Somali (Kenja)", "so_SO": "Somali (Somalja)", "sq": "Albaniż", "sq_AL": "Albaniż (Albanija)", "sq_MK": "Albaniż (Maċedonja)", "sr": "Serb", "sr_BA": "Serb (Bożnija Ħerżegovina)", "sr_Cyrl": "Serb (Ċirilliku)", "sr_Cyrl_BA": "Serb (Ċirilliku, Bożnija Ħerżegovina)", "sr_Latn": "Serb (Latin)", "sr_Latn_BA": "Serb (Latin, Bożnija Ħerżegovina)", "sv": "Svediż", "sv_AX": "Svediż (Gżejjer Aland)", "sv_FI": "Svediż (Finlandja)", "sv_SE": "Svediż (Żvezja)", "sw": "Swaħili", "sw_KE": "Swaħili (Kenja)", "sw_TZ": "Swaħili (Tanżanija)", "sw_UG": "Swaħili (Uganda)", "ta": "Tamil", "ta_IN": "Tamil (L-Indja)", "ta_LK": "Tamil (Sri Lanka)", "ta_MY": "Tamil (Malasja)", "ta_SG": "Tamil (Singapor)", "te": "Telugu", "te_IN": "Telugu (L-Indja)", "th": "Tajlandiż", "th_TH": "Tajlandiż (Tajlandja)", "ti": "Tigrinja", "ti_ER": "Tigrinja (Eritreja)", "ti_ET": "Tigrinja (Etijopja)", "tl": "Tagalog", "tl_PH": "Tagalog (Filippini)", "to": "Tongan", "to_TO": "Tongan (Tonga)", "tr": "Tork", "tr_CY": "Tork (Ċipru)", "tr_TR": "Tork (Turkija)", "ug": "Wigur", "ug_Arab": "Wigur (Għarbi)", "ug_Arab_CN": "Wigur (Għarbi, Iċ-Ċina)", "ug_CN": "Wigur (Iċ-Ċina)", "uk": "Ukranjan", "uk_UA": "Ukranjan (Ukraina)", "ur": "Urdu", "ur_IN": "Urdu (L-Indja)", "ur_PK": "Urdu (Pakistan)", "uz": "Użbek", "uz_AF": "Użbek (Afganistan)", "uz_Arab": "Użbek (Għarbi)", "uz_Arab_AF": "Użbek (Għarbi, Afganistan)", "uz_Cyrl": "Użbek (Ċirilliku)", "uz_Cyrl_UZ": "Użbek (Ċirilliku, Użbekistan)", "uz_Latn": "Użbek (Latin)", "uz_Latn_UZ": "Użbek (Latin, Użbekistan)", "uz_UZ": "Użbek (Użbekistan)", "vi": "Vjetnamiż", "vi_VN": "Vjetnamiż (Vjetnam)", "yi": "Jiddix", "yo": "Joruba", "yo_BJ": "Joruba (Benin)", "yo_NG": "Joruba (Niġerja)", "zh": "Ċiniż", "zh_CN": "Ċiniż (Iċ-Ċina)", "zh_HK": "Ċiniż (Ħong Kong S.A.R. Ċina)", "zh_Hans": "Ċiniż (Simplifikat)", "zh_Hans_CN": "Ċiniż (Simplifikat, Iċ-Ċina)", "zh_Hans_HK": "Ċiniż (Simplifikat, Ħong Kong S.A.R. Ċina)", "zh_Hans_MO": "Ċiniż (Simplifikat, Macao S.A.R., China)", "zh_Hans_SG": "Ċiniż (Simplifikat, Singapor)", "zh_Hant": "Ċiniż (Tradizzjonali)", "zh_Hant_HK": "Ċiniż (Tradizzjonali, Ħong Kong S.A.R. Ċina)", "zh_Hant_MO": "Ċiniż (Tradizzjonali, Macao S.A.R., China)", "zh_Hant_TW": "Ċiniż (Tradizzjonali, Tajwan)", "zh_MO": "Ċiniż (Macao S.A.R., China)", "zh_SG": "Ċiniż (Singapor)", "zh_TW": "Ċiniż (Tajwan)", "zu": "Żulu", "zu_ZA": "Żulu (Afrika t’Isfel)" } } src/Symfony/Component/Intl/Resources/data/locales/my.json000066400000000000000000001164131266465517700240370ustar00rootroot00000000000000{ "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_Latn": "ဘန်ဘာရာ (လက်တင်)", "bm_Latn_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": "ကာတာလန် (အီတလီ)", "cs": "ချက်", "cs_CZ": "ချက် (ချက် ပြည်ထောင်စု)", "cy": "ဝေလ", "cy_GB": "ဝေလ (ယူနိုက်တက်ကင်းဒမ်း)", "da": "ဒိန်းမတ်", "da_DK": "ဒိန်းမတ် (ဒိန်းမတ်)", "da_GL": "ဒိန်းမတ် (ဂရင်းလန်း)", "de": "ဂျာမန်", "de_AT": "ဂျာမန် (ဩစတြီးယား)", "de_BE": "ဂျာမန် (ဘယ်လ်ဂျီယမ်)", "de_CH": "ဂျာမန် (ဆွစ်ဇလန်)", "de_DE": "ဂျာမန် (ဂျာမဏီ)", "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_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_MY": "အင်္ဂလိပ် (မလေးရှား)", "en_NA": "အင်္ဂလိပ် (နမ်မီးဘီးယား)", "en_NF": "အင်္ဂလိပ် (နောဖော့ခ်ကျွန်း)", "en_NG": "အင်္ဂလိပ် (နိုင်ဂျီးရီးယား)", "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_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_VC": "အင်္ဂလိပ် (စိန့်ဗင့်ဆင့်နှင့် သည်ဂရဲနာဒင်းစ်)", "en_VG": "အင်္ဂလိပ် (ဗြိတိသျှ ဗာဂျင်း ကျွန်းစု)", "en_VI": "အင်္ဂလိပ် (ယူအက်စ် ဗာဂျင်း ကျွန်းစု)", "en_VU": "အင်္ဂလိပ် (ဗာနုအာတူ)", "en_WS": "အင်္ဂလိပ် (ဆာမိုအာ)", "en_ZA": "အင်္ဂလိပ် (တောင်အာဖရိက)", "en_ZM": "အင်္ဂလိပ် (ဇမ်ဘီယာ)", "en_ZW": "အင်္ဂလိပ် (ဇင်ဘာဘွေ)", "eo": "အက္စပရန္တို", "es": "စပိန်", "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": "ဘစ်က္ကီ (စပိန်)", "fa": "ပါရှန်", "fa_AF": "ပါရှန် (အာဖဂန်နစ္စတန်)", "fa_IR": "ပါရှန် (အီရန်)", "fi": "ဖင်နစ်ရှ်", "fi_FI": "ဖင်နစ်ရှ် (ဖင်လန်)", "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": "ပြင်သစ် (မေအိုတီ)", "fy": "အနောက်ပိုင်း ဖရီစီရန်", "fy_NL": "အနောက်ပိုင်း ဖရီစီရန် (နယ်သာလန်)", "ga": "အိုင်းရစ်", "ga_IE": "အိုင်းရစ် (အိုင်ယာလန်)", "gl": "ဂါလာစီယံ", "gl_ES": "ဂါလာစီယံ (စပိန်)", "gu": "ဂူဂျာရသီ", "gu_IN": "ဂူဂျာရသီ (အိန္ဒိယ)", "gv": "မန်းဇ်", "gv_IM": "မန်းဇ် (မန်ကျွန်း)", "ha": "ဟာဥစာ", "ha_GH": "ဟာဥစာ (ဂါနာ)", "ha_Latn": "ဟာဥစာ (လက်တင်)", "ha_Latn_GH": "ဟာဥစာ (လက်တင်, ဂါနာ)", "ha_Latn_NE": "ဟာဥစာ (လက်တင်, နိုင်ဂျာ)", "ha_Latn_NG": "ဟာဥစာ (လက်တင်, နိုင်ဂျီးရီးယား)", "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_Cyrl": "ခါဇါခ် (စစ်ရိလစ်)", "kk_Cyrl_KZ": "ခါဇါခ် (စစ်ရိလစ်, ကာဇက်စတန်)", "kk_KZ": "ခါဇါခ် (ကာဇက်စတန်)", "kl": "ခလာအ်လီဆပ်", "kl_GL": "ခလာအ်လီဆပ် (ဂရင်းလန်း)", "km": "ခမာ", "km_KH": "ခမာ (ကမ္ဘောဒီးယား)", "kn": "ကန္နာဒါ", "kn_IN": "ကန္နာဒါ (အိန္ဒိယ)", "ko": "ကိုးရီးယား", "ko_KP": "ကိုးရီးယား (မြောက်ကိုရီးယား)", "ko_KR": "ကိုးရီးယား (တောင်ကိုရီးယား)", "ks": "ကက်ရှ်မီရီ", "ks_Arab": "ကက်ရှ်မီရီ (အာရေဗျ)", "ks_Arab_IN": "ကက်ရှ်မီရီ (အာရေဗျ, အိန္ဒိယ)", "ks_IN": "ကက်ရှ်မီရီ (အိန္ဒိယ)", "kw": "ခိုနီရှ်", "kw_GB": "ခိုနီရှ် (ယူနိုက်တက်ကင်းဒမ်း)", "ky": "ခရူဂစ်", "ky_Cyrl": "ခရူဂစ် (စစ်ရိလစ်)", "ky_Cyrl_KG": "ခရူဂစ် (စစ်ရိလစ်, ခရူဂစ်စတန်)", "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_Cyrl": "မွန်ဂိုလီးယန်း (စစ်ရိလစ်)", "mn_Cyrl_MN": "မွန်ဂိုလီးယန်း (စစ်ရိလစ်, မွန်ဂိုးလီးယား)", "mn_MN": "မွန်ဂိုလီးယန်း (မွန်ဂိုးလီးယား)", "mr": "မာရသီ", "mr_IN": "မာရသီ (အိန္ဒိယ)", "ms": "မလေး", "ms_BN": "မလေး (ဘရူနိုင်း)", "ms_Latn": "မလေး (လက်တင်)", "ms_Latn_BN": "မလေး (လက်တင်, ဘရူနိုင်း)", "ms_Latn_MY": "မလေး (လက်တင်, မလေးရှား)", "ms_Latn_SG": "မလေး (လက်တင်, စင်္ကာပူ)", "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": "အိုရီရာ (အိန္ဒိယ)", "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": "ပေါ်တူဂီ (အရှေ့တီမော)", "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_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_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": "ဦးဇ်ဘက် (ဥဘက်ကစ္စတန်)", "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": "ဇူလူ (တောင်အာဖရိက)" } } src/Symfony/Component/Intl/Resources/data/locales/nb.json000066400000000000000000000517671266465517700240230ustar00rootroot00000000000000{ "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": "assamisk", "as_IN": "assamisk (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_Latn": "bambara (latinsk)", "bm_Latn_ML": "bambara (latinsk, 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)", "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 (Østerrike)", "de_BE": "tysk (Belgia)", "de_CH": "tysk (Sveits)", "de_DE": "tysk (Tyskland)", "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_AU": "engelsk (Australia)", "en_BB": "engelsk (Barbados)", "en_BE": "engelsk (Belgia)", "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_CK": "engelsk (Cookøyene)", "en_CM": "engelsk (Kamerun)", "en_CX": "engelsk (Christmasøya)", "en_DG": "engelsk (Diego Garcia)", "en_DM": "engelsk (Dominica)", "en_ER": "engelsk (Eritrea)", "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_IM": "engelsk (Man)", "en_IN": "engelsk (India)", "en_IO": "engelsk (Britiske territorier i Indiahavet)", "en_JE": "engelsk (Jersey)", "en_JM": "engelsk (Jamaica)", "en_KE": "engelsk (Kenya)", "en_KI": "engelsk (Kiribati)", "en_KN": "engelsk (St. 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_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_SG": "engelsk (Singapore)", "en_SH": "engelsk (St. Helena)", "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_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": "fulani", "ff_CM": "fulani (Kamerun)", "ff_GN": "fulani (Guinea)", "ff_MR": "fulani (Mauritania)", "ff_SN": "fulani (Senegal)", "fi": "finsk", "fi_FI": "finsk (Finland)", "fo": "færøysk", "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_Latn": "hausa (latinsk)", "ha_Latn_GH": "hausa (latinsk, Ghana)", "ha_Latn_NE": "hausa (latinsk, Niger)", "ha_Latn_NG": "hausa (latinsk, Nigeria)", "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_Cyrl": "kasakhisk (kyrillisk)", "kk_Cyrl_KZ": "kasakhisk (kyrillisk, Kasakhstan)", "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_Arab": "kasjmiri (arabisk)", "ks_Arab_IN": "kasjmiri (arabisk, India)", "ks_IN": "kasjmiri (India)", "kw": "kornisk", "kw_GB": "kornisk (Storbritannia)", "ky": "kirgisisk", "ky_Cyrl": "kirgisisk (kyrillisk)", "ky_Cyrl_KG": "kirgisisk (kyrillisk, Kirgisistan)", "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": "madagassisk", "mg_MG": "madagassisk (Madagaskar)", "mk": "makedonsk", "mk_MK": "makedonsk (Makedonia)", "ml": "malayalam", "ml_IN": "malayalam (India)", "mn": "mongolsk", "mn_Cyrl": "mongolsk (kyrillisk)", "mn_Cyrl_MN": "mongolsk (kyrillisk, Mongolia)", "mn_MN": "mongolsk (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malayisk", "ms_BN": "malayisk (Brunei)", "ms_Latn": "malayisk (latinsk)", "ms_Latn_BN": "malayisk (latinsk, Brunei)", "ms_Latn_MY": "malayisk (latinsk, Malaysia)", "ms_Latn_SG": "malayisk (latinsk, Singapore)", "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_CV": "portugisisk (Kapp Verde)", "pt_GW": "portugisisk (Guinea-Bissau)", "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_KE": "swahili (Kenya)", "sw_TZ": "swahili (Tanzania)", "sw_UG": "swahili (Uganda)", "ta": "tamilsk", "ta_IN": "tamilsk (India)", "ta_LK": "tamilsk (Sri Lanka)", "ta_MY": "tamilsk (Malaysia)", "ta_SG": "tamilsk (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_Arab": "uigurisk (arabisk)", "ug_Arab_CN": "uigurisk (arabisk, Kina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/nd.json000066400000000000000000000305231266465517700240100ustar00rootroot00000000000000{ "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_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_AU": "isi-Ngisi (Australia)", "en_BB": "isi-Ngisi (Bhabhadosi)", "en_BE": "isi-Ngisi (Bhelgium)", "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_CK": "isi-Ngisi (Cook Islands)", "en_CM": "isi-Ngisi (Khameruni)", "en_DM": "isi-Ngisi (Dominikha)", "en_ER": "isi-Ngisi (Eritrea)", "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_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_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_SG": "isi-Ngisi (Singapore)", "en_SH": "isi-Ngisi (Saint Helena)", "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_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_CV": "isi-Potukezi (Cape Verde Islands)", "pt_GW": "isi-Potukezi (Guinea-Bissau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ne.json000066400000000000000000001122531266465517700240120ustar00rootroot00000000000000{ "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_Latn": "बाम्बारा (ल्याटिन)", "bm_Latn_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": "क्याटालन (इटाली)", "cs": "चेक", "cs_CZ": "चेक (चेक गणतन्त्र)", "cy": "वेल्श", "cy_GB": "वेल्श (बेलायत)", "da": "डेनिश", "da_DK": "डेनिश (डेनमार्क)", "da_GL": "डेनिश (ग्रिनल्याण्ड)", "de": "जर्मन", "de_AT": "जर्मन (अष्ट्रिया)", "de_BE": "जर्मन (बेल्जियम)", "de_CH": "जर्मन (स्विजरल्याण्ड)", "de_DE": "जर्मन (जर्मनी)", "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_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_MY": "अंग्रेजी (मलेसिया)", "en_NA": "अंग्रेजी (नामिबिया)", "en_NF": "अंग्रेजी (नोरफोल्क टापु)", "en_NG": "अंग्रेजी (नाइजेरिया)", "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_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_VC": "अंग्रेजी (सेन्ट भिन्सेन्ट र ग्रेनाडिन्स)", "en_VG": "अंग्रेजी (बेलायती भर्जिन टापुहरु)", "en_VI": "अंग्रेजी (संयुक्त राज्य भर्जिन टापुहरु)", "en_VU": "अंग्रेजी (भानुआतु)", "en_WS": "अंग्रेजी (सामोआ)", "en_ZA": "अंग्रेजी (दक्षिण अफ्रिका)", "en_ZM": "अंग्रेजी (जाम्बिया)", "en_ZW": "अंग्रेजी (जिम्बाबे)", "eo": "एस्पेरान्तो", "es": "स्पेनिस", "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": "बास्क (स्पेन)", "fa": "फारसी", "fa_AF": "फारसी (अफगानिस्तान)", "fa_IR": "फारसी (इरान)", "fi": "फिनिश", "fi_FI": "फिनिश (फिन्ल्याण्ड)", "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": "फ्रान्सेली (मायोट्ट)", "fy": "फ्रिजीयन", "fy_NL": "फ्रिजीयन (नेदरल्याण्ड्स)", "ga": "आइरिश", "ga_IE": "आइरिश (आयरल्याण्ड)", "gl": "गलिसियाली", "gl_ES": "गलिसियाली (स्पेन)", "gu": "गुजराती", "gu_IN": "गुजराती (भारत)", "gv": "मान्क्स", "gv_IM": "मान्क्स (आइज्ले अफ् म्यान)", "ha": "हाउसा", "ha_GH": "हाउसा (घाना)", "ha_Latn": "हाउसा (ल्याटिन)", "ha_Latn_GH": "हाउसा (ल्याटिन, घाना)", "ha_Latn_NE": "हाउसा (ल्याटिन, नाइजर)", "ha_Latn_NG": "हाउसा (ल्याटिन, नाइजेरिया)", "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_Cyrl": "काजाख (सिरिलिक)", "kk_Cyrl_KZ": "काजाख (सिरिलिक, काजाकस्तान)", "kk_KZ": "काजाख (काजाकस्तान)", "kl": "कालालिसुट", "kl_GL": "कालालिसुट (ग्रिनल्याण्ड)", "km": "खमेर", "km_KH": "खमेर (कम्बोडिया)", "kn": "कन्नाडा", "kn_IN": "कन्नाडा (भारत)", "ko": "कोरियाली", "ko_KP": "कोरियाली (उत्तर कोरिया)", "ko_KR": "कोरियाली (दक्षिण कोरिया)", "ks": "काश्मीरी", "ks_Arab": "काश्मीरी (अरबी)", "ks_Arab_IN": "काश्मीरी (अरबी, भारत)", "ks_IN": "काश्मीरी (भारत)", "kw": "कोर्निश", "kw_GB": "कोर्निश (बेलायत)", "ky": "किर्गिज", "ky_Cyrl": "किर्गिज (सिरिलिक)", "ky_Cyrl_KG": "किर्गिज (सिरिलिक, किर्गिस्थान)", "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_Cyrl": "मंगोल (सिरिलिक)", "mn_Cyrl_MN": "मंगोल (सिरिलिक, मङ्गोलिया)", "mn_MN": "मंगोल (मङ्गोलिया)", "mr": "मराठी", "mr_IN": "मराठी (भारत)", "ms": "मलाया", "ms_BN": "मलाया (ब्रुनाइ)", "ms_Latn": "मलाया (ल्याटिन)", "ms_Latn_BN": "मलाया (ल्याटिन, ब्रुनाइ)", "ms_Latn_MY": "मलाया (ल्याटिन, मलेसिया)", "ms_Latn_SG": "मलाया (ल्याटिन, सिङ्गापुर)", "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_CV": "पोर्तुगी (केप भर्डे)", "pt_GW": "पोर्तुगी (गिनी-बिसाउ)", "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_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_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": "उज्बेकी (उज्बेकिस्तान)", "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": "जुलु (दक्षिण अफ्रिका)" } } src/Symfony/Component/Intl/Resources/data/locales/nl.json000066400000000000000000000523551266465517700240270ustar00rootroot00000000000000{ "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 (Latijn)", "az_Latn_AZ": "Azerbeidzjaans (Latijn, Azerbeidzjan)", "be": "Wit-Russisch", "be_BY": "Wit-Russisch (Wit-Rusland)", "bg": "Bulgaars", "bg_BG": "Bulgaars (Bulgarije)", "bm": "Bambara", "bm_Latn": "Bambara (Latijn)", "bm_Latn_ML": "Bambara (Latijn, 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 (Latijn)", "bs_Latn_BA": "Bosnisch (Latijn, Bosnië en Herzegovina)", "ca": "Catalaans", "ca_AD": "Catalaans (Andorra)", "ca_ES": "Catalaans (Spanje)", "ca_FR": "Catalaans (Frankrijk)", "ca_IT": "Catalaans (Italië)", "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_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_AU": "Engels (Australië)", "en_BB": "Engels (Barbados)", "en_BE": "Engels (België)", "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_CK": "Engels (Cookeilanden)", "en_CM": "Engels (Kameroen)", "en_CX": "Engels (Christmaseiland)", "en_DG": "Engels (Diego Garcia)", "en_DM": "Engels (Dominica)", "en_ER": "Engels (Eritrea)", "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_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 (Caymaneilanden)", "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_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_SG": "Engels (Singapore)", "en_SH": "Engels (Sint-Helena)", "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_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_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_Latn": "Hausa (Latijn)", "ha_Latn_GH": "Hausa (Latijn, Ghana)", "ha_Latn_NE": "Hausa (Latijn, Niger)", "ha_Latn_NG": "Hausa (Latijn, Nigeria)", "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_Cyrl": "Kazachs (Cyrillisch)", "kk_Cyrl_KZ": "Kazachs (Cyrillisch, Kazachstan)", "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_Arab": "Kasjmiri (Arabisch)", "ks_Arab_IN": "Kasjmiri (Arabisch, India)", "ks_IN": "Kasjmiri (India)", "kw": "Cornish", "kw_GB": "Cornish (Verenigd Koninkrijk)", "ky": "Kirgizisch", "ky_Cyrl": "Kirgizisch (Cyrillisch)", "ky_Cyrl_KG": "Kirgizisch (Cyrillisch, Kirgizië)", "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_Cyrl": "Mongools (Cyrillisch)", "mn_Cyrl_MN": "Mongools (Cyrillisch, Mongolië)", "mn_MN": "Mongools (Mongolië)", "mr": "Marathi", "mr_IN": "Marathi (India)", "ms": "Maleis", "ms_BN": "Maleis (Brunei)", "ms_Latn": "Maleis (Latijn)", "ms_Latn_BN": "Maleis (Latijn, Brunei)", "ms_Latn_MY": "Maleis (Latijn, Maleisië)", "ms_Latn_SG": "Maleis (Latijn, Singapore)", "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_CV": "Portugees (Kaapverdië)", "pt_GW": "Portugees (Guinee-Bissau)", "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 (Wit-Rusland)", "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": "Servokroatisch", "sh_BA": "Servokroatisch (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 (Latijn)", "sr_Latn_BA": "Servisch (Latijn, Bosnië en Herzegovina)", "sr_Latn_ME": "Servisch (Latijn, Montenegro)", "sr_Latn_RS": "Servisch (Latijn, Servië)", "sr_Latn_XK": "Servisch (Latijn, 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_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 (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_Arab": "Oeigoers (Arabisch)", "ug_Arab_CN": "Oeigoers (Arabisch, China)", "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 (Latijn)", "uz_Latn_UZ": "Oezbeeks (Latijn, 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)" } } src/Symfony/Component/Intl/Resources/data/locales/nl_BE.json000066400000000000000000000003141266465517700243610ustar00rootroot00000000000000{ "Names": { "en_IM": "Engels (Het Eiland Man)", "gv_IM": "Manx (Het Eiland Man)", "sh": "Servo-Kroatisch", "sh_BA": "Servo-Kroatisch (Bosnië en Herzegovina)" } } src/Symfony/Component/Intl/Resources/data/locales/nn.json000066400000000000000000000513031266465517700240210ustar00rootroot00000000000000{ "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 (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 (Palestinsk territorium)", "ar_QA": "arabisk (Qatar)", "ar_SA": "arabisk (Saudi Arabia)", "ar_SD": "arabisk (Sudan)", "ar_SO": "arabisk (Somalia)", "ar_SY": "arabisk (Syria)", "ar_TD": "arabisk (Tchad)", "ar_TN": "arabisk (Tunisia)", "ar_YE": "arabisk (Yemen)", "as": "assamisk", "as_IN": "assamisk (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_Latn": "bambara (latinsk)", "bm_Latn_ML": "bambara (latinsk, 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)", "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_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_AU": "engelsk (Australia)", "en_BB": "engelsk (Barbados)", "en_BE": "engelsk (Belgia)", "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_CK": "engelsk (Cookøyane)", "en_CM": "engelsk (Kamerun)", "en_CX": "engelsk (Christmasøya)", "en_DG": "engelsk (Diego Garcia)", "en_DM": "engelsk (Dominica)", "en_ER": "engelsk (Eritrea)", "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_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_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_SG": "engelsk (Singapore)", "en_SH": "engelsk (Saint Helena)", "en_SL": "engelsk (Sierra Leone)", "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_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": "fulani", "ff_CM": "fulani (Kamerun)", "ff_GN": "fulani (Guinea)", "ff_MR": "fulani (Mauritania)", "ff_SN": "fulani (Senegal)", "fi": "finsk", "fi_FI": "finsk (Finland)", "fo": "færøysk", "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 (Komorene)", "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 (Tchad)", "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_Latn": "hausa (latinsk)", "ha_Latn_GH": "hausa (latinsk, Ghana)", "ha_Latn_NE": "hausa (latinsk, Niger)", "ha_Latn_NG": "hausa (latinsk, Nigeria)", "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_Cyrl": "kasakhisk (kyrillisk)", "kk_Cyrl_KZ": "kasakhisk (kyrillisk, Kasakhstan)", "kk_KZ": "kasakhisk (Kasakhstan)", "kl": "kalaallisut; grønlandsk", "kl_GL": "kalaallisut; 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_Arab": "kasjmiri (arabisk)", "ks_Arab_IN": "kasjmiri (arabisk, India)", "ks_IN": "kasjmiri (India)", "kw": "kornisk", "kw_GB": "kornisk (Storbritannia)", "ky": "kirgisisk", "ky_Cyrl": "kirgisisk (kyrillisk)", "ky_Cyrl_KG": "kirgisisk (kyrillisk, Kirgisistan)", "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_Cyrl": "mongolsk (kyrillisk)", "mn_Cyrl_MN": "mongolsk (kyrillisk, Mongolia)", "mn_MN": "mongolsk (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malayisk", "ms_BN": "malayisk (Brunei Darussalam)", "ms_Latn": "malayisk (latinsk)", "ms_Latn_BN": "malayisk (latinsk, Brunei Darussalam)", "ms_Latn_MY": "malayisk (latinsk, Malaysia)", "ms_Latn_SG": "malayisk (latinsk, Singapore)", "ms_MY": "malayisk (Malaysia)", "ms_SG": "malayisk (Singapore)", "mt": "maltesisk", "mt_MT": "maltesisk (Malta)", "my": "burmesisk", "my_MM": "burmesisk (Myanmar)", "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_NL": "nederlandsk (Nederland)", "nl_SR": "nederlandsk (Surinam)", "nn": "nynorsk", "nn_NO": "nynorsk (Noreg)", "no": "norsk", "no_NO": "norsk (Noreg)", "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": "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_CV": "portugisisk (Kapp Verde)", "pt_GW": "portugisisk (Guinea-Bissau)", "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 (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)", "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_Latn": "serbisk (latinsk)", "sr_Latn_BA": "serbisk (latinsk, Bosnia og Hercegovina)", "sr_Latn_ME": "serbisk (latinsk, Montenegro)", "sr_Latn_RS": "serbisk (latinsk, Serbia)", "sr_ME": "serbisk (Montenegro)", "sr_RS": "serbisk (Serbia)", "sv": "svensk", "sv_AX": "svensk (Åland)", "sv_FI": "svensk (Finland)", "sv_SE": "svensk (Sverige)", "sw": "swahili", "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": "tonga (Tonga-øyane)", "to_TO": "tonga (Tonga)", "tr": "tyrkisk", "tr_CY": "tyrkisk (Kypros)", "tr_TR": "tyrkisk (Tyrkia)", "ug": "uigurisk", "ug_Arab": "uigurisk (arabisk)", "ug_Arab_CN": "uigurisk (arabisk, Kina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/no.json000066400000000000000000000000301266465517700240110ustar00rootroot00000000000000{ "%%ALIAS": "nb" } src/Symfony/Component/Intl/Resources/data/locales/no_NO.json000066400000000000000000000000331266465517700244100ustar00rootroot00000000000000{ "%%ALIAS": "nb_NO" } src/Symfony/Component/Intl/Resources/data/locales/no_NO_NY.json000066400000000000000000000000331266465517700250160ustar00rootroot00000000000000{ "%%ALIAS": "nn_NO" } src/Symfony/Component/Intl/Resources/data/locales/om.json000066400000000000000000000075561266465517700240340ustar00rootroot00000000000000{ "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)", "el": "Afaan Giriiki", "en": "Ingliffa", "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_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", "ms_Latn": "Malaayiffaa (Latin)", "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" } } src/Symfony/Component/Intl/Resources/data/locales/or.json000066400000000000000000001115201266465517700240240ustar00rootroot00000000000000{ "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_Latn": "ବାମ୍ବାରା (ଲାଟିନ୍)", "bm_Latn_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": "କାଟାଲାନ୍ (ଇଟାଲୀ)", "cs": "ଚେକ୍", "cs_CZ": "ଚେକ୍ (ଚେକ୍ ସାଧାରଣତନ୍ତ୍ର)", "cy": "ୱେଲ୍ସ", "cy_GB": "ୱେଲ୍ସ (ବ୍ରିଟେନ୍)", "da": "ଡାନ୍ନିସ୍", "da_DK": "ଡାନ୍ନିସ୍ (ଡେନମାର୍କ)", "da_GL": "ଡାନ୍ନିସ୍ (ଗ୍ରୀନଲ୍ୟାଣ୍ଡ)", "de": "ଜର୍ମାନ୍", "de_AT": "ଜର୍ମାନ୍ (ଅଷ୍ଟ୍ରିଆ)", "de_BE": "ଜର୍ମାନ୍ (ବେଲଜିୟମ୍)", "de_CH": "ଜର୍ମାନ୍ (ସ୍ବିଜରଲ୍ୟାଣ୍ଡ)", "de_DE": "ଜର୍ମାନ୍ (ଜର୍ମାନୀ)", "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_AU": "ଇଂରାଜୀ (ଅଷ୍ଟ୍ରେଲିଆ)", "en_BB": "ଇଂରାଜୀ (ବାରବାଡୋସ୍)", "en_BE": "ଇଂରାଜୀ (ବେଲଜିୟମ୍)", "en_BM": "ଇଂରାଜୀ (ବରମୁଡା)", "en_BS": "ଇଂରାଜୀ (ବାହାମାସ୍)", "en_BW": "ଇଂରାଜୀ (ବୋଟସ୍ବାନ୍)", "en_BZ": "ଇଂରାଜୀ (ବେଲିଜ୍)", "en_CA": "ଇଂରାଜୀ (କାନାଡା)", "en_CC": "ଇଂରାଜୀ (କୋକୋସ୍ ଆଇସଲ୍ୟାଣ୍ଡ)", "en_CK": "ଇଂରାଜୀ (କୁକ୍ ଆଇସଲ୍ୟାଣ୍ଡ)", "en_CM": "ଇଂରାଜୀ (କାମେରୁନ୍)", "en_CX": "ଇଂରାଜୀ (ଖ୍ରୀଷ୍ଟମାସ ଆଇଲ୍ୟାଣ୍ଡ)", "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": "ଇଂରାଜୀ (ମାକାଉ SAR ଚିନ୍)", "en_MP": "ଇଂରାଜୀ (ଉତ୍ତର ମାରିଆନା ଦ୍ବୀପପୁଞ୍ଜ)", "en_MS": "ଇଂରାଜୀ (ମଣ୍ଟେସେରାଟ୍)", "en_MT": "ଇଂରାଜୀ (ମାଲ୍ଟା)", "en_MU": "ଇଂରାଜୀ (ମୌରିସସ୍)", "en_MW": "ଇଂରାଜୀ (ମାଲୱି)", "en_MY": "ଇଂରାଜୀ (ମାଲେସିଆ)", "en_NA": "ଇଂରାଜୀ (ନାମ୍ବିଆ)", "en_NF": "ଇଂରାଜୀ (ନରଫ୍ଲକ୍ ଦ୍ବୀପ)", "en_NG": "ଇଂରାଜୀ (ନାଇଜେରିଆ)", "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_SG": "ଇଂରାଜୀ (ସିଙ୍ଗାପୁର୍)", "en_SH": "ଇଂରାଜୀ (ସେଣ୍ଟ ହେଲେନା)", "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_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_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_Latn": "ହୌସା (ଲାଟିନ୍)", "ha_Latn_GH": "ହୌସା (ଲାଟିନ୍, ଘାନା)", "ha_Latn_NE": "ହୌସା (ଲାଟିନ୍, ନାଇଜର୍)", "ha_Latn_NG": "ହୌସା (ଲାଟିନ୍, ନାଇଜେରିଆ)", "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_Cyrl": "କାଜାକ୍ (ସିରିଲିକ୍)", "kk_Cyrl_KZ": "କାଜାକ୍ (ସିରିଲିକ୍, କାଜାକାସ୍ଥାନ୍)", "kk_KZ": "କାଜାକ୍ (କାଜାକାସ୍ଥାନ୍)", "kl": "ଗ୍ରୀନଲାଣ୍ଡିକ୍", "kl_GL": "ଗ୍ରୀନଲାଣ୍ଡିକ୍ (ଗ୍ରୀନଲ୍ୟାଣ୍ଡ)", "km": "ଖ୍ମେର୍", "km_KH": "ଖ୍ମେର୍ (କାମ୍ବୋଡିଆ)", "kn": "କନ୍ନଡ", "kn_IN": "କନ୍ନଡ (ଭାରତ)", "ko": "କୋରିଆନ୍", "ko_KP": "କୋରିଆନ୍ (ଉତ୍ତର କୋରିଆ)", "ko_KR": "କୋରିଆନ୍ (ଦକ୍ଷିଣ କୋରିଆ)", "ks": "କାଶ୍ମିରୀ", "ks_Arab": "କାଶ୍ମିରୀ (ଆରବିକ୍)", "ks_Arab_IN": "କାଶ୍ମିରୀ (ଆରବିକ୍, ଭାରତ)", "ks_IN": "କାଶ୍ମିରୀ (ଭାରତ)", "kw": "କୋର୍ନିସ୍", "kw_GB": "କୋର୍ନିସ୍ (ବ୍ରିଟେନ୍)", "ky": "କିରଗିଜ୍", "ky_Cyrl": "କିରଗିଜ୍ (ସିରିଲିକ୍)", "ky_Cyrl_KG": "କିରଗିଜ୍ (ସିରିଲିକ୍, କିର୍ଗିଜିସ୍ଥାନ)", "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_Cyrl": "ମଙ୍ଗୋଲିଆନ୍ (ସିରିଲିକ୍)", "mn_Cyrl_MN": "ମଙ୍ଗୋଲିଆନ୍ (ସିରିଲିକ୍, ମଙ୍ଗୋଲିଆ)", "mn_MN": "ମଙ୍ଗୋଲିଆନ୍ (ମଙ୍ଗୋଲିଆ)", "mr": "ମରାଠୀ", "mr_IN": "ମରାଠୀ (ଭାରତ)", "ms": "ମାଲୟ", "ms_BN": "ମାଲୟ (ବ୍ରୁନେଇ)", "ms_Latn": "ମାଲୟ (ଲାଟିନ୍)", "ms_Latn_BN": "ମାଲୟ (ଲାଟିନ୍, ବ୍ରୁନେଇ)", "ms_Latn_MY": "ମାଲୟ (ଲାଟିନ୍, ମାଲେସିଆ)", "ms_Latn_SG": "ମାଲୟ (ଲାଟିନ୍, ସିଙ୍ଗାପୁର୍)", "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_CV": "ପର୍ତ୍ତୁଗ୍ରୀଜ୍ (କେପ୍ ଭର୍ଦେ)", "pt_GW": "ପର୍ତ୍ତୁଗ୍ରୀଜ୍ (ଗୁଇନିଆ-ବିସାଉ)", "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_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_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": "ଉଜବେକ୍ (ଉଜବେକିସ୍ଥାନ୍)", "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": "ଜୁଲୁ (ଦକ୍ଷିଣ ଆଫ୍ରିକା)" } } src/Symfony/Component/Intl/Resources/data/locales/os.json000066400000000000000000000045111266465517700240260ustar00rootroot00000000000000{ "Names": { "af": "африкаанс", "ar": "араббаг", "az": "тӕтӕйраг", "az_Cyrl": "тӕтӕйраг (Киррилицӕ)", "az_Latn": "тӕтӕйраг (Латинаг)", "bg": "болгайраг", "bs": "босниаг", "bs_Cyrl": "босниаг (Киррилицӕ)", "bs_Latn": "босниаг (Латинаг)", "ca": "каталайнаг", "ca_FR": "каталайнаг (Франц)", "ca_IT": "каталайнаг (Итали)", "cs": "чехаг", "da": "даниаг", "de": "немыцаг", "de_DE": "немыцаг (Герман)", "el": "бердзейнаг", "en": "англисаг", "en_GB": "англисаг (Стыр Британи)", "en_IN": "англисаг (Инди)", "en_US": "англисаг (АИШ)", "eo": "есперанто", "es": "испайнаг", "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": "китайаг (Традицион китайаг)" } } src/Symfony/Component/Intl/Resources/data/locales/pa.json000066400000000000000000001037071266465517700240140ustar00rootroot00000000000000{ "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_Latn": "ਬੰਬਾਰਾ (ਲਾਤੀਨੀ)", "bm_Latn_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": "ਕੈਟਾਲਾਨ (ਇਟਲੀ)", "cs": "ਚੈਕ", "cs_CZ": "ਚੈਕ (ਚੈਕ ਗਣਰਾਜ)", "cy": "ਵੈਲਜ਼", "cy_GB": "ਵੈਲਜ਼ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", "da": "ਡੈਨਿਸ਼", "da_DK": "ਡੈਨਿਸ਼ (ਡੈਨਮਾਰਕ)", "da_GL": "ਡੈਨਿਸ਼ (ਗ੍ਰੀਨਲੈਂਡ)", "de": "ਜਰਮਨ", "de_AT": "ਜਰਮਨ (ਆਸਟਰੀਆ)", "de_BE": "ਜਰਮਨ (ਬੈਲਜੀਅਮ)", "de_CH": "ਜਰਮਨ (ਸਵਿਟਜ਼ਰਲੈਂਡ)", "de_DE": "ਜਰਮਨ (ਜਰਮਨੀ)", "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_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_MY": "ਅੰਗਰੇਜ਼ੀ (ਮਲੇਸ਼ੀਆ)", "en_NA": "ਅੰਗਰੇਜ਼ੀ (ਨਾਮੀਬੀਆ)", "en_NF": "ਅੰਗਰੇਜ਼ੀ (ਨੋਰਫੌਕ ਟਾਪੂ)", "en_NG": "ਅੰਗਰੇਜ਼ੀ (ਨਾਈਜੀਰੀਆ)", "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_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_VC": "ਅੰਗਰੇਜ਼ੀ (ਸੇਂਟ ਵਿਨਸੈਂਟ ਐਂਡ ਗ੍ਰੇਨਾਡੀਨਸ)", "en_VG": "ਅੰਗਰੇਜ਼ੀ (ਬ੍ਰਿਟਿਸ਼ ਵਰਜਿਨ ਟਾਪੂ)", "en_VI": "ਅੰਗਰੇਜ਼ੀ (ਯੂ ਐਸ ਵਰਜਿਨ ਟਾਪੂ)", "en_VU": "ਅੰਗਰੇਜ਼ੀ (ਵਾਨੂਆਟੂ)", "en_WS": "ਅੰਗਰੇਜ਼ੀ (ਸਾਮੋਆ)", "en_ZA": "ਅੰਗਰੇਜ਼ੀ (ਦੱਖਣੀ ਅਫਰੀਕਾ)", "en_ZM": "ਅੰਗਰੇਜ਼ੀ (ਜ਼ਾਮਬੀਆ)", "en_ZW": "ਅੰਗਰੇਜ਼ੀ (ਜ਼ਿੰਬਾਬਵੇ)", "eo": "ਇਸਪੇਰਾਂਟੋ", "es": "ਸਪੇਨੀ", "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": "ਬਾਸਕ (ਸਪੇਨ)", "fa": "ਫ਼ਾਰਸੀ", "fa_AF": "ਫ਼ਾਰਸੀ (ਅਫ਼ਗਾਨਿਸਤਾਨ)", "fa_IR": "ਫ਼ਾਰਸੀ (ਈਰਾਨ)", "fi": "ਫਿਨਿਸ਼", "fi_FI": "ਫਿਨਿਸ਼ (ਫਿਨਲੈਂਡ)", "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": "ਫਰਾਂਸੀਸੀ (ਮਾਯੋਟੀ)", "fy": "ਪੱਛਮੀ ਫ੍ਰਿਸੀਅਨ", "fy_NL": "ਪੱਛਮੀ ਫ੍ਰਿਸੀਅਨ (ਨੀਦਰਲੈਂਡ)", "ga": "ਆਇਰੀ", "ga_IE": "ਆਇਰੀ (ਆਇਰਲੈਂਡ)", "gl": "ਗੈਲਿਸ਼ਿਅਨ", "gl_ES": "ਗੈਲਿਸ਼ਿਅਨ (ਸਪੇਨ)", "gu": "ਗੁਜਰਾਤੀ", "gu_IN": "ਗੁਜਰਾਤੀ (ਭਾਰਤ)", "gv": "ਮੈਂਕਸ", "gv_IM": "ਮੈਂਕਸ (ਆਇਲ ਆਫ ਮੈਨ)", "ha": "ਹੌਸਾ", "ha_GH": "ਹੌਸਾ (ਘਾਨਾ)", "ha_Latn": "ਹੌਸਾ (ਲਾਤੀਨੀ)", "ha_Latn_GH": "ਹੌਸਾ (ਲਾਤੀਨੀ, ਘਾਨਾ)", "ha_Latn_NE": "ਹੌਸਾ (ਲਾਤੀਨੀ, ਨਾਈਜਰ)", "ha_Latn_NG": "ਹੌਸਾ (ਲਾਤੀਨੀ, ਨਾਈਜੀਰੀਆ)", "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_Cyrl": "ਕਜ਼ਾਖ਼ (ਸਿਰੀਲਿਕ)", "kk_Cyrl_KZ": "ਕਜ਼ਾਖ਼ (ਸਿਰੀਲਿਕ, ਕਜ਼ਾਖਸਤਾਨ)", "kk_KZ": "ਕਜ਼ਾਖ਼ (ਕਜ਼ਾਖਸਤਾਨ)", "kl": "ਕਲਾਅੱਲੀਸੁਟ", "kl_GL": "ਕਲਾਅੱਲੀਸੁਟ (ਗ੍ਰੀਨਲੈਂਡ)", "km": "ਖਮੇਰ", "km_KH": "ਖਮੇਰ (ਕੰਬੋਡੀਆ)", "kn": "ਕੰਨੜ", "kn_IN": "ਕੰਨੜ (ਭਾਰਤ)", "ko": "ਕੋਰੀਆਈ", "ko_KP": "ਕੋਰੀਆਈ (ਉੱਤਰੀ ਕੋਰੀਆ)", "ko_KR": "ਕੋਰੀਆਈ (ਦੱਖਣੀ ਕੋਰੀਆ)", "ks": "ਕਸ਼ਮੀਰੀ", "ks_Arab": "ਕਸ਼ਮੀਰੀ (ਅਰਬੀ)", "ks_Arab_IN": "ਕਸ਼ਮੀਰੀ (ਅਰਬੀ, ਭਾਰਤ)", "ks_IN": "ਕਸ਼ਮੀਰੀ (ਭਾਰਤ)", "kw": "ਕੋਰਨਿਸ਼", "kw_GB": "ਕੋਰਨਿਸ਼ (ਯੂਨਾਈਟਡ ਕਿੰਗਡਮ)", "ky": "ਕਿਰਗੀਜ਼", "ky_Cyrl": "ਕਿਰਗੀਜ਼ (ਸਿਰੀਲਿਕ)", "ky_Cyrl_KG": "ਕਿਰਗੀਜ਼ (ਸਿਰੀਲਿਕ, ਕਿਰਗਿਜ਼ਸਤਾਨ)", "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_Cyrl": "ਮੰਗੋਲੀਅਨ (ਸਿਰੀਲਿਕ)", "mn_Cyrl_MN": "ਮੰਗੋਲੀਅਨ (ਸਿਰੀਲਿਕ, ਮੰਗੋਲੀਆ)", "mn_MN": "ਮੰਗੋਲੀਅਨ (ਮੰਗੋਲੀਆ)", "mr": "ਮਰਾਠੀ", "mr_IN": "ਮਰਾਠੀ (ਭਾਰਤ)", "ms": "ਮਲਯ", "ms_BN": "ਮਲਯ (ਬਰੂਨੇਈ)", "ms_Latn": "ਮਲਯ (ਲਾਤੀਨੀ)", "ms_Latn_BN": "ਮਲਯ (ਲਾਤੀਨੀ, ਬਰੂਨੇਈ)", "ms_Latn_MY": "ਮਲਯ (ਲਾਤੀਨੀ, ਮਲੇਸ਼ੀਆ)", "ms_Latn_SG": "ਮਲਯ (ਲਾਤੀਨੀ, ਸਿੰਗਾਪੁਰ)", "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": "ਉੜੀਆ (ਭਾਰਤ)", "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": "ਪੁਰਤਗਾਲੀ (ਤਿਮੋਰ-ਲੇਸਤੇ)", "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_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_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": "ਉਜ਼ਬੇਕ (ਉਜ਼ਬੇਕਿਸਤਾਨ)", "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": "ਜ਼ੁਲੂ (ਦੱਖਣੀ ਅਫਰੀਕਾ)" } } src/Symfony/Component/Intl/Resources/data/locales/pa_Arab.json000066400000000000000000000015511266465517700247330ustar00rootroot00000000000000{ "Names": { "en_PK": "ਅੰਗਰੇਜ਼ੀ (پکستان)", "ks_Arab": "ਕਸ਼ਮੀਰੀ (عربی)", "ks_Arab_IN": "ਕਸ਼ਮੀਰੀ (عربی, ਭਾਰਤ)", "pa": "پنجابی", "pa_Arab": "پنجابی (عربی)", "pa_Arab_PK": "پنجابی (عربی, پکستان)", "pa_Guru": "پنجابی (گُرمُکھی)", "pa_Guru_IN": "پنجابی (گُرمُکھی, ਭਾਰਤ)", "pa_IN": "پنجابی (ਭਾਰਤ)", "pa_PK": "پنجابی (پکستان)", "ug_Arab": "ਉਇਗੁਰ (عربی)", "ug_Arab_CN": "ਉਇਗੁਰ (عربی, ਚੀਨ)", "ur_PK": "ਉਰਦੂ (پکستان)", "uz_Arab": "ਉਜ਼ਬੇਕ (عربی)", "uz_Arab_AF": "ਉਜ਼ਬੇਕ (عربی, ਅਫ਼ਗਾਨਿਸਤਾਨ)" } } src/Symfony/Component/Intl/Resources/data/locales/pa_IN.json000066400000000000000000000000401266465517700243640ustar00rootroot00000000000000{ "%%ALIAS": "pa_Guru_IN" } src/Symfony/Component/Intl/Resources/data/locales/pa_PK.json000066400000000000000000000000401266465517700243700ustar00rootroot00000000000000{ "%%ALIAS": "pa_Arab_PK" } src/Symfony/Component/Intl/Resources/data/locales/pl.json000066400000000000000000000541631266465517700240300ustar00rootroot00000000000000{ "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": "azerski", "az_AZ": "azerski (Azerbejdżan)", "az_Cyrl": "azerski (cyrylica)", "az_Cyrl_AZ": "azerski (cyrylica, Azerbejdżan)", "az_Latn": "azerski (łacińskie)", "az_Latn_AZ": "azerski (ł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_Latn": "bambara (łacińskie)", "bm_Latn_ML": "bambara (łacińskie, 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)", "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_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_AU": "angielski (Australia)", "en_BB": "angielski (Barbados)", "en_BE": "angielski (Belgia)", "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_CK": "angielski (Wyspy Cooka)", "en_CM": "angielski (Kamerun)", "en_CX": "angielski (Wyspa Bożego Narodzenia)", "en_DG": "angielski (Diego Garcia)", "en_DM": "angielski (Dominika)", "en_ER": "angielski (Erytrea)", "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 (Wyspa 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_IM": "angielski (Wyspa Man)", "en_IN": "angielski (Indie)", "en_IO": "angielski (Brytyjskie Terytorium Oceanu Indyjskiego)", "en_JE": "angielski (Wyspa 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_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_SG": "angielski (Singapur)", "en_SH": "angielski (Wyspa Świętej Heleny)", "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_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_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źaracki", "gu_IN": "gudźaracki (Indie)", "gv": "manx", "gv_IM": "manx (Wyspa Man)", "ha": "hausa", "ha_GH": "hausa (Ghana)", "ha_Latn": "hausa (łacińskie)", "ha_Latn_GH": "hausa (łacińskie, Ghana)", "ha_Latn_NE": "hausa (łacińskie, Niger)", "ha_Latn_NG": "hausa (łacińskie, Nigeria)", "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_Cyrl": "kazachski (cyrylica)", "kk_Cyrl_KZ": "kazachski (cyrylica, Kazachstan)", "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_Arab": "kaszmirski (arabskie)", "ks_Arab_IN": "kaszmirski (arabskie, Indie)", "ks_IN": "kaszmirski (Indie)", "kw": "kornijski", "kw_GB": "kornijski (Wielka Brytania)", "ky": "kirgiski", "ky_Cyrl": "kirgiski (cyrylica)", "ky_Cyrl_KG": "kirgiski (cyrylica, Kirgistan)", "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_Cyrl": "mongolski (cyrylica)", "mn_Cyrl_MN": "mongolski (cyrylica, Mongolia)", "mn_MN": "mongolski (Mongolia)", "mr": "marathi", "mr_IN": "marathi (Indie)", "ms": "malajski", "ms_BN": "malajski (Brunei Darussalam)", "ms_Latn": "malajski (łacińskie)", "ms_Latn_BN": "malajski (łacińskie, Brunei Darussalam)", "ms_Latn_MY": "malajski (łacińskie, Malezja)", "ms_Latn_SG": "malajski (łacińskie, Singapur)", "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": "oromski", "om_ET": "oromski (Etiopia)", "om_KE": "oromski (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_CV": "portugalski (Republika Zielonego Przylądka)", "pt_GW": "portugalski (Gwinea Bissau)", "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": "lapoński północny", "se_FI": "lapoński północny (Finlandia)", "se_NO": "lapoński północny (Norwegia)", "se_SE": "lapoński północny (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": "szona", "sn_ZW": "szona (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_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_Arab": "ujgurski (arabskie)", "ug_Arab_CN": "ujgurski (arabskie, Chiny)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ps.json000066400000000000000000000063261266465517700240350ustar00rootroot00000000000000{ "Names": { "ar": "عربي", "ar_DZ": "عربي (الجزایر)", "ar_EG": "عربي (مصر)", "ar_IQ": "عربي (عراق)", "ar_KW": "عربي (کویټ)", "ar_LB": "عربي (لبنان)", "ar_LY": "عربي (لیبیا)", "ar_MA": "عربي (مراکش)", "ar_PS": "عربي (فلسطین)", "ar_SA": "عربي (سعودی عربستان)", "ar_SY": "عربي (سوریه)", "ar_YE": "عربي (یمن)", "de": "الماني", "de_AT": "الماني (اتریش)", "de_CH": "الماني (سویس)", "de_DE": "الماني (المان)", "el": "یوناني", "el_GR": "یوناني (یونان)", "en": "انګلیسي", "en_CA": "انګلیسي (کاناډا)", "en_GB": "انګلیسي (برتانیه)", "en_GH": "انګلیسي (ګانا)", "en_IN": "انګلیسي (هند)", "en_JM": "انګلیسي (جمیکا)", "en_LR": "انګلیسي (لایبریا)", "en_MY": "انګلیسي (مالیزیا)", "en_NG": "انګلیسي (نایجیریا)", "en_NZ": "انګلیسي (نیوزیلنډ)", "en_PK": "انګلیسي (پاکستان)", "en_RW": "انګلیسي (روندا)", "en_TZ": "انګلیسي (تنزانیا)", "et": "حبشي", "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": "ملایا (مالیزیا)", "pl": "پولنډي", "pl_PL": "پولنډي (پولنډ)", "ps": "پښتو", "ps_AF": "پښتو (افغانستان)", "pt": "پورتګالي", "pt_AO": "پورتګالي (انګولا)", "pt_PT": "پورتګالي (پورتګال)", "ru": "روسي", "ru_RU": "روسي (روسیه)", "sv": "سویډنی", "sv_FI": "سویډنی (فنلینډ)", "sv_SE": "سویډنی (سویډن)", "uz": "ازبکي", "uz_AF": "ازبکي (افغانستان)", "uz_Arab": "ازبکي (عربي)", "uz_Arab_AF": "ازبکي (عربي, افغانستان)", "zh": "چیني", "zh_CN": "چیني (چین)" } } src/Symfony/Component/Intl/Resources/data/locales/pt.json000066400000000000000000000526361266465517700240430ustar00rootroot00000000000000{ "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_Latn": "bambara (latim)", "bm_Latn_ML": "bambara (latim, 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)", "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_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_AU": "inglês (Austrália)", "en_BB": "inglês (Barbados)", "en_BE": "inglês (Bélgica)", "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_CK": "inglês (Ilhas Cook)", "en_CM": "inglês (República dos Camarões)", "en_CX": "inglês (Ilha Christmas)", "en_DG": "inglês (Diego Garcia)", "en_DM": "inglês (Dominica)", "en_ER": "inglês (Eritreia)", "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_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 Caiman)", "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_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 (Seychelles)", "en_SD": "inglês (Sudão)", "en_SG": "inglês (Cingapura)", "en_SH": "inglês (Santa Helena)", "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 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_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_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 (Seychelles)", "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_Latn": "hauçá (latim)", "ha_Latn_GH": "hauçá (latim, Gana)", "ha_Latn_NE": "hauçá (latim, Níger)", "ha_Latn_NG": "hauçá (latim, Nigéria)", "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_Cyrl": "cazaque (cirílico)", "kk_Cyrl_KZ": "cazaque (cirílico, Cazaquistão)", "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_Arab": "caxemira (árabe)", "ks_Arab_IN": "caxemira (árabe, Índia)", "ks_IN": "caxemira (Índia)", "kw": "córnico", "kw_GB": "córnico (Reino Unido)", "ky": "quirguiz", "ky_Cyrl": "quirguiz (cirílico)", "ky_Cyrl_KG": "quirguiz (cirílico, Quirguistão)", "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_Cyrl": "mongol (cirílico)", "mn_Cyrl_MN": "mongol (cirílico, Mongólia)", "mn_MN": "mongol (Mongólia)", "mr": "marata", "mr_IN": "marata (Índia)", "ms": "malaio", "ms_BN": "malaio (Brunei)", "ms_Latn": "malaio (latim)", "ms_Latn_BN": "malaio (latim, Brunei)", "ms_Latn_MY": "malaio (latim, Malásia)", "ms_Latn_SG": "malaio (latim, Cingapura)", "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": "ossetic", "os_GE": "ossetic (Geórgia)", "os_RU": "ossetic (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_CV": "português (Cabo Verde)", "pt_GW": "português (Guiné Bissau)", "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": "ruanda", "rw_RW": "ruanda (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)", "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_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ínia", "ti_ER": "tigrínia (Eritreia)", "ti_ET": "tigrínia (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_Arab": "uigur (árabe)", "ug_Arab_CN": "uigur (árabe, China)", "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": "ioruba", "yo_BJ": "ioruba (Benin)", "yo_NG": "ioruba (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)" } } src/Symfony/Component/Intl/Resources/data/locales/pt_PT.json000066400000000000000000000117711266465517700244410ustar00rootroot00000000000000{ "Names": { "af": "africânder", "af_NA": "africânder (Namíbia)", "af_ZA": "africânder (África do Sul)", "ar_BH": "árabe (Barém)", "ar_DJ": "árabe (Jibuti)", "ar_EG": "árabe (Egipto)", "ar_PS": "árabe (Território Palestiniano)", "ar_YE": "árabe (Iémen)", "cs": "checo", "cs_CZ": "checo (República Checa)", "da_GL": "dinamarquês (Gronelândia)", "ee": "ewe", "ee_GH": "ewe (Gana)", "ee_TG": "ewe (Togo)", "en_AI": "inglês (Anguila)", "en_BW": "inglês (Botswana)", "en_CC": "inglês (Ilhas Cocos)", "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_KY": "inglês (Ilhas Caimão)", "en_MG": "inglês (Madagáscar)", "en_MS": "inglês (Monserrate)", "en_MU": "inglês (Maurícia)", "en_PN": "inglês (Pitcairn)", "en_SC": "inglês (Seicheles)", "en_SG": "inglês (Singapura)", "en_TC": "inglês (Ilhas Turcas e Caicos)", "en_TK": "inglês (Toquelau)", "en_TT": "inglês (Trindade e Tobago)", "en_ZW": "inglês (Zimbabué)", "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_SC": "francês (Seicheles)", "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_Latn": "haúça (latim)", "ha_Latn_GH": "haúça (latim, Gana)", "ha_Latn_NE": "haúça (latim, Níger)", "ha_Latn_NG": "haúça (latim, Nigéria)", "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 Marino)", "ki_KE": "quicuio (Quénia)", "kl_GL": "groenlandês (Gronelândia)", "km": "cmer", "km_KH": "cmer (Camboja)", "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_Latn_SG": "malaio (latim, Singapura)", "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)", "pt_GW": "português (Guiné-Bissau)", "ro_RO": "romeno (Roménia)", "rw": "kinyarwanda", "rw_RW": "kinyarwanda (Ruanda)", "sl_SI": "esloveno (Eslovénia)", "sn_ZW": "shona (Zimbabué)", "so_DJ": "somali (Jibuti)", "so_KE": "somali (Quénia)", "sq_MK": "albanês (Macedónia)", "sw_KE": "suaíli (Quénia)", "ta_SG": "tâmil (Singapura)", "to": "tonga", "to_TO": "tonga (Tonga)", "vi_VN": "vietnamita (Vietname)", "yo_BJ": "ioruba (Benim)", "zh_Hans": "chinês (han simplificado)", "zh_Hans_CN": "chinês (han simplificado, China)", "zh_Hans_HK": "chinês (han simplificado, Hong Kong, RAE da China)", "zh_Hans_MO": "chinês (han simplificado, Macau, RAE da China)", "zh_Hans_SG": "chinês (han simplificado, Singapura)", "zh_Hant": "chinês (han tradicional)", "zh_Hant_HK": "chinês (han tradicional, Hong Kong, RAE da China)", "zh_Hant_MO": "chinês (han tradicional, Macau, RAE da China)", "zh_Hant_TW": "chinês (han tradicional, Taiwan)", "zh_SG": "chinês (Singapura)" } } src/Symfony/Component/Intl/Resources/data/locales/qu.json000066400000000000000000000357431266465517700240450ustar00rootroot00000000000000{ "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 (Bahré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 (Iraq)", "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_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_AU": "Ingles Simi (Australia)", "en_BE": "Ingles Simi (Bélgica)", "en_BS": "Ingles Simi (Bahamas)", "en_BW": "Ingles Simi (Botsuana)", "en_CC": "Ingles Simi (Islas Cocos)", "en_CM": "Ingles Simi (Camerún)", "en_CX": "Ingles Simi (Isla Christmas)", "en_DM": "Ingles Simi (Dominica)", "en_ER": "Ingles Simi (Eritrea)", "en_FJ": "Ingles Simi (Fiyi)", "en_FM": "Ingles Simi (Micronesia)", "en_GB": "Ingles Simi (Reino Unido)", "en_GG": "Ingles Simi (Guernsey)", "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_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_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_SG": "Ingles Simi (Singapur)", "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_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", "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, 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 (Kazajistan)", "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_GW": "Portugues Simi (Guinea-Bissau)", "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 (Kazajistan)", "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_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)" } } src/Symfony/Component/Intl/Resources/data/locales/rm.json000066400000000000000000000514521266465517700240310ustar00rootroot00000000000000{ "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_Latn": "bambara (latin)", "bm_Latn_ML": "bambara (latin, 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)", "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_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_AU": "englais (Australia)", "en_BB": "englais (Barbados)", "en_BE": "englais (Belgia)", "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_CK": "englais (Inslas Cook)", "en_CM": "englais (Camerun)", "en_CX": "englais (Insla da Christmas)", "en_DM": "englais (Dominica)", "en_ER": "englais (Eritrea)", "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_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_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_SG": "englais (Singapur)", "en_SH": "englais (Sontg’Elena)", "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_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_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_Latn": "haussa (latin)", "ha_Latn_GH": "haussa (latin, Ghana)", "ha_Latn_NE": "haussa (latin, Niger)", "ha_Latn_NG": "haussa (latin, Nigeria)", "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_Cyrl": "casac (cirillic)", "kk_Cyrl_KZ": "casac (cirillic, Kasachstan)", "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_Arab": "kashmiri (arab)", "ks_Arab_IN": "kashmiri (arab, India)", "ks_IN": "kashmiri (India)", "kw": "cornic", "kw_GB": "cornic (Reginavel Unì)", "ky": "kirghis", "ky_Cyrl": "kirghis (cirillic)", "ky_Cyrl_KG": "kirghis (cirillic, Kirghisistan)", "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_Cyrl": "mongolic (cirillic)", "mn_Cyrl_MN": "mongolic (cirillic, Mongolia)", "mn_MN": "mongolic (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malaic", "ms_BN": "malaic (Brunei)", "ms_Latn": "malaic (latin)", "ms_Latn_BN": "malaic (latin, Brunei)", "ms_Latn_MY": "malaic (latin, Malaisia)", "ms_Latn_SG": "malaic (latin, Singapur)", "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_CV": "portugais (Cap Verd)", "pt_GW": "portugais (Guinea-Bissau)", "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_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_Arab": "uiguric (arab)", "ug_Arab_CN": "uiguric (arab, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/rn.json000066400000000000000000000310231266465517700240220ustar00rootroot00000000000000{ "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_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_AU": "Icongereza (Ositaraliya)", "en_BB": "Icongereza (Barubadosi)", "en_BE": "Icongereza (Ububiligi)", "en_BM": "Icongereza (Berimuda)", "en_BS": "Icongereza (Bahamasi)", "en_BW": "Icongereza (Botswana)", "en_BZ": "Icongereza (Belize)", "en_CA": "Icongereza (Kanada)", "en_CK": "Icongereza (Izinga rya Kuku)", "en_CM": "Icongereza (Kameruni)", "en_DM": "Icongereza (Dominika)", "en_ER": "Icongereza (Elitereya)", "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_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_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_SG": "Icongereza (Singapuru)", "en_SH": "Icongereza (Sehelene)", "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_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_CV": "Igiporutugari (Ibirwa bya Kapuveri)", "pt_GW": "Igiporutugari (Gineya Bisawu)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ro.json000066400000000000000000000534511266465517700240340ustar00rootroot00000000000000{ "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_Latn": "bambara (latină)", "bm_Latn_ML": "bambara (latină, 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)", "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_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_AU": "engleză (Australia)", "en_BB": "engleză (Barbados)", "en_BE": "engleză (Belgia)", "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_CK": "engleză (Insulele Cook)", "en_CM": "engleză (Camerun)", "en_CX": "engleză (Insula Christmas)", "en_DG": "engleză (Diego Garcia)", "en_DM": "engleză (Dominica)", "en_ER": "engleză (Eritreea)", "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_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ă (Malaezia)", "en_NA": "engleză (Namibia)", "en_NF": "engleză (Insulele Norfolk)", "en_NG": "engleză (Nigeria)", "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_SG": "engleză (Singapore)", "en_SH": "engleză (Sfânta Elena)", "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 Grenadine)", "en_VG": "engleză (Insulele Virgine Britanice)", "en_VI": "engleză (Insulele Virgine S.U.A.)", "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_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": "estoniană", "et_EE": "estoniană (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_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_Latn": "hausa (latină)", "ha_Latn_GH": "hausa (latină, Ghana)", "ha_Latn_NE": "hausa (latină, Niger)", "ha_Latn_NG": "hausa (latină, Nigeria)", "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_Cyrl": "kazahă (chirilică)", "kk_Cyrl_KZ": "kazahă (chirilică, Kazahstan)", "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_Arab": "cașmiră (arabă)", "ks_Arab_IN": "cașmiră (arabă, India)", "ks_IN": "cașmiră (India)", "kw": "cornică", "kw_GB": "cornică (Regatul Unit)", "ky": "kârgâză", "ky_Cyrl": "kârgâză (chirilică)", "ky_Cyrl_KG": "kârgâză (chirilică, Kârgâzstan)", "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ă (Macedonia)", "ml": "malayalam", "ml_IN": "malayalam (India)", "mn": "mongolă", "mn_Cyrl": "mongolă (chirilică)", "mn_Cyrl_MN": "mongolă (chirilică, Mongolia)", "mn_MN": "mongolă (Mongolia)", "mr": "marathi", "mr_IN": "marathi (India)", "ms": "malaeză", "ms_BN": "malaeză (Brunei)", "ms_Latn": "malaeză (latină)", "ms_Latn_BN": "malaeză (latină, Brunei)", "ms_Latn_MY": "malaeză (latină, Malaezia)", "ms_Latn_SG": "malaeză (latină, Singapore)", "ms_MY": "malaeză (Malaezia)", "ms_SG": "malaeză (Singapore)", "mt": "malteză", "mt_MT": "malteză (Malta)", "my": "birmaneză", "my_MM": "birmaneză (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": "olandeză", "nl_AW": "olandeză (Aruba)", "nl_BE": "olandeză (Belgia)", "nl_BQ": "olandeză (Insulele Caraibe Olandeze)", "nl_CW": "olandeză (Curaçao)", "nl_NL": "olandeză (Țările de Jos)", "nl_SR": "olandeză (Surinam)", "nl_SX": "olandeză (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_CV": "portugheză (Capul Verde)", "pt_GW": "portugheză (Guineea-Bissau)", "pt_MO": "portugheză (R.A.S. Macao a Chinei)", "pt_MZ": "portugheză (Mozambic)", "pt_PT": "portugheză (Portugalia)", "pt_ST": "portugheză (Sao Tome și Principe)", "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": "singhaleză", "si_LK": "singhaleză (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ă (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_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ă (Malaezia)", "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": "tonga", "to_TO": "tonga (Tonga)", "tr": "turcă", "tr_CY": "turcă (Cipru)", "tr_TR": "turcă (Turcia)", "ug": "uigură", "ug_Arab": "uigură (arabă)", "ug_Arab_CN": "uigură (arabă, China)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/ru.json000066400000000000000000000765721266465517700240530ustar00rootroot00000000000000{ "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_Latn": "бамбарийский (латиница)", "bm_Latn_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": "каталанский (Италия)", "cs": "чешский", "cs_CZ": "чешский (Чехия)", "cy": "валлийский", "cy_GB": "валлийский (Великобритания)", "da": "датский", "da_DK": "датский (Дания)", "da_GL": "датский (Гренландия)", "de": "немецкий", "de_AT": "немецкий (Австрия)", "de_BE": "немецкий (Бельгия)", "de_CH": "немецкий (Швейцария)", "de_DE": "немецкий (Германия)", "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_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_MY": "английский (Малайзия)", "en_NA": "английский (Намибия)", "en_NF": "английский (о-в Норфолк)", "en_NG": "английский (Нигерия)", "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_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_VC": "английский (Сент-Винсент и Гренадины)", "en_VG": "английский (Виргинские о-ва (Британские))", "en_VI": "английский (Виргинские о-ва (США))", "en_VU": "английский (Вануату)", "en_WS": "английский (Самоа)", "en_ZA": "английский (ЮАР)", "en_ZM": "английский (Замбия)", "en_ZW": "английский (Зимбабве)", "eo": "эсперанто", "es": "испанский", "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": "баскский (Испания)", "fa": "персидский", "fa_AF": "персидский (Афганистан)", "fa_IR": "персидский (Иран)", "ff": "фулах", "ff_CM": "фулах (Камерун)", "ff_GN": "фулах (Гвинея)", "ff_MR": "фулах (Мавритания)", "ff_SN": "фулах (Сенегал)", "fi": "финский", "fi_FI": "финский (Финляндия)", "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": "французский (Майотта)", "fy": "западно-фризский", "fy_NL": "западно-фризский (Нидерланды)", "ga": "ирландский", "ga_IE": "ирландский (Ирландия)", "gd": "гэльский", "gd_GB": "гэльский (Великобритания)", "gl": "галисийский", "gl_ES": "галисийский (Испания)", "gu": "гуджарати", "gu_IN": "гуджарати (Индия)", "gv": "мэнский", "gv_IM": "мэнский (О-в Мэн)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латиница)", "ha_Latn_GH": "хауса (латиница, Гана)", "ha_Latn_NE": "хауса (латиница, Нигер)", "ha_Latn_NG": "хауса (латиница, Нигерия)", "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_Cyrl": "казахский (кириллица)", "kk_Cyrl_KZ": "казахский (кириллица, Казахстан)", "kk_KZ": "казахский (Казахстан)", "kl": "гренландский", "kl_GL": "гренландский (Гренландия)", "km": "кхмерский", "km_KH": "кхмерский (Камбоджа)", "kn": "каннада", "kn_IN": "каннада (Индия)", "ko": "корейский", "ko_KP": "корейский (КНДР)", "ko_KR": "корейский (Республика Корея)", "ks": "кашмири", "ks_Arab": "кашмири (арабица)", "ks_Arab_IN": "кашмири (арабица, Индия)", "ks_IN": "кашмири (Индия)", "kw": "корнийский", "kw_GB": "корнийский (Великобритания)", "ky": "киргизский", "ky_Cyrl": "киргизский (кириллица)", "ky_Cyrl_KG": "киргизский (кириллица, Киргизия)", "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_Cyrl": "монгольский (кириллица)", "mn_Cyrl_MN": "монгольский (кириллица, Монголия)", "mn_MN": "монгольский (Монголия)", "mr": "маратхи", "mr_IN": "маратхи (Индия)", "ms": "малайский", "ms_BN": "малайский (Бруней-Даруссалам)", "ms_Latn": "малайский (латиница)", "ms_Latn_BN": "малайский (латиница, Бруней-Даруссалам)", "ms_Latn_MY": "малайский (латиница, Малайзия)", "ms_Latn_SG": "малайский (латиница, Сингапур)", "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_CV": "португальский (Кабо-Верде)", "pt_GW": "португальский (Гвинея-Бисау)", "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_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_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": "узбекский (Узбекистан)", "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": "зулу (ЮАР)" } } src/Symfony/Component/Intl/Resources/data/locales/rw.json000066400000000000000000000053151266465517700240400ustar00rootroot00000000000000{ "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" } } src/Symfony/Component/Intl/Resources/data/locales/se.json000066400000000000000000000450331266465517700240200ustar00rootroot00000000000000{ "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_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_AU": "eaŋgalsgiella (Austrália)", "en_BB": "eaŋgalsgiella (Barbados)", "en_BE": "eaŋgalsgiella (Belgia)", "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_CK": "eaŋgalsgiella (Cook-sullot)", "en_CM": "eaŋgalsgiella (Kamerun)", "en_CX": "eaŋgalsgiella (Juovllat-sullot)", "en_DG": "eaŋgalsgiella (Diego Garcia)", "en_DM": "eaŋgalsgiella (Dominica)", "en_ER": "eaŋgalsgiella (Eritrea)", "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_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_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_SG": "eaŋgalsgiella (Singapore)", "en_SH": "eaŋgalsgiella (Saint Helena)", "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_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_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_Latn": "haussagiella (láhtenaš)", "ha_Latn_GH": "haussagiella (láhtenaš, Ghana)", "ha_Latn_NE": "haussagiella (láhtenaš, Niger)", "ha_Latn_NG": "haussagiella (láhtenaš, Nigeria)", "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_Cyrl": "kazakgiella (kyrillalaš)", "kk_Cyrl_KZ": "kazakgiella (kyrillalaš, Kasakstan)", "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_Cyrl": "mongoliagiella (kyrillalaš)", "mn_Cyrl_MN": "mongoliagiella (kyrillalaš, Mongolia)", "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_CV": "portugálagiella (Kap Verde)", "pt_GW": "portugálagiella (Guinea-Bissau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/se_FI.json000066400000000000000000000045321266465517700243750ustar00rootroot00000000000000{ "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_Cyrl": "kazakhgiella (kyrillalaš)", "kk_Cyrl_KZ": "kazakhgiella (kyrillalaš, Kasakstan)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sg.json000066400000000000000000000275551266465517700240330ustar00rootroot00000000000000{ "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_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_AU": "Anglëe (Ostralïi, Sotralïi)", "en_BB": "Anglëe (Barabâda)", "en_BE": "Anglëe (Bêleze, Belezîki)", "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_CK": "Anglëe (âzûâ Kûku)", "en_CM": "Anglëe (Kamerûne)", "en_DM": "Anglëe (Dömïnîka)", "en_ER": "Anglëe (Eritrëe)", "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_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_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_SG": "Anglëe (Sïngäpûru)", "en_SH": "Anglëe (Sênt-Helêna)", "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_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_CV": "Portugëe, Pûra (Azûâ tî Kâpo-Vêre)", "pt_GW": "Portugëe, Pûra (Gninëe-Bisau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sh.json000066400000000000000000000000351266465517700240140ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn" } src/Symfony/Component/Intl/Resources/data/locales/sh_BA.json000066400000000000000000000000401266465517700243520ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_BA" } src/Symfony/Component/Intl/Resources/data/locales/sh_CS.json000066400000000000000000000000401266465517700243750ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_RS" } src/Symfony/Component/Intl/Resources/data/locales/sh_YU.json000066400000000000000000000000401266465517700244250ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_RS" } src/Symfony/Component/Intl/Resources/data/locales/si.json000066400000000000000000001134011266465517700240170ustar00rootroot00000000000000{ "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_Latn": "බම්බරා (ලතින්)", "bm_Latn_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": "කැටලන් (ඉතාලිය)", "cs": "චෙත්", "cs_CZ": "චෙත් (චෙක් ජනරජය)", "cy": "වේල්ස්", "cy_GB": "වේල්ස් (එක්සත් රාජධානිය)", "da": "ඩැනිශ්", "da_DK": "ඩැනිශ් (ඩෙන්මාර්කය)", "da_GL": "ඩැනිශ් (ග්‍රීන්ලන්තය)", "de": "ජර්මන්", "de_AT": "ජර්මන් (ඔස්ට්‍රියාව)", "de_BE": "ජර්මන් (බෙල්ජියම)", "de_CH": "ජර්මන් (ස්විස්ටර්ලන්තය)", "de_DE": "ජර්මන් (ජර්මනිය)", "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_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_MY": "ඉංග්‍රීසි (මැලේසියාව)", "en_NA": "ඉංග්‍රීසි (නැමීබියාව)", "en_NF": "ඉංග්‍රීසි (නෝෆෝක් දූපත)", "en_NG": "ඉංග්‍රීසි (නයිජීරියාව)", "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_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_VC": "ඉංග්‍රීසි (ශාන්ත වින්සන්ට් සහ ග්‍රෙනඩින්ස්)", "en_VG": "ඉංග්‍රීසි (බ්‍රිතාන්‍ය වර්ජින් දූපත්)", "en_VI": "ඉංග්‍රීසි (ඇමරිකානු වර්ජින් දූපත්)", "en_VU": "ඉංග්‍රීසි (වනුවාටු)", "en_WS": "ඉංග්‍රීසි (සැමෝවා)", "en_ZA": "ඉංග්‍රීසි (දකුණු අප්‍රිකාව)", "en_ZM": "ඉංග්‍රීසි (සැම්බියාව)", "en_ZW": "ඉංග්‍රීසි (සිම්බාබ්වේ)", "eo": "එස්පැරන්ටෝ", "es": "ස්පාඤ්ඤ", "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": "බොස්කෝ (ස්පාඤ්ඤය)", "fa": "පර්සියානු", "fa_AF": "පර්සියානු (ඇෆ්ගනිස්ථානය)", "fa_IR": "පර්සියානු (ඉරානය)", "fi": "ෆින්ලන්ත", "fi_FI": "ෆින්ලන්ත (ෆින්ලන්තය)", "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": "ප්‍රංශ (මයෝට්)", "fy": "බටහිර ෆ්‍රිසියානු", "fy_NL": "බටහිර ෆ්‍රිසියානු (නෙදර්ලන්තය)", "ga": "අයර්ලන්ත", "ga_IE": "අයර්ලන්ත (අයර්ලන්තය)", "gl": "ගැලීසියානු", "gl_ES": "ගැලීසියානු (ස්පාඤ්ඤය)", "gu": "ගුජරාටි", "gu_IN": "ගුජරාටි (ඉන්දියාව)", "gv": "මැන්ක්ස්", "gv_IM": "මැන්ක්ස් (අයිල් ඔෆ් මෑන්)", "ha": "හෝසා", "ha_GH": "හෝසා (ඝානාව)", "ha_Latn": "හෝසා (ලතින්)", "ha_Latn_GH": "හෝසා (ලතින්, ඝානාව)", "ha_Latn_NE": "හෝසා (ලතින්, නයිජර්)", "ha_Latn_NG": "හෝසා (ලතින්, නයිජීරියාව)", "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_Cyrl": "කසාඛ් (සිරිලික්)", "kk_Cyrl_KZ": "කසාඛ් (සිරිලික්, කසකස්තානය)", "kk_KZ": "කසාඛ් (කසකස්තානය)", "kl": "කලාලිසට්", "kl_GL": "කලාලිසට් (ග්‍රීන්ලන්තය)", "km": "කමර්", "km_KH": "කමර් (කාම්බෝජය)", "kn": "කණ්ණඩ", "kn_IN": "කණ්ණඩ (ඉන්දියාව)", "ko": "කොරියානු", "ko_KP": "කොරියානු (උතුරු කොරියාව)", "ko_KR": "කොරියානු (දකුණු කොරියාව)", "ks": "කාෂ්මීර්", "ks_Arab": "කාෂ්මීර් (අරාබි)", "ks_Arab_IN": "කාෂ්මීර් (අරාබි, ඉන්දියාව)", "ks_IN": "කාෂ්මීර් (ඉන්දියාව)", "kw": "කෝනීසියානු", "kw_GB": "කෝනීසියානු (එක්සත් රාජධානිය)", "ky": "කිර්ගිස්", "ky_Cyrl": "කිර්ගිස් (සිරිලික්)", "ky_Cyrl_KG": "කිර්ගිස් (සිරිලික්, කිර්ගිස්තානය)", "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_Cyrl": "මොංගෝලියානු (සිරිලික්)", "mn_Cyrl_MN": "මොංගෝලියානු (සිරිලික්, මොන්ගෝලියාව)", "mn_MN": "මොංගෝලියානු (මොන්ගෝලියාව)", "mr": "මරාති", "mr_IN": "මරාති (ඉන්දියාව)", "ms": "මැලේ", "ms_BN": "මැලේ (බෲනායි)", "ms_Latn": "මැලේ (ලතින්)", "ms_Latn_BN": "මැලේ (ලතින්, බෲනායි)", "ms_Latn_MY": "මැලේ (ලතින්, මැලේසියාව)", "ms_Latn_SG": "මැලේ (ලතින්, සිංගප්පූරුව)", "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_CV": "පෘතුගීසි (කේප් වර්ඩ්)", "pt_GW": "පෘතුගීසි (ගිනි බිසව්)", "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_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_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": "උස්බෙක් (උස්බෙකිස්ථානය)", "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": "සුලු (දකුණු අප්‍රිකාව)" } } src/Symfony/Component/Intl/Resources/data/locales/sk.json000066400000000000000000000567351266465517700240410ustar00rootroot00000000000000{ "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_Latn": "bambarčina (latinka)", "bm_Latn_ML": "bambarčina (latinka, 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)", "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_LI": "nemčina (Lichtenštajnsko)", "de_LU": "nemčina (Luxembursko)", "dz": "dzongkä", "dz_BT": "dzongkä (Bhután)", "ee": "ewe", "ee_GH": "ewe (Ghana)", "ee_TG": "ewe (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_AU": "angličtina (Austrália)", "en_BB": "angličtina (Barbados)", "en_BE": "angličtina (Belgicko)", "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_CK": "angličtina (Cookove ostrovy)", "en_CM": "angličtina (Kamerun)", "en_CX": "angličtina (Vianočný ostrov)", "en_DG": "angličtina (Diego García)", "en_DM": "angličtina (Dominika)", "en_ER": "angličtina (Eritrea)", "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_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_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_SG": "angličtina (Singapur)", "en_SH": "angličtina (Svätá Helena)", "en_SL": "angličtina (Sierra Leone)", "en_SS": "angličtina (Južný Sudán)", "en_SX": "angličtina (Sint Maarten)", "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_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_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 (Kongo - Kinshasa)", "fr_CF": "francúzština (Stredoafrická republika)", "fr_CG": "francúzština (Kongo - Brazzaville)", "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_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_Latn": "hauština (latinka)", "ha_Latn_GH": "hauština (latinka, Ghana)", "ha_Latn_NE": "hauština (latinka, Niger)", "ha_Latn_NG": "hauština (latinka, Nigéria)", "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á ioština", "ii_CN": "s’čchuanská ioština (Čí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_Cyrl": "kazaština (cyrilika)", "kk_Cyrl_KZ": "kazaština (cyrilika, Kazachstan)", "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_Arab": "kašmírčina (arabské)", "ks_Arab_IN": "kašmírčina (arabské, India)", "ks_IN": "kašmírčina (India)", "kw": "kornčina", "kw_GB": "kornčina (Spojené kráľovstvo)", "ky": "kirgizština", "ky_Cyrl": "kirgizština (cyrilika)", "ky_Cyrl_KG": "kirgizština (cyrilika, Kirgizsko)", "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 (Kongo - Kinshasa)", "ln_CF": "lingalčina (Stredoafrická republika)", "ln_CG": "lingalčina (Kongo - Brazzaville)", "lo": "laoština", "lo_LA": "laoština (Laos)", "lt": "litovčina", "lt_LT": "litovčina (Litva)", "lu": "luba-katanga", "lu_CD": "luba-katanga (Kongo - Kinshasa)", "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_Cyrl": "mongolčina (cyrilika)", "mn_Cyrl_MN": "mongolčina (cyrilika, Mongolsko)", "mn_MN": "mongolčina (Mongolsko)", "mr": "maráthčina", "mr_IN": "maráthčina (India)", "ms": "malajčina", "ms_BN": "malajčina (Brunej)", "ms_Latn": "malajčina (latinka)", "ms_Latn_BN": "malajčina (latinka, Brunej)", "ms_Latn_MY": "malajčina (latinka, Malajzia)", "ms_Latn_SG": "malajčina (latinka, Singapur)", "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órsky bokmål", "nb_NO": "nórsky bokmål (Nórsko)", "nb_SJ": "nórsky bokmål (Svalbard a Jan Mayen)", "nd": "severné ndebele", "nd_ZW": "severné ndebele (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 (Sint Maarten)", "nn": "nórsky nynorsk", "nn_NO": "nórsky nynorsk (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_CV": "portugalčina (Kapverdy)", "pt_GW": "portugalčina (Guinea-Bissau)", "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": "kirundčina", "rn_BI": "kirundč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": "kiňarwanda", "rw_RW": "kiňarwanda (Rwanda)", "se": "severné sami", "se_FI": "severné sami (Fínsko)", "se_NO": "severné sami (Nórsko)", "se_SE": "severné sami (Š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 (Ålandy)", "sv_FI": "švédčina (Fínsko)", "sv_SE": "švédčina (Švédsko)", "sw": "svahilčina", "sw_KE": "svahilčina (Keňa)", "sw_TZ": "svahilčina (Tanzánia)", "sw_UG": "svahilč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_Arab": "ujgurčina (arabské)", "ug_Arab_CN": "ujgurčina (arabské, Čína)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sl.json000066400000000000000000000606631266465517700240350ustar00rootroot00000000000000{ "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_Latn": "bambarščina (latinica)", "bm_Latn_ML": "bambarščina (latinica, 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)", "cs": "češčina", "cs_CZ": "češčina (Češka)", "cy": "valižanščina", "cy_GB": "valižanščina (Velika Britanija)", "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_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_AU": "angleščina (Avstralija)", "en_BB": "angleščina (Barbados)", "en_BE": "angleščina (Belgija)", "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_CK": "angleščina (Cookovi otoki)", "en_CM": "angleščina (Kamerun)", "en_CX": "angleščina (Božični otok)", "en_DG": "angleščina (Diego Garcia)", "en_DM": "angleščina (Dominika)", "en_ER": "angleščina (Eritreja)", "en_FJ": "angleščina (Fidži)", "en_FK": "angleščina (Falklandski otoki)", "en_FM": "angleščina (Mikronezija)", "en_GB": "angleščina (Velika Britanija)", "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 Hong Kong)", "en_IE": "angleščina (Irska)", "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_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_SG": "angleščina (Singapur)", "en_SH": "angleščina (Sveta Helena)", "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 (Otočji 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 (Druga ameriška ozemlja v Tihem oceanu)", "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_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_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": "frizijščina", "fy_NL": "frizijščina (Nizozemska)", "ga": "irščina", "ga_IE": "irščina (Irska)", "gd": "škotska gelščina", "gd_GB": "škotska gelščina (Velika Britanija)", "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_Latn": "havščina (latinica)", "ha_Latn_GH": "havščina (latinica, Gana)", "ha_Latn_NE": "havščina (latinica, Niger)", "ha_Latn_NG": "havščina (latinica, Nigerija)", "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": "gruzinščina", "ka_GE": "gruzinščina (Gruzija)", "ki": "kikujščina", "ki_KE": "kikujščina (Kenija)", "kk": "kazaščina", "kk_Cyrl": "kazaščina (cirilica)", "kk_Cyrl_KZ": "kazaščina (cirilica, Kazahstan)", "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_Arab": "kašmirščina (arabski)", "ks_Arab_IN": "kašmirščina (arabski, Indija)", "ks_IN": "kašmirščina (Indija)", "kw": "kornijščina", "kw_GB": "kornijščina (Velika Britanija)", "ky": "kirgiščina", "ky_Cyrl": "kirgiščina (cirilica)", "ky_Cyrl_KG": "kirgiščina (cirilica, Kirgizistan)", "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_Cyrl": "mongolščina (cirilica)", "mn_Cyrl_MN": "mongolščina (cirilica, Mongolija)", "mn_MN": "mongolščina (Mongolija)", "mr": "maratščina", "mr_IN": "maratščina (Indija)", "ms": "malajščina", "ms_BN": "malajščina (Brunej)", "ms_Latn": "malajščina (latinica)", "ms_Latn_BN": "malajščina (latinica, Brunej)", "ms_Latn_MY": "malajščina (latinica, Malezija)", "ms_Latn_SG": "malajščina (latinica, Singapur)", "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": "orijščina", "or_IN": "orijšč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_CV": "portugalščina (Zelenortski otoki)", "pt_GW": "portugalščina (Gvineja Bissau)", "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 (Vzhodni Timor)", "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": "singalščina", "si_LK": "singalšč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_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_Arab": "ujgurščina (arabski)", "ug_Arab_CN": "ujgurščina (arabski, Kitajska)", "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 Hong Kong)", "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 Hong Kong)", "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 Hong Kong)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sn.json000066400000000000000000000273431266465517700240350ustar00rootroot00000000000000{ "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_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_AU": "Chirungu (Australia)", "en_BB": "Chirungu (Barbados)", "en_BE": "Chirungu (Beljium)", "en_BM": "Chirungu (Bermuda)", "en_BS": "Chirungu (Bahama)", "en_BW": "Chirungu (Botswana)", "en_BZ": "Chirungu (Belize)", "en_CA": "Chirungu (Kanada)", "en_CK": "Chirungu (Zvitsuwa zveCook)", "en_CM": "Chirungu (Kameruni)", "en_DM": "Chirungu (Dominica)", "en_ER": "Chirungu (Eritrea)", "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_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_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_SG": "Chirungu (Singapore)", "en_SH": "Chirungu (Saint Helena)", "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_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_CV": "chiPutukezi (Zvitsuwa zveCape Verde)", "pt_GW": "chiPutukezi (Guinea-Bissau)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/so.json000066400000000000000000000273031266465517700240320ustar00rootroot00000000000000{ "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_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_AU": "Ingiriisi (Awstaraaliya)", "en_BB": "Ingiriisi (Baarbadoos)", "en_BE": "Ingiriisi (Biljam)", "en_BM": "Ingiriisi (Bermuuda)", "en_BS": "Ingiriisi (Bahaamas)", "en_BW": "Ingiriisi (Botuswaana)", "en_BZ": "Ingiriisi (Belize)", "en_CA": "Ingiriisi (Kanada)", "en_CK": "Ingiriisi (Jaziiradda Cook)", "en_CM": "Ingiriisi (Kaameruun)", "en_DM": "Ingiriisi (Domeenika)", "en_ER": "Ingiriisi (Eretereeya)", "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_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_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_SG": "Ingiriisi (Singaboor)", "en_SH": "Ingiriisi (Saint Helena)", "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_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 (Myanmar)", "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_CV": "Boortaqiis (Cape Verde Islands)", "pt_GW": "Boortaqiis (Gini-Bisaaw)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sq.json000066400000000000000000000530301266465517700240300ustar00rootroot00000000000000{ "Names": { "af": "afrikanisht", "af_NA": "afrikanisht (Namibi)", "af_ZA": "afrikanisht (Afrika e Jugut)", "ak": "akanisht", "ak_GH": "akanisht (Ganë)", "am": "amarike", "am_ET": "amarike (Etiopi)", "ar": "arabisht", "ar_AE": "arabisht (Emiratet e Bashkuara Arabe)", "ar_BH": "arabisht (Bahrein)", "ar_DJ": "arabisht (Xhibut)", "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": "azere", "az_AZ": "azere (Azerbajxhan)", "az_Cyrl": "azere (cirilik)", "az_Cyrl_AZ": "azere (cirilik, Azerbajxhan)", "az_Latn": "azere (latin)", "az_Latn_AZ": "azere (latin, Azerbajxhan)", "be": "bjellorusisht", "be_BY": "bjellorusisht (Bjellorusi)", "bg": "bullgarisht", "bg_BG": "bullgarisht (Bullgari)", "bm": "bambara", "bm_Latn": "bambara (latin)", "bm_Latn_ML": "bambara (latin, Mali)", "bn": "bengalisht", "bn_BD": "bengalisht (Bangladesh)", "bn_IN": "bengalisht (Indi)", "bo": "tibetisht", "bo_CN": "tibetisht (Kinë)", "bo_IN": "tibetisht (Indi)", "br": "bretone", "br_FR": "bretone (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)", "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_LI": "gjermanisht (Lihtënshtajn)", "de_LU": "gjermanisht (Luksemburg)", "dz": "xongka", "dz_BT": "xongka (Butan)", "ee": "juisht", "ee_GH": "juisht (Ganë)", "ee_TG": "juisht (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_AU": "anglisht (Australi)", "en_BB": "anglisht (Barbados)", "en_BE": "anglisht (Belgjikë)", "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_CK": "anglisht (Ishujt Kukë)", "en_CM": "anglisht (Kamerun)", "en_CX": "anglisht (Ishulli i Krishtlindjes)", "en_DG": "anglisht (Diego Garsia)", "en_DM": "anglisht (Dominikë)", "en_ER": "anglisht (Eritre)", "en_FJ": "anglisht (Fixhi)", "en_FK": "anglisht (Ishujt Folklandë)", "en_FM": "anglisht (Mikronezi)", "en_GB": "anglisht (Mbretëria e Bashkuar)", "en_GD": "anglisht (Grenadë)", "en_GG": "anglisht (Guernsej)", "en_GH": "anglisht (Ganë)", "en_GI": "anglisht (Gjibraltar)", "en_GM": "anglisht (Gambi)", "en_GU": "anglisht (Guam)", "en_GY": "anglisht (Guajanë)", "en_HK": "anglisht (RVAK i Hong Kongut)", "en_IE": "anglisht (Irlandë)", "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 (Qiribati)", "en_KN": "anglisht (Shën Kits e 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 (Ishujt Norfolkë)", "en_NG": "anglisht (Nigeri)", "en_NR": "anglisht (Nauru)", "en_NU": "anglisht (Niue)", "en_NZ": "anglisht (Zelanda 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 (Sishel)", "en_SD": "anglisht (Sudan)", "en_SG": "anglisht (Singapor)", "en_SH": "anglisht (Shën Helena)", "en_SL": "anglisht (Siera Leone)", "en_SS": "anglisht (Sudani i Jugut)", "en_SX": "anglisht (Shën Martin (Sint Maarten-pjesa e Mbretërisë së Holandës))", "en_SZ": "anglisht (Svazilandë)", "en_TC": "anglisht (Ishujt Turke dhe Kaike)", "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 Vinsent dhe Grenadinet)", "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 (Zambi)", "en_ZW": "anglisht (Zimbabve)", "eo": "esperanto", "es": "spanjisht", "es_AR": "spanjisht (Argjentinë)", "es_BO": "spanjisht (Bolivi)", "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 (El 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)", "fi": "finlandisht", "fi_FI": "finlandisht (Finlandë)", "fo": "faroisht", "fo_FO": "faroisht (Ishujt Faroe)", "fr": "frëngjisht", "fr_BE": "frëngjisht (Belgjikë)", "fr_BF": "frëngjisht (Burkina Faso)", "fr_BI": "frëngjisht (Burund)", "fr_BJ": "frëngjisht (Benin)", "fr_BL": "frëngjisht (Shën Bartolemeo)", "fr_CA": "frëngjisht (Kanada)", "fr_CD": "frëngjisht (Kongo-Kinshasa)", "fr_CF": "frëngjisht (Republika Afrikano-Qendrore)", "fr_CG": "frëngjisht (Kongo-Brazavilë)", "fr_CH": "frëngjisht (Zvicër)", "fr_CI": "frëngjisht (Bregu i Fildishtë)", "fr_CM": "frëngjisht (Kamerun)", "fr_DJ": "frëngjisht (Xhibut)", "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 Peir dhe Mikuelon)", "fr_RE": "frëngjisht (Reunion)", "fr_RW": "frëngjisht (Ruandë)", "fr_SC": "frëngjisht (Sishel)", "fr_SN": "frëngjisht (Senegali)", "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 Futina)", "fr_YT": "frëngjisht (Majotë)", "fy": "frizianisht", "fy_NL": "frizianisht (Holandë)", "ga": "irlandezçe", "ga_IE": "irlandezçe (Irlandë)", "gl": "galike", "gl_ES": "galike (Spanjë)", "gu": "guxharatisht", "gu_IN": "guxharatisht (Indi)", "gv": "mankse", "gv_IM": "mankse (Ishulli i Manit)", "ha": "hausisht", "ha_GH": "hausisht (Ganë)", "ha_Latn": "hausisht (latin)", "ha_Latn_GH": "hausisht (latin, Ganë)", "ha_Latn_NE": "hausisht (latin, Niger)", "ha_Latn_NG": "hausisht (latin, Nigeri)", "ha_NE": "hausisht (Niger)", "ha_NG": "hausisht (Nigeri)", "he": "hebraisht", "he_IL": "hebraisht (Izrael)", "hi": "indishte", "hi_IN": "indishte (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": "igbe", "ig_NG": "igbe (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_Cyrl": "kazakisht (cirilik)", "kk_Cyrl_KZ": "kazakisht (cirilik, Kazakistan)", "kk_KZ": "kazakisht (Kazakistan)", "kl": "kalalisute", "kl_GL": "kalalisute (Grenlandë)", "km": "kmere", "km_KH": "kmere (Kamboxhia)", "kn": "kanade", "kn_IN": "kanade (Indi)", "ko": "koreanisht", "ko_KP": "koreanisht (Koreja e Veriut)", "ko_KR": "koreanisht (Koreja e Jugut)", "ks": "kashmire", "ks_Arab": "kashmire (arabik)", "ks_Arab_IN": "kashmire (arabik, Indi)", "ks_IN": "kashmire (Indi)", "kw": "kornisht", "kw_GB": "kornisht (Mbretëria e Bashkuar)", "ky": "kirgizisht", "ky_Cyrl": "kirgizisht (cirilik)", "ky_Cyrl_KG": "kirgizisht (cirilik, Kirgistan)", "ky_KG": "kirgizisht (Kirgistan)", "lb": "luksemburgase", "lb_LU": "luksemburgase (Luksemburg)", "lg": "gandisht", "lg_UG": "gandisht (Ugandë)", "ln": "lingalisht", "ln_AO": "lingalisht (Angolë)", "ln_CD": "lingalisht (Kongo-Kinshasa)", "ln_CF": "lingalisht (Republika Afrikano-Qendrore)", "ln_CG": "lingalisht (Kongo-Brazavilë)", "lo": "laosisht", "lo_LA": "laosisht (Laos)", "lt": "lituanisht", "lt_LT": "lituanisht (Lituani)", "lu": "Lubakatange", "lu_CD": "Lubakatange (Kongo-Kinshasa)", "lv": "letonisht", "lv_LV": "letonisht (Letoni)", "mg": "malageze", "mg_MG": "malageze (Madagaskar)", "mk": "maqedonisht", "mk_MK": "maqedonisht (Maqedoni)", "ml": "malajalame", "ml_IN": "malajalame (Indi)", "mn": "mongolisht", "mn_Cyrl": "mongolisht (cirilik)", "mn_Cyrl_MN": "mongolisht (cirilik, Mongoli)", "mn_MN": "mongolisht (Mongoli)", "mr": "maratisht", "mr_IN": "maratisht (Indi)", "ms": "malajisht", "ms_BN": "malajisht (Brunej)", "ms_Latn": "malajisht (latin)", "ms_Latn_BN": "malajisht (latin, Brunej)", "ms_Latn_MY": "malajisht (latin, Malajzi)", "ms_Latn_SG": "malajisht (latin, Singapor)", "ms_MY": "malajisht (Malajzi)", "ms_SG": "malajisht (Singapor)", "mt": "maltisht", "mt_MT": "maltisht (Maltë)", "my": "birmanisht", "my_MM": "birmanisht (Mianmar (Burma))", "nb": "bokmalishte norvegjeze", "nb_NO": "bokmalishte norvegjeze (Norvegji)", "nb_SJ": "bokmalishte norvegjeze (Svalbard e Zhan 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 (Shën Martin (Sint Maarten-pjesa e Mbretërisë së Holandës))", "nn": "ninorske norvegjeze", "nn_NO": "ninorske norvegjeze (Norvegji)", "om": "oromoisht", "om_ET": "oromoisht (Etiopi)", "om_KE": "oromoisht (Kenia)", "or": "orije", "or_IN": "orije (Indi)", "pa": "panxhabe", "pa_Arab": "panxhabe (arabik)", "pa_Arab_PK": "panxhabe (arabik, Pakistan)", "pa_Guru": "panxhabe (gurmuk)", "pa_Guru_IN": "panxhabe (gurmuk, Indi)", "pa_IN": "panxhabe (Indi)", "pa_PK": "panxhabe (Pakistan)", "pl": "polonisht", "pl_PL": "polonisht (Poloni)", "ps": "pashto", "ps_AF": "pashto (Afganistan)", "pt": "portugalisht", "pt_AO": "portugalisht (Angolë)", "pt_BR": "portugalisht (Brazil)", "pt_CV": "portugalisht (Kepi i Gjelbër)", "pt_GW": "portugalisht (Guine-Bisau)", "pt_MO": "portugalisht (RVAK i Makaos)", "pt_MZ": "portugalisht (Mozambik)", "pt_PT": "portugalisht (Portugali)", "pt_ST": "portugalisht (Sao Tome e Prinsipe)", "pt_TL": "portugalisht (Timori Lindor)", "qu": "keçua", "qu_BO": "keçua (Bolivi)", "qu_EC": "keçua (Ekuador)", "qu_PE": "keçua (Peru)", "rm": "rome", "rm_CH": "rome (Zvicër)", "rn": "rundisht", "rn_BI": "rundisht (Burund)", "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 (Republika Afrikano-Qendrore)", "sh": "Serbo-Kroatisht", "sh_BA": "Serbo-Kroatisht (Bosnjë-Hercegovinë)", "si": "sinhale", "si_LK": "sinhale (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 (Xhibut)", "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, Mali 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, Mali i Zi)", "sr_Latn_RS": "serbisht (latin, Serbi)", "sr_Latn_XK": "serbisht (latin, Kosovë)", "sr_ME": "serbisht (Mali 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_KE": "suahilisht (Kenia)", "sw_TZ": "suahilisht (Tanzani)", "sw_UG": "suahilisht (Ugandë)", "ta": "tamile", "ta_IN": "tamile (Indi)", "ta_LK": "tamile (Sri Lankë)", "ta_MY": "tamile (Malajzi)", "ta_SG": "tamile (Singapor)", "te": "teluge", "te_IN": "teluge (Indi)", "th": "tajlandisht", "th_TH": "tajlandisht (Tajlandë)", "ti": "tigrinje", "ti_ER": "tigrinje (Eritre)", "ti_ET": "tigrinje (Etiopi)", "to": "tonganisht", "to_TO": "tonganisht (Tonga)", "tr": "turqisht", "tr_CY": "turqisht (Qipro)", "tr_TR": "turqisht (Turqi)", "ug": "ujgure", "ug_Arab": "ujgure (arabik)", "ug_Arab_CN": "ujgure (arabik, Kinë)", "ug_CN": "ujgure (Kinë)", "uk": "ukrainisht", "uk_UA": "ukrainisht (Ukrainë)", "ur": "urdu", "ur_IN": "urdu (Indi)", "ur_PK": "urdu (Pakistan)", "uz": "uzbeke", "uz_AF": "uzbeke (Afganistan)", "uz_Arab": "uzbeke (arabik)", "uz_Arab_AF": "uzbeke (arabik, Afganistan)", "uz_Cyrl": "uzbeke (cirilik)", "uz_Cyrl_UZ": "uzbeke (cirilik, Uzbekistan)", "uz_Latn": "uzbeke (latin)", "uz_Latn_UZ": "uzbeke (latin, Uzbekistan)", "uz_UZ": "uzbeke (Uzbekistan)", "vi": "vietnamisht", "vi_VN": "vietnamisht (Vietnam)", "yo": "jorubisht", "yo_BJ": "jorubisht (Benin)", "yo_NG": "jorubisht (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": "zulu", "zu_ZA": "zulu (Afrika e Jugut)" } } src/Symfony/Component/Intl/Resources/data/locales/sr.json000066400000000000000000000745641266465517700240500ustar00rootroot00000000000000{ "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_Latn": "бамбара (латиница)", "bm_Latn_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": "каталонски (Италија)", "cs": "чешки", "cs_CZ": "чешки (Чешка)", "cy": "велшки", "cy_GB": "велшки (Велика Британија)", "da": "дански", "da_DK": "дански (Данска)", "da_GL": "дански (Гренланд)", "de": "немачки", "de_AT": "немачки (Аустрија)", "de_BE": "немачки (Белгија)", "de_CH": "немачки (Швајцарска)", "de_DE": "немачки (Немачка)", "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_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_MY": "енглески (Малезија)", "en_NA": "енглески (Намибија)", "en_NF": "енглески (Норфолк Острво)", "en_NG": "енглески (Нигерија)", "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_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_VC": "енглески (Сент Винсент и Гренадини)", "en_VG": "енглески (Британска Девичанска Острва)", "en_VI": "енглески (Америчка Девичанска Острва)", "en_VU": "енглески (Вануату)", "en_WS": "енглески (Самоа)", "en_ZA": "енглески (Јужноафричка Република)", "en_ZM": "енглески (Замбија)", "en_ZW": "енглески (Зимбабве)", "eo": "есперанто", "es": "шпански", "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": "баскијски (Шпанија)", "fa": "персијски", "fa_AF": "персијски (Авганистан)", "fa_IR": "персијски (Иран)", "ff": "Фулах", "ff_CM": "Фулах (Камерун)", "ff_GN": "Фулах (Гвинеја)", "ff_MR": "Фулах (Мауританија)", "ff_SN": "Фулах (Сенегал)", "fi": "фински", "fi_FI": "фински (Финска)", "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": "француски (Мајот)", "fy": "западни фризијски", "fy_NL": "западни фризијски (Холандија)", "ga": "ирски", "ga_IE": "ирски (Ирска)", "gd": "Шкотски Галски", "gd_GB": "Шкотски Галски (Велика Британија)", "gl": "галицијски", "gl_ES": "галицијски (Шпанија)", "gu": "гуџарати", "gu_IN": "гуџарати (Индија)", "gv": "Манкс", "gv_IM": "Манкс (Острво Ман)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латиница)", "ha_Latn_GH": "хауса (латиница, Гана)", "ha_Latn_NE": "хауса (латиница, Нигер)", "ha_Latn_NG": "хауса (латиница, Нигерија)", "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_Cyrl": "казашки (ћирилица)", "kk_Cyrl_KZ": "казашки (ћирилица, Казахстан)", "kk_KZ": "казашки (Казахстан)", "kl": "калалисут", "kl_GL": "калалисут (Гренланд)", "km": "кмерски", "km_KH": "кмерски (Камбоџа)", "kn": "канада", "kn_IN": "канада (Индија)", "ko": "корејски", "ko_KP": "корејски (Северна Кореја)", "ko_KR": "корејски (Јужна Кореја)", "ks": "кашмирски", "ks_Arab": "кашмирски (арапско писмо)", "ks_Arab_IN": "кашмирски (арапско писмо, Индија)", "ks_IN": "кашмирски (Индија)", "kw": "корнволски", "kw_GB": "корнволски (Велика Британија)", "ky": "киргиски", "ky_Cyrl": "киргиски (ћирилица)", "ky_Cyrl_KG": "киргиски (ћирилица, Киргистан)", "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_Cyrl": "монголски (ћирилица)", "mn_Cyrl_MN": "монголски (ћирилица, Монголија)", "mn_MN": "монголски (Монголија)", "mr": "марати", "mr_IN": "марати (Индија)", "ms": "малајски", "ms_BN": "малајски (Брунеј)", "ms_Latn": "малајски (латиница)", "ms_Latn_BN": "малајски (латиница, Брунеј)", "ms_Latn_MY": "малајски (латиница, Малезија)", "ms_Latn_SG": "малајски (латиница, Сингапур)", "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_CV": "португалски (Зеленортска Острва)", "pt_GW": "португалски (Гвинеја-Бисао)", "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_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_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": "узбечки (Узбекистан)", "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": "зулу (Јужноафричка Република)" } } src/Symfony/Component/Intl/Resources/data/locales/sr_BA.json000066400000000000000000000000401266465517700243640ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_BA" } src/Symfony/Component/Intl/Resources/data/locales/sr_CS.json000066400000000000000000000000401266465517700244070ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_CS.json000066400000000000000000000000401266465517700254000ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_Cyrl_YU.json000066400000000000000000000000401266465517700254300ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_Latn.json000066400000000000000000000536771266465517700250300ustar00rootroot00000000000000{ "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 (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_Latn": "bambara (latinica)", "bm_Latn_ML": "bambara (latinica, 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)", "cs": "češki", "cs_CZ": "češki (Češka)", "cy": "velški", "cy_GB": "velški (Velika Britanija)", "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_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_AU": "engleski (Australija)", "en_BB": "engleski (Barbados)", "en_BE": "engleski (Belgija)", "en_BM": "engleski (Bermuda)", "en_BS": "engleski (Bahami)", "en_BW": "engleski (Bocvana)", "en_BZ": "engleski (Belize)", "en_CA": "engleski (Kanada)", "en_CC": "engleski (Kokos (Keling) Ostrva)", "en_CK": "engleski (Kukova Ostrva)", "en_CM": "engleski (Kamerun)", "en_CX": "engleski (Božićno ostrvo)", "en_DG": "engleski (Dijego Garsija)", "en_DM": "engleski (Dominika)", "en_ER": "engleski (Eritreja)", "en_FJ": "engleski (Fidži)", "en_FK": "engleski (Foklandska ostrva)", "en_FM": "engleski (Mikronezija)", "en_GB": "engleski (Velika Britanija)", "en_GD": "engleski (Grenada)", "en_GG": "engleski (Gurnsi)", "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 S. A. R. Kina)", "en_IE": "engleski (Irska)", "en_IM": "engleski (Ostrvo Man)", "en_IN": "engleski (Indija)", "en_IO": "engleski (Britanska teritorija u Indijskom okeanu)", "en_JE": "engleski (Džersi)", "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 (Norfolk Ostrvo)", "en_NG": "engleski (Nigerija)", "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_SG": "engleski (Singapur)", "en_SH": "engleski (Sveta Jelena)", "en_SL": "engleski (Sijera Leone)", "en_SS": "engleski (Južni Sudan)", "en_SX": "engleski (Sveti Martin)", "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 Američke 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_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 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": "persijski", "fa_AF": "persijski (Avganistan)", "fa_IR": "persijski (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_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 (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 (Gvadelupe)", "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 (Sent 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 (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 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_Latn": "hausa (latinica)", "ha_Latn_GH": "hausa (latinica, Gana)", "ha_Latn_NE": "hausa (latinica, Niger)", "ha_Latn_NG": "hausa (latinica, Nigerija)", "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čuan ji", "ii_CN": "sečuan 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_Cyrl": "kazaški (ćirilica)", "kk_Cyrl_KZ": "kazaški (ćirilica, Kazahstan)", "kk_KZ": "kazaški (Kazahstan)", "kl": "kalalisut", "kl_GL": "kalalisut (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_Arab": "kašmirski (arapsko pismo)", "ks_Arab_IN": "kašmirski (arapsko pismo, Indija)", "ks_IN": "kašmirski (Indija)", "kw": "kornvolski", "kw_GB": "kornvolski (Velika Britanija)", "ky": "kirgiski", "ky_Cyrl": "kirgiski (ćirilica)", "ky_Cyrl_KG": "kirgiski (ćirilica, Kirgistan)", "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": "laoški", "lo_LA": "laoški (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_Cyrl": "mongolski (ćirilica)", "mn_Cyrl_MN": "mongolski (ćirilica, Mongolija)", "mn_MN": "mongolski (Mongolija)", "mr": "marati", "mr_IN": "marati (Indija)", "ms": "malajski", "ms_BN": "malajski (Brunej)", "ms_Latn": "malajski (latinica)", "ms_Latn_BN": "malajski (latinica, Brunej)", "ms_Latn_MY": "malajski (latinica, Malezija)", "ms_Latn_SG": "malajski (latinica, Singapur)", "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 bokmal", "nb_NO": "norveški bokmal (Norveška)", "nb_SJ": "norveški bokmal (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)", "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": "orija", "or_IN": "orija (Indija)", "os": "Osetski", "os_GE": "Osetski (Gruzija)", "os_RU": "Osetski (Rusija)", "pa": "pandžabi", "pa_Arab": "pandžabi (arapsko pismo)", "pa_Arab_PK": "pandžabi (arapsko pismo, Pakistan)", "pa_Guru": "pandžabi (gurmuki pismo)", "pa_Guru_IN": "pandžabi (gurmuki pismo, Indija)", "pa_IN": "pandžabi (Indija)", "pa_PK": "pandžabi (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_CV": "portugalski (Zelenortska Ostrva)", "pt_GW": "portugalski (Gvineja-Bisao)", "pt_MO": "portugalski (SAR Makao (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 (Švajcarska)", "rn": "rundi", "rn_BI": "rundi (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": "sinhalski", "si_LK": "sinhalski (Š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_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": "Tagalski", "tl_PH": "Tagalski (Filipini)", "to": "tonga", "to_TO": "tonga (Tonga)", "tr": "turski", "tr_CY": "turski (Kipar)", "tr_TR": "turski (Turska)", "ug": "ujgurski", "ug_Arab": "ujgurski (arapsko pismo)", "ug_Arab_CN": "ujgurski (arapsko pismo, Kina)", "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 (Hong Kong S. A. R. Kina)", "zh_Hans": "kineski (pojednostavljeno kinesko pismo)", "zh_Hans_CN": "kineski (pojednostavljeno kinesko pismo, Kina)", "zh_Hans_HK": "kineski (pojednostavljeno kinesko pismo, Hong Kong S. A. R. 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, Hong Kong S. A. R. 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)" } } src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_CS.json000066400000000000000000000000401266465517700253650ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_Latn_YU.json000066400000000000000000000000401266465517700254150ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_ME.json000066400000000000000000000000401266465517700244030ustar00rootroot00000000000000{ "%%ALIAS": "sr_Latn_ME" } src/Symfony/Component/Intl/Resources/data/locales/sr_RS.json000066400000000000000000000000401266465517700244260ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_RS" } src/Symfony/Component/Intl/Resources/data/locales/sr_XK.json000066400000000000000000000000401266465517700244240ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_XK" } src/Symfony/Component/Intl/Resources/data/locales/sr_YU.json000066400000000000000000000000401266465517700244370ustar00rootroot00000000000000{ "%%ALIAS": "sr_Cyrl_RS" } src/Symfony/Component/Intl/Resources/data/locales/sv.json000066400000000000000000000533231266465517700240420ustar00rootroot00000000000000{ "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_Latn": "bambara (latinska)", "bm_Latn_ML": "bambara (latinska, 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)", "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_LI": "tyska (Liechtenstein)", "de_LU": "tyska (Luxemburg)", "dz": "bhutanesiska", "dz_BT": "bhutanesiska (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_AU": "engelska (Australien)", "en_BB": "engelska (Barbados)", "en_BE": "engelska (Belgien)", "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_CK": "engelska (Cooköarna)", "en_CM": "engelska (Kamerun)", "en_CX": "engelska (Julön)", "en_DG": "engelska (Diego Garcia)", "en_DM": "engelska (Dominica)", "en_ER": "engelska (Eritrea)", "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_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_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_SG": "engelska (Singapore)", "en_SH": "engelska (S:t Helena)", "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_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_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 (S:t 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": "höglandsskotska", "gd_GB": "höglandsskotska (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_Latn": "hausa (latinska)", "ha_Latn_GH": "hausa (latinska, Ghana)", "ha_Latn_NE": "hausa (latinska, Niger)", "ha_Latn_NG": "hausa (latinska, Nigeria)", "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_Cyrl": "kazakiska (kyrilliska)", "kk_Cyrl_KZ": "kazakiska (kyrilliska, Kazakstan)", "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_Arab": "kashmiriska (arabiska)", "ks_Arab_IN": "kashmiriska (arabiska, Indien)", "ks_IN": "kashmiriska (Indien)", "kw": "korniska", "kw_GB": "korniska (Storbritannien)", "ky": "kirgisiska", "ky_Cyrl": "kirgisiska (kyrilliska)", "ky_Cyrl_KG": "kirgisiska (kyrilliska, Kirgizistan)", "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_Cyrl": "mongoliska (kyrilliska)", "mn_Cyrl_MN": "mongoliska (kyrilliska, Mongoliet)", "mn_MN": "mongoliska (Mongoliet)", "mr": "marathi", "mr_IN": "marathi (Indien)", "ms": "malajiska", "ms_BN": "malajiska (Brunei)", "ms_Latn": "malajiska (latinska)", "ms_Latn_BN": "malajiska (latinska, Brunei)", "ms_Latn_MY": "malajiska (latinska, Malaysia)", "ms_Latn_SG": "malajiska (latinska, Singapore)", "ms_MY": "malajiska (Malaysia)", "ms_SG": "malajiska (Singapore)", "mt": "maltesiska", "mt_MT": "maltesiska (Malta)", "my": "burmesiska", "my_MM": "burmesiska (Myanmar (Burma))", "nb": "norskt bokmål", "nb_NO": "norskt bokmål (Norge)", "nb_SJ": "norskt 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_CV": "portugisiska (Kap Verde)", "pt_GW": "portugisiska (Guinea-Bissau)", "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_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": "telugiska", "te_IN": "telugiska (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_Arab": "uiguriska (arabiska)", "ug_Arab_CN": "uiguriska (arabiska, Kina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/sv_FI.json000066400000000000000000000050121266465517700244100ustar00rootroot00000000000000{ "Names": { "ar_PS": "arabiska (Palestinska området)", "ar_SD": "arabiska (Nordsudan)", "cy_GB": "walesiska (Förenade kungariket)", "en_GB": "engelska (Förenade kungariket)", "en_KN": "engelska (Saint Kitts och Nevis)", "en_LC": "engelska (Saint Lucia)", "en_PN": "engelska (Pitcairn)", "en_SD": "engelska (Nordsudan)", "en_SH": "engelska (Saint Helena)", "en_SX": "engelska (Sint Martin)", "en_TK": "engelska (Tokelauöarna)", "en_US": "engelska (Förenta staterna)", "en_VC": "engelska (Saint Vincent och Grenadinerna)", "es_US": "spanska (Förenta staterna)", "fr_BL": "franska (Saint-Barthélemy)", "fr_CD": "franska (Demokratiska republiken Kongo)", "fr_CG": "franska (Kongo)", "fr_MF": "franska (S:t Martin (franska delen))", "fr_PM": "franska (Saint Pierre och Miquelon)", "fr_WF": "franska (Wallis- och Futuna)", "gd_GB": "höglandsskotska (Förenade kungariket)", "km": "khmer", "km_KH": "khmer (Kambodja)", "ks": "kashmiri", "ks_Arab": "kashmiri (arabiska)", "ks_Arab_IN": "kashmiri (arabiska, Indien)", "ks_IN": "kashmiri (Indien)", "kw_GB": "korniska (Förenade kungariket)", "ky": "kirgiziska", "ky_Cyrl": "kirgiziska (kyrilliska)", "ky_Cyrl_KG": "kirgiziska (kyrilliska, Kirgizistan)", "ky_KG": "kirgiziska (Kirgizistan)", "ln_CD": "lingala (Demokratiska republiken Kongo)", "ln_CG": "lingala (Kongo)", "lo": "lao", "lo_LA": "lao (Laos)", "lu_CD": "luba-katanga (Demokratiska republiken Kongo)", "my_MM": "burmesiska (Burma)", "nb": "bokmål", "nb_NO": "bokmål (Norge)", "nb_SJ": "bokmål (Svalbard och Jan Mayen)", "nl_BQ": "nederländska (Bonaire, S:t Eustatius och Saba)", "nl_SX": "nederländska (Sint Martin)", "pa": "panjabi", "pa_Arab": "panjabi (arabiska)", "pa_Arab_PK": "panjabi (arabiska, Pakistan)", "pa_Guru": "panjabi (gurmukhi)", "pa_Guru_IN": "panjabi (gurmukhi, Indien)", "pa_IN": "panjabi (Indien)", "pa_PK": "panjabi (Pakistan)", "ps": "pashto", "ps_AF": "pashto (Afghanistan)", "te": "telugu", "te_IN": "telugu (Indien)", "th": "thai", "th_TH": "thai (Thailand)", "ti": "tigrinska", "ti_ER": "tigrinska (Eritrea)", "ti_ET": "tigrinska (Etiopien)" } } src/Symfony/Component/Intl/Resources/data/locales/sw.json000066400000000000000000000532641266465517700240470ustar00rootroot00000000000000{ "Names": { "af": "Kiafrikana", "af_NA": "Kiafrikana (Namibia)", "af_ZA": "Kiafrikana (Afrika Kusini)", "ak": "Kiakani", "ak_GH": "Kiakani (Ghana)", "am": "Kiamhari", "am_ET": "Kiamhari (Uhabeshi)", "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 (Yordani)", "ar_KM": "Kiarabu (Komoro)", "ar_KW": "Kiarabu (Kuwaiti)", "ar_LB": "Kiarabu (Lebanoni)", "ar_LY": "Kiarabu (Libya)", "ar_MA": "Kiarabu (Moroko)", "ar_MR": "Kiarabu (Moritania)", "ar_OM": "Kiarabu (Omani)", "ar_PS": "Kiarabu (Maeneo ya Palestina)", "ar_QA": "Kiarabu (Katari)", "ar_SA": "Kiarabu (Saudi)", "ar_SD": "Kiarabu (Sudani)", "ar_SO": "Kiarabu (Somalia)", "ar_SS": "Kiarabu (Sudani Kusini)", "ar_SY": "Kiarabu (Siria)", "ar_TD": "Kiarabu (Chadi)", "ar_TN": "Kiarabu (Tunisia)", "ar_YE": "Kiarabu (Yemeni)", "as": "Kiassam", "as_IN": "Kiassam (India)", "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)", "be": "Kibelarusi", "be_BY": "Kibelarusi (Belarusi)", "bg": "Kibulgaria", "bg_BG": "Kibulgaria (Bulgaria)", "bm": "Kibambara", "bm_Latn": "Kibambara (Kilatini)", "bm_Latn_ML": "Kibambara (Kilatini, 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)", "cs": "Kicheki", "cs_CZ": "Kicheki (Jamhuri ya Cheki)", "cy": "Kiwelisi", "cy_GB": "Kiwelisi (Uingereza)", "da": "Kidenmaki", "da_DK": "Kidenmaki (Denmaki)", "da_GL": "Kidenmaki (Grinlandi)", "de": "Kijerumani", "de_AT": "Kijerumani (Austria)", "de_BE": "Kijerumani (Ubelgiji)", "de_CH": "Kijerumani (Uswisi)", "de_DE": "Kijerumani (Ujerumani)", "de_LI": "Kijerumani (Liechtenstein)", "de_LU": "Kijerumani (Lasembagi)", "dz": "Kizongkha", "dz_BT": "Kizongkha (Butani)", "ee": "Kiewe", "ee_GH": "Kiewe (Ghana)", "ee_TG": "Kiewe (Togo)", "el": "Kigiriki", "el_CY": "Kigiriki (Saiprasi)", "el_GR": "Kigiriki (Ugiriki)", "en": "Kiingereza", "en_AG": "Kiingereza (Antigua na Barbuda)", "en_AI": "Kiingereza (Anguilla)", "en_AS": "Kiingereza (Samoa ya Marekani)", "en_AU": "Kiingereza (Australia)", "en_BB": "Kiingereza (Babadosi)", "en_BE": "Kiingereza (Ubelgiji)", "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_CK": "Kiingereza (Visiwa vya Cook)", "en_CM": "Kiingereza (Kameruni)", "en_CX": "Kiingereza (Kisiwa cha Krismasi)", "en_DG": "Kiingereza (Diego Garcia)", "en_DM": "Kiingereza (Dominika)", "en_ER": "Kiingereza (Eritrea)", "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 (Gwam)", "en_GY": "Kiingereza (Guyana)", "en_HK": "Kiingereza (Hong Kong SAR China)", "en_IE": "Kiingereza (Ayalandi)", "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 Marshal)", "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_NR": "Kiingereza (Nauru)", "en_NU": "Kiingereza (Niue)", "en_NZ": "Kiingereza (Nyuzilandi)", "en_PG": "Kiingereza (Papua)", "en_PH": "Kiingereza (Filipino)", "en_PK": "Kiingereza (Pakistani)", "en_PN": "Kiingereza (Pitkairni)", "en_PR": "Kiingereza (Pwetoriko)", "en_PW": "Kiingereza (Palau)", "en_RW": "Kiingereza (Rwanda)", "en_SB": "Kiingereza (Visiwa vya Solomon)", "en_SC": "Kiingereza (Shelisheli)", "en_SD": "Kiingereza (Sudani)", "en_SG": "Kiingereza (Singapoo)", "en_SH": "Kiingereza (Santahelena)", "en_SL": "Kiingereza (Siera Leoni)", "en_SS": "Kiingereza (Sudani Kusini)", "en_SX": "Kiingereza (Santamatini)", "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_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 (Gwatemala)", "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 (Filipino)", "es_PR": "Kihispania (Pwetoriko)", "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)", "fi": "Kifinlandi", "fi_FI": "Kifinlandi (Ufini)", "fo": "Kifaroe", "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 (Gaboni)", "fr_GF": "Kifaransa (Gwiyana ya Ufaransa)", "fr_GN": "Kifaransa (Gine)", "fr_GP": "Kifaransa (Gwadelupe)", "fr_GQ": "Kifaransa (Ginekweta)", "fr_HT": "Kifaransa (Haiti)", "fr_KM": "Kifaransa (Komoro)", "fr_LU": "Kifaransa (Lasembagi)", "fr_MA": "Kifaransa (Moroko)", "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 (Nijeri)", "fr_PF": "Kifaransa (Polinesia ya Ufaransa)", "fr_PM": "Kifaransa (Santapieri na Mikeloni)", "fr_RE": "Kifaransa (Riyunioni)", "fr_RW": "Kifaransa (Rwanda)", "fr_SC": "Kifaransa (Shelisheli)", "fr_SN": "Kifaransa (Senegali)", "fr_SY": "Kifaransa (Siria)", "fr_TD": "Kifaransa (Chadi)", "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_Latn": "Kihausa (Kilatini)", "ha_Latn_GH": "Kihausa (Kilatini, Ghana)", "ha_Latn_NE": "Kihausa (Kilatini, Nijeri)", "ha_Latn_NG": "Kihausa (Kilatini, Nigeria)", "ha_NE": "Kihausa (Nijeri)", "ha_NG": "Kihausa (Nigeria)", "he": "Kiebrania", "he_IL": "Kiebrania (Israeli)", "hi": "Kihindi", "hi_IN": "Kihindi (India)", "hr": "Kroeshia", "hr_BA": "Kroeshia (Bosnia na Hezegovina)", "hr_HR": "Kroeshia (Korasia)", "hu": "Kihungari", "hu_HU": "Kihungari (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 (Samarino)", "ja": "Kijapani", "ja_JP": "Kijapani (Japani)", "ka": "Kijojia", "ka_GE": "Kijojia (Jojia)", "ki": "Kikikuyu", "ki_KE": "Kikikuyu (Kenya)", "kk": "Kikazaki", "kk_Cyrl": "Kikazaki (Kisiriliki)", "kk_Cyrl_KZ": "Kikazaki (Kisiriliki, Kazakistani)", "kk_KZ": "Kikazaki (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_Arab": "Kikashmiri (Kiarabu)", "ks_Arab_IN": "Kikashmiri (Kiarabu, India)", "ks_IN": "Kikashmiri (India)", "kw": "Kikorni", "kw_GB": "Kikorni (Uingereza)", "ky": "Kikirigizi", "ky_Cyrl": "Kikirigizi (Kisiriliki)", "ky_Cyrl_KG": "Kikirigizi (Kisiriliki, Kirigizistani)", "ky_KG": "Kikirigizi (Kirigizistani)", "lb": "Kilasembagi", "lb_LU": "Kilasembagi (Lasembagi)", "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 (Litwania)", "lu": "Kiluba-Katanga", "lu_CD": "Kiluba-Katanga (Jamhuri ya Kidemokrasia ya Kongo)", "lv": "Kilatvia", "lv_LV": "Kilatvia (Lativia)", "mg": "Malagasi", "mg_MG": "Malagasi (Madagaska)", "mk": "Kimasedonia", "mk_MK": "Kimasedonia (Masedonia)", "ml": "Kimalayalam", "ml_IN": "Kimalayalam (India)", "mn": "Kimongolia", "mn_Cyrl": "Kimongolia (Kisiriliki)", "mn_Cyrl_MN": "Kimongolia (Kisiriliki, Mongolia)", "mn_MN": "Kimongolia (Mongolia)", "mr": "Kimarathi", "mr_IN": "Kimarathi (India)", "ms": "Kimalesia", "ms_BN": "Kimalesia (Brunei)", "ms_Latn": "Kimalesia (Kilatini)", "ms_Latn_BN": "Kimalesia (Kilatini, Brunei)", "ms_Latn_MY": "Kimalesia (Kilatini, Malesia)", "ms_Latn_SG": "Kimalesia (Kilatini, Singapoo)", "ms_MY": "Kimalesia (Malesia)", "ms_SG": "Kimalesia (Singapoo)", "mt": "Kimalta", "mt_MT": "Kimalta (Malta)", "my": "Kiburma", "my_MM": "Kiburma (Myanmar (Burma))", "nb": "Kibokmal cha Norwe", "nb_NO": "Kibokmal cha Norwe (Norwe)", "nb_SJ": "Kibokmal cha Norwe (Svalbard na Jan Mayen)", "nd": "Kindebele cha Kaskazini", "nd_ZW": "Kindebele cha Kaskazini (Zimbabwe)", "ne": "Kinepali", "ne_IN": "Kinepali (India)", "ne_NP": "Kinepali (Nepali)", "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 (Santamatini)", "nn": "Kinorwe Kipya", "nn_NO": "Kinorwe Kipya (Norwe)", "om": "Kioromo", "om_ET": "Kioromo (Uhabeshi)", "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_CV": "Kireno (Kepuvede)", "pt_GW": "Kireno (Ginebisau)", "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 ya Mashariki)", "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 (Ukraini)", "rw": "Kinyarwanda", "rw_RW": "Kinyarwanda (Rwanda)", "se": "Kisami cha Kaskazini", "se_FI": "Kisami cha Kaskazini (Ufini)", "se_NO": "Kisami cha Kaskazini (Norwe)", "se_SE": "Kisami cha Kaskazini (Uswidi)", "sg": "Kisango", "sg_CF": "Kisango (Jamhuri ya Afrika ya Kati)", "si": "Kisinhala", "si_LK": "Kisinhala (Sirilanka)", "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 (Uhabeshi)", "so_KE": "Kisomali (Kenya)", "so_SO": "Kisomali (Somalia)", "sq": "Kialbania", "sq_AL": "Kialbania (Albania)", "sq_MK": "Kialbania (Masedonia)", "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_KE": "Kiswahili (Kenya)", "sw_TZ": "Kiswahili (Tanzania)", "sw_UG": "Kiswahili (Uganda)", "ta": "Kitamil", "ta_IN": "Kitamil (India)", "ta_LK": "Kitamil (Sirilanka)", "ta_MY": "Kitamil (Malesia)", "ta_SG": "Kitamil (Singapoo)", "te": "Kitelugu", "te_IN": "Kitelugu (India)", "th": "Kitailandi", "th_TH": "Kitailandi (Tailandi)", "ti": "Kitigrinya", "ti_ER": "Kitigrinya (Eritrea)", "ti_ET": "Kitigrinya (Uhabeshi)", "to": "Kitonga", "to_TO": "Kitonga (Tonga)", "tr": "Kituruki", "tr_CY": "Kituruki (Saiprasi)", "tr_TR": "Kituruki (Uturuki)", "ug": "Kiuiguri", "ug_Arab": "Kiuiguri (Kiarabu)", "ug_Arab_CN": "Kiuiguri (Kiarabu, China)", "ug_CN": "Kiuiguri (China)", "uk": "Kiukrania", "uk_UA": "Kiukrania (Ukraini)", "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 (Vietinamu)", "yi": "Kiyidi", "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, Singapoo)", "zh_Hant": "Kichina (Kihan cha Jadi)", "zh_Hant_HK": "Kichina (Kihan cha Jadi, Hong Kong SAR China)", "zh_Hant_MO": "Kichina (Kihan cha Jadi, Macau SAR China)", "zh_Hant_TW": "Kichina (Kihan cha Jadi, Taiwani)", "zh_MO": "Kichina (Macau SAR China)", "zh_SG": "Kichina (Singapoo)", "zh_TW": "Kichina (Taiwani)", "zu": "Kizulu", "zu_ZA": "Kizulu (Afrika Kusini)" } } src/Symfony/Component/Intl/Resources/data/locales/ta.json000066400000000000000000001177041266465517700240220ustar00rootroot00000000000000{ "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_Latn": "பம்பாரா (லத்தின்)", "bm_Latn_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": "கேட்டலான் (இத்தாலி)", "cs": "செக்", "cs_CZ": "செக் (செக் குடியரசு)", "cy": "வெல்ஷ்", "cy_GB": "வெல்ஷ் (ஐக்கிய பேரரசு)", "da": "டேனிஷ்", "da_DK": "டேனிஷ் (டென்மார்க்)", "da_GL": "டேனிஷ் (கிரீன்லாந்து)", "de": "ஜெர்மன்", "de_AT": "ஜெர்மன் (ஆஸ்திரியா)", "de_BE": "ஜெர்மன் (பெல்ஜியம்)", "de_CH": "ஜெர்மன் (ஸ்விட்சர்லாந்து)", "de_DE": "ஜெர்மன் (ஜெர்மனி)", "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_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_MY": "ஆங்கிலம் (மலேஷியா)", "en_NA": "ஆங்கிலம் (நமீபியா)", "en_NF": "ஆங்கிலம் (நார்ஃபாக் தீவுகள்)", "en_NG": "ஆங்கிலம் (நைஜீரியா)", "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_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_VC": "ஆங்கிலம் (செயின்ட் வின்சென்ட் மற்றும் கிரெனடைன்ஸ்)", "en_VG": "ஆங்கிலம் (பிரிட்டீஷ் கன்னித் தீவுகள்)", "en_VI": "ஆங்கிலம் (யூ.எஸ். கன்னித் தீவுகள்)", "en_VU": "ஆங்கிலம் (வனுவாட்டு)", "en_WS": "ஆங்கிலம் (சமோவா)", "en_ZA": "ஆங்கிலம் (தென் ஆப்பிரிக்கா)", "en_ZM": "ஆங்கிலம் (ஜாம்பியா)", "en_ZW": "ஆங்கிலம் (ஜிம்பாப்வே)", "eo": "எஸ்பரேன்டோ", "es": "ஸ்பானிஷ்", "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": "பஸ்க் (ஸ்பெயின்)", "fa": "பெர்ஷியன்", "fa_AF": "பெர்ஷியன் (ஆப்கானிஸ்தான்)", "fa_IR": "பெர்ஷியன் (ஈரான்)", "ff": "ஃபுலா", "ff_CM": "ஃபுலா (கேமரூன்)", "ff_GN": "ஃபுலா (கினியா)", "ff_MR": "ஃபுலா (மௌரிடானியா)", "ff_SN": "ஃபுலா (செனெகல்)", "fi": "ஃபின்னிஷ்", "fi_FI": "ஃபின்னிஷ் (பின்லாந்து)", "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": "பிரெஞ்சு (மயோத்)", "fy": "மேற்கத்திய ஃப்ரிஷியன்", "fy_NL": "மேற்கத்திய ஃப்ரிஷியன் (நெதர்லாந்து)", "ga": "ஐரிஷ்", "ga_IE": "ஐரிஷ் (அயர்லாந்து)", "gd": "ஸ்காட்ஸ் கேலிக்", "gd_GB": "ஸ்காட்ஸ் கேலிக் (ஐக்கிய பேரரசு)", "gl": "காலிஸியன்", "gl_ES": "காலிஸியன் (ஸ்பெயின்)", "gu": "குஜராத்தி", "gu_IN": "குஜராத்தி (இந்தியா)", "gv": "மேங்க்ஸ்", "gv_IM": "மேங்க்ஸ் (ஐல் ஆஃப் மேன்)", "ha": "ஹௌஸா", "ha_GH": "ஹௌஸா (கானா)", "ha_Latn": "ஹௌஸா (லத்தின்)", "ha_Latn_GH": "ஹௌஸா (லத்தின், கானா)", "ha_Latn_NE": "ஹௌஸா (லத்தின், நைஜர்)", "ha_Latn_NG": "ஹௌஸா (லத்தின், நைஜீரியா)", "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_Cyrl": "கசாக் (சிரிலிக்)", "kk_Cyrl_KZ": "கசாக் (சிரிலிக், கஸகஸ்தான்)", "kk_KZ": "கசாக் (கஸகஸ்தான்)", "kl": "கலாலிசூட்", "kl_GL": "கலாலிசூட் (கிரீன்லாந்து)", "km": "கெமெர்", "km_KH": "கெமெர் (கம்போடியா)", "kn": "கன்னடம்", "kn_IN": "கன்னடம் (இந்தியா)", "ko": "கொரியன்", "ko_KP": "கொரியன் (வட கொரியா)", "ko_KR": "கொரியன் (தென் கொரியா)", "ks": "காஷ்மிரி", "ks_Arab": "காஷ்மிரி (அரபிக்)", "ks_Arab_IN": "காஷ்மிரி (அரபிக், இந்தியா)", "ks_IN": "காஷ்மிரி (இந்தியா)", "kw": "கார்னிஷ்", "kw_GB": "கார்னிஷ் (ஐக்கிய பேரரசு)", "ky": "கிர்கிஸ்", "ky_Cyrl": "கிர்கிஸ் (சிரிலிக்)", "ky_Cyrl_KG": "கிர்கிஸ் (சிரிலிக், கிர்கிஸ்தான்)", "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_Cyrl": "மங்கோலியன் (சிரிலிக்)", "mn_Cyrl_MN": "மங்கோலியன் (சிரிலிக், மங்கோலியா)", "mn_MN": "மங்கோலியன் (மங்கோலியா)", "mr": "மராத்தி", "mr_IN": "மராத்தி (இந்தியா)", "ms": "மலாய்", "ms_BN": "மலாய் (புரூனேய்)", "ms_Latn": "மலாய் (லத்தின்)", "ms_Latn_BN": "மலாய் (லத்தின், புரூனேய்)", "ms_Latn_MY": "மலாய் (லத்தின், மலேஷியா)", "ms_Latn_SG": "மலாய் (லத்தின், சிங்கப்பூர்)", "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_CV": "போர்ச்சுக்கீஸ் (கேப் வெர்டே)", "pt_GW": "போர்ச்சுக்கீஸ் (கினி-பிஸ்ஸாவ்)", "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_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_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": "உஸ்பெக் (உஸ்பெகிஸ்தான்)", "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": "ஜுலு (தென் ஆப்பிரிக்கா)" } } src/Symfony/Component/Intl/Resources/data/locales/te.json000066400000000000000000001143311266465517700240170ustar00rootroot00000000000000{ "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_Latn": "బంబారా (లాటిన్)", "bm_Latn_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": "కెటలాన్ (ఇటలీ)", "cs": "చెక్", "cs_CZ": "చెక్ (చెక్ రిపబ్లిక్)", "cy": "వెల్ష్", "cy_GB": "వెల్ష్ (యునైటెడ్ కింగ్‌డమ్)", "da": "డేనిష్", "da_DK": "డేనిష్ (డెన్మార్క్)", "da_GL": "డేనిష్ (గ్రీన్‌లాండ్)", "de": "జర్మన్", "de_AT": "జర్మన్ (ఆస్ట్రియా)", "de_BE": "జర్మన్ (బెల్జియం)", "de_CH": "జర్మన్ (స్విట్జర్లాండ్)", "de_DE": "జర్మన్ (జర్మనీ)", "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_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_MY": "ఆంగ్లం (మలేషియా)", "en_NA": "ఆంగ్లం (నమీబియా)", "en_NF": "ఆంగ్లం (నార్ఫాక్ దీవి)", "en_NG": "ఆంగ్లం (నైజీరియా)", "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_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_VC": "ఆంగ్లం (సెంట్ విన్సెంట్ మరియు గ్రెనడీన్స్)", "en_VG": "ఆంగ్లం (బ్రిటిష్ వర్జిన్ దీవులు)", "en_VI": "ఆంగ్లం (యు.ఎస్. వర్జిన్ దీవులు)", "en_VU": "ఆంగ్లం (వనాటు)", "en_WS": "ఆంగ్లం (సమోవా)", "en_ZA": "ఆంగ్లం (దక్షిణ ఆఫ్రికా)", "en_ZM": "ఆంగ్లం (జాంబియా)", "en_ZW": "ఆంగ్లం (జింబాబ్వే)", "eo": "ఎస్పరెన్టొ", "es": "స్పానిష్", "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": "బాస్క్ (స్పెయిన్)", "fa": "పర్షియన్", "fa_AF": "పర్షియన్ (ఆఫ్ఘనిస్తాన్)", "fa_IR": "పర్షియన్ (ఇరాన్)", "ff": "ఫ్యుల", "ff_CM": "ఫ్యుల (కామెరూన్)", "ff_GN": "ఫ్యుల (గినియా)", "ff_MR": "ఫ్యుల (మౌరిటేనియా)", "ff_SN": "ఫ్యుల (సెనెగల్)", "fi": "ఫిన్నిష్", "fi_FI": "ఫిన్నిష్ (ఫిన్లాండ్)", "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": "ఫ్రెంచ్ (మాయొట్టి)", "fy": "పశ్చిమ ఫ్రిసియన్", "fy_NL": "పశ్చిమ ఫ్రిసియన్ (నెదర్లాండ్స్)", "ga": "ఐరిష్", "ga_IE": "ఐరిష్ (ఐర్లాండ్)", "gd": "స్కాటిష్ గేలిక్", "gd_GB": "స్కాటిష్ గేలిక్ (యునైటెడ్ కింగ్‌డమ్)", "gl": "గెలిషియన్", "gl_ES": "గెలిషియన్ (స్పెయిన్)", "gu": "గుజరాతి", "gu_IN": "గుజరాతి (భారత దేశం)", "gv": "మంకస్", "gv_IM": "మంకస్ (ఐల్ ఆఫ్ మాన్)", "ha": "హౌసా", "ha_GH": "హౌసా (ఘనా)", "ha_Latn": "హౌసా (లాటిన్)", "ha_Latn_GH": "హౌసా (లాటిన్, ఘనా)", "ha_Latn_NE": "హౌసా (లాటిన్, నైజర్)", "ha_Latn_NG": "హౌసా (లాటిన్, నైజీరియా)", "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_Cyrl": "కజఖ్ (సిరిలిక్)", "kk_Cyrl_KZ": "కజఖ్ (సిరిలిక్, కజకస్తాన్)", "kk_KZ": "కజఖ్ (కజకస్తాన్)", "kl": "కలాల్లిసూట్", "kl_GL": "కలాల్లిసూట్ (గ్రీన్‌లాండ్)", "km": "ఖ్మేర్", "km_KH": "ఖ్మేర్ (కంబోడియా)", "kn": "కన్నడ", "kn_IN": "కన్నడ (భారత దేశం)", "ko": "కొరియన్", "ko_KP": "కొరియన్ (ఉత్తర కొరియా)", "ko_KR": "కొరియన్ (దక్షిణ కొరియా)", "ks": "కాశ్మీరి", "ks_Arab": "కాశ్మీరి (అరబిక్)", "ks_Arab_IN": "కాశ్మీరి (అరబిక్, భారత దేశం)", "ks_IN": "కాశ్మీరి (భారత దేశం)", "kw": "కోర్నిష్", "kw_GB": "కోర్నిష్ (యునైటెడ్ కింగ్‌డమ్)", "ky": "కిర్గిజ్", "ky_Cyrl": "కిర్గిజ్ (సిరిలిక్)", "ky_Cyrl_KG": "కిర్గిజ్ (సిరిలిక్, కిర్గిజిస్తాన్)", "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_Cyrl": "మంగోలియన్ (సిరిలిక్)", "mn_Cyrl_MN": "మంగోలియన్ (సిరిలిక్, మంగోలియా)", "mn_MN": "మంగోలియన్ (మంగోలియా)", "mr": "మరాఠీ", "mr_IN": "మరాఠీ (భారత దేశం)", "ms": "మలేయ్", "ms_BN": "మలేయ్ (బ్రూనై)", "ms_Latn": "మలేయ్ (లాటిన్)", "ms_Latn_BN": "మలేయ్ (లాటిన్, బ్రూనై)", "ms_Latn_MY": "మలేయ్ (లాటిన్, మలేషియా)", "ms_Latn_SG": "మలేయ్ (లాటిన్, సింగపూర్)", "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_CV": "పోర్చుగీస్ (కేప్ వెర్డే)", "pt_GW": "పోర్చుగీస్ (గినియా-బిస్సావ్)", "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_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_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": "ఉజ్బెక్ (ఉజ్బెకిస్తాన్)", "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": "జూలూ (దక్షిణ ఆఫ్రికా)" } } src/Symfony/Component/Intl/Resources/data/locales/th.json000066400000000000000000001122461266465517700240250ustar00rootroot00000000000000{ "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_Latn": "บัมบารา (ละติน)", "bm_Latn_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": "กาตาลัง (อิตาลี)", "cs": "เช็ก", "cs_CZ": "เช็ก (สาธารณรัฐเช็ก)", "cy": "เวลส์", "cy_GB": "เวลส์ (สหราชอาณาจักร)", "da": "เดนมาร์ก", "da_DK": "เดนมาร์ก (เดนมาร์ก)", "da_GL": "เดนมาร์ก (กรีนแลนด์)", "de": "เยอรมัน", "de_AT": "เยอรมัน (ออสเตรีย)", "de_BE": "เยอรมัน (เบลเยียม)", "de_CH": "เยอรมัน (สวิตเซอร์แลนด์)", "de_DE": "เยอรมัน (เยอรมนี)", "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_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_MY": "อังกฤษ (มาเลเซีย)", "en_NA": "อังกฤษ (นามิเบีย)", "en_NF": "อังกฤษ (เกาะนอร์ฟอล์ก)", "en_NG": "อังกฤษ (ไนจีเรีย)", "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_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_VC": "อังกฤษ (เซนต์วินเซนต์และเกรนาดีนส์)", "en_VG": "อังกฤษ (หมู่เกาะบริติชเวอร์จิน)", "en_VI": "อังกฤษ (หมู่เกาะยูเอสเวอร์จิน)", "en_VU": "อังกฤษ (วานูอาตู)", "en_WS": "อังกฤษ (ซามัว)", "en_ZA": "อังกฤษ (แอฟริกาใต้)", "en_ZM": "อังกฤษ (แซมเบีย)", "en_ZW": "อังกฤษ (ซิมบับเว)", "eo": "เอสเปอรันโต", "es": "สเปน", "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": "บัสเก (สเปน)", "fa": "เปอร์เซีย", "fa_AF": "เปอร์เซีย (อัฟกานิสถาน)", "fa_IR": "เปอร์เซีย (อิหร่าน)", "ff": "ฟูลาฮ์", "ff_CM": "ฟูลาฮ์ (แคเมอรูน)", "ff_GN": "ฟูลาฮ์ (กินี)", "ff_MR": "ฟูลาฮ์ (มอริเตเนีย)", "ff_SN": "ฟูลาฮ์ (เซเนกัล)", "fi": "ฟินแลนด์", "fi_FI": "ฟินแลนด์ (ฟินแลนด์)", "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": "ฝรั่งเศส (มายอต)", "fy": "ฟริเซียนตะวันตก", "fy_NL": "ฟริเซียนตะวันตก (เนเธอร์แลนด์)", "ga": "ไอริช", "ga_IE": "ไอริช (ไอร์แลนด์)", "gd": "สกอตส์กาลิก", "gd_GB": "สกอตส์กาลิก (สหราชอาณาจักร)", "gl": "กาลิเซีย", "gl_ES": "กาลิเซีย (สเปน)", "gu": "คุชราต", "gu_IN": "คุชราต (อินเดีย)", "gv": "มานซ์", "gv_IM": "มานซ์ (เกาะแมน)", "ha": "เฮาชา", "ha_GH": "เฮาชา (กานา)", "ha_Latn": "เฮาชา (ละติน)", "ha_Latn_GH": "เฮาชา (ละติน, กานา)", "ha_Latn_NE": "เฮาชา (ละติน, ไนเจอร์)", "ha_Latn_NG": "เฮาชา (ละติน, ไนจีเรีย)", "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_Cyrl": "คาซัค (ซีริลลิก)", "kk_Cyrl_KZ": "คาซัค (ซีริลลิก, คาซัคสถาน)", "kk_KZ": "คาซัค (คาซัคสถาน)", "kl": "กรีนแลนด์", "kl_GL": "กรีนแลนด์ (กรีนแลนด์)", "km": "เขมร", "km_KH": "เขมร (กัมพูชา)", "kn": "กันนาดา", "kn_IN": "กันนาดา (อินเดีย)", "ko": "เกาหลี", "ko_KP": "เกาหลี (เกาหลีเหนือ)", "ko_KR": "เกาหลี (เกาหลีใต้)", "ks": "กัศมีร์", "ks_Arab": "กัศมีร์ (อาหรับ)", "ks_Arab_IN": "กัศมีร์ (อาหรับ, อินเดีย)", "ks_IN": "กัศมีร์ (อินเดีย)", "kw": "คอร์นิช", "kw_GB": "คอร์นิช (สหราชอาณาจักร)", "ky": "คีร์กีซ", "ky_Cyrl": "คีร์กีซ (ซีริลลิก)", "ky_Cyrl_KG": "คีร์กีซ (ซีริลลิก, คีร์กีซสถาน)", "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_Cyrl": "มองโกเลีย (ซีริลลิก)", "mn_Cyrl_MN": "มองโกเลีย (ซีริลลิก, มองโกเลีย)", "mn_MN": "มองโกเลีย (มองโกเลีย)", "mr": "มราฐี", "mr_IN": "มราฐี (อินเดีย)", "ms": "มาเลย์", "ms_BN": "มาเลย์ (บรูไน)", "ms_Latn": "มาเลย์ (ละติน)", "ms_Latn_BN": "มาเลย์ (ละติน, บรูไน)", "ms_Latn_MY": "มาเลย์ (ละติน, มาเลเซีย)", "ms_Latn_SG": "มาเลย์ (ละติน, สิงคโปร์)", "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_CV": "โปรตุเกส (เคปเวิร์ด)", "pt_GW": "โปรตุเกส (กินี-บิสเซา)", "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_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_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": "อุซเบก (อุซเบกิสถาน)", "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": "ซูลู (แอฟริกาใต้)" } } src/Symfony/Component/Intl/Resources/data/locales/ti.json000066400000000000000000000053561266465517700240310ustar00rootroot00000000000000{ "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": "ማላይኛ", "ms_Latn": "ማላይኛ (ላቲን)", "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": "ዙሉኛ" } } src/Symfony/Component/Intl/Resources/data/locales/tl.json000066400000000000000000000000311266465517700240150ustar00rootroot00000000000000{ "%%ALIAS": "fil" } src/Symfony/Component/Intl/Resources/data/locales/tl_PH.json000066400000000000000000000000341266465517700244070ustar00rootroot00000000000000{ "%%ALIAS": "fil_PH" } src/Symfony/Component/Intl/Resources/data/locales/to.json000066400000000000000000000663131266465517700240370ustar00rootroot00000000000000{ "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_Latn": "lea fakapamipala (tohinima fakalatina)", "bm_Latn_ML": "lea fakapamipala (tohinima fakalatina, 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)", "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_LI": "lea fakasiamane (Likitenisiteini)", "de_LU": "lea fakasiamane (Lakisimipeki)", "dz": "lea fakaputeni", "dz_BT": "lea fakaputeni (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_AU": "lea fakapālangi (ʻAositelēlia)", "en_BB": "lea fakapālangi (Pāpeitosi)", "en_BE": "lea fakapālangi (Pelesiume)", "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_CK": "lea fakapālangi (ʻOtumotu Kuki)", "en_CM": "lea fakapālangi (Kameluni)", "en_CX": "lea fakapālangi (Motu Kilisimasi)", "en_DG": "lea fakapālangi (Tieko Kāsia)", "en_DM": "lea fakapālangi (Tominika)", "en_ER": "lea fakapālangi (ʻElitulia)", "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_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_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 (Pueto 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_SG": "lea fakapālangi (Singapoa)", "en_SH": "lea fakapālangi (Sā Helena)", "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_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 (Pueto 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_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_Latn": "lea fakahausa (tohinima fakalatina)", "ha_Latn_GH": "lea fakahausa (tohinima fakalatina, Kana)", "ha_Latn_NE": "lea fakahausa (tohinima fakalatina, Nisia)", "ha_Latn_NG": "lea fakahausa (tohinima fakalatina, Naisilia)", "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_Cyrl": "lea fakakasaki (tohinima fakalūsia)", "kk_Cyrl_KZ": "lea fakakasaki (tohinima fakalūsia, Kasakitani)", "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_Arab": "lea fakakāsimila (tohinima fakaʻalepea)", "ks_Arab_IN": "lea fakakāsimila (tohinima fakaʻalepea, ʻInitia)", "ks_IN": "lea fakakāsimila (ʻInitia)", "kw": "lea fakakoniuali", "kw_GB": "lea fakakoniuali (Pilitānia)", "ky": "lea fakakīsisi", "ky_Cyrl": "lea fakakīsisi (tohinima fakalūsia)", "ky_Cyrl_KG": "lea fakakīsisi (tohinima fakalūsia, Kīkisitani)", "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_Cyrl": "lea fakamongokōlia (tohinima fakalūsia)", "mn_Cyrl_MN": "lea fakamongokōlia (tohinima fakalūsia, Mongokō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_Latn": "lea fakamalei (tohinima fakalatina)", "ms_Latn_BN": "lea fakamalei (tohinima fakalatina, Pulunei)", "ms_Latn_MY": "lea fakamalei (tohinima fakalatina, Malēsia)", "ms_Latn_SG": "lea fakamalei (tohinima fakalatina, Singapoa)", "ms_MY": "lea fakamalei (Malēsia)", "ms_SG": "lea fakamalei (Singapoa)", "mt": "lea fakamolota", "mt_MT": "lea fakamolota (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 fakanouē", "no_NO": "lea fakanouē (Noauē)", "om": "lea fakaʻolomo", "om_ET": "lea fakaʻolomo (ʻĪtiōpia)", "om_KE": "lea fakaʻolomo (Keniā)", "or": "lea fakaʻinitia-ʻolāea", "or_IN": "lea fakaʻinitia-ʻolāea (ʻ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 fakapōlani", "pl_PL": "lea fakapōlani (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_CV": "lea fakapotukali (Muiʻi Vēte)", "pt_GW": "lea fakapotukali (Kini-Pisau)", "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_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_Arab": "lea fakaʻuikūli (tohinima fakaʻalepea)", "ug_Arab_CN": "lea fakaʻuikūli (tohinima fakaʻalepea, Siaina)", "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)" } } src/Symfony/Component/Intl/Resources/data/locales/tr.json000066400000000000000000000535451266465517700240450ustar00rootroot00000000000000{ "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ı Sahara)", "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": "Beyaz Rusça", "be_BY": "Beyaz Rusça (Beyaz Rusya)", "bg": "Bulgarca", "bg_BG": "Bulgarca (Bulgaristan)", "bm": "Bambara", "bm_Latn": "Bambara (Latin)", "bm_Latn_ML": "Bambara (Latin, 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)", "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_LI": "Almanca (Liechtenstein)", "de_LU": "Almanca (Lüksemburg)", "dz": "Butan Dili", "dz_BT": "Butan Dili (Butan)", "ee": "Ewe", "ee_GH": "Ewe (Gana)", "ee_TG": "Ewe (Togo)", "el": "Yunanca", "el_CY": "Yunanca (Güney Kıbrıs Rum Kesimi)", "el_GR": "Yunanca (Yunanistan)", "en": "İngilizce", "en_AG": "İngilizce (Antigua ve Barbuda)", "en_AI": "İngilizce (Anguilla)", "en_AS": "İngilizce (Amerikan Samoası)", "en_AU": "İngilizce (Avustralya)", "en_BB": "İngilizce (Barbados)", "en_BE": "İngilizce (Belçika)", "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_CK": "İngilizce (Cook Adaları)", "en_CM": "İngilizce (Kamerun)", "en_CX": "İngilizce (Christmas Adası)", "en_DG": "İngilizce (Diego Garcia)", "en_DM": "İngilizce (Dominika)", "en_ER": "İngilizce (Eritre)", "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 ÖYB)", "en_IE": "İngilizce (İrlanda)", "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 (Lesoto)", "en_MG": "İngilizce (Madagaskar)", "en_MH": "İngilizce (Marshall Adaları)", "en_MO": "İngilizce (Çin Makao ÖYB)", "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_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_SG": "İngilizce (Singapur)", "en_SH": "İngilizce (Saint Helena)", "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 (ABD)", "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_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 (ABD)", "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": "Fulah", "ff_CM": "Fulah (Kamerun)", "ff_GN": "Fulah (Gine)", "ff_MR": "Fulah (Moritanya)", "ff_SN": "Fulah (Senegal)", "fi": "Fince", "fi_FI": "Fince (Finlandiya)", "fo": "Faroe Dili", "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 Adaları)", "fr_YT": "Fransızca (Mayotte)", "fy": "Batı Frizcesi", "fy_NL": "Batı Frizcesi (Hollanda)", "ga": "İrlandaca", "ga_IE": "İrlandaca (İrlanda)", "gd": "İskoç Gal Dili", "gd_GB": "İskoç Gal Dili (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", "ha_GH": "Hausa (Gana)", "ha_Latn": "Hausa (Latin)", "ha_Latn_GH": "Hausa (Latin, Gana)", "ha_Latn_NE": "Hausa (Latin, Nijer)", "ha_Latn_NG": "Hausa (Latin, Nijerya)", "ha_NE": "Hausa (Nijer)", "ha_NG": "Hausa (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_Cyrl": "Kazakça (Kiril)", "kk_Cyrl_KZ": "Kazakça (Kiril, Kazakistan)", "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", "kn_IN": "Kannada (Hindistan)", "ko": "Korece", "ko_KP": "Korece (Kuzey Kore)", "ko_KR": "Korece (Güney Kore)", "ks": "Keşmirce", "ks_Arab": "Keşmirce (Arap)", "ks_Arab_IN": "Keşmirce (Arap, Hindistan)", "ks_IN": "Keşmirce (Hindistan)", "kw": "Kernevekçe", "kw_GB": "Kernevekçe (Birleşik Krallık)", "ky": "Kırgızca", "ky_Cyrl": "Kırgızca (Kiril)", "ky_Cyrl_KG": "Kırgızca (Kiril, Kırgızistan)", "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": "Laoca", "lo_LA": "Laoca (Laos)", "lt": "Litvanyaca", "lt_LT": "Litvanyaca (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", "ml_IN": "Malayalam (Hindistan)", "mn": "Moğolca", "mn_Cyrl": "Moğolca (Kiril)", "mn_Cyrl_MN": "Moğolca (Kiril, Moğolistan)", "mn_MN": "Moğolca (Moğolistan)", "mr": "Marathi", "mr_IN": "Marathi (Hindistan)", "ms": "Malayca", "ms_BN": "Malayca (Brunei)", "ms_Latn": "Malayca (Latin)", "ms_Latn_BN": "Malayca (Latin, Brunei)", "ms_Latn_MY": "Malayca (Latin, Malezya)", "ms_Latn_SG": "Malayca (Latin, Singapur)", "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 Adaları)", "nd": "Kuzey Ndebele", "nd_ZW": "Kuzey Ndebele (Zimbabve)", "ne": "Nepalce", "ne_IN": "Nepalce (Hindistan)", "ne_NP": "Nepalce (Nepal)", "nl": "Hollandaca", "nl_AW": "Hollandaca (Aruba)", "nl_BE": "Hollandaca (Belçika)", "nl_BQ": "Hollandaca (Karayip Hollanda)", "nl_CW": "Hollandaca (Curaçao)", "nl_NL": "Hollandaca (Hollanda)", "nl_SR": "Hollandaca (Surinam)", "nl_SX": "Hollandaca (Sint Maarten)", "nn": "Norveççe Nynorsk", "nn_NO": "Norveççe Nynorsk (Norveç)", "no": "Norveççe", "no_NO": "Norveççe (Norveç)", "om": "Oromo", "om_ET": "Oromo (Etiyopya)", "om_KE": "Oromo (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_CV": "Portekizce (Cape Verde)", "pt_GW": "Portekizce (Gine-Bissau)", "pt_MO": "Portekizce (Çin Makao ÖYB)", "pt_MZ": "Portekizce (Mozambik)", "pt_PT": "Portekizce (Portekiz)", "pt_ST": "Portekizce (São Tomé ve Príncipe)", "pt_TL": "Portekizce (Timor-Leste)", "qu": "Keçuvaca", "qu_BO": "Keçuvaca (Bolivya)", "qu_EC": "Keçuvaca (Ekvador)", "qu_PE": "Keçuvaca (Peru)", "rm": "Romanşça", "rm_CH": "Romanşça (İsviçre)", "rn": "Kirundi", "rn_BI": "Kirundi (Burundi)", "ro": "Romence", "ro_MD": "Romence (Moldova)", "ro_RO": "Romence (Romanya)", "ru": "Rusça", "ru_BY": "Rusça (Beyaz Rusya)", "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 Sami", "se_FI": "Kuzey Sami (Finlandiya)", "se_NO": "Kuzey Sami (Norveç)", "se_SE": "Kuzey Sami (İ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_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": "Takalotça", "tl_PH": "Takalotça (Filipinler)", "to": "Tongaca", "to_TO": "Tongaca (Tonga)", "tr": "Türkçe", "tr_CY": "Türkçe (Güney Kıbrıs Rum Kesimi)", "tr_TR": "Türkçe (Türkiye)", "ug": "Uygurca", "ug_Arab": "Uygurca (Arap)", "ug_Arab_CN": "Uygurca (Arap, Çin)", "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 ÖYB)", "zh_Hans": "Çince (Basitleştirilmiş)", "zh_Hans_CN": "Çince (Basitleştirilmiş, Çin)", "zh_Hans_HK": "Çince (Basitleştirilmiş, Çin Hong Kong ÖYB)", "zh_Hans_MO": "Çince (Basitleştirilmiş, Çin Makao ÖYB)", "zh_Hans_SG": "Çince (Basitleştirilmiş, Singapur)", "zh_Hant": "Çince (Geleneksel)", "zh_Hant_HK": "Çince (Geleneksel, Çin Hong Kong ÖYB)", "zh_Hant_MO": "Çince (Geleneksel, Çin Makao ÖYB)", "zh_Hant_TW": "Çince (Geleneksel, Tayvan)", "zh_MO": "Çince (Çin Makao ÖYB)", "zh_SG": "Çince (Singapur)", "zh_TW": "Çince (Tayvan)", "zu": "Zuluca", "zu_ZA": "Zuluca (Güney Afrika)" } } src/Symfony/Component/Intl/Resources/data/locales/ug.json000066400000000000000000000770631266465517700240340ustar00rootroot00000000000000{ "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_Latn": "بامباراچە (لاتىنچە)", "bm_Latn_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": "كاتالانچە (ئىتالىيە)", "cs": "چېخچە", "cs_CZ": "چېخچە (چېخ جۇمھۇرىيىتى)", "cy": "ۋېلشچە", "cy_GB": "ۋېلشچە (ئەنگلىيە پادىشاھلىقى)", "da": "دانىشچە", "da_DK": "دانىشچە (دانىيە)", "da_GL": "دانىشچە (گىرېنلاند)", "de": "گېرمانچە", "de_AT": "گېرمانچە (ئاۋسترىيە)", "de_BE": "گېرمانچە (بېلگىيە)", "de_CH": "گېرمانچە (شىۋىتسارىيە)", "de_DE": "گېرمانچە (گېرمانىيە)", "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_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_MY": "ئىنگلىزچە (مالايشىيا)", "en_NA": "ئىنگلىزچە (نامىبىيە)", "en_NF": "ئىنگلىزچە (نورفولك ئارىلى)", "en_NG": "ئىنگلىزچە (نىگېرىيە)", "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_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_VC": "ئىنگلىزچە (ساينىت-ۋىنسېنت ۋە گىرېنادىنېس)", "en_VG": "ئىنگلىزچە (ئەنگلىيەگە قاراشلىق ۋىرجىن ئارىلى)", "en_VI": "ئىنگلىزچە (ئامېرىكا تەۋەلىكىدىكى ۋىرجىن تاقىم ئاراللىرى)", "en_VU": "ئىنگلىزچە (ۋانۇئاتۇ)", "en_WS": "ئىنگلىزچە (ساموئا)", "en_ZA": "ئىنگلىزچە (جەنۇبىي ئافرىقا)", "en_ZM": "ئىنگلىزچە (زامبىيە)", "en_ZW": "ئىنگلىزچە (زىمبابۋې)", "eo": "دۇنيا تىلى", "es": "ئىسپانچە", "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": "باسكىچە (ئىسپانىيە)", "fa": "پارسچە", "fa_AF": "پارسچە (ئافغانىستان)", "fa_IR": "پارسچە (ئىران)", "ff": "فۇلاچە", "ff_CM": "فۇلاچە (كامېرون)", "ff_GN": "فۇلاچە (گىۋىنېيە)", "ff_MR": "فۇلاچە (ماۋرىتانىيە)", "ff_SN": "فۇلاچە (سېنېگال)", "fi": "فىنچە", "fi_FI": "فىنچە (فىنلاندىيە)", "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": "فىرانسۇزچە (مايوتتې)", "fy": "غەربى فىرىزيەچە", "fy_NL": "غەربى فىرىزيەچە (گوللاندىيە)", "ga": "ئىرېلاندچە", "ga_IE": "ئىرېلاندچە (ئىرېلاندىيە)", "gd": "سكوتچە", "gd_GB": "سكوتچە (ئەنگلىيە پادىشاھلىقى)", "gl": "گالىتسىيانچە", "gl_ES": "گالىتسىيانچە (ئىسپانىيە)", "gu": "گۇجاراتچە", "gu_IN": "گۇجاراتچە (ھىندىستان)", "gv": "مانچە", "gv_IM": "مانچە (مېن ئارىلى)", "ha": "خائۇساچە", "ha_GH": "خائۇساچە (گانا)", "ha_Latn": "خائۇساچە (لاتىنچە)", "ha_Latn_GH": "خائۇساچە (لاتىنچە, گانا)", "ha_Latn_NE": "خائۇساچە (لاتىنچە, نېگىر)", "ha_Latn_NG": "خائۇساچە (لاتىنچە, نىگېرىيە)", "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_Cyrl": "قازاقچە (كىرىل)", "kk_Cyrl_KZ": "قازاقچە (كىرىل, قازاقىستان)", "kk_KZ": "قازاقچە (قازاقىستان)", "kl": "گىرېنلاندچە", "kl_GL": "گىرېنلاندچە (گىرېنلاند)", "km": "كىخمېرچە", "km_KH": "كىخمېرچە (كامبودژا)", "kn": "كانناداچە", "kn_IN": "كانناداچە (ھىندىستان)", "ko": "كورېيەچە", "ko_KP": "كورېيەچە (شىمالىي كورىيە)", "ko_KR": "كورېيەچە (جەنۇبىي كورىيە)", "ks": "كەشمىرچە", "ks_Arab": "كەشمىرچە (ئەرەب)", "ks_Arab_IN": "كەشمىرچە (ئەرەب, ھىندىستان)", "ks_IN": "كەشمىرچە (ھىندىستان)", "kw": "كورنىشچە", "kw_GB": "كورنىشچە (ئەنگلىيە پادىشاھلىقى)", "ky": "قىرغىزچە", "ky_Cyrl": "قىرغىزچە (كىرىل)", "ky_Cyrl_KG": "قىرغىزچە (كىرىل, قىرغىزىستان)", "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_Cyrl": "موڭغۇلچە (كىرىل)", "mn_Cyrl_MN": "موڭغۇلچە (كىرىل, موڭغۇلىيە)", "mn_MN": "موڭغۇلچە (موڭغۇلىيە)", "mr": "ماراتچە", "mr_IN": "ماراتچە (ھىندىستان)", "ms": "مالايچە", "ms_BN": "مالايچە (بىرۇنېي)", "ms_Latn": "مالايچە (لاتىنچە)", "ms_Latn_BN": "مالايچە (لاتىنچە, بىرۇنېي)", "ms_Latn_MY": "مالايچە (لاتىنچە, مالايشىيا)", "ms_Latn_SG": "مالايچە (لاتىنچە, سىنگاپور)", "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_CV": "پورتۇگالچە (يېشىل تۇمشۇق)", "pt_GW": "پورتۇگالچە (گىۋىنېيە-بىسسائۇ)", "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_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_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": "ئۆزبېكچە (ئۆزبېكىستان)", "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": "زۇلۇچە (جەنۇبىي ئافرىقا)" } } src/Symfony/Component/Intl/Resources/data/locales/ug_CN.json000066400000000000000000000000401266465517700243710ustar00rootroot00000000000000{ "%%ALIAS": "ug_Arab_CN" } src/Symfony/Component/Intl/Resources/data/locales/uk.json000066400000000000000000000764211266465517700240350ustar00rootroot00000000000000{ "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_Latn": "бамбара (латинська)", "bm_Latn_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": "каталонська (Італія)", "cs": "чеська", "cs_CZ": "чеська (Чехія)", "cy": "валлійська", "cy_GB": "валлійська (Велика Британія)", "da": "данська", "da_DK": "данська (Данія)", "da_GL": "данська (Гренландія)", "de": "німецька", "de_AT": "німецька (Австрія)", "de_BE": "німецька (Бельгія)", "de_CH": "німецька (Швейцарія)", "de_DE": "німецька (Німеччина)", "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_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_MY": "англійська (Малайзія)", "en_NA": "англійська (Намібія)", "en_NF": "англійська (Острів Норфолк)", "en_NG": "англійська (Нігерія)", "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_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_VC": "англійська (Сент-Вінсент і Гренадини)", "en_VG": "англійська (Британські Віргінські острови)", "en_VI": "англійська (Віргінські острови, США)", "en_VU": "англійська (Вануату)", "en_WS": "англійська (Самоа)", "en_ZA": "англійська (ПАР)", "en_ZM": "англійська (Замбія)", "en_ZW": "англійська (Зімбабве)", "eo": "есперанто", "es": "іспанська", "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": "баскська (Іспанія)", "fa": "перська", "fa_AF": "перська (Афганістан)", "fa_IR": "перська (Іран)", "ff": "фула", "ff_CM": "фула (Камерун)", "ff_GN": "фула (Гвінея)", "ff_MR": "фула (Мавританія)", "ff_SN": "фула (Сенегал)", "fi": "фінська", "fi_FI": "фінська (Фінляндія)", "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": "французька (Майотта)", "fy": "західно-фризька", "fy_NL": "західно-фризька (Нідерланди)", "ga": "ірландська", "ga_IE": "ірландська (Ірландія)", "gd": "гаельська", "gd_GB": "гаельська (Велика Британія)", "gl": "галісійська", "gl_ES": "галісійська (Іспанія)", "gu": "гуджараті", "gu_IN": "гуджараті (Індія)", "gv": "менкська", "gv_IM": "менкська (Острів Мен)", "ha": "хауса", "ha_GH": "хауса (Гана)", "ha_Latn": "хауса (латинська)", "ha_Latn_GH": "хауса (латинська, Гана)", "ha_Latn_NE": "хауса (латинська, Нігер)", "ha_Latn_NG": "хауса (латинська, Нігерія)", "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_Cyrl": "казахська (кирилиця)", "kk_Cyrl_KZ": "казахська (кирилиця, Казахстан)", "kk_KZ": "казахська (Казахстан)", "kl": "калааллісут", "kl_GL": "калааллісут (Гренландія)", "km": "кхмерська", "km_KH": "кхмерська (Камбоджа)", "kn": "каннада", "kn_IN": "каннада (Індія)", "ko": "корейська", "ko_KP": "корейська (Північна Корея)", "ko_KR": "корейська (Південна Корея)", "ks": "кашмірська", "ks_Arab": "кашмірська (арабська)", "ks_Arab_IN": "кашмірська (арабська, Індія)", "ks_IN": "кашмірська (Індія)", "kw": "корнійська", "kw_GB": "корнійська (Велика Британія)", "ky": "киргизька", "ky_Cyrl": "киргизька (кирилиця)", "ky_Cyrl_KG": "киргизька (кирилиця, Киргизстан)", "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_Cyrl": "монгольська (кирилиця)", "mn_Cyrl_MN": "монгольська (кирилиця, Монголія)", "mn_MN": "монгольська (Монголія)", "mr": "маратхі", "mr_IN": "маратхі (Індія)", "ms": "малайська", "ms_BN": "малайська (Бруней)", "ms_Latn": "малайська (латинська)", "ms_Latn_BN": "малайська (латинська, Бруней)", "ms_Latn_MY": "малайська (латинська, Малайзія)", "ms_Latn_SG": "малайська (латинська, Сінгапур)", "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_CV": "португальська (Кабо Верде)", "pt_GW": "португальська (Гвінея-Бісау)", "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_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_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": "узбецька (Узбекистан)", "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": "зулуська (ПАР)" } } src/Symfony/Component/Intl/Resources/data/locales/ur.json000066400000000000000000000652141266465517700240420ustar00rootroot00000000000000{ "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_Latn": "بمبارا (لاطینی)", "bm_Latn_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": "کاٹالانین (اٹلی)", "cs": "چیک", "cs_CZ": "چیک (چیک جمہوریہ)", "cy": "ویلش", "cy_GB": "ویلش (سلطنت متحدہ)", "da": "ڈینش", "da_DK": "ڈینش (ڈنمارک)", "da_GL": "ڈینش (گرین لینڈ)", "de": "جرمن", "de_AT": "جرمن (آسٹریا)", "de_BE": "جرمن (بیلجیم)", "de_CH": "جرمن (سوئٹزر لینڈ)", "de_DE": "جرمن (جرمنی)", "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_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": "انگریزی (ہانگ کانگ SAR چین)", "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": "انگریزی (مکاؤ SAR چین)", "en_MP": "انگریزی (شمالی ماریانا آئلینڈز)", "en_MS": "انگریزی (مونٹسیراٹ)", "en_MT": "انگریزی (مالٹا)", "en_MU": "انگریزی (ماریشس)", "en_MW": "انگریزی (ملاوی)", "en_MY": "انگریزی (ملیشیا)", "en_NA": "انگریزی (نامیبیا)", "en_NF": "انگریزی (نار فاک آئلینڈ)", "en_NG": "انگریزی (نائجیریا)", "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_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_VC": "انگریزی (سینٹ ونسنٹ اور گرینیڈائنز)", "en_VG": "انگریزی (برٹش ورجن آئلینڈز)", "en_VI": "انگریزی (امریکی ورجن آئلینڈز)", "en_VU": "انگریزی (وینوآٹو)", "en_WS": "انگریزی (ساموآ)", "en_ZA": "انگریزی (جنوبی افریقہ)", "en_ZM": "انگریزی (زامبیا)", "en_ZW": "انگریزی (زمبابوے)", "eo": "ایسپرانٹو", "es": "ہسپانوی", "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": "باسکی (ہسپانیہ)", "fa": "فارسی", "fa_AF": "فارسی (افغانستان)", "fa_IR": "فارسی (ایران)", "fi": "فینیش", "fi_FI": "فینیش (فن لینڈ)", "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": "فرانسیسی (مایوٹ)", "fy": "مغربی فریسیئن", "fy_NL": "مغربی فریسیئن (نیدر لینڈز)", "ga": "آئیرِش", "ga_IE": "آئیرِش (آئرلینڈ)", "gd": "سکاٹ گیلِک", "gd_GB": "سکاٹ گیلِک (سلطنت متحدہ)", "gl": "گالیشیائی", "gl_ES": "گالیشیائی (ہسپانیہ)", "gu": "گجراتی", "gu_IN": "گجراتی (بھارت)", "gv": "مینکس", "gv_IM": "مینکس (آئل آف مین)", "ha": "ہؤسا", "ha_GH": "ہؤسا (گھانا)", "ha_Latn": "ہؤسا (لاطینی)", "ha_Latn_GH": "ہؤسا (لاطینی, گھانا)", "ha_Latn_NE": "ہؤسا (لاطینی, نائجر)", "ha_Latn_NG": "ہؤسا (لاطینی, نائجیریا)", "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_Cyrl": "قزاخ (سیریلک)", "kk_Cyrl_KZ": "قزاخ (سیریلک, قزاخستان)", "kk_KZ": "قزاخ (قزاخستان)", "kl": "كالاليست", "kl_GL": "كالاليست (گرین لینڈ)", "km": "خمیر", "km_KH": "خمیر (کمبوڈیا)", "kn": "کنّاڈا", "kn_IN": "کنّاڈا (بھارت)", "ko": "کوریائی", "ko_KP": "کوریائی (شمالی کوریا)", "ko_KR": "کوریائی (جنوبی کوریا)", "ks": "کشمیری", "ks_Arab": "کشمیری (عربی)", "ks_Arab_IN": "کشمیری (عربی, بھارت)", "ks_IN": "کشمیری (بھارت)", "kw": "کورنش", "kw_GB": "کورنش (سلطنت متحدہ)", "ky": "کرغیزی", "ky_Cyrl": "کرغیزی (سیریلک)", "ky_Cyrl_KG": "کرغیزی (سیریلک, کرغزستان)", "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_Cyrl": "منگؤلی (سیریلک)", "mn_Cyrl_MN": "منگؤلی (سیریلک, منگولیا)", "mn_MN": "منگؤلی (منگولیا)", "mr": "مراٹهی", "mr_IN": "مراٹهی (بھارت)", "ms": "مالائی", "ms_BN": "مالائی (برونئی)", "ms_Latn": "مالائی (لاطینی)", "ms_Latn_BN": "مالائی (لاطینی, برونئی)", "ms_Latn_MY": "مالائی (لاطینی, ملیشیا)", "ms_Latn_SG": "مالائی (لاطینی, سنگاپور)", "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_CV": "پُرتگالی (کیپ ورڈی)", "pt_GW": "پُرتگالی (گنی بساؤ)", "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_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_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": "ازبیک (ازبکستان)", "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": "زولو (جنوبی افریقہ)" } } src/Symfony/Component/Intl/Resources/data/locales/ur_IN.json000066400000000000000000000063531266465517700244270ustar00rootroot00000000000000{ "Names": { "af": "افریقی", "af_NA": "افریقی (نامیبیا)", "af_ZA": "افریقی (جنوبی افریقہ)", "bm": "بامبرا", "bm_Latn": "بامبرا (لاطینی)", "bm_Latn_ML": "بامبرا (لاطینی, مالی)", "ca": "کتالان", "ca_AD": "کتالان (انڈورا)", "ca_ES": "کتالان (ہسپانیہ)", "ca_FR": "کتالان (فرانس)", "ca_IT": "کتالان (اٹلی)", "en_BB": "انگریزی (بارباڈوس)", "en_CC": "انگریزی (جزائر (کیلنگ) کوکوس)", "en_CK": "انگریزی (جزائر کک)", "en_DG": "انگریزی (ڈیگو گارشیا)", "en_FK": "انگریزی (جزائر فاکلینڈ)", "en_GD": "انگریزی (گریناڈا)", "en_IO": "انگریزی (برطانوی بحرہند خطہ)", "en_MH": "انگریزی (جزائر مارشل)", "en_MP": "انگریزی (جزائر شمالی ماریانا)", "en_NF": "انگریزی (جزیرہ نارفولک)", "en_NR": "انگریزی (ناورو)", "en_PH": "انگریزی (فلپائن)", "en_PN": "انگریزی (جزائر پٹکیرن)", "en_SB": "انگریزی (جزائر سلیمان)", "en_TC": "انگریزی (جزائر کیکس و ترکیہ)", "en_UM": "انگریزی (امریکی بیرونی جزائر)", "en_VG": "انگریزی (برطانوی جزائر ورجن)", "en_VI": "انگریزی (امریکی جزائر ورجن)", "es_IC": "ہسپانوی (جزائر کناری)", "es_PH": "ہسپانوی (فلپائن)", "et": "اسٹونی", "et_EE": "اسٹونی (اسٹونیا)", "fo": "فارويز", "fo_FO": "فارويز (جزائرفارو)", "fr_CI": "فرانسیسی (کوت داوواغ)", "fr_GF": "فرانسیسی (فرانسیسی گیانا)", "fy": "مغربی فریسیائی", "fy_NL": "مغربی فریسیائی (نیدر لینڈز)", "gv": "مانوی", "gv_IM": "مانوی (آئل آف مین)", "ii": "سشوان ی", "ii_CN": "سشوان ی (چین)", "ki": "کیکویو", "ki_KE": "کیکویو (کینیا)", "kn": "کنڑ", "kn_IN": "کنڑ (بھارت)", "kw": "کورنوالی", "kw_GB": "کورنوالی (سلطنت متحدہ)", "lb": "لکسمبرگی", "lb_LU": "لکسمبرگی (لگژمبرگ)", "lv": "لٹويای", "lv_LV": "لٹويای (لٹویا)", "os_RU": "اوسیٹک (روس)", "pt_BR": "پُرتگالی (برازیل)", "ro": "رومانوی", "ro_MD": "رومانوی (مالدووا)", "ro_RO": "رومانوی (رومانیا)", "ru_RU": "روسی (روس)", "sg": "سانجو", "sg_CF": "سانجو (وسط افریقی جمہوریہ)", "sv_AX": "سویڈش (جزائر ایلانڈ)", "ug": "آئغور", "ug_Arab": "آئغور (عربی)", "ug_Arab_CN": "آئغور (عربی, چین)", "ug_CN": "آئغور (چین)" } } src/Symfony/Component/Intl/Resources/data/locales/uz.json000066400000000000000000000532121266465517700240450ustar00rootroot00000000000000{ "Names": { "af": "afrikancha", "af_NA": "afrikancha (Namibiya)", "af_ZA": "afrikancha (Janubi-Afrika)", "ak": "akancha", "ak_GH": "akancha (Gana)", "am": "amxarcha", "am_ET": "amxarcha (Efiopiya)", "ar": "arabcha", "ar_AE": "arabcha (Birlashgan Arab Amirliklari)", "ar_BH": "arabcha (Bahrayn)", "ar_DJ": "arabcha (Djibuti)", "ar_DZ": "arabcha (Jazoir)", "ar_EG": "arabcha (Misr)", "ar_EH": "arabcha (Gʻarbiy Sahroi Kabir)", "ar_ER": "arabcha (Eritreya)", "ar_IL": "arabcha (Isroil)", "ar_IQ": "arabcha (Iroq)", "ar_JO": "arabcha (Iordaniya)", "ar_KM": "arabcha (Komor orollari)", "ar_KW": "arabcha (Quveyt)", "ar_LB": "arabcha (Livan)", "ar_LY": "arabcha (Liviya)", "ar_MA": "arabcha (Marokash)", "ar_MR": "arabcha (Mavritaniya)", "ar_OM": "arabcha (Omon)", "ar_PS": "arabcha (Falastin hududi)", "ar_QA": "arabcha (Qatar)", "ar_SA": "arabcha (Saudiya Arabistoni)", "ar_SD": "arabcha (Sudan)", "ar_SO": "arabcha (Somali)", "ar_SS": "arabcha (Janubiy Sudan)", "ar_SY": "arabcha (Suriya)", "ar_TD": "arabcha (Chad)", "ar_TN": "arabcha (Tunis)", "ar_YE": "arabcha (Yaman)", "as": "assamcha", "as_IN": "assamcha (Hindiston)", "az": "ozarbayjoncha", "az_AZ": "ozarbayjoncha (Ozarbayjon)", "az_Cyrl": "ozarbayjoncha (Kiril)", "az_Cyrl_AZ": "ozarbayjoncha (Kiril, Ozarbayjon)", "az_Latn": "ozarbayjoncha (Lotin)", "az_Latn_AZ": "ozarbayjoncha (Lotin, Ozarbayjon)", "be": "belaruscha", "be_BY": "belaruscha (Belorusiya)", "bg": "bolgarcha", "bg_BG": "bolgarcha (Bolgariya)", "bm": "bambarcha", "bm_Latn": "bambarcha (Lotin)", "bm_Latn_ML": "bambarcha (Lotin, Mali)", "bn": "bengalcha", "bn_BD": "bengalcha (Bangladesh)", "bn_IN": "bengalcha (Hindiston)", "bo": "tibetcha", "bo_CN": "tibetcha (Xitoy)", "bo_IN": "tibetcha (Hindiston)", "br": "bretoncha", "br_FR": "bretoncha (Fransiya)", "bs": "bosniycha", "bs_BA": "bosniycha (Bosniya va Gertsegovina)", "bs_Cyrl": "bosniycha (Kiril)", "bs_Cyrl_BA": "bosniycha (Kiril, Bosniya va Gertsegovina)", "bs_Latn": "bosniycha (Lotin)", "bs_Latn_BA": "bosniycha (Lotin, Bosniya va Gertsegovina)", "ca": "katalancha", "ca_AD": "katalancha (Andorra)", "ca_ES": "katalancha (Ispaniya)", "ca_FR": "katalancha (Fransiya)", "ca_IT": "katalancha (Italiya)", "cs": "chexcha", "cs_CZ": "chexcha (Chexiya Respublikasi)", "cy": "uelscha", "cy_GB": "uelscha (Birlashgan Qirollik)", "da": "datcha", "da_DK": "datcha (Daniya)", "da_GL": "datcha (Grenlandiya)", "de": "nemischa", "de_AT": "nemischa (Avstriya)", "de_BE": "nemischa (Belgiya)", "de_CH": "nemischa (Shveysariya)", "de_DE": "nemischa (Germaniya)", "de_LI": "nemischa (Lixtenshteyn)", "de_LU": "nemischa (Lyuksemburg)", "dz": "yovoncha", "dz_BT": "yovoncha (Butan)", "ee": "ivicha", "ee_GH": "ivicha (Gana)", "ee_TG": "ivicha (Togo)", "el": "yunoncha", "el_CY": "yunoncha (Kipr)", "el_GR": "yunoncha (Gretsiya)", "en": "inglizcha", "en_AG": "inglizcha (Antigua va Barbados)", "en_AI": "inglizcha (Angila)", "en_AS": "inglizcha (Amerika Samoasi)", "en_AU": "inglizcha (Avstraliya)", "en_BB": "inglizcha (Barbados)", "en_BE": "inglizcha (Belgiya)", "en_BM": "inglizcha (Bermuda)", "en_BS": "inglizcha (Bagama orollari)", "en_BW": "inglizcha (Botsvanna)", "en_BZ": "inglizcha (Beliz)", "en_CA": "inglizcha (Kanada)", "en_CC": "inglizcha (Kokos (Kiling) orollari)", "en_CK": "inglizcha (Kuk orollari)", "en_CM": "inglizcha (Kamerun)", "en_CX": "inglizcha (Rojdestvo oroli)", "en_DG": "inglizcha (Diyego Garsiya)", "en_DM": "inglizcha (Dominika)", "en_ER": "inglizcha (Eritreya)", "en_FJ": "inglizcha (Fiji orollari)", "en_FK": "inglizcha (Folklend orollari)", "en_FM": "inglizcha (Mikroneziya)", "en_GB": "inglizcha (Birlashgan Qirollik)", "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_IM": "inglizcha (Men oroli)", "en_IN": "inglizcha (Hindiston)", "en_IO": "inglizcha (Britaniya Hind okeani hududi)", "en_JE": "inglizcha (Djersi)", "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 (Marshal orollari)", "en_MO": "inglizcha (Makao Xitoy MMH)", "en_MP": "inglizcha (Shimoliy Marianna 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 orollari)", "en_NG": "inglizcha (Nigeriya)", "en_NR": "inglizcha (Nauru)", "en_NU": "inglizcha (Niuye)", "en_NZ": "inglizcha (Yangi Zelandiya)", "en_PG": "inglizcha (Papua Yangi Gvineya)", "en_PH": "inglizcha (Filippin)", "en_PK": "inglizcha (Pokiston)", "en_PN": "inglizcha (Pitkarin 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_SG": "inglizcha (Singapur)", "en_SH": "inglizcha (Muqaddas Yelena orollari)", "en_SL": "inglizcha (Syerra-Leone)", "en_SS": "inglizcha (Janubiy Sudan)", "en_SX": "inglizcha (Sint Martin)", "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 (Qoʻshma Shtatlar)", "en_VC": "inglizcha (Sent-Vinsent va Grenadin)", "en_VG": "inglizcha (Britaniya Virdjiniya orollari)", "en_VI": "inglizcha (AQSH Virdjiniya orollari)", "en_VU": "inglizcha (Vanuatu)", "en_WS": "inglizcha (Samoa)", "en_ZA": "inglizcha (Janubi-Afrika)", "en_ZM": "inglizcha (Zambiya)", "en_ZW": "inglizcha (Zimbabve)", "eo": "esperantocha", "es": "ispancha", "es_AR": "ispancha (Argentina)", "es_BO": "ispancha (Boliviya)", "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 (Seyta va Melilla)", "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 (Qoʻshma Shtatlar)", "es_UY": "ispancha (Urugvay)", "es_VE": "ispancha (Venesuela)", "et": "estoncha", "et_EE": "estoncha (Estoniya)", "eu": "baskcha", "eu_ES": "baskcha (Ispaniya)", "fa": "forscha", "fa_AF": "forscha (Afgʻoniston)", "fa_IR": "forscha (Eron)", "fi": "fincha", "fi_FI": "fincha (Finlyandiya)", "fo": "farercha", "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 (Avliyo Varfolomey)", "fr_CA": "fransuzcha (Kanada)", "fr_CD": "fransuzcha (Kongo-Kinshasa)", "fr_CF": "fransuzcha (Markaziy Afrika Respublikasi)", "fr_CG": "fransuzcha (Kongo Brazzavil)", "fr_CH": "fransuzcha (Shveysariya)", "fr_CI": "fransuzcha (Kot-d-Ivuar)", "fr_CM": "fransuzcha (Kamerun)", "fr_DJ": "fransuzcha (Djibuti)", "fr_DZ": "fransuzcha (Jazoir)", "fr_FR": "fransuzcha (Fransiya)", "fr_GA": "fransuzcha (Gabon)", "fr_GF": "fransuzcha (Frantsuz 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 (Frantsuz Polineziyasi)", "fr_PM": "fransuzcha (Sent-Pyer va Mikelon)", "fr_RE": "fransuzcha (Reyunon)", "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 (Uellis va Futuna)", "fr_YT": "fransuzcha (Mayotta)", "fy": "gʻarbiy friziancha", "fy_NL": "gʻarbiy friziancha (Niderlandiya)", "ga": "irlandcha", "ga_IE": "irlandcha (Irlandiya)", "gl": "galitsiycha", "gl_ES": "galitsiycha (Ispaniya)", "gu": "gujoratcha", "gu_IN": "gujoratcha (Hindiston)", "gv": "mencha", "gv_IM": "mencha (Men oroli)", "ha": "xauscha", "ha_GH": "xauscha (Gana)", "ha_Latn": "xauscha (Lotin)", "ha_Latn_GH": "xauscha (Lotin, Gana)", "ha_Latn_NE": "xauscha (Lotin, Niger)", "ha_Latn_NG": "xauscha (Lotin, Nigeriya)", "ha_NE": "xauscha (Niger)", "ha_NG": "xauscha (Nigeriya)", "he": "ibroniy", "he_IL": "ibroniy (Isroil)", "hi": "hindcha", "hi_IN": "hindcha (Hindiston)", "hr": "xorvatcha", "hr_BA": "xorvatcha (Bosniya va Gertsegovina)", "hr_HR": "xorvatcha (Xorvatiya)", "hu": "vengrcha", "hu_HU": "vengrcha (Vengriya)", "hy": "armancha", "hy_AM": "armancha (Armaniston)", "id": "indoneyzcha", "id_ID": "indoneyzcha (Indoneziya)", "ig": "igbocha", "ig_NG": "igbocha (Nigeriya)", "ii": "zichuan yicha", "ii_CN": "zichuan yicha (Xitoy)", "is": "islandcha", "is_IS": "islandcha (Islandiya)", "it": "italyancha", "it_CH": "italyancha (Shveysariya)", "it_IT": "italyancha (Italiya)", "it_SM": "italyancha (San-Marino)", "ja": "yaponcha", "ja_JP": "yaponcha (Yaponiya)", "ka": "gruzincha", "ka_GE": "gruzincha (Gruziya)", "ki": "kikuycha", "ki_KE": "kikuycha (Keniya)", "kk": "qozoqcha", "kk_Cyrl": "qozoqcha (Kiril)", "kk_Cyrl_KZ": "qozoqcha (Kiril, Qozogʻiston)", "kk_KZ": "qozoqcha (Qozogʻiston)", "kl": "kalallisutcha", "kl_GL": "kalallisutcha (Grenlandiya)", "km": "xmercha", "km_KH": "xmercha (Kambodja)", "kn": "kannadcha", "kn_IN": "kannadcha (Hindiston)", "ko": "koreyscha", "ko_KP": "koreyscha (Shimoliy Koreya)", "ko_KR": "koreyscha (Janubiy Koreya)", "ks": "kashmircha", "ks_Arab": "kashmircha (Arab)", "ks_Arab_IN": "kashmircha (Arab, Hindiston)", "ks_IN": "kashmircha (Hindiston)", "kw": "kornishcha", "kw_GB": "kornishcha (Birlashgan Qirollik)", "ky": "qirgʻizcha", "ky_Cyrl": "qirgʻizcha (Kiril)", "ky_Cyrl_KG": "qirgʻizcha (Kiril, Qirgʻiziston)", "ky_KG": "qirgʻizcha (Qirgʻiziston)", "lb": "lyuksemburgcha", "lb_LU": "lyuksemburgcha (Lyuksemburg)", "lg": "gandcha", "lg_UG": "gandcha (Uganda)", "ln": "lingalcha", "ln_AO": "lingalcha (Angola)", "ln_CD": "lingalcha (Kongo-Kinshasa)", "ln_CF": "lingalcha (Markaziy Afrika Respublikasi)", "ln_CG": "lingalcha (Kongo Brazzavil)", "lo": "laoscha", "lo_LA": "laoscha (Laos)", "lt": "litovcha", "lt_LT": "litovcha (Litva)", "lu": "luba-katangcha", "lu_CD": "luba-katangcha (Kongo-Kinshasa)", "lv": "latishcha", "lv_LV": "latishcha (Latviya)", "mg": "malagasiycha", "mg_MG": "malagasiycha (Madagaskar)", "mk": "makedoncha", "mk_MK": "makedoncha (Makedoniya)", "ml": "malayamcha", "ml_IN": "malayamcha (Hindiston)", "mn": "mo‘g‘ulcha", "mn_Cyrl": "mo‘g‘ulcha (Kiril)", "mn_Cyrl_MN": "mo‘g‘ulcha (Kiril, Mo‘g‘uliston)", "mn_MN": "mo‘g‘ulcha (Mo‘g‘uliston)", "mr": "maratcha", "mr_IN": "maratcha (Hindiston)", "ms": "malaycha", "ms_BN": "malaycha (Bruney)", "ms_Latn": "malaycha (Lotin)", "ms_Latn_BN": "malaycha (Lotin, Bruney)", "ms_Latn_MY": "malaycha (Lotin, Malayziya)", "ms_Latn_SG": "malaycha (Lotin, Singapur)", "ms_MY": "malaycha (Malayziya)", "ms_SG": "malaycha (Singapur)", "mt": "maltacha", "mt_MT": "maltacha (Malta)", "my": "birmancha", "my_MM": "birmancha (Myanma (Birma))", "nb": "norvegcha bokmal", "nb_NO": "norvegcha bokmal (Norvegiya)", "nb_SJ": "norvegcha bokmal (Savlbard va Jan Mayen)", "nd": "shimoliy ndebelcha", "nd_ZW": "shimoliy ndebelcha (Zimbabve)", "ne": "nepalcha", "ne_IN": "nepalcha (Hindiston)", "ne_NP": "nepalcha (Nepal)", "nl": "gollandcha", "nl_AW": "gollandcha (Aruba)", "nl_BE": "gollandcha (Belgiya)", "nl_BQ": "gollandcha (Karib Niderlandiyasi)", "nl_CW": "gollandcha (Kurasao)", "nl_NL": "gollandcha (Niderlandiya)", "nl_SR": "gollandcha (Surinam)", "nl_SX": "gollandcha (Sint Martin)", "nn": "norvegcha ninorsk", "nn_NO": "norvegcha ninorsk (Norvegiya)", "om": "oromocha", "om_ET": "oromocha (Efiopiya)", "om_KE": "oromocha (Keniya)", "or": "oriycha", "or_IN": "oriycha (Hindiston)", "pa": "panjobcha", "pa_Arab": "panjobcha (Arab)", "pa_Arab_PK": "panjobcha (Arab, Pokiston)", "pa_Guru": "panjobcha (Gurmuxi)", "pa_Guru_IN": "panjobcha (Gurmuxi, Hindiston)", "pa_IN": "panjobcha (Hindiston)", "pa_PK": "panjobcha (Pokiston)", "pl": "polyakcha", "pl_PL": "polyakcha (Polsha)", "ps": "pushtu tili", "ps_AF": "pushtu tili (Afgʻoniston)", "pt": "portugalcha", "pt_AO": "portugalcha (Angola)", "pt_BR": "portugalcha (Braziliya)", "pt_CV": "portugalcha (Kabo-Verde)", "pt_GW": "portugalcha (Gvineya-Bisau)", "pt_MO": "portugalcha (Makao Xitoy MMH)", "pt_MZ": "portugalcha (Mozambik)", "pt_PT": "portugalcha (Portugaliya)", "pt_ST": "portugalcha (San-Tome va Prinsipi)", "pt_TL": "portugalcha (Sharqiy-Timor)", "qu": "qvechuancha", "qu_BO": "qvechuancha (Boliviya)", "qu_EC": "qvechuancha (Ekvador)", "qu_PE": "qvechuancha (Peru)", "rm": "romancha", "rm_CH": "romancha (Shveysariya)", "rn": "rundcha", "rn_BI": "rundcha (Burundi)", "ro": "rumincha", "ro_MD": "rumincha (Moldova)", "ro_RO": "rumincha (Ruminiya)", "ru": "ruscha", "ru_BY": "ruscha (Belorusiya)", "ru_KG": "ruscha (Qirgʻiziston)", "ru_KZ": "ruscha (Qozogʻiston)", "ru_MD": "ruscha (Moldova)", "ru_RU": "ruscha (Rossiya)", "ru_UA": "ruscha (Ukraina)", "rw": "kinyarvandcha", "rw_RW": "kinyarvandcha (Ruanda)", "se": "shimoliy semiycha", "se_FI": "shimoliy semiycha (Finlyandiya)", "se_NO": "shimoliy semiycha (Norvegiya)", "se_SE": "shimoliy semiycha (Shvetsiya)", "sg": "sangoancha", "sg_CF": "sangoancha (Markaziy Afrika Respublikasi)", "si": "sinholcha", "si_LK": "sinholcha (Shri-Lanka)", "sk": "slovakcha", "sk_SK": "slovakcha (Slovakiya)", "sl": "slovencha", "sl_SI": "slovencha (Sloveniya)", "sn": "shoniycha", "sn_ZW": "shoniycha (Zimbabve)", "so": "somalicha", "so_DJ": "somalicha (Djibuti)", "so_ET": "somalicha (Efiopiya)", "so_KE": "somalicha (Keniya)", "so_SO": "somalicha (Somali)", "sq": "albancha", "sq_AL": "albancha (Albaniya)", "sq_MK": "albancha (Makedoniya)", "sq_XK": "albancha (Kosovo)", "sr": "serbcha", "sr_BA": "serbcha (Bosniya va Gertsegovina)", "sr_Cyrl": "serbcha (Kiril)", "sr_Cyrl_BA": "serbcha (Kiril, Bosniya va Gertsegovina)", "sr_Cyrl_ME": "serbcha (Kiril, Chernogoriya)", "sr_Cyrl_RS": "serbcha (Kiril, Serbiya)", "sr_Cyrl_XK": "serbcha (Kiril, 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": "shvedcha", "sv_AX": "shvedcha (Aland orollari)", "sv_FI": "shvedcha (Finlyandiya)", "sv_SE": "shvedcha (Shvetsiya)", "sw": "svahilcha", "sw_KE": "svahilcha (Keniya)", "sw_TZ": "svahilcha (Tanzaniya)", "sw_UG": "svahilcha (Uganda)", "ta": "tamilcha", "ta_IN": "tamilcha (Hindiston)", "ta_LK": "tamilcha (Shri-Lanka)", "ta_MY": "tamilcha (Malayziya)", "ta_SG": "tamilcha (Singapur)", "te": "telugvancha", "te_IN": "telugvancha (Hindiston)", "th": "taycha", "th_TH": "taycha (Tayland)", "ti": "tigrincha", "ti_ER": "tigrincha (Eritreya)", "ti_ET": "tigrincha (Efiopiya)", "to": "tongocha", "to_TO": "tongocha (Tonga)", "tr": "turkcha", "tr_CY": "turkcha (Kipr)", "tr_TR": "turkcha (Turkiya)", "ug": "uygʻurcha", "ug_Arab": "uygʻurcha (Arab)", "ug_Arab_CN": "uygʻurcha (Arab, Xitoy)", "ug_CN": "uygʻurcha (Xitoy)", "uk": "ukraincha", "uk_UA": "ukraincha (Ukraina)", "ur": "urducha", "ur_IN": "urducha (Hindiston)", "ur_PK": "urducha (Pokiston)", "uz": "oʻzbekcha", "uz_AF": "oʻzbekcha (Afgʻoniston)", "uz_Arab": "oʻzbekcha (Arab)", "uz_Arab_AF": "oʻzbekcha (Arab, Afgʻoniston)", "uz_Cyrl": "oʻzbekcha (Kiril)", "uz_Cyrl_UZ": "oʻzbekcha (Kiril, Oʻzbekiston)", "uz_Latn": "oʻzbekcha (Lotin)", "uz_Latn_UZ": "oʻzbekcha (Lotin, Oʻzbekiston)", "uz_UZ": "oʻzbekcha (Oʻzbekiston)", "vi": "vyetnamcha", "vi_VN": "vyetnamcha (Vyetnam)", "yo": "yorubcha", "yo_BJ": "yorubcha (Benin)", "yo_NG": "yorubcha (Nigeriya)", "zh": "xitoycha", "zh_CN": "xitoycha (Xitoy)", "zh_HK": "xitoycha (Gonkong Xitoy MMH)", "zh_Hans": "xitoycha (Soddalashtirilgan)", "zh_Hans_CN": "xitoycha (Soddalashtirilgan, Xitoy)", "zh_Hans_HK": "xitoycha (Soddalashtirilgan, Gonkong Xitoy MMH)", "zh_Hans_MO": "xitoycha (Soddalashtirilgan, Makao Xitoy MMH)", "zh_Hans_SG": "xitoycha (Soddalashtirilgan, Singapur)", "zh_Hant": "xitoycha (Anʼanaviy)", "zh_Hant_HK": "xitoycha (Anʼanaviy, Gonkong Xitoy MMH)", "zh_Hant_MO": "xitoycha (Anʼanaviy, Makao Xitoy MMH)", "zh_Hant_TW": "xitoycha (Anʼanaviy, Tayvan)", "zh_MO": "xitoycha (Makao Xitoy MMH)", "zh_SG": "xitoycha (Singapur)", "zh_TW": "xitoycha (Tayvan)", "zu": "zuluancha", "zu_ZA": "zuluancha (Janubi-Afrika)" } } src/Symfony/Component/Intl/Resources/data/locales/uz_AF.json000066400000000000000000000000401266465517700244020ustar00rootroot00000000000000{ "%%ALIAS": "uz_Arab_AF" } src/Symfony/Component/Intl/Resources/data/locales/uz_Arab.json000066400000000000000000000016761266465517700250010ustar00rootroot00000000000000{ "Names": { "fa": "دری", "fa_AF": "دری (افغانستان)", "fa_IR": "دری (Eron)", "ks_Arab": "kashmircha (عربی)", "ks_Arab_IN": "kashmircha (عربی, Hindiston)", "pa_Arab": "panjobcha (عربی)", "pa_Arab_PK": "panjobcha (عربی, Pokiston)", "ps": "پشتو", "ps_AF": "پشتو (افغانستان)", "ug_Arab": "uygʻurcha (عربی)", "ug_Arab_CN": "uygʻurcha (عربی, Xitoy)", "uz": "اوزبیک", "uz_AF": "اوزبیک (افغانستان)", "uz_Arab": "اوزبیک (عربی)", "uz_Arab_AF": "اوزبیک (عربی, افغانستان)", "uz_Cyrl": "اوزبیک (Kiril)", "uz_Cyrl_UZ": "اوزبیک (Kiril, Oʻzbekiston)", "uz_Latn": "اوزبیک (Lotin)", "uz_Latn_UZ": "اوزبیک (Lotin, Oʻzbekiston)", "uz_UZ": "اوزبیک (Oʻzbekiston)" } } src/Symfony/Component/Intl/Resources/data/locales/uz_Cyrl.json000066400000000000000000000675221266465517700250470ustar00rootroot00000000000000{ "Names": { "af": "Африканча", "af_NA": "Африканча (Намибия)", "af_ZA": "Африканча (Жанубий Африка)", "ak_GH": "akancha (Гана)", "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_Latn": "bambarcha (Лотин)", "bm_Latn_ML": "bambarcha (Лотин, Мали)", "bn": "Бенгалча", "bn_BD": "Бенгалча (Бангладеш)", "bn_IN": "Бенгалча (Ҳиндистон)", "bo": "Тибетча", "bo_CN": "Тибетча (Хитой)", "bo_IN": "Тибетча (Ҳиндистон)", "br_FR": "bretoncha (Франция)", "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_LI": "Олмонча (Лихтенштейн)", "de_LU": "Олмонча (Люксембург)", "dz_BT": "yovoncha (Бутан)", "ee_GH": "ivicha (Гана)", "ee_TG": "ivicha (Того)", "el": "Грекча", "el_CY": "Грекча (Кипр)", "el_GR": "Грекча (Греция)", "en": "Инглизча", "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_MY": "Инглизча (Малайзия)", "en_NA": "Инглизча (Намибия)", "en_NF": "Инглизча (Норфолк ороллари)", "en_NG": "Инглизча (Нигерия)", "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_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_VC": "Инглизча (Сент-Винсент ва Гренадин)", "en_VG": "Инглизча (Британия Вирджиния ороллари)", "en_VI": "Инглизча (АҚШ Вирджиния ороллари)", "en_VU": "Инглизча (Вануату)", "en_WS": "Инглизча (Самоа)", "en_ZA": "Инглизча (Жанубий Африка)", "en_ZM": "Инглизча (Замбия)", "en_ZW": "Инглизча (Зимбабве)", "eo": "Эсперанто", "es": "Испанча", "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": "Баскча (Испания)", "fa": "Форсча", "fa_AF": "Форсча (Афғонистон)", "fa_IR": "Форсча (Эрон)", "fi": "Финча", "fi_FI": "Финча (Финляндия)", "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": "Французча (Майотта)", "fy": "Ғарбий фризианча", "fy_NL": "Ғарбий фризианча (Нидерландия)", "ga": "Ирландча", "ga_IE": "Ирландча (Ирландия)", "gl": "Галицийча", "gl_ES": "Галицийча (Испания)", "gu": "Гужарати", "gu_IN": "Гужарати (Ҳиндистон)", "gv_IM": "mencha (Мэн ороли)", "ha": "Хауса", "ha_GH": "Хауса (Гана)", "ha_Latn": "Хауса (Лотин)", "ha_Latn_GH": "Хауса (Лотин, Гана)", "ha_Latn_NE": "Хауса (Лотин, Нигер)", "ha_Latn_NG": "Хауса (Лотин, Нигерия)", "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": "zichuan yicha (Хитой)", "is": "Исландча", "is_IS": "Исландча (Исландия)", "it": "Италянча", "it_CH": "Италянча (Швейцария)", "it_IT": "Италянча (Италия)", "it_SM": "Италянча (Сан-Марино)", "ja": "Японча", "ja_JP": "Японча (Япония)", "ka": "Грузинча", "ka_GE": "Грузинча (Грузия)", "ki_KE": "kikuycha (Кения)", "kk": "Қозоқча", "kk_Cyrl": "Қозоқча (Кирил)", "kk_Cyrl_KZ": "Қозоқча (Кирил, Қозоғистон)", "kk_KZ": "Қозоқча (Қозоғистон)", "kl_GL": "kalallisutcha (Гренландия)", "km": "Хмерча", "km_KH": "Хмерча (Камбоджа)", "kn": "Каннада", "kn_IN": "Каннада (Ҳиндистон)", "ko": "Корейсча", "ko_KP": "Корейсча (Шимолий Корея)", "ko_KR": "Корейсча (Жанубий Корея)", "ks": "Кашмирча", "ks_Arab": "Кашмирча (Араб)", "ks_Arab_IN": "Кашмирча (Араб, Ҳиндистон)", "ks_IN": "Кашмирча (Ҳиндистон)", "kw_GB": "kornishcha (Бирлашган Қироллик)", "ky": "Қирғизча", "ky_Cyrl": "Қирғизча (Кирил)", "ky_Cyrl_KG": "Қирғизча (Кирил, Қирғизистон)", "ky_KG": "Қирғизча (Қирғизистон)", "lb": "Люксембургча", "lb_LU": "Люксембургча (Люксембург)", "lg_UG": "gandcha (Уганда)", "ln_AO": "lingalcha (Ангола)", "ln_CD": "lingalcha (Конго-Киншаса)", "ln_CF": "lingalcha (Марказий Африка Республикаси)", "ln_CG": "lingalcha (Конго Браззавиль)", "lo": "Лао", "lo_LA": "Лао (Лаос)", "lt": "Литвача", "lt_LT": "Литвача (Литва)", "lu_CD": "luba-katangcha (Конго-Киншаса)", "lv": "Латишча", "lv_LV": "Латишча (Латвия)", "mg": "Малагаси", "mg_MG": "Малагаси (Мадагаскар)", "mk": "Македонча", "mk_MK": "Македонча (Македония)", "ml": "Малайалам", "ml_IN": "Малайалам (Ҳиндистон)", "mn_Cyrl": "mo‘g‘ulcha (Кирил)", "mn_Cyrl_MN": "mo‘g‘ulcha (Кирил, Муғулистон)", "mn_MN": "mo‘g‘ulcha (Муғулистон)", "mr": "Марати", "mr_IN": "Марати (Ҳиндистон)", "ms": "Малайча", "ms_BN": "Малайча (Бруней)", "ms_Latn": "Малайча (Лотин)", "ms_Latn_BN": "Малайча (Лотин, Бруней)", "ms_Latn_MY": "Малайча (Лотин, Малайзия)", "ms_Latn_SG": "Малайча (Лотин, Сингапур)", "ms_MY": "Малайча (Малайзия)", "ms_SG": "Малайча (Сингапур)", "mt": "Мальтача", "mt_MT": "Мальтача (Мальта)", "my": "Бирманча", "my_MM": "Бирманча (Мьянма (Бирма))", "nb": "Норвегча Бокмал", "nb_NO": "Норвегча Бокмал (Норвегия)", "nb_SJ": "Норвегча Бокмал (Савльбард ва Жан Маен)", "nd_ZW": "shimoliy ndebelcha (Зимбабве)", "ne": "Непалча", "ne_IN": "Непалча (Ҳиндистон)", "ne_NP": "Непалча (Непал)", "nl": "Голландча", "nl_AW": "Голландча (Аруба)", "nl_BE": "Голландча (Бельгия)", "nl_BQ": "Голландча (Кариб Нидерландияси)", "nl_CW": "Голландча (Курасао)", "nl_NL": "Голландча (Нидерландия)", "nl_SR": "Голландча (Суринам)", "nl_SX": "Голландча (Синт-Маартен)", "nn": "Норвегча Нинорск", "nn_NO": "Норвегча Нинорск (Норвегия)", "om_ET": "oromocha (Эфиопия)", "om_KE": "oromocha (Кения)", "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": "Португалча (Шарқий-Тимор)", "qu": "Квечуа", "qu_BO": "Квечуа (Боливия)", "qu_EC": "Квечуа (Эквадор)", "qu_PE": "Квечуа (Перу)", "rm": "Романча", "rm_CH": "Романча (Швейцария)", "rn_BI": "rundcha (Бурунди)", "ro": "Руминча", "ro_MD": "Руминча (Молдова)", "ro_RO": "Руминча (Руминия)", "ru": "Русча", "ru_BY": "Русча (Белорусия)", "ru_KG": "Русча (Қирғизистон)", "ru_KZ": "Русча (Қозоғистон)", "ru_MD": "Русча (Молдова)", "ru_RU": "Русча (Россия)", "ru_UA": "Русча (Украина)", "rw_RW": "kinyarvandcha (Руанда)", "se_FI": "shimoliy semiycha (Финляндия)", "se_NO": "shimoliy semiycha (Норвегия)", "se_SE": "shimoliy semiycha (Швеция)", "sg_CF": "sangoancha (Марказий Африка Республикаси)", "si": "Синхала", "si_LK": "Синхала (Шри-Ланка)", "sk": "Словакча", "sk_SK": "Словакча (Словакия)", "sl": "Словенча", "sl_SI": "Словенча (Словения)", "sn_ZW": "shoniycha (Зимбабве)", "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_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_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": "Ўзбек (Ўзбекистон)", "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": "Зулу (Жанубий Африка)" } } src/Symfony/Component/Intl/Resources/data/locales/uz_UZ.json000066400000000000000000000000401266465517700244520ustar00rootroot00000000000000{ "%%ALIAS": "uz_Latn_UZ" } src/Symfony/Component/Intl/Resources/data/locales/vi.json000066400000000000000000000636741266465517700240420ustar00rootroot00000000000000{ "Names": { "af": "Tiếng Nam Phi", "af_NA": "Tiếng Nam Phi (Namibia)", "af_ZA": "Tiếng Nam Phi (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.quốc Ả Rập T.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 (I-rắc)", "ar_JO": "Tiếng Ả Rập (Jordan)", "ar_KM": "Tiếng Ả Rập (Comoros)", "ar_KW": "Tiếng Ả Rập (Cô-oét)", "ar_LB": "Tiếng Ả Rập (Li-băng)", "ar_LY": "Tiếng Ả Rập (Li-bi)", "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 (Somali)", "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 (Bungari)", "bm": "Tiếng Bambara", "bm_Latn": "Tiếng Bambara (Chữ La tinh)", "bm_Latn_ML": "Tiếng Bambara (Chữ La tinh, Mali)", "bn": "Tiếng Bengali", "bn_BD": "Tiếng Bengali (Bangladesh)", "bn_IN": "Tiếng Bengali (Ấ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 Nam Tư", "bs_BA": "Tiếng Nam Tư (Bosnia và Herzegovina)", "bs_Cyrl": "Tiếng Nam Tư (Chữ Kirin)", "bs_Cyrl_BA": "Tiếng Nam Tư (Chữ Kirin, Bosnia và Herzegovina)", "bs_Latn": "Tiếng Nam Tư (Chữ La tinh)", "bs_Latn_BA": "Tiếng Nam Tư (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 (Ý)", "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_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_AU": "Tiếng Anh (Úc)", "en_BB": "Tiếng Anh (Barbados)", "en_BE": "Tiếng Anh (Bỉ)", "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_CK": "Tiếng Anh (Quần đảo Cook)", "en_CM": "Tiếng Anh (Cameroon)", "en_CX": "Tiếng Anh (Đảo Giáng Sinh)", "en_DG": "Tiếng Anh (Diego Garcia)", "en_DM": "Tiếng Anh (Dominica)", "en_ER": "Tiếng Anh (Eritrea)", "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 (Đặc khu hành chính Hồng Kông - Trung Quốc)", "en_IE": "Tiếng Anh (Ai-len)", "en_IM": "Tiếng Anh (Đảo Man)", "en_IN": "Tiếng Anh (Ấn Độ)", "en_IO": "Tiếng Anh (Thuộc địa 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 (Saint Kitts và Nevis)", "en_KY": "Tiếng Anh (Quần đảo Cayman)", "en_LC": "Tiếng Anh (Saint 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 (Đặc khu hành chính 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_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 (Philippin)", "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_SG": "Tiếng Anh (Singapore)", "en_SH": "Tiếng Anh (Saint Helena)", "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 nhỏ xa t.tâm thuộc Mỹ)", "en_US": "Tiếng Anh (Hoa Kỳ)", "en_VC": "Tiếng Anh (Saint 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_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 (Philippin)", "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 Faore", "fo_FO": "Tiếng Faore (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 (Saint 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 (Bờ Biển Ngà)", "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 (Saint 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 Ai-len", "ga_IE": "Tiếng Ai-len (Ai-len)", "gd": "Tiếng Xentơ (Xcốt len)", "gd_GB": "Tiếng Xentơ (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_Latn": "Tiếng Hausa (Chữ La tinh)", "ha_Latn_GH": "Tiếng Hausa (Chữ La tinh, Ghana)", "ha_Latn_NE": "Tiếng Hausa (Chữ La tinh, Niger)", "ha_Latn_NG": "Tiếng Hausa (Chữ La tinh, Nigeria)", "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 (Hungari)", "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 (Georgia)", "ki": "Tiếng Kikuyu", "ki_KE": "Tiếng Kikuyu (Kenya)", "kk": "Tiếng Kazakh", "kk_Cyrl": "Tiếng Kazakh (Chữ Kirin)", "kk_Cyrl_KZ": "Tiếng Kazakh (Chữ Kirin, Kazakhstan)", "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 Kashmiri", "ks_Arab": "Tiếng Kashmiri (Chữ Ả Rập)", "ks_Arab_IN": "Tiếng Kashmiri (Chữ Ả Rập, Ấn Độ)", "ks_IN": "Tiếng Kashmiri (Ấn Độ)", "kw": "Tiếng Cornwall", "kw_GB": "Tiếng Cornwall (Vương quốc Anh)", "ky": "Tiếng Kyrgyz", "ky_Cyrl": "Tiếng Kyrgyz (Chữ Kirin)", "ky_Cyrl_KG": "Tiếng Kyrgyz (Chữ Kirin, Kyrgyzstan)", "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 Lít-va", "lt_LT": "Tiếng Lít-va (Lít-va)", "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_Cyrl": "Tiếng Mông Cổ (Chữ Kirin)", "mn_Cyrl_MN": "Tiếng Mông Cổ (Chữ Kirin, 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 Malaysia", "ms_BN": "Tiếng Malaysia (Brunei)", "ms_Latn": "Tiếng Malaysia (Chữ La tinh)", "ms_Latn_BN": "Tiếng Malaysia (Chữ La tinh, Brunei)", "ms_Latn_MY": "Tiếng Malaysia (Chữ La tinh, Malaysia)", "ms_Latn_SG": "Tiếng Malaysia (Chữ La tinh, Singapore)", "ms_MY": "Tiếng Malaysia (Malaysia)", "ms_SG": "Tiếng Malaysia (Singapore)", "mt": "Tiếng Malt", "mt_MT": "Tiếng Malt (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 Oriya", "or_IN": "Tiếng Oriya (Ấn Độ)", "os": "Tiếng Ossetic", "os_GE": "Tiếng Ossetic (Georgia)", "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_CV": "Tiếng Bồ Đào Nha (Cape Verde)", "pt_GW": "Tiếng Bồ Đào Nha (Guinea-Bissau)", "pt_MO": "Tiếng Bồ Đào Nha (Đặc khu hành chính 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 (Đông Timor)", "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 Rumani", "ro_MD": "Tiếng Rumani (Moldova)", "ro_RO": "Tiếng Rumani (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 Xéc bi - Croatia", "sh_BA": "Tiếng Xéc bi - 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 (Somali)", "sq": "Tiếng An-ba-ni", "sq_AL": "Tiếng An-ba-ni (Albani)", "sq_MK": "Tiếng An-ba-ni (Macedonia)", "sq_XK": "Tiếng An-ba-ni (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_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 Tigrigya", "ti_ER": "Tiếng Tigrigya (Eritrea)", "ti_ET": "Tiếng Tigrigya (Ethiopia)", "tl": "Tiếng Tagalog", "tl_PH": "Tiếng Tagalog (Philippin)", "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 Uyghur", "ug_Arab": "Tiếng Uyghur (Chữ Ả Rập)", "ug_Arab_CN": "Tiếng Uyghur (Chữ Ả Rập, Trung Quốc)", "ug_CN": "Tiếng Uyghur (Trung Quốc)", "uk": "Tiếng Ucraina", "uk_UA": "Tiếng Ucraina (Ukraina)", "ur": "Tiếng Uđu", "ur_IN": "Tiếng Uđu (Ấn Độ)", "ur_PK": "Tiếng Uđu (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 Y-đit", "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 (Đặc khu hành chính 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ể, Đặc khu hành chính Hồng Kông - Trung Quốc)", "zh_Hans_MO": "Tiếng Trung (Giản thể, Đặc khu hành chính 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ể, Đặc khu hành chính Hồng Kông - Trung Quốc)", "zh_Hant_MO": "Tiếng Trung (Phồn thể, Đặc khu hành chính Macao - Trung Quốc)", "zh_Hant_TW": "Tiếng Trung (Phồn thể, Đài Loan)", "zh_MO": "Tiếng Trung (Đặc khu hành chính 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)" } } src/Symfony/Component/Intl/Resources/data/locales/yi.json000066400000000000000000000515361266465517700240370ustar00rootroot00000000000000{ "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_LI": "דײַטש (ליכטנשטיין)", "de_LU": "דײַטש (לוקסעמבורג)", "el": "גריכיש", "el_GR": "גריכיש (גריכנלאַנד)", "en": "ענגליש", "en_AG": "ענגליש (אַנטיגוע און באַרבודע)", "en_AU": "ענגליש (אויסטראַליע)", "en_BB": "ענגליש (באַרבאַדאס)", "en_BE": "ענגליש (בעלגיע)", "en_BM": "ענגליש (בערמודע)", "en_BS": "ענגליש (באַהאַמאַס)", "en_BW": "ענגליש (באצוואַנע)", "en_BZ": "ענגליש (בעליז)", "en_CA": "ענגליש (קאַנאַדע)", "en_CK": "ענגליש (קוק אינזלען)", "en_CM": "ענגליש (קאַמערון)", "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_IE": "ענגליש (אירלאַנד)", "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_NZ": "ענגליש (ניו זילאַנד)", "en_PG": "ענגליש (פּאַפּואַ נײַ גינע)", "en_PH": "ענגליש (פֿיליפּינען)", "en_PK": "ענגליש (פּאַקיסטאַן)", "en_PN": "ענגליש (פּיטקערן אינזלען)", "en_PR": "ענגליש (פּארטא־ריקא)", "en_RW": "ענגליש (רוואַנדע)", "en_SB": "ענגליש (סאלאמאן אינזלען)", "en_SC": "ענגליש (סיישעל)", "en_SD": "ענגליש (סודאַן)", "en_SG": "ענגליש (סינגאַפּור)", "en_SH": "ענגליש (סט העלענע)", "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_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_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_Latn": "האַוסאַ (גַלחיש)", "ha_Latn_GH": "האַוסאַ (גַלחיש, גהאַנע)", "ha_Latn_NE": "האַוסאַ (גַלחיש, ניזשער)", "ha_Latn_NG": "האַוסאַ (גַלחיש, ניגעריע)", "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": "קאַזאַכיש", "kk_Cyrl": "קאַזאַכיש (ציריליש)", "km": "כמער", "km_KH": "כמער (קאַמבאדיע)", "kn": "קאַנאַדאַ", "kn_IN": "קאַנאַדאַ (אינדיע)", "ko": "קארעאיש", "kw": "קארניש", "kw_GB": "קארניש (פֿאַראייניגטע קעניגרייך)", "ky": "קירגיזיש", "ky_Cyrl": "קירגיזיש (ציריליש)", "lb": "לוקסעמבורגיש", "lb_LU": "לוקסעמבורגיש (לוקסעמבורג)", "lo": "לאַא", "lo_LA": "לאַא (לאַאס)", "lt": "ליטוויש", "lt_LT": "ליטוויש (ליטע)", "lv": "לעטיש", "lv_LV": "לעטיש (לעטלאַנד)", "mk": "מאַקעדאניש", "mk_MK": "מאַקעדאניש (מאַקעדאניע)", "ml": "מאַלאַיאַלאַם", "ml_IN": "מאַלאַיאַלאַם (אינדיע)", "mn": "מאנגאליש", "mn_Cyrl": "מאנגאליש (ציריליש)", "mn_Cyrl_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_CV": "פּארטוגעזיש (קאַפּווערדישע אינזלען)", "pt_GW": "פּארטוגעזיש (גינע־ביסאַו)", "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_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": "זולו (דרום־אַפֿריקע)" } } src/Symfony/Component/Intl/Resources/data/locales/yo.json000066400000000000000000000537651266465517700240530ustar00rootroot00000000000000{ "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_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_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_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_CK": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Etíokun Kùúkù)", "en_CM": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Kamerúúnì)", "en_DM": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Dòmíníkà)", "en_ER": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Eritira)", "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_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_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_SG": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Singapo)", "en_SH": "Èdè Gẹ̀ẹ́sì (Orílẹ́ède Hẹlena)", "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_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", "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_CV": "Èdè Pọtugi (Orílẹ́ède Etíokun Kápé féndè)", "pt_GW": "Èdè Pọtugi (Orílẹ́ède Gene-Busau)", "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_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)" } } src/Symfony/Component/Intl/Resources/data/locales/yo_BJ.json000066400000000000000000000461121266465517700244120ustar00rootroot00000000000000{ "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_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_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_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_CK": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Etíokun Kùúkù)", "en_CM": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Kamerúúnì)", "en_DM": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Dòmíníkà)", "en_ER": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Eritira)", "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_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_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_SG": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Singapo)", "en_SH": "Èdè Gɛ̀ɛ́sì (Orílɛ́ède Hɛlena)", "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_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)", "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_CV": "Èdè Pɔtugi (Orílɛ́ède Etíokun Kápé féndè)", "pt_GW": "Èdè Pɔtugi (Orílɛ́ède Gene-Busau)", "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_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)" } } src/Symfony/Component/Intl/Resources/data/locales/zh.json000066400000000000000000000574771266465517700240510ustar00rootroot00000000000000{ "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_Latn": "班巴拉文 (拉丁文)", "bm_Latn_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": "加泰罗尼亚文 (意大利)", "cs": "捷克文", "cs_CZ": "捷克文 (捷克共和国)", "cy": "威尔士文", "cy_GB": "威尔士文 (英国)", "da": "丹麦文", "da_DK": "丹麦文 (丹麦)", "da_GL": "丹麦文 (格陵兰)", "de": "德文", "de_AT": "德文 (奥地利)", "de_BE": "德文 (比利时)", "de_CH": "德文 (瑞士)", "de_DE": "德文 (德国)", "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_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_MY": "英文 (马来西亚)", "en_NA": "英文 (纳米比亚)", "en_NF": "英文 (诺福克岛)", "en_NG": "英文 (尼日利亚)", "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_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_VC": "英文 (圣文森特和格林纳丁斯)", "en_VG": "英文 (英属维京群岛)", "en_VI": "英文 (美属维京群岛)", "en_VU": "英文 (瓦努阿图)", "en_WS": "英文 (萨摩亚)", "en_ZA": "英文 (南非)", "en_ZM": "英文 (赞比亚)", "en_ZW": "英文 (津巴布韦)", "eo": "世界文", "es": "西班牙文", "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": "巴斯克文 (西班牙)", "fa": "波斯文", "fa_AF": "波斯文 (阿富汗)", "fa_IR": "波斯文 (伊朗)", "ff": "夫拉文", "ff_CM": "夫拉文 (喀麦隆)", "ff_GN": "夫拉文 (几内亚)", "ff_MR": "夫拉文 (毛里塔尼亚)", "ff_SN": "夫拉文 (塞内加尔)", "fi": "芬兰文", "fi_FI": "芬兰文 (芬兰)", "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": "法文 (马约特)", "fy": "西弗里西亚文", "fy_NL": "西弗里西亚文 (荷兰)", "ga": "爱尔兰文", "ga_IE": "爱尔兰文 (爱尔兰)", "gd": "苏格兰盖尔文", "gd_GB": "苏格兰盖尔文 (英国)", "gl": "加利西亚文", "gl_ES": "加利西亚文 (西班牙)", "gu": "古吉拉特文", "gu_IN": "古吉拉特文 (印度)", "gv": "马恩岛文", "gv_IM": "马恩岛文 (曼岛)", "ha": "豪萨文", "ha_GH": "豪萨文 (加纳)", "ha_Latn": "豪萨文 (拉丁文)", "ha_Latn_GH": "豪萨文 (拉丁文, 加纳)", "ha_Latn_NE": "豪萨文 (拉丁文, 尼日尔)", "ha_Latn_NG": "豪萨文 (拉丁文, 尼日利亚)", "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_Cyrl": "哈萨克文 (西里尔文)", "kk_Cyrl_KZ": "哈萨克文 (西里尔文, 哈萨克斯坦)", "kk_KZ": "哈萨克文 (哈萨克斯坦)", "kl": "格陵兰文", "kl_GL": "格陵兰文 (格陵兰)", "km": "高棉文", "km_KH": "高棉文 (柬埔寨)", "kn": "卡纳达文", "kn_IN": "卡纳达文 (印度)", "ko": "韩文", "ko_KP": "韩文 (朝鲜)", "ko_KR": "韩文 (韩国)", "ks": "克什米尔文", "ks_Arab": "克什米尔文 (阿拉伯文)", "ks_Arab_IN": "克什米尔文 (阿拉伯文, 印度)", "ks_IN": "克什米尔文 (印度)", "kw": "凯尔特文", "kw_GB": "凯尔特文 (英国)", "ky": "吉尔吉斯文", "ky_Cyrl": "吉尔吉斯文 (西里尔文)", "ky_Cyrl_KG": "吉尔吉斯文 (西里尔文, 吉尔吉斯斯坦)", "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_Cyrl": "蒙古文 (西里尔文)", "mn_Cyrl_MN": "蒙古文 (西里尔文, 蒙古)", "mn_MN": "蒙古文 (蒙古)", "mr": "马拉地文", "mr_IN": "马拉地文 (印度)", "ms": "马来文", "ms_BN": "马来文 (文莱)", "ms_Latn": "马来文 (拉丁文)", "ms_Latn_BN": "马来文 (拉丁文, 文莱)", "ms_Latn_MY": "马来文 (拉丁文, 马来西亚)", "ms_Latn_SG": "马来文 (拉丁文, 新加坡)", "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_CV": "葡萄牙文 (佛得角)", "pt_GW": "葡萄牙文 (几内亚比绍)", "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_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_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": "乌兹别克文 (乌兹别克斯坦)", "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": "祖鲁文 (南非)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_CN.json000066400000000000000000000000401266465517700243770ustar00rootroot00000000000000{ "%%ALIAS": "zh_Hans_CN" } src/Symfony/Component/Intl/Resources/data/locales/zh_HK.json000066400000000000000000000000401266465517700244010ustar00rootroot00000000000000{ "%%ALIAS": "zh_Hant_HK" } src/Symfony/Component/Intl/Resources/data/locales/zh_Hans_HK.json000066400000000000000000000006431266465517700253630ustar00rootroot00000000000000{ "Names": { "fr_GP": "法文 (瓜德罗普岛)", "fr_PM": "法文 (圣皮埃尔和密克隆)", "om": "奥罗莫文", "om_ET": "奥罗莫文 (埃塞俄比亚)", "om_KE": "奥罗莫文 (肯尼亚)", "sr_Cyrl_ME": "塞尔维亚文 (西里尔文, 黑山)", "sr_Latn_ME": "塞尔维亚文 (拉丁文, 黑山)", "sr_ME": "塞尔维亚文 (黑山)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_Hans_MO.json000066400000000000000000000005661266465517700254000ustar00rootroot00000000000000{ "Names": { "fr_PM": "法文 (圣皮埃尔和密克隆)", "om": "奥罗莫文", "om_ET": "奥罗莫文 (埃塞俄比亚)", "om_KE": "奥罗莫文 (肯尼亚)", "sr_Cyrl_ME": "塞尔维亚文 (西里尔文, 黑山)", "sr_Latn_ME": "塞尔维亚文 (拉丁文, 黑山)", "sr_ME": "塞尔维亚文 (黑山)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_Hans_SG.json000066400000000000000000000005661266465517700253760ustar00rootroot00000000000000{ "Names": { "fr_PM": "法文 (圣皮埃尔和密克隆)", "om": "奥罗莫文", "om_ET": "奥罗莫文 (埃塞俄比亚)", "om_KE": "奥罗莫文 (肯尼亚)", "sr_Cyrl_ME": "塞尔维亚文 (西里尔文, 黑山)", "sr_Latn_ME": "塞尔维亚文 (拉丁文, 黑山)", "sr_ME": "塞尔维亚文 (黑山)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_Hant.json000066400000000000000000000514021266465517700250010ustar00rootroot00000000000000{ "Names": { "af": "南非荷蘭文", "af_NA": "南非荷蘭文 (納米比亞)", "af_ZA": "南非荷蘭文 (南非)", "ak": "阿坎文", "ak_GH": "阿坎文 (迦納)", "am_ET": "阿姆哈拉文 (衣索比亞)", "ar_AE": "阿拉伯文 (阿拉伯聯合大公國)", "ar_DJ": "阿拉伯文 (吉布地)", "ar_DZ": "阿拉伯文 (阿爾及利亞)", "ar_ER": "阿拉伯文 (厄利垂亞)", "ar_JO": "阿拉伯文 (約旦)", "ar_KM": "阿拉伯文 (葛摩)", "ar_LY": "阿拉伯文 (利比亞)", "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_Latn_ML": "班巴拉文 (拉丁文, 馬利)", "bn_BD": "孟加拉文 (孟加拉)", "bo_CN": "藏文 (中華人民共和國)", "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_CZ": "捷克文 (捷克共和國)", "cy": "威爾斯文", "cy_GB": "威爾斯文 (英國)", "da": "丹麥文", "da_DK": "丹麥文 (丹麥)", "da_GL": "丹麥文 (格陵蘭)", "de_AT": "德文 (奧地利)", "de_BE": "德文 (比利時)", "de_DE": "德文 (德國)", "de_LI": "德文 (列支敦斯登)", "de_LU": "德文 (盧森堡)", "dz": "宗卡文", "dz_BT": "宗卡文 (不丹)", "ee": "埃維文", "ee_GH": "埃維文 (迦納)", "ee_TG": "埃維文 (多哥共和國)", "el": "希臘文", "el_CY": "希臘文 (賽普勒斯)", "el_GR": "希臘文 (希臘)", "en_AG": "英文 (安地卡及巴布達)", "en_AI": "英文 (安圭拉島)", "en_AS": "英文 (美屬薩摩亞群島)", "en_AU": "英文 (澳洲)", "en_BB": "英文 (巴貝多)", "en_BE": "英文 (比利時)", "en_BM": "英文 (百慕達)", "en_BS": "英文 (巴哈馬)", "en_BW": "英文 (波札那)", "en_BZ": "英文 (貝里斯)", "en_CC": "英文 (可可斯群島)", "en_CK": "英文 (庫克群島)", "en_CM": "英文 (喀麥隆)", "en_CX": "英文 (聖誕島)", "en_DG": "英文 (迪亞哥加西亞島)", "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_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_NR": "英文 (諾魯)", "en_NU": "英文 (紐埃島)", "en_NZ": "英文 (紐西蘭)", "en_PG": "英文 (巴布亞紐幾內亞)", "en_PH": "英文 (菲律賓)", "en_PN": "英文 (皮特肯群島)", "en_PW": "英文 (帛琉)", "en_RW": "英文 (盧安達)", "en_SB": "英文 (索羅門群島)", "en_SC": "英文 (塞席爾)", "en_SD": "英文 (蘇丹)", "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_VC": "英文 (聖文森及格瑞那丁)", "en_VG": "英文 (英屬維京群島)", "en_VI": "英文 (美屬維京群島)", "en_VU": "英文 (萬那杜)", "en_WS": "英文 (薩摩亞群島)", "en_ZM": "英文 (尚比亞)", "en_ZW": "英文 (辛巴威)", "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": "富拉文", "ff_CM": "富拉文 (喀麥隆)", "ff_GN": "富拉文 (幾內亞)", "ff_MR": "富拉文 (茅利塔尼亞)", "ff_SN": "富拉文 (塞內加爾)", "fi": "芬蘭文", "fi_FI": "芬蘭文 (芬蘭)", "fo": "法羅文", "fo_FO": "法羅文 (法羅群島)", "fr_BE": "法文 (比利時)", "fr_BF": "法文 (布吉納法索)", "fr_BI": "法文 (蒲隆地)", "fr_BJ": "法文 (貝南)", "fr_BL": "法文 (聖巴瑟米)", "fr_CD": "法文 (剛果(金夏沙))", "fr_CF": "法文 (中非共和國)", "fr_CG": "法文 (剛果(布拉薩))", "fr_CI": "法文 (象牙海岸)", "fr_CM": "法文 (喀麥隆)", "fr_DJ": "法文 (吉布地)", "fr_DZ": "法文 (阿爾及利亞)", "fr_FR": "法文 (法國)", "fr_GA": "法文 (加彭)", "fr_GF": "法文 (法屬圭亞那)", "fr_GN": "法文 (幾內亞)", "fr_GP": "法文 (瓜地洛普)", "fr_GQ": "法文 (赤道幾內亞)", "fr_KM": "法文 (葛摩)", "fr_LU": "法文 (盧森堡)", "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": "加利西亞文 (西班牙)", "gv": "曼島文", "gv_IM": "曼島文 (曼島)", "ha": "豪撒文", "ha_GH": "豪撒文 (迦納)", "ha_Latn": "豪撒文 (拉丁文)", "ha_Latn_GH": "豪撒文 (拉丁文, 迦納)", "ha_Latn_NE": "豪撒文 (拉丁文, 尼日)", "ha_Latn_NG": "豪撒文 (拉丁文, 奈及利亞)", "ha_NE": "豪撒文 (尼日)", "ha_NG": "豪撒文 (奈及利亞)", "he": "希伯來文", "he_IL": "希伯來文 (以色列)", "hi": "北印度文", "hi_IN": "北印度文 (印度)", "hr": "克羅埃西亞文", "hr_BA": "克羅埃西亞文 (波士尼亞與赫塞格維納)", "hr_HR": "克羅埃西亞文 (克羅埃西亞)", "hy": "亞美尼亞文", "hy_AM": "亞美尼亞文 (亞美尼亞)", "id": "印尼文", "id_ID": "印尼文 (印尼)", "ig_NG": "伊布文 (奈及利亞)", "ii_CN": "四川彝文 (中華人民共和國)", "is": "冰島文", "is_IS": "冰島文 (冰島)", "it": "義大利文", "it_CH": "義大利文 (瑞士)", "it_IT": "義大利文 (義大利)", "it_SM": "義大利文 (聖馬利諾)", "ka": "喬治亞文", "ka_GE": "喬治亞文 (喬治亞共和國)", "ki": "吉庫尤文", "ki_KE": "吉庫尤文 (肯亞)", "kk": "哈薩克文", "kk_Cyrl": "哈薩克文 (斯拉夫文)", "kk_Cyrl_KZ": "哈薩克文 (斯拉夫文, 哈薩克)", "kk_KZ": "哈薩克文 (哈薩克)", "kl": "格陵蘭文", "kl_GL": "格陵蘭文 (格陵蘭)", "kn": "坎那達文", "kn_IN": "坎那達文 (印度)", "ko": "韓文", "ko_KP": "韓文 (北韓)", "ko_KR": "韓文 (南韓)", "ks": "喀什米爾文", "ks_Arab": "喀什米爾文 (阿拉伯文)", "ks_Arab_IN": "喀什米爾文 (阿拉伯文, 印度)", "ks_IN": "喀什米爾文 (印度)", "kw": "康瓦耳文", "kw_GB": "康瓦耳文 (英國)", "ky": "吉爾吉斯文", "ky_Cyrl": "吉爾吉斯文 (斯拉夫文)", "ky_Cyrl_KG": "吉爾吉斯文 (斯拉夫文, 吉爾吉斯)", "ky_KG": "吉爾吉斯文 (吉爾吉斯)", "lb": "盧森堡文", "lb_LU": "盧森堡文 (盧森堡)", "lg": "干達文", "lg_UG": "干達文 (烏干達)", "ln_CD": "林加拉文 (剛果(金夏沙))", "ln_CF": "林加拉文 (中非共和國)", "ln_CG": "林加拉文 (剛果(布拉薩))", "lo": "寮文", "lo_LA": "寮文 (寮國)", "lu": "魯巴加丹加文", "lu_CD": "魯巴加丹加文 (剛果(金夏沙))", "lv": "拉脫維亞文", "lv_LV": "拉脫維亞文 (拉脫維亞)", "mg": "馬拉加什文", "mg_MG": "馬拉加什文 (馬達加斯加)", "mk": "馬其頓文", "mk_MK": "馬其頓文 (馬其頓)", "ml": "馬來亞拉姆文", "ml_IN": "馬來亞拉姆文 (印度)", "mn_Cyrl": "蒙古文 (斯拉夫文)", "mn_Cyrl_MN": "蒙古文 (斯拉夫文, 蒙古)", "mr": "馬拉地文", "mr_IN": "馬拉地文 (印度)", "ms": "馬來文", "ms_BN": "馬來文 (汶萊)", "ms_Latn": "馬來文 (拉丁文)", "ms_Latn_BN": "馬來文 (拉丁文, 汶萊)", "ms_Latn_MY": "馬來文 (拉丁文, 馬來西亞)", "ms_Latn_SG": "馬來文 (拉丁文, 新加坡)", "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_Guru": "旁遮普文 (古魯穆奇文)", "pa_Guru_IN": "旁遮普文 (古魯穆奇文, 印度)", "pl": "波蘭文", "pl_PL": "波蘭文 (波蘭)", "ps": "普什圖文", "ps_AF": "普什圖文 (阿富汗)", "pt_CV": "葡萄牙文 (維德角)", "pt_GW": "葡萄牙文 (幾內亞比紹)", "pt_MO": "葡萄牙文 (中華人民共和國澳門特別行政區)", "pt_MZ": "葡萄牙文 (莫三比克)", "pt_ST": "葡萄牙文 (聖多美及普林西比)", "pt_TL": "葡萄牙文 (東帝汶)", "qu": "蓋楚瓦文", "qu_BO": "蓋楚瓦文 (玻利維亞)", "qu_EC": "蓋楚瓦文 (厄瓜多)", "qu_PE": "蓋楚瓦文 (秘魯)", "rm": "羅曼斯文", "rm_CH": "羅曼斯文 (瑞士)", "rn": "隆迪文", "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_AX": "瑞典文 (奧蘭群島)", "sv_FI": "瑞典文 (芬蘭)", "sw": "史瓦希里文", "sw_KE": "史瓦希里文 (肯亞)", "sw_TZ": "史瓦希里文 (坦尚尼亞)", "sw_UG": "史瓦希里文 (烏干達)", "ta": "坦米爾文", "ta_IN": "坦米爾文 (印度)", "ta_LK": "坦米爾文 (斯里蘭卡)", "ta_MY": "坦米爾文 (馬來西亞)", "ta_SG": "坦米爾文 (新加坡)", "te": "泰盧固文", "te_IN": "泰盧固文 (印度)", "th_TH": "泰文 (泰國)", "ti": "提格利尼亞文", "ti_ER": "提格利尼亞文 (厄利垂亞)", "ti_ET": "提格利尼亞文 (衣索比亞)", "tl": "塔加路族文", "tl_PH": "塔加路族文 (菲律賓)", "to": "東加文", "to_TO": "東加文 (東加)", "tr_CY": "土耳其文 (賽普勒斯)", "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": "烏茲別克文 (烏茲別克)", "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": "祖魯文 (南非)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_Hant_HK.json000066400000000000000000000164201266465517700253640ustar00rootroot00000000000000{ "Names": { "am_ET": "阿姆哈拉文 (埃塞俄比亞)", "ar_AE": "阿拉伯文 (阿拉伯聯合酋長國)", "ar_ER": "阿拉伯文 (厄立特里亞)", "ar_KM": "阿拉伯文 (科摩羅)", "ar_MR": "阿拉伯文 (毛里塔尼亞)", "ar_QA": "阿拉伯文 (卡塔爾)", "ar_SO": "阿拉伯文 (索馬里)", "az_AZ": "亞塞拜然文 (阿塞拜疆)", "az_Cyrl": "亞塞拜然文 (西里爾語字母)", "az_Cyrl_AZ": "亞塞拜然文 (西里爾語字母, 阿塞拜疆)", "az_Latn": "亞塞拜然文 (拉丁字母)", "az_Latn_AZ": "亞塞拜然文 (拉丁字母, 阿塞拜疆)", "bm_Latn": "班巴拉文 (拉丁字母)", "bm_Latn_ML": "班巴拉文 (拉丁字母, 馬里)", "br_FR": "布里多尼文 (法國)", "bs_BA": "波士尼亞文 (波斯尼亞和黑塞哥維那)", "bs_Cyrl": "波士尼亞文 (西里爾語字母)", "bs_Cyrl_BA": "波士尼亞文 (西里爾語字母, 波斯尼亞和黑塞哥維那)", "bs_Latn": "波士尼亞文 (拉丁字母)", "bs_Latn_BA": "波士尼亞文 (拉丁字母, 波斯尼亞和黑塞哥維那)", "ca_IT": "加泰羅尼亞文 (意大利)", "el_CY": "希臘文 (塞浦路斯)", "en_AG": "英文 (安提瓜及巴布達)", "en_BW": "英文 (博茨瓦納)", "en_ER": "英文 (厄立特里亞)", "en_GD": "英文 (格林納達)", "en_GM": "英文 (岡比亞)", "en_IM": "英文 (英屬地曼島)", "en_KE": "英文 (肯雅)", "en_KN": "英文 (聖基茨和尼維斯)", "en_LC": "英文 (聖盧西亞)", "en_LR": "英文 (利比里亞)", "en_LS": "英文 (萊索托)", "en_MS": "英文 (蒙塞拉特島)", "en_MU": "英文 (毛里裘斯)", "en_NG": "英文 (尼日利亞)", "en_PG": "英文 (巴布亞新幾內亞)", "en_PN": "英文 (皮特凱恩島)", "en_RW": "英文 (盧旺達)", "en_SB": "英文 (所羅門群島)", "en_SC": "英文 (塞舌爾)", "en_SZ": "英文 (斯威士蘭)", "en_TC": "英文 (特克斯和凱科斯群島)", "en_TO": "英文 (湯加)", "en_TT": "英文 (千里達和多巴哥)", "en_TV": "英文 (圖瓦盧)", "en_TZ": "英文 (坦桑尼亞)", "en_VC": "英文 (聖文森特和格林納丁斯)", "en_VU": "英文 (瓦努阿圖)", "en_ZM": "英文 (贊比亞)", "eo": "世界語", "es_CR": "西班牙文 (哥斯達黎加)", "es_GT": "西班牙文 (危地馬拉)", "ff_MR": "富拉文 (毛里塔尼亞)", "fr_BJ": "法文 (貝寧)", "fr_BL": "法文 (聖巴泰勒米)", "fr_CD": "法文 (剛果 - 金夏沙)", "fr_CG": "法文 (剛果 - 布拉薩)", "fr_KM": "法文 (科摩羅)", "fr_ML": "法文 (馬里)", "fr_MR": "法文 (毛里塔尼亞)", "fr_MU": "法文 (毛里裘斯)", "fr_NC": "法文 (新喀里多尼亞)", "fr_NE": "法文 (尼日爾)", "fr_RW": "法文 (盧旺達)", "fr_SC": "法文 (塞舌爾)", "fr_VU": "法文 (瓦努阿圖)", "gl": "加里西亞文", "gl_ES": "加里西亞文 (西班牙)", "gv_IM": "曼島文 (英屬地曼島)", "ha_Latn": "豪撒文 (拉丁字母)", "ha_Latn_GH": "豪撒文 (拉丁字母, 迦納)", "ha_Latn_NE": "豪撒文 (拉丁字母, 尼日爾)", "ha_Latn_NG": "豪撒文 (拉丁字母, 尼日利亞)", "ha_NE": "豪撒文 (尼日爾)", "ha_NG": "豪撒文 (尼日利亞)", "hr_BA": "克羅埃西亞文 (波斯尼亞和黑塞哥維那)", "ig_NG": "伊布文 (尼日利亞)", "it_SM": "意大利文 (聖馬利諾)", "ka_GE": "喬治亞文 (格魯吉亞)", "ki_KE": "吉庫尤文 (肯雅)", "kk_Cyrl": "哈薩克文 (西里爾語字母)", "kk_Cyrl_KZ": "哈薩克文 (西里爾語字母, 哈薩克)", "ky_Cyrl": "吉爾吉斯文 (西里爾語字母)", "ky_Cyrl_KG": "吉爾吉斯文 (西里爾語字母, 吉爾吉斯)", "ln_CD": "林加拉文 (剛果 - 金夏沙)", "ln_CG": "林加拉文 (剛果 - 布拉薩)", "lu_CD": "魯巴加丹加文 (剛果 - 金夏沙)", "mn_Cyrl": "蒙古文 (西里爾語字母)", "mn_Cyrl_MN": "蒙古文 (西里爾語字母, 蒙古)", "ms_Latn": "馬來文 (拉丁字母)", "ms_Latn_BN": "馬來文 (拉丁字母, 汶萊)", "ms_Latn_MY": "馬來文 (拉丁字母, 馬來西亞)", "ms_Latn_SG": "馬來文 (拉丁字母, 新加坡)", "nb_SJ": "巴克摩挪威文 (斯瓦爾巴群島及揚馬延島)", "nl_AW": "荷蘭文 (阿魯巴)", "nl_SR": "荷蘭文 (蘇里南)", "om_ET": "奧羅莫文 (埃塞俄比亞)", "om_KE": "奧羅莫文 (肯雅)", "os_GE": "奧塞提文 (格魯吉亞)", "pt_ST": "葡萄牙文 (聖多美普林西比)", "rw_RW": "盧安達文 (盧旺達)", "sh_BA": "塞爾維亞克羅埃西亞文 (波斯尼亞和黑塞哥維那)", "sl_SI": "斯洛維尼亞文 (斯洛文尼亞)", "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": "史瓦希里文 (坦桑尼亞)", "ti_ER": "提格利尼亞文 (厄立特里亞)", "ti_ET": "提格利尼亞文 (埃塞俄比亞)", "to_TO": "東加文 (湯加)", "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": "中文 (繁體字, 台灣)" } } src/Symfony/Component/Intl/Resources/data/locales/zh_MO.json000066400000000000000000000000401266465517700244120ustar00rootroot00000000000000{ "%%ALIAS": "zh_Hant_MO" } src/Symfony/Component/Intl/Resources/data/locales/zh_SG.json000066400000000000000000000000401266465517700244100ustar00rootroot00000000000000{ "%%ALIAS": "zh_Hans_SG" } src/Symfony/Component/Intl/Resources/data/locales/zh_TW.json000066400000000000000000000000401266465517700244310ustar00rootroot00000000000000{ "%%ALIAS": "zh_Hant_TW" } src/Symfony/Component/Intl/Resources/data/locales/zu.json000066400000000000000000000564641266465517700240610ustar00rootroot00000000000000{ "Names": { "af": "isi-Afrikaans", "af_NA": "isi-Afrikaans (i-Namibia)", "af_ZA": "isi-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 (i-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 (i-Cyrillic)", "az_Cyrl_AZ": "isi-Azerbaijani (i-Cyrillic, i-Azerbaijan)", "az_Latn": "isi-Azerbaijani (i-Latin)", "az_Latn_AZ": "isi-Azerbaijani (i-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_Latn": "isi-Bambara (i-Latin)", "bm_Latn_ML": "isi-Bambara (i-Latin, i-Mali)", "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 (i-Cyrillic)", "bs_Cyrl_BA": "isi-Bosnian (i-Cyrillic, i-Bosnia ne-Herzegovina)", "bs_Latn": "isi-Bosnian (i-Latin)", "bs_Latn_BA": "isi-Bosnian (i-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)", "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_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 and Barbuda)", "en_AI": "i-English (i-Anguilla)", "en_AS": "i-English (i-American Samoa)", "en_AU": "i-English (i-Australia)", "en_BB": "i-English (i-Barbados)", "en_BE": "i-English (i-Belgium)", "en_BM": "i-English (i-Bermuda)", "en_BS": "i-English (i-Bahamas)", "en_BW": "i-English (i-Botswana)", "en_BZ": "i-English (i-Belize)", "en_CA": "i-English (i-Canada)", "en_CC": "i-English (i-Cocos (Keeling) Islands)", "en_CK": "i-English (i-Cook Islands)", "en_CM": "i-English (i-Cameroon)", "en_CX": "i-English (i-Christmas Island)", "en_DG": "i-English (i-Diego Garcia)", "en_DM": "i-English (i-Dominica)", "en_ER": "i-English (i-Eritrea)", "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_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 (i-Lesotho)", "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 (i-Malawi)", "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_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_SG": "i-English (i-Singapore)", "en_SH": "i-English (i-Saint Helena)", "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 and 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 (i-Zimbabwe)", "eo": "isi-Esperanto", "es": "isi-Spanish", "es_AR": "isi-Spanish (i-Argentina)", "es_BO": "isi-Spanish (i-Bolivia)", "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)", "fi": "isi-Finnish", "fi_FI": "isi-Finnish (i-Finland)", "fo": "isi-Faroese", "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 (isi-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 (i-Mali)", "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_Latn": "isi-Hausa (i-Latin)", "ha_Latn_GH": "isi-Hausa (i-Latin, i-Ghana)", "ha_Latn_NE": "isi-Hausa (i-Latin, i-Niger)", "ha_Latn_NG": "isi-Hausa (i-Latin, i-Nigeria)", "ha_NE": "isi-Hausa (i-Niger)", "ha_NG": "isi-Hausa (i-Nigeria)", "he": "isi-Hebrew", "he_IL": "isi-Hebrew (i-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_Cyrl": "isi-Kazakh (i-Cyrillic)", "kk_Cyrl_KZ": "isi-Kazakh (i-Cyrillic, i-Kazakhstan)", "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_Arab": "isi-Kashmiri (i-Arab)", "ks_Arab_IN": "isi-Kashmiri (i-Arab, i-India)", "ks_IN": "isi-Kashmiri (i-India)", "kw": "isi-Cornish", "kw_GB": "isi-Cornish (i-United Kingdom)", "ky": "isi-Kyrgyz", "ky_Cyrl": "isi-Kyrgyz (i-Cyrillic)", "ky_Cyrl_KG": "isi-Kyrgyz (i-Cyrillic, i-Kyrgyzstan)", "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_Cyrl": "isi-Mongolian (i-Cyrillic)", "mn_Cyrl_MN": "isi-Mongolian (i-Cyrillic, i-Mongolia)", "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_Latn": "isi-Malay (i-Latin)", "ms_Latn_BN": "isi-Malay (i-Latin, i-Brunei)", "ms_Latn_MY": "isi-Malay (i-Latin, i-Malaysia)", "ms_Latn_SG": "isi-Malay (i-Latin, i-Singapore)", "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 (i-Zimbabwe)", "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)", "om": "Isi-Oromo", "om_ET": "Isi-Oromo (i-Ethiopia)", "om_KE": "Isi-Oromo (i-Kenya)", "or": "isi-Oriya", "or_IN": "isi-Oriya (i-India)", "os": "isi-Ossetic", "os_GE": "isi-Ossetic (i-Georgia)", "os_RU": "isi-Ossetic (i-Russia)", "pa": "isi-Punjabi", "pa_Arab": "isi-Punjabi (i-Arab)", "pa_Arab_PK": "isi-Punjabi (i-Arab, i-Pakistan)", "pa_Guru": "isi-Punjabi (i-Gurmukhi)", "pa_Guru_IN": "isi-Punjabi (i-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_CV": "isi-Portuguese (i-Cape Verde)", "pt_GW": "isi-Portuguese (i-Guinea-Bissau)", "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)", "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": "isi-Shona", "sn_ZW": "isi-Shona (i-Zimbabwe)", "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 (i-Cyrillic)", "sr_Cyrl_BA": "isi-Serbian (i-Cyrillic, i-Bosnia ne-Herzegovina)", "sr_Cyrl_ME": "isi-Serbian (i-Cyrillic, i-Montenegro)", "sr_Cyrl_RS": "isi-Serbian (i-Cyrillic, i-Serbia)", "sr_Cyrl_XK": "isi-Serbian (i-Cyrillic, i-Kosovo)", "sr_Latn": "isi-Serbian (i-Latin)", "sr_Latn_BA": "isi-Serbian (i-Latin, i-Bosnia ne-Herzegovina)", "sr_Latn_ME": "isi-Serbian (i-Latin, i-Montenegro)", "sr_Latn_RS": "isi-Serbian (i-Latin, i-Serbia)", "sr_Latn_XK": "isi-Serbian (i-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": "isi-Swahili", "sw_KE": "isi-Swahili (i-Kenya)", "sw_TZ": "isi-Swahili (i-Tanzania)", "sw_UG": "isi-Swahili (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_Arab": "isi-Uighur (i-Arab)", "ug_Arab_CN": "isi-Uighur (i-Arab, i-China)", "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 (i-Arab)", "uz_Arab_AF": "isi-Uzbek (i-Arab, i-Afghanistan)", "uz_Cyrl": "isi-Uzbek (i-Cyrillic)", "uz_Cyrl_UZ": "isi-Uzbek (i-Cyrillic, i-Uzbekistan)", "uz_Latn": "isi-Uzbek (i-Latin)", "uz_Latn_UZ": "isi-Uzbek (i-Latin, i-Uzbekistan)", "uz_UZ": "isi-Uzbek (i-Uzbekistan)", "vi": "isi-Vietnamese", "vi_VN": "isi-Vietnamese (i-Vietnam)", "yi": "Isi-Yidish", "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 (i-Simplified)", "zh_Hans_CN": "isi-Chinese (i-Simplified, i-China)", "zh_Hans_HK": "isi-Chinese (i-Simplified, i-Hong Kong SAR China)", "zh_Hans_MO": "isi-Chinese (i-Simplified, i-Macau SAR China)", "zh_Hans_SG": "isi-Chinese (i-Simplified, 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)" } } src/Symfony/Component/Intl/Resources/data/regions/000077500000000000000000000000001266465517700225355ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/regions/af.json000066400000000000000000000160401266465517700240170ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Cocos- (Keeling) eilande", "CD": "Demokratiese Republiek van die Kongo", "CF": "Sentraal-Afrikaanse Republiek", "CG": "Republiek van die Kongo", "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": "Britse 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": "Sint Kitts en Nevis", "KP": "Noord-Korea", "KR": "Suid-Korea", "KW": "Koeweit", "KY": "Kaaimanseilande", "KZ": "Kazakstan", "LA": "Laos", "LB": "Libanon", "LC": "Sint 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": "Sint Martin", "MG": "Madagaskar", "MH": "Marshalleilande", "MK": "Macedonië", "ML": "Mali", "MM": "Mianmar (Birma)", "MN": "Mongolië", "MO": "Macau SAS Sjina", "MP": "Noordelike Mariana-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": "Sint 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": "Solomoneilande", "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": "Sao Tome en Principe", "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", "US": "Verenigde State van Amerika", "UY": "Uruguay", "UZ": "Oesbekistan", "VA": "Vatikaanstad", "VC": "Sint 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" } } src/Symfony/Component/Intl/Resources/data/regions/ak.json000066400000000000000000000140431266465517700240250ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/am.json000066400000000000000000000215201266465517700240250ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ማካኡ ልዩ የአስተዳደር ክልል ቻይና", "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": "ዚምቧቤ" } } src/Symfony/Component/Intl/Resources/data/regions/ar.json000066400000000000000000000216641266465517700240430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "زيمبابوي" } } src/Symfony/Component/Intl/Resources/data/regions/as.json000066400000000000000000000014511266465517700240340ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "AQ": "এন্টাৰ্টিকা", "BR": "ব্ৰাজিল", "CN": "চীন", "DE": "জাৰ্মানি", "FR": "ফ্ৰান্স", "GB": "সংযুক্ত ৰাজ্য", "GS": "দক্ষিণ জৰ্জিয়া আৰু দক্ষিণ চেণ্ডৱিচ্‌ দ্বীপ", "IN": "ভাৰত", "IO": "ব্ৰিটিশ্ব ইণ্ডিয়ান মহাসাগৰৰ অঞ্চল", "IT": "ইটালি", "JP": "জাপান", "RU": "ৰুচ", "TF": "দক্ষিণ ফ্ৰান্সৰ অঞ্চল", "US": "যুক্তৰাষ্ট্ৰ" } } src/Symfony/Component/Intl/Resources/data/regions/az.json000066400000000000000000000162121266465517700240440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Yüksəliş Adası", "AD": "Andorra", "AE": "Birləşmiş Ərəb Əmirlikləri", "AF": "Əfqanıstan", "AG": "Antiqua və Barbuda", "AI": "Angila", "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ə Hersoqovina", "BB": "Barbados", "BD": "Banqladeş", "BE": "Belçika", "BF": "Burkina Faso", "BG": "Bolqariya", "BH": "Bəhreyn", "BI": "Burundi", "BJ": "Benin", "BL": "San Bartolomey", "BM": "Bermuda", "BN": "Bruney", "BO": "Boliviya", "BQ": "Karib Niderlandı", "BR": "Braziliya", "BS": "Baham Adaları", "BT": "Butan", "BW": "Botsvana", "BY": "Belarus", "BZ": "Beliz", "CA": "Kanada", "CC": "Kokos Adaları", "CD": "Konqo - Kinşasa", "CF": "Mərkəzi Afrika Respublikası", "CG": "Konqo - Brazzavil", "CH": "İsveçrə", "CI": "Fil Dişi Sahili", "CK": "Kuk Adaları", "CL": "Çili", "CM": "Kamerun", "CN": "Çin", "CO": "Kolumbiya", "CR": "Kosta Rika", "CU": "Kuba", "CV": "Kape Verde", "CW": "Kurasao", "CX": "Milad Adası", "CY": "Kipr", "CZ": "Çexiya", "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 Sahara", "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": "Fransız Qviyanası", "GG": "Gernsey", "GH": "Qana", "GI": "Gibraltar", "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": "Qviyana", "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": "Britaniya 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": "San Kits və Nevis", "KP": "Şimali Koreya", "KR": "Cənubi Koreya", "KW": "Küveyt", "KY": "Kayman Adaları", "KZ": "Qazaxıstan", "LA": "Laos", "LB": "Livan", "LC": "San Lüsiya", "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": "San Martin", "MG": "Madaqaskar", "MH": "Marşal Adaları", "MK": "Makedoniya", "ML": "Mali", "MM": "Myanma", "MN": "Monqoliya", "MO": "Makao Xüsusi İnzibati Ərazi Çin", "MP": "Şimali Mariana 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": "Fransız Polineziyası", "PG": "Papua Yeni Qvineya", "PH": "Filippin", "PK": "Pakistan", "PL": "Polşa", "PM": "San Pier və Mikelon", "PN": "Pitkern Adaları", "PR": "Puerto Riko", "PS": "Fələstin Əraziləri", "PT": "Portuqal", "PW": "Palau", "PY": "Paraqvay", "QA": "Qatar", "RE": "Reunion", "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": "Siera Leon", "SM": "San Marino", "SN": "Seneqal", "SO": "Somali", "SR": "Surinam", "SS": "Cənubi Sudan", "ST": "Sao Tome və Prinsip", "SV": "Salvador", "SX": "Sint Maarten", "SY": "Suriya", "SZ": "Svazilend", "TA": "Tristan da Kunya", "TC": "Turks və Kaikos Adaları", "TD": "Çad", "TF": "Fransa Cənub Əraziləri", "TG": "Toqo", "TH": "Tayland", "TJ": "Tacikistan", "TK": "Tokelau", "TL": "Şərqi Timor", "TM": "Türkmənistan", "TN": "Tunis", "TO": "Tonqa", "TR": "Türkiya", "TT": "Trinidad və Tobaqo", "TV": "Tuvalu", "TW": "Tayvan", "TZ": "Tanzaniya", "UA": "Ukrayna", "UG": "Uqanda", "UM": "Birləşmiş Ştatlar Uzaq Adalar", "US": "Amerika Birləşmiş Ştatları", "UY": "Uruqvay", "UZ": "Özbəkistan", "VA": "Vatikan", "VC": "San Vinsent və Qrenada", "VE": "Venesuela", "VG": "Britaniya Vircin Adaları", "VI": "ABŞ Vircin Adaları", "VN": "Vyetnam", "VU": "Vanuatu", "WF": "Uolis və Futuna", "WS": "Samoa", "XK": "Kosovo", "YE": "Yəmən", "YT": "Mayot", "ZA": "Cənub Afrika", "ZM": "Zambiya", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/az_Cyrl.json000066400000000000000000000006351266465517700250370ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AZ": "Азәрбајҹан", "BR": "Бразилија", "CN": "Чин", "DE": "Алманија", "FR": "Франса", "IN": "Һиндистан", "IT": "Италија", "JP": "Јапонија", "RU": "Русија", "US": "Америка Бирләшмиш Штатлары" } } src/Symfony/Component/Intl/Resources/data/regions/be.json000066400000000000000000000221111266465517700240130ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Каба-Вердэ", "CW": "Востраў Кюрасаа", "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": "Чарнагорыя", "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": "Уганда", "US": "Злучаныя Штаты Амерыкі", "UY": "Уругвай", "UZ": "Узбекістан", "VA": "Ватыкан", "VC": "Сент-Вінсент і Грэнадзіны", "VE": "Венесуэла", "VG": "Брытанскія Віргінскія астравы", "VI": "Амерыканскія Віргінскія астравы", "VN": "В’етнам", "VU": "Вануату", "WF": "Уоліс і Футуна", "WS": "Самоа", "YE": "Емен", "YT": "Востраў Маёта", "ZA": "Паўднёва-Афрыканская Рэспубліка", "ZM": "Замбія", "ZW": "Зімбабвэ" } } src/Symfony/Component/Intl/Resources/data/regions/bg.json000066400000000000000000000224161266465517700240250ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/bm.json000066400000000000000000000140351266465517700240310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/bn.json000066400000000000000000000307041266465517700240330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "জিম্বাবোয়ে" } } src/Symfony/Component/Intl/Resources/data/regions/bn_IN.json000066400000000000000000000002671266465517700244220ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GD": "গ্রেনেডা", "GT": "গোয়াতেমালা", "JM": "জামাইকা" } } src/Symfony/Component/Intl/Resources/data/regions/bo.json000066400000000000000000000006551266465517700240360ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "CN": "རྒྱ་ནག", "DE": "འཇར་མན་", "GB": "དབྱིན་ཇི་", "IN": "རྒྱ་གར་", "IT": "ཨི་ཀྲར་ལི་", "JP": "རི་པིན་", "NP": "བར་ཡུལ་", "RU": "ཨུ་རུ་སུ་", "US": "ཨ་མེ་རི་ཀ།" } } src/Symfony/Component/Intl/Resources/data/regions/bo_IN.json000066400000000000000000000000571266465517700244200ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": [] } src/Symfony/Component/Intl/Resources/data/regions/br.json000066400000000000000000000156341266465517700240440ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Nederlandat Karib", "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": "Reünion", "RO": "Roumania", "RS": "Serbia", "RU": "Rusia", "RW": "Rwanda", "SA": "Arabia Saoudat", "SB": "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" } } src/Symfony/Component/Intl/Resources/data/regions/bs.json000066400000000000000000000160261266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Ostrvo Asension", "AD": "Andora", "AE": "Ujedinjeni Arapski Emirati", "AF": "Afganistan", "AG": "Antigva i Barbuda", "AI": "Angvila", "AL": "Albanija", "AM": "Jermenija", "AO": "Angola", "AQ": "Antarktika", "AR": "Argentina", "AS": "Američka Samoa", "AT": "Austrija", "AU": "Australija", "AW": "Aruba", "AX": "Alandska 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": "Sv. 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": "Kokos (Keling) 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", "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": "Gvadelupe", "GQ": "Ekvatorijalna Gvineja", "GR": "Grčka", "GS": "Južna Džordžija i Južna Sendvič Ostrva", "GT": "Gvatemala", "GU": "Guam", "GW": "Gvineja-Bisao", "GY": "Gvajana", "HK": "Hong Kong (S. A. R. 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 Territorija u Indijskom Okeanu", "IQ": "Irak", "IR": "Iran", "IS": "Island", "IT": "Italija", "JE": "Džersi", "JM": "Jamajka", "JO": "Jordan", "JP": "Japan", "KE": "Kenija", "KG": "Kirgizstan", "KH": "Kambodža", "KI": "Kiribati", "KM": "Komorska Ostrva", "KN": "Sent Kits i Nevis", "KP": "Sjeverna Koreja", "KR": "Južna Koreja", "KW": "Kuvajt", "KY": "Kajmanska Ostrva", "KZ": "Kazahstan", "LA": "Laos", "LB": "Liban", "LC": "Sent 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": "Sv. Martin", "MG": "Madagaskar", "MH": "Maršalska Ostrva", "MK": "Makedonija", "ML": "Mali", "MM": "Mijanmar", "MN": "Mongolija", "MO": "Makao (S. A. R. Kina)", "MP": "Sjeverna Marijanska Ostrva", "MQ": "Martinik", "MR": "Mauritanija", "MS": "Monserat", "MT": "Malta", "MU": "Mauricius", "MV": "Maldivi", "MW": "Malavi", "MX": "Meksiko", "MY": "Malezija", "MZ": "Mozambik", "NA": "Namibija", "NC": "Nova Kaledonija", "NE": "Niger", "NF": "Norfolk Ostrvo", "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": "Porto Riko", "PS": "Palestinska Teritorija", "PT": "Portugal", "PW": "Palau", "PY": "Paragvaj", "QA": "Katar", "RE": "Rejunion", "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 Janmajen Ostrva", "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": "Turks i Kajkos Ostrva", "TD": "Čad", "TF": "Francuske Južne Teritorije", "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": "Manja Udaljena Ostrva SAD", "US": "Sjedinjene Američke Države", "UY": "Urugvaj", "UZ": "Uzbekistan", "VA": "Vatikan", "VC": "Sent Vinsent i Grenadini", "VE": "Venecuela", "VG": "Britanska Djevičanska Ostrva", "VI": "Djevičanska Ostrva SAD", "VN": "Vijetnam", "VU": "Vanuatu", "WF": "Valis i Futuna Ostrva", "WS": "Samoa", "XK": "Kosovo", "YE": "Jemen", "YT": "Majote", "ZA": "Južnoafrička Republika", "ZM": "Zambija", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/bs_Cyrl.json000066400000000000000000000222001266465517700250210ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/ca.json000066400000000000000000000160741266465517700240230ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Bielorússia", "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": "Palestina", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/cs.json000066400000000000000000000162001266465517700240340ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Velká Británie", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/cy.json000066400000000000000000000161001266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.7.80", "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": "Føroyar", "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": "Pilipinas", "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": "Sénégal", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/da.json000066400000000000000000000157171266465517700240270ustar00rootroot00000000000000{ "Version": "2.1.9.62", "Names": { "AC": "Ascensionøen", "AD": "Andorra", "AE": "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": "Ålandsøerne", "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": "Nederlandske antiller", "BR": "Brasilien", "BS": "Bahamas", "BT": "Bhutan", "BW": "Botswana", "BY": "Hviderusland", "BZ": "Belize", "CA": "Canada", "CC": "Cocosøerne", "CD": "Congo-Kinshasa", "CF": "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 South Sandwich Islands", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea-Bissau", "GY": "Guyana", "HK": "Hongkong SAR", "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": "Macao SAR", "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 Caledonien", "NE": "Niger", "NF": "Norfolkøen", "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": "Sao Tome og Principe", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/de.json000066400000000000000000000161741266465517700240310ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Åland-Inseln", "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": "Karibische Niederlande", "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": "Kap 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": "Demokratische Volksrepublik Korea", "KR": "Republik Korea", "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": "Russische Föderation", "RW": "Ruanda", "SA": "Saudi-Arabien", "SB": "Salomonen", "SC": "Seychellen", "SD": "Sudan", "SE": "Schweden", "SG": "Singapur", "SH": "St. Helena", "SI": "Slowenien", "SJ": "Svalbard und Jan Mayen", "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": "Timor-Leste", "TM": "Turkmenistan", "TN": "Tunesien", "TO": "Tonga", "TR": "Türkei", "TT": "Trinidad und Tobago", "TV": "Tuvalu", "TW": "Taiwan", "TZ": "Tansania", "UA": "Ukraine", "UG": "Uganda", "UM": "Amerikanisch-Ozeanien", "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" } } src/Symfony/Component/Intl/Resources/data/regions/de_CH.json000066400000000000000000000006211266465517700243710ustar00rootroot00000000000000{ "Version": "2.1.8.21", "Names": { "BD": "Bangladesh", "BN": "Brunei", "BW": "Botswana", "BY": "Weissrussland", "CV": "Kapverden", "DJ": "Djibouti", "GB": "Grossbritannien", "MH": "Marshall-Inseln", "RW": "Rwanda", "SB": "Salomon-Inseln", "ST": "Sao Tomé und Principe", "ZW": "Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/dz.json000066400000000000000000000324051266465517700240510ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ཛིམ་བྷབ་ཝེ" } } src/Symfony/Component/Intl/Resources/data/regions/ee.json000066400000000000000000000210071266465517700240210ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Kanada 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": "Spania nutome", "ET": "Etiopia nutome", "FI": "Finland nutome", "FJ": "Fidzi nutome", "FK": "Falkland ƒudomekpowo nutome", "FM": "Mikronesia nutome", "FO": "Faroe ƒudomekpowo nutome", "FR": "Frans 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": "Grisi 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": "Meksico 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": "Nedalands 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": "Tailand 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 Afrika nutome", "ZM": "Zambia nutome", "ZW": "Zimbabwe nutome" } } src/Symfony/Component/Intl/Resources/data/regions/el.json000066400000000000000000000233271266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Ζιμπάμπουε" } } src/Symfony/Component/Intl/Resources/data/regions/en.json000066400000000000000000000156411266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.87", "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", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/en_AU.json000066400000000000000000000003201266465517700244120ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GS": "South Georgia and the South Sandwich Islands", "UM": "U.S. Minor Outlying Islands", "VC": "Saint Vincent and the Grenadines" } } src/Symfony/Component/Intl/Resources/data/regions/en_GB.json000066400000000000000000000010651266465517700244040ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AG": "Antigua and Barbuda", "BA": "Bosnia and Herzegovina", "BL": "Saint Barthélemy", "EA": "Ceuta and Melilla", "KN": "Saint Kitts and Nevis", "LC": "Saint Lucia", "MF": "Saint Martin", "PM": "Saint Pierre and Miquelon", "SH": "Saint Helena", "SJ": "Svalbard and Jan Mayen", "ST": "São Tomé and Príncipe", "TC": "Turks and Caicos Islands", "TT": "Trinidad and Tobago", "WF": "Wallis and Futuna" } } src/Symfony/Component/Intl/Resources/data/regions/eo.json000066400000000000000000000137241266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.6.76", "Names": { "AD": "Andoro", "AE": "Unuiĝintaj Arabaj Emirlandos", "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" } } src/Symfony/Component/Intl/Resources/data/regions/es.json000066400000000000000000000160561266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Costa de Marfil", "CK": "Islas Cook", "CL": "Chile", "CM": "Camerún", "CN": "China", "CO": "Colombia", "CR": "Costa Rica", "CU": "Cuba", "CV": "Cabo Verde", "CW": "Curazao", "CX": "Isla Christmas", "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": "islas Canarias", "ID": "Indonesia", "IE": "Irlanda", "IL": "Israel", "IM": "Isla de Man", "IN": "India", "IO": "Territorio Británico del Océano Índico", "IQ": "Iraq", "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": "Isla 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": "Palau", "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 da Cunha", "TC": "Islas Turcas y Caicos", "TD": "Chad", "TF": "Territorios Australes Franceses", "TG": "Togo", "TH": "Tailandia", "TJ": "Tayikistán", "TK": "Tokelau", "TL": "Timor Oriental", "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" } } src/Symfony/Component/Intl/Resources/data/regions/es_419.json000066400000000000000000000002461266465517700244360ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AC": "Isla Ascensión", "BA": "Bosnia y Herzegovina", "IQ": "Irak", "NU": "Niue" } } src/Symfony/Component/Intl/Resources/data/regions/es_CL.json000066400000000000000000000001261266465517700244140ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "EH": "Sahara Occidental" } } src/Symfony/Component/Intl/Resources/data/regions/es_MX.json000066400000000000000000000013571266465517700244510ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BA": "Bosnia-Herzegovina", "BD": "Bangladesh", "CC": "Islas Cocos (Keeling)", "CG": "Congo Brazzaville", "CX": "Isla de Navidad", "GG": "Guernsey", "GS": "Islas Georgias del Sur y Sandwich del Sur", "GW": "Guinea-Bissau", "HK": "Región Administrativa Especial de Hong Kong de la República Popular China", "IC": "Islas Canarias", "MO": "Región Administrativa Especial de Macao de la República Popular China", "PW": "Palaos", "QA": "Qatar", "TA": "Tristán de Acuña", "UM": "Islas UltramarinasMenores de Estados Unidos", "VI": "Islas Vírgenes de los Estados Unidos" } } src/Symfony/Component/Intl/Resources/data/regions/et.json000066400000000000000000000157471266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Ascensioni saar", "AD": "Andorra", "AE": "Araabia Ühendemiraadid", "AF": "Afganistan", "AG": "Antigua ja Barbuda", "AI": "Anguilla", "AL": "Albaania", "AM": "Armeenia", "AO": "Angola", "AQ": "Antarktis", "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-Brazzaville", "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 Liiduriigid", "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": "Hongkong - Hiina 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": "Kenya", "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 - Hiina 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/eu.json000066400000000000000000000161031266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Ascension uhartea", "AD": "Andorra", "AE": "Arabiar Emirrerri 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": "San Bartolome", "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 (Keeling) 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": "Guernsey", "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": "Saint Martin", "MG": "Madagaskar", "MH": "Marshall uharteak", "MK": "Mazedonia", "ML": "Mali", "MM": "Myanmar", "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": "Saint 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 Caicos uharteak", "TD": "Txad", "TF": "Hegoaldeko lurralde frantsesak", "TG": "Togo", "TH": "Thailandia", "TJ": "Tadjikistan", "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" } } src/Symfony/Component/Intl/Resources/data/regions/fa.json000066400000000000000000000212301266465517700240140ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "زیمبابوه" } } src/Symfony/Component/Intl/Resources/data/regions/fa_AF.json000066400000000000000000000060501266465517700243650ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AD": "اندورا", "AG": "انتیگوا و باربودا", "AL": "البانیا", "AO": "انگولا", "AR": "ارجنتاین", "AU": "آسترالیا", "BA": "بوسنیا و هرزه‌گوینا", "BD": "بنگله‌دیش", "BE": "بلجیم", "BG": "بلغاریا", "BN": "برونی", "BO": "بولیویا", "BR": "برازیل", "BS": "بهاماس", "BY": "روسیهٔ سفید", "CD": "جمهوری دموکراتیک کانگو", "CF": "افریقای مرکزی", "CG": "کانگو", "CH": "سویس", "CL": "چلی", "CO": "کولمبیا", "CR": "کاستریکا", "CU": "کیوبا", "DK": "دنمارک", "EE": "استونیا", "ER": "اریتریا", "ES": "هسپانیه", "ET": "ایتوپیا", "FI": "فنلند", "FM": "میکرونزیا", "GD": "گرینادا", "GN": "گینیا", "GQ": "گینیا استوایی", "GT": "گواتیمالا", "GW": "گینیا بیسائو", "GY": "گیانا", "HN": "هاندوراس", "HR": "کروشیا", "HT": "هایتی", "ID": "اندونیزیا", "IE": "آیرلند", "IS": "آیسلند", "JP": "جاپان", "KE": "کینیا", "KG": "قرغزستان", "KH": "کمپوچیا", "KN": "سنت کیتس و نیویس", "KP": "کوریای شمالی", "KR": "کوریای جنوبی", "LK": "سریلانکا", "LS": "لیسوتو", "LT": "لتوانیا", "LV": "لاتویا", "LY": "لیبیا", "MG": "مادغاسکر", "MN": "منگولیا", "MR": "موریتانیا", "MT": "مالتا", "MX": "مکسیکو", "MY": "مالیزیا", "MZ": "موزمبیق", "NG": "نیجریا", "NI": "نیکاراگوا", "NL": "هالند", "NO": "ناروی", "NP": "نیپال", "NZ": "زیلاند جدید", "PA": "پانامه", "PE": "پیرو", "PG": "پاپوا نیو گینیا", "PL": "پولند", "PT": "پرتگال", "PY": "پاراگوای", "RO": "رومانیا", "RW": "روآندا", "SB": "جزایر سلومون", "SE": "سویدن", "SG": "سینگاپور", "SI": "سلونیا", "SK": "سلواکیا", "SL": "سیرالیون", "SN": "سینیگال", "SO": "سومالیه", "ST": "سائو تومه و پرینسیپ", "SV": "السلوادور", "TJ": "تاجکستان", "UA": "اکراین", "UY": "یوروگوای", "VC": "سنت وینسنت و گرینادین", "VE": "ونزویلا", "ZW": "زیمبابوی" } } src/Symfony/Component/Intl/Resources/data/regions/ff.json000066400000000000000000000141251266465517700240260ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/fi.json000066400000000000000000000157761266465517700240460ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Yhdistynyt kuningaskunta", "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": "Surinam", "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 ulkopuoliset 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/fo.json000066400000000000000000000156121266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "AC": "Ascensionoyggjin", "AD": "Andorra", "AE": "Sameindu Emirríkini", "AF": "Afganistan", "AG": "Antigua og Barbuda", "AI": "Anguilla", "AL": "Albania", "AM": "Armenia", "AO": "Angola", "AQ": "Antarktis", "AR": "Argentina", "AS": "Amerikanska Sámoa", "AT": "Eysturríki", "AU": "Avstralia", "AW": "Aruba", "AX": "Áland", "AZ": "Aserbajdsjan", "BA": "Bosnia-Hersegovina", "BB": "Barbados", "BD": "Bangladesj", "BE": "Belgia", "BF": "Burkina Faso", "BG": "Bulgaria", "BH": "Bahrain", "BI": "Burundi", "BJ": "Benin", "BL": "Saint Barthélemy", "BM": "Bermuda", "BN": "Brunei", "BO": "Bolivia", "BQ": "Niðurlonds Karibia", "BR": "Brasilia", "BS": "Bahamas", "BT": "Butan", "BW": "Botsvana", "BY": "Hvítarussland", "BZ": "Belis", "CA": "Kanada", "CC": "Kokosoyggjarnar", "CD": "Kongo-Kinshasa", "CF": "Miðafrikalýðveldið", "CG": "Kongo", "CH": "Sveis", "CI": "Fílabeinsstrondin", "CK": "Cooksoyggjarnar", "CL": "Kili", "CM": "Kamerun", "CN": "Kina", "CO": "Kolombia", "CR": "Kosta Rika", "CU": "Kuba", "CV": "Grønhøvdaoyggjarnar", "CW": "Curaçao", "CX": "Jólaoyggjin", "CY": "Kýpros", "CZ": "Kekkia", "DE": "Týskland", "DG": "Diego Garcia", "DJ": "Djibouti", "DK": "Danmørk", "DM": "Dominika", "DO": "Domingo lýð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": "Falklandsoyggjarnar", "FM": "Mikronesia", "FO": "Føroyar", "FR": "Frakland", "GA": "Gabon", "GB": "Stóra Bretland", "GD": "Grenada", "GE": "Georgia", "GF": "Fransk Gujana", "GG": "Guernsey", "GH": "Ghana", "GI": "Gibraltar", "GL": "Grønland", "GM": "Gambia", "GN": "Guinea", "GP": "Guadeloupe", "GQ": "Ekvator Guinea", "GR": "Grikkaland", "GS": "Suðurgeorgia", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea Bissau", "GY": "Gujana", "HK": "Hongkong", "HN": "Honduras", "HR": "Kroatia", "HT": "Haiti", "HU": "Ungarn", "IC": "Kanaríoyggjarnar", "ID": "Indonesia", "IE": "Írland", "IL": "Ísrael", "IM": "Mann", "IN": "India", "IO": "Bretsku Indiahavsoyggjarnar", "IQ": "Irak", "IR": "Iran", "IS": "Ísland", "IT": "Italia", "JE": "Jersey", "JM": "Jameika", "JO": "Jordania", "JP": "Japan", "KE": "Kenja", "KG": "Kirgisia", "KH": "Kambodja", "KI": "Kiribati", "KM": "Komorooyggjarnar", "KN": "Saint Kitts og Nevis", "KP": "Norður-Korea", "KR": "Suður-Korea", "KW": "Kuvait", "KY": "Caymanoyggjarnar", "KZ": "Kasakstan", "LA": "Laos", "LB": "Libanon", "LC": "Saint Lusia", "LI": "Liktenstein", "LK": "Sri Lanka", "LR": "Liberia", "LS": "Lesoto", "LT": "Litava", "LU": "Luksemborg", "LV": "Lettland", "LY": "Libya", "MA": "Marokko", "MC": "Monako", "MD": "Moldova", "ME": "Montenegro", "MF": "Fransk Saint Martin", "MG": "Madagaskar", "MH": "Marshalloyggjarnar", "MK": "Makedónia", "ML": "Mali", "MM": "Burma", "MN": "Mongolia", "MO": "Makao", "MP": "Norðurmarianoyggjarnar", "MQ": "Martinique", "MR": "Móritania", "MS": "Montserrat", "MT": "Malta", "MU": "Móritius", "MV": "Maldivuoyggjarnar", "MW": "Malavi", "MX": "Meksiko", "MY": "Maleisia", "MZ": "Mosambik", "NA": "Namibia", "NC": "Ný-Kaledonia", "NE": "Niger", "NF": "Norfolkoyggjin", "NG": "Nigeria", "NI": "Nikaragua", "NL": "Niðurlond", "NO": "Noreg", "NP": "Nepal", "NR": "Nauru", "NU": "Niue", "NZ": "Ný Sæland", "OM": "Oman", "PA": "Panama", "PE": "Perú", "PF": "Franska Polynesia", "PG": "Papua Nýguinea", "PH": "Filipsoyggjar", "PK": "Pakistan", "PL": "Pólland", "PM": "Saint Pierre og Miquelon", "PN": "Pitcairn", "PR": "Puerto Rico", "PS": "Palestinskt territorium", "PT": "Portugal", "PW": "Palau", "PY": "Paraguei", "QA": "Katar", "RE": "Réunion", "RO": "Rumenia", "RS": "Serbia", "RU": "Russland", "RW": "Ruanda", "SA": "Saudi-Arábia", "SB": "Sálomonoyggjarnar", "SC": "Seyskelloyggjarnar", "SD": "Norðursudan", "SE": "Svøríki", "SG": "Singapor", "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": "Suðursudan", "ST": "Sao Tome og Prinsipi", "SV": "El Salvador", "SX": "Niðurlonds Saint Martin", "SY": "Syria", "SZ": "Svasiland", "TA": "Tristan da Cunha", "TC": "Turks- og Caicosoyggjarnar", "TD": "Kjad", "TG": "Togo", "TH": "Teiland", "TJ": "Tadsjikistan", "TK": "Tokelau", "TL": "Eystur-Timor", "TM": "Turkmenistan", "TN": "Tunesia", "TO": "Tonga", "TR": "Turkaland", "TT": "Trinidad og Tobago", "TV": "Tuvalu", "TW": "Teivan", "TZ": "Tansania", "UA": "Ukreina", "UG": "Uganda", "US": "Sambandsríki Amerika", "UY": "Uruguei", "UZ": "Usbekistan", "VA": "Vatikan", "VC": "Saint Vinsent og Grenadinoyggjar", "VE": "Venesuela", "VG": "Stóra Bretlands Jómfrúoyggjarnar", "VI": "Sambandsríki Amerikas Jómfrúoyggjarnar", "VN": "Vietnam", "VU": "Vanuatu", "WF": "Wallis og Futuna", "WS": "Sámoa", "XK": "Kosovo", "YE": "Jemen", "YT": "Mayotte", "ZA": "Suðurafrikalýðveldið", "ZM": "Sambia", "ZW": "Simbabvi" } } src/Symfony/Component/Intl/Resources/data/regions/fr.json000066400000000000000000000163001266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Îles Géorgie du Sud et 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 (partie française)", "MG": "Madagascar", "MH": "Îles Marshall", "MK": "Macédoine", "ML": "Mali", "MM": "Myanmar", "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": "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": "Tokelau", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/fr_CA.json000066400000000000000000000005521266465517700244040ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BY": "Bélarus", "CC": "Îles Cocos (Keeling)", "FM": "Micronésie", "GS": "Géorgie du Sud et les îles Sandwich du Sud", "MF": "Saint-Martin (France)", "SV": "Salvador", "SX": "Saint-Martin (Pays-Bas)", "VC": "Saint-Vincent-et-les Grenadines" } } src/Symfony/Component/Intl/Resources/data/regions/fy.json000066400000000000000000000160701266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ga.json000066400000000000000000000174301266465517700240240ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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.", "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" } } src/Symfony/Component/Intl/Resources/data/regions/gd.json000066400000000000000000000173751266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Eilean na Deasgabhalach", "AD": "Andorra", "AE": "Na h-Iomaratan Arabach Aonaichte", "AF": "Afghanastàn", "AG": "Aintìoga is Barbuda", "AI": "Anguilla", "AL": "Albàinia", "AM": "Airmeinia", "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 Cocos (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àinn", "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òrsea 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 a Deas", "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 (Burma)", "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": "An 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": "Eilean 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 Stàitean Aonaichte", "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 Aimeireagach na Maighdinn", "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" } } src/Symfony/Component/Intl/Resources/data/regions/gl.json000066400000000000000000000160131266465517700240330ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 e Hercegovina", "BB": "Barbados", "BD": "Bangladesh", "BE": "Bélxica", "BF": "Burkina Faso", "BG": "Bulgaria", "BH": "Bahrein", "BI": "Burundi", "BJ": "Benin", "BL": "San Bartolomé", "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 Africana Central", "CG": "Congo", "CH": "Suíza", "CI": "Costa de Marfil", "CK": "Illas Cook", "CL": "Chile", "CM": "Camerún", "CN": "China", "CO": "Colombia", "CR": "Costa Rica", "CU": "Cuba", "CV": "Cabo Verde", "CW": "Curaçao", "CX": "Illa Christmas", "CY": "Chipre", "CZ": "República Checa", "DE": "Alemaña", "DG": "Diego García", "DJ": "Xibuti", "DK": "Dinamarca", "DM": "Dominica", "DO": "República Dominicana", "DZ": "Arxelia", "EA": "Ceuta e Melilla", "EC": "Ecuador", "EE": "Estonia", "EG": "Exipto", "EH": "Sahara Occidental", "ER": "Eritrea", "ES": "España", "ET": "Etiopía", "FI": "Finlandia", "FJ": "Fixi", "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": "Gana", "GI": "Xibraltar", "GL": "Grenlandia", "GM": "Gambia", "GN": "Guinea", "GP": "Guadalupe", "GQ": "Guinea Ecuatorial", "GR": "Grecia", "GS": "Xeorxia do Sur e Illas Sandwich", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea-Bissau", "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": "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": "Xapón", "KE": "Quenia", "KG": "Quirguicistán", "KH": "Cambodia", "KI": "Kiribati", "KM": "Comores", "KN": "San Cristovo e Nevis", "KP": "Corea do Norte", "KR": "Corea do Sur", "KW": "Kuwait", "KY": "Illas Caimán", "KZ": "Kazakhstan", "LA": "Laos", "LB": "Líbano", "LC": "Santa Lucía", "LI": "Liechtenstein", "LK": "Sri Lanka", "LR": "Liberia", "LS": "Lesotho", "LT": "Lituania", "LU": "Luxemburgo", "LV": "Letonia", "LY": "Libia", "MA": "Marrocos", "MC": "Mónaco", "MD": "Moldova", "ME": "Montenegro", "MF": "San Martiño", "MG": "Madagascar", "MH": "Illas Marshall", "MK": "Macedonia", "ML": "Mali", "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 Celandia", "OM": "Omán", "PA": "Panamá", "PE": "Perú", "PF": "Polinesia Francesa", "PG": "Papúa Nova Guinea", "PH": "Filipinas", "PK": "Paquistán", "PL": "Polonia", "PM": "San Pedro e Miguelón", "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": "Surinam", "SS": "Sudán do sur", "ST": "San Tomé e Príncipe", "SV": "El Salvador", "SX": "Sint Maarten", "SY": "Siria", "SZ": "Suacilandia", "TA": "Tristán da Cunha", "TC": "Illas Turks e Caicos", "TD": "Chad", "TF": "Territorios Franceses do Sul", "TG": "Togo", "TH": "Tailandia", "TJ": "Taxiquistán", "TK": "Tokelau", "TL": "Timor Leste", "TM": "Turkmenistán", "TN": "Tunisia", "TO": "Tonga", "TR": "Turquía", "TT": "Trindade e Tobago", "TV": "Tuvalu", "TW": "Taiwán", "TZ": "Tanzania", "UA": "Ucraína", "UG": "Uganda", "UM": "Illas Menores Distantes dos EUA.", "US": "Estados Unidos de América", "UY": "Uruguai", "UZ": "Uzbekistán", "VA": "Cidade do Vaticano", "VC": "San Vicente e 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": "Sudáfrica", "ZM": "Zambia", "ZW": "Cimbabue" } } src/Symfony/Component/Intl/Resources/data/regions/gu.json000066400000000000000000000274411266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "સંયુક્ત રાજ્ય આઉટલાઇંગ આયલેન્ડ્સ", "US": "સંયુકત રાજ્ય અમેરિકા", "UY": "ઉરુગ્વે", "UZ": "ઉઝ્બેકિસ્તાન", "VA": "વેટિકન સિટી", "VC": "સેન્ટ વિન્સેન્ટ એન્ડ ગ્રેનેડીન્સ", "VE": "વેનેઝુએલા", "VG": "બ્રિટિશ વર્જિન આઇલેન્ડ્સ", "VI": "યુ.એસ વર્જિન આઇલેન્ડ્સ", "VN": "વિયેતનામ", "VU": "વાનુઆતુ", "WF": "વૉલિસ એંડ ફ્યુચુના", "WS": "સમોઆ", "XK": "કોસોવો", "YE": "યેમેન", "YT": "મેયોટ", "ZA": "દક્ષિણ આફ્રિકા", "ZM": "ઝામ્બિયા", "ZW": "ઝિમ્બાબ્વે" } } src/Symfony/Component/Intl/Resources/data/regions/gv.json000066400000000000000000000001611266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GB": "Rywvaneth Unys", "IM": "Ellan Vannin" } } src/Symfony/Component/Intl/Resources/data/regions/ha.json000066400000000000000000000140441266465517700240230ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/he.json000066400000000000000000000212271266465517700240300ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "זימבאבווה" } } src/Symfony/Component/Intl/Resources/data/regions/hi.json000066400000000000000000000273361266465517700240430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ज़िम्बाब्वे" } } src/Symfony/Component/Intl/Resources/data/regions/hr.json000066400000000000000000000160561266465517700240510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Otok Ascension", "AD": "Andora", "AE": "Ujedinjeni Arapski Emirati", "AF": "Afganistan", "AG": "Antigua 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": "Otoci Aland", "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": "Sveti Bartolomej", "BM": "Bermuda", "BN": "Brunej", "BO": "Bolivija", "BQ": "Karipski otoci Nizozemske", "BR": "Brazil", "BS": "Bahami", "BT": "Butan", "BW": "Bocvana", "BY": "Bjelorusija", "BZ": "Belize", "CA": "Kanada", "CC": "Kokosovi (Keeling) 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": "Velika Britanija", "GD": "Grenada", "GE": "Gruzija", "GF": "Francuska Gvajana", "GG": "Guernsey", "GH": "Gana", "GI": "Gibraltar", "GL": "Grenland", "GM": "Gambija", "GN": "Gvineja", "GP": "Guadalupa", "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": "Hong Kong PUP 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": "Sveti Martin", "MG": "Madagaskar", "MH": "Maršalovi Otoci", "MK": "Makedonija", "ML": "Mali", "MM": "Mijanmar (Burma)", "MN": "Mongolija", "MO": "Makao PUP Kina", "MP": "Sjeverni Marijanski Otoci", "MQ": "Martinique", "MR": "Mauritanija", "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": "Sveti Petar i Mikelon", "PN": "Otoci Pitcairn", "PR": "Portoriko", "PS": "Palestinsko Područje", "PT": "Portugal", "PW": "Palau", "PY": "Paragvaj", "QA": "Katar", "RE": "Reunion", "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": "Francuske Južne i Antarktičke Zemlje", "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": "Mali udaljeni otoci SAD-a", "US": "Sjedinjene Američke Države", "UY": "Urugvaj", "UZ": "Uzbekistan", "VA": "Sveta Stolica", "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" } } src/Symfony/Component/Intl/Resources/data/regions/hu.json000066400000000000000000000164431266465517700240540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Ascension-sziget", "AD": "Andorra", "AE": "Egyesült Arab Emirátus", "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": "Fehéroroszország", "BZ": "Belize", "CA": "Kanada", "CC": "Kókusz-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-szigetek", "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": "Guinea-Bissau", "GY": "Guyana", "HK": "Hongkong SAR Kína", "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": "Santa 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ó SAR Kína", "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": "Reunion", "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": "Spitzbergák és Jan Mayen-szigetek", "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": "Amerikai Csendes-óceáni Szigetek", "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-szigetek", "WS": "Szamoa", "XK": "Koszovó", "YE": "Jemen", "YT": "Mayotte", "ZA": "Dél-afrikai Köztársaság", "ZM": "Zambia", "ZW": "Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/hy.json000066400000000000000000000232051266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Զիմբաբվե" } } src/Symfony/Component/Intl/Resources/data/regions/id.json000066400000000000000000000157101266465517700240300ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Antarktika", "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 Barthelemy", "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", "CD": "Kongo - Kinshasa", "CF": "Republik Afrika Tengah", "CG": "Kongo - Brazzaville", "CH": "Swiss", "CI": "Cote d’Ivoire", "CK": "Kepulauan Cook", "CL": "Cile", "CM": "Kamerun", "CN": "China", "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", "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 dan Kepulauan Sandwich Selatan", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea-Bissau", "GY": "Guyana", "HK": "Hong Kong SAR China", "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 China", "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.", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ig.json000066400000000000000000000003661266465517700240340ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "BJ": "Binin", "BM": "Bemuda", "CN": "Chaina", "HT": "Hati", "KM": "Comorosu", "LY": "Libyia", "MV": "Maldivesa", "NG": "Nigeria" } } src/Symfony/Component/Intl/Resources/data/regions/ii.json000066400000000000000000000004511266465517700240310ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "BR": "ꀠꑭ", "CN": "ꍏꇩ", "DE": "ꄓꇩ", "FR": "ꃔꇩ", "GB": "ꑱꇩ", "IN": "ꑴꄗ", "IT": "ꑴꄊꆺ", "JP": "ꏝꀪ", "RU": "ꊉꇆꌦ", "US": "ꂰꇩ" } } src/Symfony/Component/Intl/Resources/data/regions/in.json000066400000000000000000000157101266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Antarktika", "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 Barthelemy", "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", "CD": "Kongo - Kinshasa", "CF": "Republik Afrika Tengah", "CG": "Kongo - Brazzaville", "CH": "Swiss", "CI": "Cote d’Ivoire", "CK": "Kepulauan Cook", "CL": "Cile", "CM": "Kamerun", "CN": "China", "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", "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 dan Kepulauan Sandwich Selatan", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea-Bissau", "GY": "Guyana", "HK": "Hong Kong SAR China", "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 China", "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.", "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" } } src/Symfony/Component/Intl/Resources/data/regions/is.json000066400000000000000000000163641266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Saint Barthélemy", "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ídjieyjar", "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": "Saint 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": "Sint Maarten", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/it.json000066400000000000000000000157641266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.8.32", "Names": { "AC": "Isola di 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 Aland", "AZ": "Azerbaigian", "BA": "Bosnia-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", "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 di 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 Faroe", "FR": "Francia", "GA": "Gabon", "GB": "Regno Unito", "GD": "Grenada", "GE": "Georgia", "GF": "Guiana 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 isole Sandwich meridionali", "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": "Malesia", "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": "Réunion", "RO": "Romania", "RS": "Serbia", "RU": "Federazione Russa", "RW": "Ruanda", "SA": "Arabia Saudita", "SB": "Isole Solomon", "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": "Sudan del Sud", "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": "Territori australi francesi", "TG": "Togo", "TH": "Tailandia", "TJ": "Tagikistan", "TK": "Tokelau", "TL": "Timor Est", "TM": "Turkmenistan", "TN": "Tunisia", "TO": "Tonga", "TR": "Turchia", "TT": "Trinidad e Tobago", "TV": "Tuvalu", "TW": "Taiwan", "TZ": "Tanzania", "UA": "Ucraina", "UG": "Uganda", "UM": "Isole minori lontane dagli USA", "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" } } src/Symfony/Component/Intl/Resources/data/regions/iw.json000066400000000000000000000212271266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "זימבאבווה" } } src/Symfony/Component/Intl/Resources/data/regions/ja.json000066400000000000000000000211601266465517700240220ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ジンバブエ" } } src/Symfony/Component/Intl/Resources/data/regions/ka.json000066400000000000000000000305521266465517700240300ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "ზიმბაბვე" } } src/Symfony/Component/Intl/Resources/data/regions/ki.json000066400000000000000000000140271266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/kk.json000066400000000000000000000227521266465517700240450ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/kl.json000066400000000000000000000001251266465517700240340ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GL": "Kalaallit Nunaat" } } src/Symfony/Component/Intl/Resources/data/regions/km.json000066400000000000000000000277051266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ហ្ស៊ីមបាបវ៉េ" } } src/Symfony/Component/Intl/Resources/data/regions/kn.json000066400000000000000000000305061266465517700240440ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ಯುಎಸ್‌. ಔಟ್‌ಲೇಯಿಂಗ್ ದ್ವೀಪಗಳು", "US": "ಅಮೇರಿಕಾ ಸಂಯುಕ್ತ ಸಂಸ್ಥಾನ", "UY": "ಉರುಗ್ವೇ", "UZ": "ಉಜ್ಬೇಕಿಸ್ಥಾನ್", "VA": "ವ್ಯಾಟಿಕನ್", "VC": "ಸೇಂಟ್. ವಿನ್ಸೆಂಟ್ ಮತ್ತು ಗ್ರೆನೆಡೈನ್ಸ್", "VE": "ವೆನೆಜುವೆಲಾ", "VG": "ಬ್ರಿಟಿಷ್ ವರ್ಜಿನ್ ದ್ವೀಪಗಳು", "VI": "ಯು.ಎಸ್. ವರ್ಜಿನ್ ದ್ವೀಪಗಳು", "VN": "ವಿಯೇಟ್ನಾಮ್", "VU": "ವನೌಟು", "WF": "ವಾಲಿಸ್ ಮತ್ತು ಫುಟುನಾ", "WS": "ಸಮೋವಾ", "XK": "ಕೊಸೊವೊ", "YE": "ಯೆಮನ್", "YT": "ಮಯೊಟ್ಟೆ", "ZA": "ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ", "ZM": "ಝಾಂಬಿಯಾ", "ZW": "ಜಿಂಬಾಬ್ವೆ" } } src/Symfony/Component/Intl/Resources/data/regions/ko.json000066400000000000000000000173721266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.9.31", "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": "짐바브웨" } } src/Symfony/Component/Intl/Resources/data/regions/ks.json000066400000000000000000000220271266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "زِمبابے" } } src/Symfony/Component/Intl/Resources/data/regions/kw.json000066400000000000000000000001231266465517700240450ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "GB": "Rywvaneth Unys" } } src/Symfony/Component/Intl/Resources/data/regions/ky.json000066400000000000000000000224721266465517700240620ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/lb.json000066400000000000000000000160231266465517700240270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Elfebeeküst", "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" } } src/Symfony/Component/Intl/Resources/data/regions/lg.json000066400000000000000000000144401266465517700240350ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ln.json000066400000000000000000000146561266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Repibiki demokratiki ya Kongó", "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" } } src/Symfony/Component/Intl/Resources/data/regions/lo.json000066400000000000000000000262711266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ຊິມບັບເວ" } } src/Symfony/Component/Intl/Resources/data/regions/lt.json000066400000000000000000000165251266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Didžioji Britanija", "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": "Šventoji Liucija", "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ūzų Polinezija", "PG": "Papua Naujoji Gvinėja", "PH": "Filipinai", "PK": "Pakistanas", "PL": "Lenkija", "PM": "Sen Pjeras ir Mikelonas", "PN": "Pitkernas", "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", "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 Futuna", "WS": "Samoa", "XK": "Kosovas", "YE": "Jemenas", "YT": "Majotas", "ZA": "Pietų Afrika", "ZM": "Zambija", "ZW": "Zimbabvė" } } src/Symfony/Component/Intl/Resources/data/regions/lu.json000066400000000000000000000140321266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/lv.json000066400000000000000000000163111266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Amerikāņu 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": "Burundi", "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 jeb 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": "Čehija", "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": "Franču 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": "Franču Polinēzija", "PG": "Papua-Jaungvineja", "PH": "Filipīnas", "PK": "Pakistāna", "PL": "Polija", "PM": "Senpjēra un Mikelona", "PN": "Pitkērna", "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": "Šeiš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 Zemes", "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 Aizjūras salas", "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 Futuna", "WS": "Samoa", "XK": "Kosova", "YE": "Jemena", "YT": "Majota", "ZA": "Dienvidāfrikas Republika", "ZM": "Zambija", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/meta.json000066400000000000000000000070131266465517700243570ustar00rootroot00000000000000{ "Version": "2.1.7.12", "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", "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" ] } src/Symfony/Component/Intl/Resources/data/regions/mg.json000066400000000000000000000140631266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/mk.json000066400000000000000000000227351266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/ml.json000066400000000000000000000301171266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "മക്കാവോ 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": "യു.എസ്. ദ്വീപസമൂഹങ്ങൾ", "US": "അമേരിക്കൻ ഐക്യനാടുകൾ", "UY": "ഉറുഗ്വേ", "UZ": "ഉസ്‌ബെക്കിസ്ഥാൻ", "VA": "വത്തിക്കാൻ", "VC": "സെന്റ് വിൻസെന്റും ഗ്രനെഡൈൻസും", "VE": "വെനിസ്വേല", "VG": "ബ്രിട്ടീഷ് വെർജിൻ ദ്വീപുകൾ", "VI": "യു.എസ്. വെർജിൻ ദ്വീപുകൾ", "VN": "വിയറ്റ്നാം", "VU": "വന്വാതു", "WF": "വാലിസ് ആന്റ് ഫ്യൂച്യുന", "WS": "സമോവ", "XK": "കൊസോവൊ", "YE": "യെമൻ", "YT": "മയോട്ടി", "ZA": "ദക്ഷിണാഫ്രിക്ക", "ZM": "സാംബിയ", "ZW": "സിംബാബ്‌വേ" } } src/Symfony/Component/Intl/Resources/data/regions/mn.json000066400000000000000000000221271266465517700240460ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/mr.json000066400000000000000000000270341266465517700240540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "झिम्बाब्वे" } } src/Symfony/Component/Intl/Resources/data/regions/ms.json000066400000000000000000000157111266465517700240540ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Yunani", "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.", "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" } } src/Symfony/Component/Intl/Resources/data/regions/mt.json000066400000000000000000000151571266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.8.22", "Names": { "AD": "Andorra", "AE": "Emirati Għarab Maqgħuda", "AF": "Afganistan", "AG": "Antigua and Barbuda", "AI": "Angwilla", "AL": "Albanija", "AM": "Armenja", "AO": "Angola", "AQ": "Antartika", "AR": "Arġentina", "AS": "Samoa Amerikana", "AT": "Awstrija", "AU": "Awstralja", "AW": "Aruba", "AX": "Gżejjer Aland", "AZ": "Ażerbajġan", "BA": "Bożnija Ħerżegovina", "BB": "Barbados", "BD": "Bangladexx", "BE": "Belġju", "BF": "Burkina Faso", "BG": "Bulgarija", "BH": "Baħrajn", "BI": "Burundi", "BJ": "Benin", "BM": "Bermuda", "BN": "Brunej", "BO": "Bolivja", "BR": "Il-Brażil", "BS": "Baħamas", "BT": "Butan", "BW": "Botswana", "BY": "Bjelorussja", "BZ": "Beliże", "CA": "Kanada", "CC": "Cocos (Keeling) Islands", "CD": "Democratic Republic of the Congo", "CF": "Repubblika Afrikana Ċentrali", "CG": "Kongo", "CH": "Svizzera", "CI": "Kosta ta’ l-Avorju", "CK": "Cook Islands", "CL": "Ċili", "CM": "Kamerun", "CN": "Iċ-Ċina", "CO": "Kolumbja", "CR": "Kosta Rika", "CU": "Kuba", "CV": "Kape Verde", "CX": "Christmas Island", "CY": "Ċipru", "CZ": "Repubblika Ċeka", "DE": "Il-Ġermanja", "DJ": "Ġibuti", "DK": "Danimarka", "DM": "Dominika", "DO": "Republikka Domenikana", "DZ": "Alġerija", "EC": "Ekwador", "EE": "Estonja", "EG": "Eġittu", "EH": "Sahara tal-Punent", "ER": "Eritreja", "ES": "Spanja", "ET": "Etijopja", "FI": "Finlandja", "FJ": "Fiġi", "FK": "Falkland Islands", "FM": "Mikronesja", "FO": "Gżejjer Faroe", "FR": "Franza", "GA": "Gabon", "GB": "L-Ingilterra", "GD": "Grenada", "GE": "Ġorġja", "GF": "Gujana Franċiża", "GH": "Gana", "GI": "Gibraltar", "GL": "Grinlandja", "GM": "Gambja", "GN": "Gineja", "GP": "Gwadelupe", "GQ": "Ginea Ekwatorjali", "GR": "Greċja", "GS": "South Georgia and the South Sandwich Islands", "GT": "Gwatemala", "GU": "Gwam", "GW": "Ginea-Bissaw", "GY": "Gujana", "HK": "Ħong Kong S.A.R. Ċina", "HN": "Ħonduras", "HR": "Kroazja", "HT": "Ħaiti", "HU": "Ungerija", "ID": "Indoneżja", "IE": "Irlanda", "IL": "Iżrael", "IM": "Isle of Man", "IN": "L-Indja", "IO": "British Indian Ocean Territory", "IQ": "Iraq", "IR": "Iran", "IS": "Islanda", "IT": "L-Italja", "JM": "Ġamajka", "JO": "Ġordan", "JP": "Il-Ġappun", "KE": "Kenja", "KG": "Kirgistan", "KH": "Kambodja", "KI": "Kiribati", "KM": "Komoros", "KN": "Saint Kitts and Nevis", "KP": "Koreja ta’ Fuq", "KR": "Koreja t’Isfel", "KW": "Kuwajt", "KY": "Gżejjer Kajmani", "KZ": "Każakstan", "LA": "Laos", "LB": "Libanu", "LC": "Santa Luċija", "LI": "Liechtenstein", "LK": "Sri Lanka", "LR": "Liberja", "LS": "Lesoto", "LT": "Litwanja", "LU": "Lussemburgu", "LV": "Latvja", "LY": "Libja", "MA": "Marokk", "MC": "Monako", "MD": "Maldova", "MG": "Madagaskar", "MH": "Gżejjer ta’ Marshall", "MK": "Maċedonja", "ML": "Mali", "MM": "Mjanmar", "MN": "Mongolja", "MO": "Macao S.A.R., China", "MP": "Gżejjer Marjana ta’ Fuq", "MQ": "Martinik", "MR": "Mawritanja", "MS": "Montserrat", "MT": "Malta", "MU": "Mawrizju", "MV": "Maldives", "MW": "Malawi", "MX": "Messiku", "MY": "Malasja", "MZ": "Możambik", "NA": "Namibja", "NC": "New Caledonia", "NE": "Niġer", "NF": "Norfolk Island", "NG": "Niġerja", "NI": "Nikaragwa", "NL": "Olanda", "NO": "Norveġja", "NP": "Nepal", "NR": "Nauru", "NU": "Niue", "NZ": "New Zealand", "OM": "Oman", "PA": "Panama", "PE": "Peru", "PF": "Polinesja Franċiża", "PG": "Papwa-Ginea Ġdida", "PH": "Filippini", "PK": "Pakistan", "PL": "Polonja", "PM": "Saint Pierre and Miquelon", "PN": "Pitcairn", "PR": "Puerto Rico", "PS": "Territorju Palestinjan", "PT": "Portugall", "PW": "Palau", "PY": "Paragwaj", "QA": "Qatar", "RE": "Réunion", "RO": "Rumanija", "RU": "Ir-Russja", "RW": "Rwanda", "SA": "Għarabja Sawdita", "SB": "Solomon Islands", "SC": "Seychelles", "SD": "Sudan", "SE": "Żvezja", "SG": "Singapor", "SH": "Saint Helena", "SI": "Slovenja", "SJ": "Svalbard and Jan Mayen", "SK": "Slovakkja", "SL": "Sierra Leone", "SM": "San Marino", "SN": "Senegal", "SO": "Somalja", "SR": "Surinam", "ST": "Sao Tome and Principe", "SV": "El Salvador", "SY": "Sirja", "SZ": "Sważiland", "TC": "Turks and Caicos Islands", "TD": "Ċad", "TF": "Territorji Franċiżi ta’ Nofsinhar", "TG": "Togo", "TH": "Tajlandja", "TJ": "Taġikistan", "TK": "Tokelaw", "TL": "Timor tal-Lvant", "TM": "Turkmenistan", "TN": "Tuneż", "TO": "Tonga", "TR": "Turkija", "TT": "Trinidad u Tobago", "TV": "Tuvalu", "TW": "Tajwan", "TZ": "Tanżanija", "UA": "Ukraina", "UG": "Uganda", "UM": "United States Minor Outlying Islands", "US": "L-Istati Uniti", "UY": "Urugwaj", "UZ": "Użbekistan", "VA": "Vatikan", "VC": "Saint Vincent and the Grenadines", "VE": "Venezwela", "VG": "British Virgin Islands", "VI": "U.S. Virgin Islands", "VN": "Vjetnam", "VU": "Vanwatu", "WF": "Wallis and Futuna", "WS": "Samoa", "YE": "Jemen", "YT": "Majotte", "ZA": "Afrika t’Isfel", "ZM": "Żambja", "ZW": "Żimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/my.json000066400000000000000000000314361266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ဇင်ဘာဘွေ" } } src/Symfony/Component/Intl/Resources/data/regions/nb.json000066400000000000000000000155631266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Tsjekkia", "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": "Britiske territorier 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": "St. 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/nd.json000066400000000000000000000141531266465517700240350ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ne.json000066400000000000000000000277631266465517700240510ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "जिम्बाबे" } } src/Symfony/Component/Intl/Resources/data/regions/nl.json000066400000000000000000000161021266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Wit-Rusland", "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": "Caymaneilanden", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/nl_BE.json000066400000000000000000000001231266465517700244030ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "IM": "Het Eiland Man" } } src/Symfony/Component/Intl/Resources/data/regions/nn.json000066400000000000000000000153721266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.7.72", "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 Darussalam", "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", "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": "Komorene", "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", "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", "ST": "São Tomé og Príncipe", "SV": "El Salvador", "SY": "Syria", "SZ": "Swaziland", "TA": "Tristan da Cunha", "TC": "Turks- og Caicosøyane", "TD": "Tchad", "TF": "Franske sørområde", "TG": "Togo", "TH": "Thailand", "TJ": "Tadsjikistan", "TK": "Tokelau", "TL": "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", "YE": "Yemen", "YT": "Mayotte", "ZA": "Sør-Afrika", "ZM": "Zambia", "ZW": "Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/no.json000066400000000000000000000155631266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Tsjekkia", "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": "Britiske territorier 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": "St. 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/om.json000066400000000000000000000005451266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/or.json000066400000000000000000000270341266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ଜିମ୍ବାୱେ" } } src/Symfony/Component/Intl/Resources/data/regions/os.json000066400000000000000000000006001266465517700240450ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "BR": "Бразили", "CN": "Китай", "DE": "Герман", "FR": "Франц", "GB": "Стыр Британи", "GE": "Гуырдзыстон", "IN": "Инди", "IT": "Итали", "JP": "Япон", "RU": "Уӕрӕсе", "US": "АИШ" } } src/Symfony/Component/Intl/Resources/data/regions/pa.json000066400000000000000000000256131266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ਜ਼ਿੰਬਾਬਵੇ" } } src/Symfony/Component/Intl/Resources/data/regions/pa_Arab.json000066400000000000000000000001211266465517700247470ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "PK": "پکستان" } } src/Symfony/Component/Intl/Resources/data/regions/pl.json000066400000000000000000000160751266465517700240540ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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 Darussalam", "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": "Wyspa 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": "Wyspa 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", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ps.json000066400000000000000000000036611266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "یمن" } } src/Symfony/Component/Intl/Resources/data/regions/pt.json000066400000000000000000000161311266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Geórgia do Sul e Ilhas 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 Caiman", "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": "Seychelles", "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 Distantes dos EUA", "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" } } src/Symfony/Component/Intl/Resources/data/regions/pt_PT.json000066400000000000000000000026711266465517700244640ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AI": "Anguila", "AM": "Arménia", "BH": "Barém", "BJ": "Benim", "BW": "Botswana", "CC": "Ilhas Cocos", "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", "EG": "Egipto", "FK": "Ilhas Falkland", "FO": "Ilhas Faroé", "GL": "Gronelândia", "GS": "Ilhas Geórgia do Sul e Sandwich do Sul", "GU": "Guame", "GW": "Guiné-Bissau", "IR": "Irão", "KE": "Quénia", "KY": "Ilhas Caimão", "LV": "Letónia", "MC": "Mónaco", "MG": "Madagáscar", "MK": "Macedónia", "MS": "Monserrate", "MU": "Maurícia", "NC": "Nova Caledónia", "NL": "Países Baixos", "PL": "Polónia", "PN": "Pitcairn", "PS": "Território Palestiniano", "RO": "Roménia", "SC": "Seicheles", "SG": "Singapura", "SI": "Eslovénia", "SM": "São Marino", "TC": "Ilhas Turcas e Caicos", "TK": "Toquelau", "TM": "Turquemenistão", "TT": "Trindade e Tobago", "VN": "Vietname", "YE": "Iémen", "YT": "Maiote", "ZW": "Zimbabué" } } src/Symfony/Component/Intl/Resources/data/regions/qu.json000066400000000000000000000121001266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.6.71", "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": "Bahré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": "Guernsey", "GH": "Ghana", "GM": "Gambia", "GN": "Guinea", "GQ": "Guinea Ecuatorial", "GR": "Grecia", "GT": "Guatemala", "GU": "Guam", "GW": "Guinea-Bissau", "GY": "Guyana", "HK": "Hong Kong (RAE)", "HN": "Honduras", "HR": "Croacia", "HT": "Haití", "ID": "Indonesia", "IL": "Israel", "IN": "India", "IQ": "Iraq", "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": "Kazajistan", "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": "Tierras Australes y Antárticas Francesas", "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, Futuna", "WS": "Samoa", "YE": "Yemen", "ZA": "Sudáfrica", "ZM": "Zambia", "ZW": "Zimbabue" } } src/Symfony/Component/Intl/Resources/data/regions/rm.json000066400000000000000000000154541266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" } } src/Symfony/Component/Intl/Resources/data/regions/rn.json000066400000000000000000000146671266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/regions/ro.json000066400000000000000000000161621266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "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": "Malaezia", "MZ": "Mozambic", "NA": "Namibia", "NC": "Noua Caledonie", "NE": "Niger", "NF": "Insulele 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": "Surinam", "SS": "Sudanul de Sud", "ST": "Sao Tome și Principe", "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.", "US": "Statele Unite ale Americii", "UY": "Uruguay", "UZ": "Uzbekistan", "VA": "Statul Cetății Vaticanului", "VC": "Saint Vincent și Grenadine", "VE": "Venezuela", "VG": "Insulele Virgine Britanice", "VI": "Insulele Virgine S.U.A.", "VN": "Vietnam", "VU": "Vanuatu", "WF": "Wallis și Futuna", "WS": "Samoa", "XK": "Kosovo", "YE": "Yemen", "YT": "Mayotte", "ZA": "Africa de Sud", "ZM": "Zambia", "ZW": "Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/ru.json000066400000000000000000000223041266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/rw.json000066400000000000000000000001451266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "RW": "Rwanda", "TO": "Igitonga" } } src/Symfony/Component/Intl/Resources/data/regions/se.json000066400000000000000000000155021266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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" } } src/Symfony/Component/Intl/Resources/data/regions/se_FI.json000066400000000000000000000002411266465517700244120ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BA": "Bosnia ja Hercegovina", "KH": "Kamboža", "SD": "Sudan", "TD": "Chad" } } src/Symfony/Component/Intl/Resources/data/regions/sg.json000066400000000000000000000147751266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/sh.json000066400000000000000000000160201266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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": "Sveti Bartolomej", "BM": "Bermuda", "BN": "Brunej", "BO": "Bolivija", "BQ": "Karipska Holandija", "BR": "Brazil", "BS": "Bahami", "BT": "Butan", "BW": "Bocvana", "BY": "Belorusija", "BZ": "Belize", "CA": "Kanada", "CC": "Kokos (Keling) 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": "Velika Britanija", "GD": "Grenada", "GE": "Gruzija", "GF": "Francuska Gvajana", "GG": "Gurnsi", "GH": "Gana", "GI": "Gibraltar", "GL": "Grenland", "GM": "Gambija", "GN": "Gvineja", "GP": "Gvadelupe", "GQ": "Ekvatorijalna Gvineja", "GR": "Grčka", "GS": "Južna Džordžija i Južna Sendvič Ostrva", "GT": "Gvatemala", "GU": "Guam", "GW": "Gvineja-Bisao", "GY": "Gvajana", "HK": "Hong Kong S. A. R. 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žersi", "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": "Sent Martin", "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": "Norfolk Ostrvo", "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": "Portugal", "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", "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", "US": "Sjedinjene Američke 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" } } src/Symfony/Component/Intl/Resources/data/regions/si.json000066400000000000000000000303441266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "සිම්බාබ්වේ" } } src/Symfony/Component/Intl/Resources/data/regions/sk.json000066400000000000000000000161531266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Ascensión", "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": "Ålandy", "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": "Kongo - Kinshasa", "CF": "Stredoafrická republika", "CG": "Kongo - Brazzaville", "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 García", "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", "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": "Sint Maarten", "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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/sl.json000066400000000000000000000161611266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Velika Britanija", "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 Hong Kong", "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": "Otočji Turks in Caicos", "TD": "Čad", "TF": "Francosko južno ozemlje", "TG": "Togo", "TH": "Tajska", "TJ": "Tadžikistan", "TK": "Tokelau", "TL": "Vzhodni Timor", "TM": "Turkmenistan", "TN": "Tunizija", "TO": "Tonga", "TR": "Turčija", "TT": "Trinidad in Tobago", "TV": "Tuvalu", "TW": "Tajvan", "TZ": "Tanzanija", "UA": "Ukrajina", "UG": "Uganda", "UM": "Druga ameriška ozemlja v Tihem oceanu", "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" } } src/Symfony/Component/Intl/Resources/data/regions/sn.json000066400000000000000000000137761266465517700240660ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/so.json000066400000000000000000000143161266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Myanmar", "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" } } src/Symfony/Component/Intl/Resources/data/regions/sq.json000066400000000000000000000160751266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Bahrein", "BI": "Burund", "BJ": "Benin", "BL": "Shën Bartolemeo", "BM": "Bermudë", "BN": "Brunej", "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": "Republika Afrikano-Qendrore", "CG": "Kongo-Brazavilë", "CH": "Zvicër", "CI": "Bregu i Fildishtë", "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": "Xhibut", "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 Folklandë", "FM": "Mikronezi", "FO": "Ishujt Faroe", "FR": "Francë", "GA": "Gabon", "GB": "Mbretëria e Bashkuar", "GD": "Grenadë", "GE": "Gjeorgji", "GF": "Guajana Franceze", "GG": "Guernsej", "GH": "Ganë", "GI": "Gjibraltar", "GL": "Grenlandë", "GM": "Gambi", "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": "Qiribati", "KM": "Komore", "KN": "Shën Kits e 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": "Lihtënshtajn", "LK": "Sri Lankë", "LR": "Liberi", "LS": "Lesoto", "LT": "Lituani", "LU": "Luksemburg", "LV": "Letoni", "LY": "Libi", "MA": "Marok", "MC": "Monako", "MD": "Moldavi", "ME": "Mali 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": "Ishujt Norfolkë", "NG": "Nigeri", "NI": "Nikaragua", "NL": "Holandë", "NO": "Norvegji", "NP": "Nepal", "NR": "Nauru", "NU": "Niue", "NZ": "Zelanda 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 Peir dhe Mikuelon", "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": "Sishel", "SD": "Sudan", "SE": "Suedi", "SG": "Singapor", "SH": "Shën Helena", "SI": "Slloveni", "SJ": "Svalbard e Zhan Majen", "SK": "Sllovaki", "SL": "Siera Leone", "SM": "San Marino", "SN": "Senegali", "SO": "Somali", "SR": "Surinami", "SS": "Sudani i Jugut", "ST": "Sao Tome e Prinsipe", "SV": "El Salvador", "SX": "Shën Martin (Sint Maarten-pjesa e Mbretërisë së Holandës)", "SY": "Siri", "SZ": "Svazilandë", "TA": "Tristan da Kuna", "TC": "Ishujt Turke dhe Kaike", "TD": "Çad", "TF": "Territoret Australiane Franceze", "TG": "Togo", "TH": "Tajlandë", "TJ": "Taxhikistan", "TK": "Tokelau", "TL": "Timori Lindor", "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ë", "US": "Shtetet e Bashkuara të Amerikës", "UY": "Uruguai", "UZ": "Uzbekistan", "VA": "Vatikan", "VC": "Shën Vinsent dhe Grenadinet", "VE": "Venezuelë", "VG": "Ishujt e Virgjër Britanikë", "VI": "Ishujt e Virgjër Amerikanë", "VN": "Vietnam", "VU": "Vanuatu", "WF": "Uollis e Futina", "WS": "Samoa", "XK": "Kosovë", "YE": "Jemen", "YT": "Majotë", "ZA": "Afrika e Jugut", "ZM": "Zambi", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/sr.json000066400000000000000000000224551266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/sr_Latn.json000066400000000000000000000160201266465517700250310ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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": "Sveti Bartolomej", "BM": "Bermuda", "BN": "Brunej", "BO": "Bolivija", "BQ": "Karipska Holandija", "BR": "Brazil", "BS": "Bahami", "BT": "Butan", "BW": "Bocvana", "BY": "Belorusija", "BZ": "Belize", "CA": "Kanada", "CC": "Kokos (Keling) 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": "Velika Britanija", "GD": "Grenada", "GE": "Gruzija", "GF": "Francuska Gvajana", "GG": "Gurnsi", "GH": "Gana", "GI": "Gibraltar", "GL": "Grenland", "GM": "Gambija", "GN": "Gvineja", "GP": "Gvadelupe", "GQ": "Ekvatorijalna Gvineja", "GR": "Grčka", "GS": "Južna Džordžija i Južna Sendvič Ostrva", "GT": "Gvatemala", "GU": "Guam", "GW": "Gvineja-Bisao", "GY": "Gvajana", "HK": "Hong Kong S. A. R. 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žersi", "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": "Sent Martin", "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": "Norfolk Ostrvo", "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": "Portugal", "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", "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", "US": "Sjedinjene Američke 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" } } src/Symfony/Component/Intl/Resources/data/regions/sv.json000066400000000000000000000156561266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "S:t 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/sv_FI.json000066400000000000000000000013541266465517700244410ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "BL": "Saint-Barthélemy", "BQ": "Bonaire, S:t Eustatius och Saba", "CD": "Demokratiska republiken Kongo", "CG": "Kongo", "GB": "Förenade kungariket", "KN": "Saint Kitts och Nevis", "LC": "Saint Lucia", "MF": "S:t Martin (franska delen)", "MM": "Burma", "PM": "Saint Pierre och Miquelon", "PN": "Pitcairn", "PS": "Palestinska området", "SD": "Nordsudan", "SH": "Saint Helena", "SX": "Sint Martin", "TK": "Tokelauöarna", "US": "Förenta staterna", "VA": "Vatikanen", "VC": "Saint Vincent och Grenadinerna", "WF": "Wallis- och Futuna" } } src/Symfony/Component/Intl/Resources/data/regions/sw.json000066400000000000000000000157641266465517700240760ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Azabajani", "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": "Butani", "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": "Kepuvede", "CW": "Kurakao", "CX": "Kisiwa cha Krismasi", "CY": "Saiprasi", "CZ": "Jamhuri ya Cheki", "DE": "Ujerumani", "DG": "Diego Garcia", "DJ": "Jibuti", "DK": "Denmaki", "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": "Uhabeshi", "FI": "Ufini", "FJ": "Fiji", "FK": "Visiwa vya Falkland", "FM": "Mikronesia", "FO": "Visiwa vya Faroe", "FR": "Ufaransa", "GA": "Gaboni", "GB": "Uingereza", "GD": "Grenada", "GE": "Jojia", "GF": "Gwiyana ya Ufaransa", "GG": "Guernsey", "GH": "Ghana", "GI": "Jibralta", "GL": "Grinlandi", "GM": "Gambia", "GN": "Gine", "GP": "Gwadelupe", "GQ": "Ginekweta", "GR": "Ugiriki", "GS": "Jojia Kusini na Visiwa vya Sandwich Kusini", "GT": "Gwatemala", "GU": "Gwam", "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": "Yordani", "JP": "Japani", "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": "Liechtenstein", "LK": "Sirilanka", "LR": "Liberia", "LS": "Lesoto", "LT": "Litwania", "LU": "Lasembagi", "LV": "Lativia", "LY": "Libya", "MA": "Moroko", "MC": "Monako", "MD": "Moldova", "ME": "Montenegro", "MF": "Saint Martin", "MG": "Madagaska", "MH": "Visiwa vya Marshal", "MK": "Masedonia", "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": "Modivu", "MW": "Malawi", "MX": "Meksiko", "MY": "Malesia", "MZ": "Msumbiji", "NA": "Namibia", "NC": "Nyukaledonia", "NE": "Nijeri", "NF": "Kisiwa cha Norfolk", "NG": "Nigeria", "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": "Maeneo ya Palestina", "PT": "Ureno", "PW": "Palau", "PY": "Paragwai", "QA": "Katari", "RE": "Riyunioni", "RO": "Romania", "RS": "Serbia", "RU": "Urusi", "RW": "Rwanda", "SA": "Saudi", "SB": "Visiwa vya Solomon", "SC": "Shelisheli", "SD": "Sudani", "SE": "Uswidi", "SG": "Singapoo", "SH": "Santahelena", "SI": "Slovenia", "SJ": "Svalbard na Jan Mayen", "SK": "Slovakia", "SL": "Siera Leoni", "SM": "Samarino", "SN": "Senegali", "SO": "Somalia", "SR": "Surinamu", "SS": "Sudani Kusini", "ST": "São Tomé na Príncipe", "SV": "Elsavado", "SX": "Santamatini", "SY": "Siria", "SZ": "Uswazi", "TA": "Tristan da Cunha", "TC": "Visiwa vya Turki na Kaiko", "TD": "Chadi", "TF": "Maeneo ya Kusini ya Ufaransa", "TG": "Togo", "TH": "Tailandi", "TJ": "Tajikistani", "TK": "Tokelau", "TL": "Timor ya Mashariki", "TM": "Turukimenistani", "TN": "Tunisia", "TO": "Tonga", "TR": "Uturuki", "TT": "Trinidad na Tobago", "TV": "Tuvalu", "TW": "Taiwani", "TZ": "Tanzania", "UA": "Ukraini", "UG": "Uganda", "UM": "Visiwa Vidogo vya Nje vya Marekani", "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": "Vietinamu", "VU": "Vanuatu", "WF": "Walis na Futuna", "WS": "Samoa", "XK": "Kosovo", "YE": "Yemeni", "YT": "Mayotte", "ZA": "Afrika Kusini", "ZM": "Zambia", "ZW": "Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/regions/ta.json000066400000000000000000000310541266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ஜிம்பாப்வே" } } src/Symfony/Component/Intl/Resources/data/regions/te.json000066400000000000000000000304321266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "జింబాబ్వే" } } src/Symfony/Component/Intl/Resources/data/regions/th.json000066400000000000000000000300321266465517700240410ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ซิมบับเว" } } src/Symfony/Component/Intl/Resources/data/regions/tl.json000066400000000000000000000157161266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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 Island", "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": "North Korea", "KR": "South 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", "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" } } src/Symfony/Component/Intl/Resources/data/regions/to.json000066400000000000000000000164151266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Pueto 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": "Tulisiteni 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" } } src/Symfony/Component/Intl/Resources/data/regions/tr.json000066400000000000000000000160231266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Beyaz Rusya", "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": "Güney Kıbrıs Rum Kesimi", "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ı Sahara", "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 ÖYB", "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": "Lesoto", "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 ÖYB", "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 Adaları", "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ı", "US": "ABD", "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 Adaları", "WS": "Samoa", "XK": "Kosova", "YE": "Yemen", "YT": "Mayotte", "ZA": "Güney Afrika", "ZM": "Zambiya", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/ug.json000066400000000000000000000237551266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "زىمبابۋې" } } src/Symfony/Component/Intl/Resources/data/regions/uk.json000066400000000000000000000226171266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Зімбабве" } } src/Symfony/Component/Intl/Resources/data/regions/ur.json000066400000000000000000000213411266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "امریکہ سے باہر کے چھوٹے جزائز", "US": "ریاستہائے متحدہ", "UY": "یوروگوئے", "UZ": "ازبکستان", "VA": "واٹیکن سٹی", "VC": "سینٹ ونسنٹ اور گرینیڈائنز", "VE": "وینزوئیلا", "VG": "برٹش ورجن آئلینڈز", "VI": "امریکی ورجن آئلینڈز", "VN": "ویتنام", "VU": "وینوآٹو", "WF": "ویلیز اور فیوٹیونا", "WS": "ساموآ", "XK": "کوسووو", "YE": "یمن", "YT": "مایوٹ", "ZA": "جنوبی افریقہ", "ZM": "زامبیا", "ZW": "زمبابوے" } } src/Symfony/Component/Intl/Resources/data/regions/ur_IN.json000066400000000000000000000022061266465517700244440ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "AC": "جزیرہ اسینشن", "AX": "جزائر ایلانڈ", "BB": "بارباڈوس", "BR": "برازیل", "CC": "جزائر (کیلنگ) کوکوس", "CI": "کوت داوواغ", "CK": "جزائر کک", "DG": "ڈیگو گارشیا", "FK": "جزائر فاکلینڈ", "FO": "جزائرفارو", "GD": "گریناڈا", "GF": "فرانسیسی گیانا", "IC": "جزائر کناری", "IO": "برطانوی بحرہند خطہ", "MH": "جزائر مارشل", "MP": "جزائر شمالی ماریانا", "NF": "جزیرہ نارفولک", "NR": "ناورو", "PH": "فلپائن", "PN": "جزائر پٹکیرن", "RU": "روس", "SB": "جزائر سلیمان", "TA": "ترسٹان دا کونیا", "TC": "جزائر کیکس و ترکیہ", "UM": "امریکی بیرونی جزائر", "VG": "برطانوی جزائر ورجن", "VI": "امریکی جزائر ورجن" } } src/Symfony/Component/Intl/Resources/data/regions/uz.json000066400000000000000000000161551266465517700240760ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Vozneseniye oroli", "AD": "Andorra", "AE": "Birlashgan Arab Amirliklari", "AF": "Afgʻoniston", "AG": "Antigua va Barbados", "AI": "Angila", "AL": "Albaniya", "AM": "Armaniston", "AO": "Angola", "AQ": "Antarktika", "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": "Avliyo Varfolomey", "BM": "Bermuda", "BN": "Bruney", "BO": "Boliviya", "BQ": "Karib Niderlandiyasi", "BR": "Braziliya", "BS": "Bagama orollari", "BT": "Butan", "BW": "Botsvanna", "BY": "Belorusiya", "BZ": "Beliz", "CA": "Kanada", "CC": "Kokos (Kiling) orollari", "CD": "Kongo-Kinshasa", "CF": "Markaziy Afrika Respublikasi", "CG": "Kongo Brazzavil", "CH": "Shveysariya", "CI": "Kot-d-Ivuar", "CK": "Kuk orollari", "CL": "Chili", "CM": "Kamerun", "CN": "Xitoy", "CO": "Kolumbiya", "CR": "Kosta-Rika", "CU": "Kuba", "CV": "Kabo-Verde", "CW": "Kurasao", "CX": "Rojdestvo oroli", "CY": "Kipr", "CZ": "Chexiya Respublikasi", "DE": "Germaniya", "DG": "Diyego Garsiya", "DJ": "Djibuti", "DK": "Daniya", "DM": "Dominika", "DO": "Dominikan Respublikasi", "DZ": "Jazoir", "EA": "Seyta va Melilla", "EC": "Ekvador", "EE": "Estoniya", "EG": "Misr", "EH": "Gʻarbiy Sahroi Kabir", "ER": "Eritreya", "ES": "Ispaniya", "ET": "Efiopiya", "FI": "Finlyandiya", "FJ": "Fiji orollari", "FK": "Folklend orollari", "FM": "Mikroneziya", "FO": "Farer orollari", "FR": "Fransiya", "GA": "Gabon", "GB": "Birlashgan Qirollik", "GD": "Grenada", "GE": "Gruziya", "GF": "Frantsuz Gvianasi", "GG": "Gernsi", "GH": "Gana", "GI": "Gibraltar", "GL": "Grenlandiya", "GM": "Gambiya", "GN": "Gvineya", "GP": "Gvadelupe", "GQ": "Ekvatorial Gvineya", "GR": "Gretsiya", "GS": "Janubiy Djordjiya 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": "Britaniya Hind okeani hududi", "IQ": "Iroq", "IR": "Eron", "IS": "Islandiya", "IT": "Italiya", "JE": "Djersi", "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": "Quveyt", "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": "Marshal orollari", "MK": "Makedoniya", "ML": "Mali", "MM": "Myanma (Birma)", "MN": "Mo‘g‘uliston", "MO": "Makao Xitoy MMH", "MP": "Shimoliy Marianna 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 orollari", "NG": "Nigeriya", "NI": "Nikaragua", "NL": "Niderlandiya", "NO": "Norvegiya", "NP": "Nepal", "NR": "Nauru", "NU": "Niuye", "NZ": "Yangi Zelandiya", "OM": "Omon", "PA": "Panama", "PE": "Peru", "PF": "Frantsuz Polineziyasi", "PG": "Papua Yangi Gvineya", "PH": "Filippin", "PK": "Pokiston", "PL": "Polsha", "PM": "Sent-Pyer va Mikelon", "PN": "Pitkarin orollari", "PR": "Puerto-Riko", "PS": "Falastin hududi", "PT": "Portugaliya", "PW": "Palau", "PY": "Paragvay", "QA": "Qatar", "RE": "Reyunon", "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 orollari", "SI": "Sloveniya", "SJ": "Savlbard va Jan 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 Martin", "SY": "Suriya", "SZ": "Svazilend", "TA": "Tristan de Kuna", "TC": "Turks va Kaykos orollari", "TD": "Chad", "TF": "Frantsiya janubiy xududlari", "TG": "Togo", "TH": "Tayland", "TJ": "Tojikiston", "TK": "Tokelau", "TL": "Sharqiy-Timor", "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", "US": "Qoʻshma Shtatlar", "UY": "Urugvay", "UZ": "Oʻzbekiston", "VA": "Vatikan", "VC": "Sent-Vinsent va Grenadin", "VE": "Venesuela", "VG": "Britaniya Virdjiniya orollari", "VI": "AQSH Virdjiniya orollari", "VN": "Vyetnam", "VU": "Vanuatu", "WF": "Uellis va Futuna", "WS": "Samoa", "XK": "Kosovo", "YE": "Yaman", "YT": "Mayotta", "ZA": "Janubi-Afrika", "ZM": "Zambiya", "ZW": "Zimbabve" } } src/Symfony/Component/Intl/Resources/data/regions/uz_Arab.json000066400000000000000000000001271266465517700250130ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "AF": "افغانستان" } } src/Symfony/Component/Intl/Resources/data/regions/uz_Cyrl.json000066400000000000000000000225541266465517700250670ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Зимбабве" } } src/Symfony/Component/Intl/Resources/data/regions/vi.json000066400000000000000000000163451266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "AC": "Đảo Ascension", "AD": "Andorra", "AE": "Các Tiểu V.quốc Ả Rập T.nhất", "AF": "Afghanistan", "AG": "Antigua và Barbuda", "AI": "Anguilla", "AL": "Albani", "AM": "Armenia", "AO": "Angola", "AQ": "Nam Cực", "AR": "Argentina", "AS": "Đảo Somoa thuộc Mỹ", "AT": "Áo", "AU": "Úc", "AW": "Aruba", "AX": "Quần đảo Åland", "AZ": "Azerbaijan", "BA": "Bosnia và Herzegovina", "BB": "Barbados", "BD": "Bangladesh", "BE": "Bỉ", "BF": "Burkina Faso", "BG": "Bungari", "BH": "Bahrain", "BI": "Burundi", "BJ": "Benin", "BL": "Saint 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": "Bờ Biển Ngà", "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": "Georgia", "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": "Đặc khu hành chính Hồng Kông - Trung Quốc", "HN": "Honduras", "HR": "Croatia", "HT": "Haiti", "HU": "Hungari", "IC": "Quần đảo Canary", "ID": "Indonesia", "IE": "Ai-len", "IL": "Israel", "IM": "Đảo Man", "IN": "Ấn Độ", "IO": "Thuộc địa Anh tại Ấn Độ Dương", "IQ": "I-rắc", "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": "Saint Kitts và Nevis", "KP": "Triều Tiên", "KR": "Hàn Quốc", "KW": "Cô-oét", "KY": "Quần đảo Cayman", "KZ": "Kazakhstan", "LA": "Lào", "LB": "Li-băng", "LC": "Saint Lucia", "LI": "Liechtenstein", "LK": "Sri Lanka", "LR": "Liberia", "LS": "Lesotho", "LT": "Lít-va", "LU": "Luxembourg", "LV": "Latvia", "LY": "Li-bi", "MA": "Ma-rốc", "MC": "Monaco", "MD": "Moldova", "ME": "Montenegro", "MF": "Saint Martin", "MG": "Madagascar", "MH": "Quần đảo Marshall", "MK": "Macedonia", "ML": "Mali", "MM": "Myanmar (Miến Điện)", "MN": "Mông Cổ", "MO": "Đặc khu hành chính 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": "Philippin", "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": "Saint Helena", "SI": "Slovenia", "SJ": "Svalbard và Jan Mayen", "SK": "Slovakia", "SL": "Sierra Leone", "SM": "San Marino", "SN": "Senegal", "SO": "Somali", "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ổ miền nam nước Pháp", "TG": "Togo", "TH": "Thái Lan", "TJ": "Tajikistan", "TK": "Tokelau", "TL": "Đông Timor", "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 nhỏ xa t.tâm thuộc Mỹ", "US": "Hoa Kỳ", "UY": "Uruguay", "UZ": "Uzbekistan", "VA": "Thành Vatican", "VC": "Saint 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" } } src/Symfony/Component/Intl/Resources/data/regions/yi.json000066400000000000000000000163151266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.7.41", "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": "זימבאַבווע" } } src/Symfony/Component/Intl/Resources/data/regions/yo.json000066400000000000000000000232621266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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" } } src/Symfony/Component/Intl/Resources/data/regions/yo_BJ.json000066400000000000000000000225741266465517700244440ustar00rootroot00000000000000{ "Version": "2.1.8.19", "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" } } src/Symfony/Component/Intl/Resources/data/regions/zh.json000066400000000000000000000166101266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "津巴布韦" } } src/Symfony/Component/Intl/Resources/data/regions/zh_HK.json000066400000000000000000000043071266465517700244370ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "AE": "阿拉伯聯合酋長國", "AG": "安提瓜及巴布達", "AW": "阿魯巴", "AZ": "阿塞拜疆", "BA": "波斯尼亞和黑塞哥維那", "BB": "巴巴多斯", "BJ": "貝寧", "BL": "聖巴泰勒米", "BW": "博茨瓦納", "CD": "剛果 - 金夏沙", "CG": "剛果 - 布拉薩", "CI": "科特迪瓦", "CR": "哥斯達黎加", "CV": "佛得角", "CY": "塞浦路斯", "ER": "厄立特里亞", "ET": "埃塞俄比亞", "GA": "加蓬", "GD": "格林納達", "GE": "格魯吉亞", "GM": "岡比亞", "GS": "南佐治亞島與南桑威奇群島", "GT": "危地馬拉", "HN": "洪都拉斯", "IM": "英屬地曼島", "IT": "意大利", "KE": "肯雅", "KM": "科摩羅", "KN": "聖基茨和尼維斯", "LC": "聖盧西亞", "LI": "列支敦士登", "LR": "利比里亞", "LS": "萊索托", "ME": "黑山", "ML": "馬里", "MR": "毛里塔尼亞", "MS": "蒙塞拉特島", "MU": "毛里裘斯", "MV": "馬爾代夫", "MZ": "莫桑比克", "NC": "新喀里多尼亞", "NE": "尼日爾", "NG": "尼日利亞", "OM": "阿曼", "PG": "巴布亞新幾內亞", "PN": "皮特凱恩島", "QA": "卡塔爾", "RW": "盧旺達", "SA": "沙特阿拉伯", "SB": "所羅門群島", "SC": "塞舌爾", "SI": "斯洛文尼亞", "SJ": "斯瓦爾巴群島及揚馬延島", "SL": "塞拉利昂", "SO": "索馬里", "SR": "蘇里南", "ST": "聖多美普林西比", "SZ": "斯威士蘭", "TC": "特克斯和凱科斯群島", "TD": "乍得", "TF": "法屬南部地區", "TO": "湯加", "TT": "千里達和多巴哥", "TV": "圖瓦盧", "TZ": "坦桑尼亞", "VA": "梵蒂岡宮城", "VC": "聖文森特和格林納丁斯", "VU": "瓦努阿圖", "ZM": "贊比亞" } } src/Symfony/Component/Intl/Resources/data/regions/zh_Hans_HK.json000066400000000000000000000002261266465517700254040ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "GP": "瓜德罗普岛", "ME": "黑山", "PM": "圣皮埃尔和密克隆" } } src/Symfony/Component/Intl/Resources/data/regions/zh_Hans_MO.json000066400000000000000000000001651266465517700254170ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ME": "黑山", "PM": "圣皮埃尔和密克隆" } } src/Symfony/Component/Intl/Resources/data/regions/zh_Hans_SG.json000066400000000000000000000001651266465517700254150ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ME": "黑山", "PM": "圣皮埃尔和密克隆" } } src/Symfony/Component/Intl/Resources/data/regions/zh_Hant.json000066400000000000000000000166461266465517700250400ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "辛巴威" } } src/Symfony/Component/Intl/Resources/data/regions/zh_Hant_HK.json000066400000000000000000000043071266465517700254110ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "AE": "阿拉伯聯合酋長國", "AG": "安提瓜及巴布達", "AW": "阿魯巴", "AZ": "阿塞拜疆", "BA": "波斯尼亞和黑塞哥維那", "BB": "巴巴多斯", "BJ": "貝寧", "BL": "聖巴泰勒米", "BW": "博茨瓦納", "CD": "剛果 - 金夏沙", "CG": "剛果 - 布拉薩", "CI": "科特迪瓦", "CR": "哥斯達黎加", "CV": "佛得角", "CY": "塞浦路斯", "ER": "厄立特里亞", "ET": "埃塞俄比亞", "GA": "加蓬", "GD": "格林納達", "GE": "格魯吉亞", "GM": "岡比亞", "GS": "南佐治亞島與南桑威奇群島", "GT": "危地馬拉", "HN": "洪都拉斯", "IM": "英屬地曼島", "IT": "意大利", "KE": "肯雅", "KM": "科摩羅", "KN": "聖基茨和尼維斯", "LC": "聖盧西亞", "LI": "列支敦士登", "LR": "利比里亞", "LS": "萊索托", "ME": "黑山", "ML": "馬里", "MR": "毛里塔尼亞", "MS": "蒙塞拉特島", "MU": "毛里裘斯", "MV": "馬爾代夫", "MZ": "莫桑比克", "NC": "新喀里多尼亞", "NE": "尼日爾", "NG": "尼日利亞", "OM": "阿曼", "PG": "巴布亞新幾內亞", "PN": "皮特凱恩島", "QA": "卡塔爾", "RW": "盧旺達", "SA": "沙特阿拉伯", "SB": "所羅門群島", "SC": "塞舌爾", "SI": "斯洛文尼亞", "SJ": "斯瓦爾巴群島及揚馬延島", "SL": "塞拉利昂", "SO": "索馬里", "SR": "蘇里南", "ST": "聖多美普林西比", "SZ": "斯威士蘭", "TC": "特克斯和凱科斯群島", "TD": "乍得", "TF": "法屬南部地區", "TO": "湯加", "TT": "千里達和多巴哥", "TV": "圖瓦盧", "TZ": "坦桑尼亞", "VA": "梵蒂岡宮城", "VC": "聖文森特和格林納丁斯", "VU": "瓦努阿圖", "ZM": "贊比亞" } } src/Symfony/Component/Intl/Resources/data/regions/zh_SG.json000066400000000000000000000001651266465517700244440ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "ME": "黑山", "PM": "圣皮埃尔和密克隆" } } src/Symfony/Component/Intl/Resources/data/regions/zu.json000066400000000000000000000167131266465517700240760ustar00rootroot00000000000000{ "Version": "2.1.8.18", "Names": { "AC": "i-Ascension Island", "AD": "i-Andorra", "AE": "i-United Arab Emirates", "AF": "i-Afghanistan", "AG": "i-Antigua and 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": "i-Botswana", "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": "isi-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": "i-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": "i-Lesotho", "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": "i-Mali", "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": "i-Malawi", "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-Saint 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 and 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", "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": "i-Zimbabwe" } } src/Symfony/Component/Intl/Resources/data/scripts/000077500000000000000000000000001266465517700225565ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/data/scripts/af.json000066400000000000000000000021551266465517700240420ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "Hangul", "Hani": "Han", "Hans": "Vereenvoudig", "Hant": "Tradisioneel", "Hebr": "Hebreeus", "Hira": "Hiragana", "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": "Telugu", "Thaa": "Thaana", "Thai": "Thai", "Tibt": "Tibettaans", "Zsym": "Simbole", "Zxxx": "Ongeskrewe", "Zyyy": "Algemeen", "Zzzz": "Onbekende skryfstelsel" } } src/Symfony/Component/Intl/Resources/data/scripts/am.json000066400000000000000000000024511266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ያልታወቀ ስክሪፕት" } } src/Symfony/Component/Intl/Resources/data/scripts/ar.json000066400000000000000000000112261266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "الجرمخي", "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": "المانداينية", "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": "الموروث", "Zsym": "رموز", "Zxxx": "غير مكتوب", "Zyyy": "عام", "Zzzz": "نظام كتابة غير معروف" } } src/Symfony/Component/Intl/Resources/data/scripts/as.json000066400000000000000000000001261266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "Beng": "বঙালী" } } src/Symfony/Component/Intl/Resources/data/scripts/az.json000066400000000000000000000070051266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hanqıl", "Hani": "han", "Hano": "hanunu", "Hans": "sadələşmiş han", "Hant": "ənənəvi han", "Hebr": "yəhudi", "Hira": "iraqana", "Hmng": "pahav monq", "Hrkt": "katakana vəya hiraqana", "Hung": "qədimi macar", "Inds": "hindistan", "Ital": "qədimi italyalı", "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": "zmth", "Zsym": "simvollar", "Zxxx": "yazısız", "Zyyy": "ümumi yazı", "Zzzz": "naməlum skript" } } src/Symfony/Component/Intl/Resources/data/scripts/be.json000066400000000000000000000010501266465517700240330ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "Arab": "арабскае", "Armn": "армянскае", "Cyrl": "кірылічны", "Geor": "грузінскае", "Hans": "спрошчанае кітайскае", "Hant": "традыцыйнае кітайскае", "Hebr": "габрэйскае", "Jpan": "японскае", "Latn": "лацінскі", "Zxxx": "чысты", "Zzzz": "невядомы або недапушчальны пераклад" } } src/Symfony/Component/Intl/Resources/data/scripts/bg.json000066400000000000000000000111601266465517700240400ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "гурмукхи", "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": "Фагс-па", "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": "Математически символи", "Zsym": "символи", "Zxxx": "без писменост", "Zyyy": "обща", "Zzzz": "непозната писменост" } } src/Symfony/Component/Intl/Resources/data/scripts/bn.json000066400000000000000000000140511266465517700240510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "অজানা লিপি" } } src/Symfony/Component/Intl/Resources/data/scripts/bn_IN.json000066400000000000000000000001451266465517700244360ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Hant": "ঐতিহ্যবাহী" } } src/Symfony/Component/Intl/Resources/data/scripts/bo.json000066400000000000000000000001371266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Tibt": "བོད་ཡིག་" } } src/Symfony/Component/Intl/Resources/data/scripts/br.json000066400000000000000000000036241266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/bs.json000066400000000000000000000110461266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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žarati pismo", "Guru": "gurmuki pismo", "Hang": "hangul pismo", "Hani": "han pismo", "Hano": "hanuno pismo", "Hans": "pojednostavljeno kinesko pismo", "Hant": "tradicionalno kinesko pismo", "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", "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": "malajalam 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", "Sund": "sudansko 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", "Zsym": "simboli", "Zxxx": "nepisani jezik", "Zyyy": "zajedničko pismo", "Zzzz": "nepoznato ili nevažeće pismo" } } src/Symfony/Component/Intl/Resources/data/scripts/bs_Cyrl.json000066400000000000000000000143541266465517700250550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Непознато или неважеће писмо" } } src/Symfony/Component/Intl/Resources/data/scripts/ca.json000066400000000000000000000112011266465517700240270ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "afaka", "Arab": "àrab", "Armi": "arameu imperial", "Armn": "armeni", "Avst": "avèstic", "Bali": "balinès", "Bamu": "bamum", "Bass": "bassa vah", "Batk": "batak", "Beng": "bengalí", "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", "Ethi": "etiòpic", "Geok": "georgià hucuri", "Geor": "georgià", "Glag": "glagolític", "Goth": "gòtic", "Gran": "grantha", "Grek": "grec", "Gujr": "gujarati", "Guru": "gurmukhi", "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", "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", "Mand": "mandaic", "Mani": "maniqueu", "Maya": "jeroglífics maies", "Mend": "mende", "Merc": "cursiva meroítica", "Mero": "meroític", "Mlym": "malaiàlam", "Mong": "mongol", "Moon": "moon", "Mroo": "mro", "Mtei": "manipurí", "Mymr": "birmà", "Narb": "antic nord-aràbic", "Nbat": "nabateu", "Nkgb": "geba", "Nkoo": "n’Ko", "Nshu": "nü shu", "Ogam": "ogham", "Olck": "santali", "Orkh": "orkhon", "Orya": "oriya", "Osma": "osmanya", "Palm": "palmirè", "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", "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", "Zsym": "símbols", "Zxxx": "sense escriptura", "Zyyy": "comú", "Zzzz": "escriptura desconeguda" } } src/Symfony/Component/Intl/Resources/data/scripts/cs.json000066400000000000000000000121051266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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é", "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", "Zsym": "symboly", "Zxxx": "bez zápisu", "Zyyy": "obecné", "Zzzz": "neznámé písmo" } } src/Symfony/Component/Intl/Resources/data/scripts/cy.json000066400000000000000000000022471266465517700240710ustar00rootroot00000000000000{ "Version": "2.1.7.80", "Names": { "Arab": "Arabaidd", "Armn": "Armenaidd", "Beng": "Bengalaidd", "Bopo": "Bopomofo", "Brai": "Braille", "Cyrl": "Cyrilig", "Deva": "Devanāgarī", "Ethi": "Ethiopig", "Geor": "Georgaidd", "Grek": "Groegaidd", "Gujr": "Gujarataidd", "Guru": "Gwrmwci", "Hang": "Hangul", "Hani": "Han", "Hans": "Symledig", "Hant": "Traddodiadol", "Hebr": "Hebreig", "Hira": "Hiragana", "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": "Thaa", "Thai": "Thai", "Tibt": "Tibetaidd", "Zsym": "Symbolau", "Zxxx": "Anysgrifenedig", "Zyyy": "Cyffredin", "Zzzz": "Sgript anhysbys" } } src/Symfony/Component/Intl/Resources/data/scripts/da.json000066400000000000000000000110461266465517700240370ustar00rootroot00000000000000{ "Version": "2.1.9.62", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanunoo", "Hans": "forenklet", "Hant": "traditionelt", "Hebr": "hebraisk", "Hira": "hiragana", "Hluw": "anatolske hieroglyffer", "Hmng": "pahawh hmong", "Hrkt": "katakana eller hiragana", "Hung": "oldungarsk", "Inds": "indus", "Ital": "Olditalisk", "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": "zmth", "Zsym": "zsym", "Zxxx": "uden skriftsprog", "Zyyy": "fælles", "Zzzz": "ukendt skriftsprog" } } src/Symfony/Component/Intl/Resources/data/scripts/de.json000066400000000000000000000115721266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "Hangul", "Hani": "Chinesisch", "Hano": "Hanunoo", "Hans": "Vereinfacht", "Hant": "Traditionell", "Hebr": "Hebräisch", "Hira": "Hiragana", "Hluw": "Hieroglyphen-Luwisch", "Hmng": "Pahawh Hmong", "Hrkt": "Katakana oder Hiragana", "Hung": "Altungarisch", "Inds": "Indus-Schrift", "Ital": "Altitalisch", "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", "Zsym": "Symbole", "Zxxx": "Schriftlos", "Zyyy": "Unbestimmt", "Zzzz": "Unbekannte Schrift" } } src/Symfony/Component/Intl/Resources/data/scripts/dz.json000066400000000000000000000047571266465517700241030ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ངོ་མ་ཤེས་པའི་ཡི་གུ" } } src/Symfony/Component/Intl/Resources/data/scripts/ee.json000066400000000000000000000030021266465517700240350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "arabiagbeŋɔŋlɔ", "Armn": "armeniagbeŋɔŋlɔ", "Beng": "bengaligbeŋɔŋlɔ", "Bopo": "bopomfogbeŋɔŋlɔ", "Brai": "braillegbeŋɔŋlɔ", "Cyrl": "syrilliagbeŋɔŋ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": "tsainagbeŋɔŋlɔ", "Hant": "blema tsainagbeŋɔŋlɔ", "Hebr": "hebrigbeŋɔŋlɔ", "Hira": "hiraganagbeŋɔŋlɔ", "Jpan": "dzapangbeŋɔŋ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" } } src/Symfony/Component/Intl/Resources/data/scripts/el.json000066400000000000000000000122311266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Γκουρμουκχί", "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": "Άγνωστη γραφή" } } src/Symfony/Component/Intl/Resources/data/scripts/en.json000066400000000000000000000113451266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.87", "Names": { "Afak": "Afaka", "Aghb": "Caucasian Albanian", "Arab": "Arabic", "Armi": "Imperial Aramaic", "Armn": "Armenian", "Avst": "Avestan", "Bali": "Balinese", "Bamu": "Bamum", "Bass": "Bassa Vah", "Batk": "Batak", "Beng": "Bengali", "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", "Hang": "Hangul", "Hani": "Han", "Hano": "Hanunoo", "Hans": "Simplified", "Hant": "Traditional", "Hebr": "Hebrew", "Hira": "Hiragana", "Hluw": "Anatolian Hieroglyphs", "Hmng": "Pahawh Hmong", "Hrkt": "Japanese syllabaries", "Hung": "Old Hungarian", "Inds": "Indus", "Ital": "Old Italic", "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", "Maya": "Mayan hieroglyphs", "Mend": "Mende", "Merc": "Meroitic Cursive", "Mero": "Meroitic", "Mlym": "Malayalam", "Modi": "Modi", "Mong": "Mongolian", "Moon": "Moon", "Mroo": "Mro", "Mtei": "Meitei Mayek", "Mymr": "Myanmar", "Narb": "Old North Arabian", "Nbat": "Nabataean", "Nkgb": "Naxi Geba", "Nkoo": "N’Ko", "Nshu": "Nüshu", "Ogam": "Ogham", "Olck": "Ol Chiki", "Orkh": "Orkhon", "Orya": "Oriya", "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", "Zsym": "Symbols", "Zxxx": "Unwritten", "Zyyy": "Common", "Zzzz": "Unknown Script" } } src/Symfony/Component/Intl/Resources/data/scripts/en_AU.json000066400000000000000000000002531266465517700244400ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Cham": "Cham", "Loma": "Loma", "Modi": "Modi", "Moon": "Moon", "Thai": "Thai" } } src/Symfony/Component/Intl/Resources/data/scripts/en_GB.json000066400000000000000000000001131266465517700244160ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Thai": "Thai" } } src/Symfony/Component/Intl/Resources/data/scripts/es.json000066400000000000000000000070031266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanunoo", "Hans": "simplificado", "Hant": "tradicional", "Hebr": "hebreo", "Hira": "hiragana", "Hmng": "pahawh hmong", "Hrkt": "katakana o hiragana", "Hung": "húngaro antiguo", "Inds": "Indio (harappan)", "Ital": "antigua bastardilla", "Java": "javanés", "Jpan": "japonés", "Kali": "kayah li", "Kana": "katakana", "Khar": "kharosthi", "Khmr": "jemer", "Knda": "canarés", "Kore": "coreano", "Lana": "lanna", "Laoo": "lao", "Latf": "latino fraktur", "Latg": "latino gaélico", "Latn": "latín", "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": "singalé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", "Zsym": "símbolos", "Zxxx": "no escrito", "Zyyy": "común", "Zzzz": "alfabeto desconocido" } } src/Symfony/Component/Intl/Resources/data/scripts/es_419.json000066400000000000000000000002071266465517700244540ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Laoo": "laosiano", "Mlym": "malayalam", "Sinh": "sinhala" } } src/Symfony/Component/Intl/Resources/data/scripts/es_MX.json000066400000000000000000000003111266465517700244570ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Hans": "han simplificado", "Hant": "han tradicional", "Laoo": "lao", "Sinh": "cingalés", "Telu": "telugú" } } src/Symfony/Component/Intl/Resources/data/scripts/et.json000066400000000000000000000061771266465517700240740ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "araabia", "Armn": "armeenia", "Bali": "bali", "Batk": "bataki", "Beng": "bengali", "Blis": "Blissi sümbolid", "Bopo": "bopomofo", "Brah": "brahmi", "Brai": "punktkiri", "Bugi": "bugi", "Buhd": "buhidi", "Cans": "Kanada põlisrahvaste ühtlustatud silpkiri", "Cham": "tšami", "Cher": "tšerokii", "Cirt": "cirth", "Copt": "kopti", "Cprt": "muinasküprose", "Cyrl": "kirillitsa", "Cyrs": "kirikuslaavi kirillitsa", "Deva": "devanaagari", "Dsrt": "deseret", "Egyd": "egiptuse demootiline", "Egyh": "egiptuse hieraatiline", "Egyp": "egiptuse hieroglüüfkiri", "Ethi": "etioopia", "Geok": "gruusia hutsuri", "Geor": "gruusia", "Glag": "glagoolitsa", "Goth": "gooti", "Grek": "kreeka", "Gujr": "gudžarati", "Guru": "gurmukhi", "Hang": "hanguli", "Hani": "hiina han", "Hano": "hanunoo", "Hans": "hiina lihtsustatud", "Hant": "hiina traditsiooniline", "Hebr": "heebrea", "Hira": "hiragana", "Hrkt": "katakana või hiragana", "Hung": "vanaungari", "Inds": "induse", "Ital": "vanaitali", "Java": "jaava", "Jpan": "jaapani", "Kali": "kaja li", "Kana": "katakana", "Khar": "kharoshthi", "Khmr": "khmeeri", "Knda": "kannada", "Kore": "koreani", "Laoo": "lao", "Latf": "ladina fraktuurkiri", "Latg": "ladina keldi kiri", "Latn": "ladina", "Lepc": "leptša", "Limb": "limbu", "Lina": "lineaar-A", "Linb": "lineaar-B", "Mand": "mandea", "Maya": "maaja hieroglüüfkiri", "Mero": "meroe", "Mlym": "malajalami", "Mong": "mongoli", "Mymr": "birma", "Nkoo": "nkoo", "Ogam": "ogam", "Orkh": "orhoni", "Orya": "oria", "Osma": "osmanja", "Perm": "vanapermi", "Phag": "phags-pa", "Phnx": "foiniikia", "Plrd": "Pollardi miao", "Roro": "rongorongo", "Runr": "ruunikiri", "Sara": "sarati", "Shaw": "Shaw tähestik", "Sinh": "singali", "Sylo": "silotinagri", "Syrc": "assüüria", "Syre": "assüüria estrangelo", "Syrj": "lääneassüüria", "Syrn": "idaassüüria", "Tagb": "tagbanwa", "Tale": "tai le", "Talu": "lihtsustatud tai lue", "Taml": "tamili", "Telu": "telugu", "Teng": "tengwar", "Tfng": "tifinagi", "Tglg": "tagalogi", "Thaa": "thaana", "Thai": "tai", "Tibt": "tiibeti", "Ugar": "ugariti", "Vaii": "vai", "Visp": "häälduskiri", "Xpeo": "vanapärsia", "Xsux": "sumeri kiilkiri", "Yiii": "jii", "Zinh": "päritud", "Zsym": "sümbolid", "Zxxx": "kirjakeeleta", "Zyyy": "üldine", "Zzzz": "määramata" } } src/Symfony/Component/Intl/Resources/data/scripts/eu.json000066400000000000000000000022721266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangula", "Hani": "idazkera txinatarra", "Hans": "sinplifikatua", "Hant": "tradizionala", "Hebr": "hebreera", "Hira": "hiragana", "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", "Zsym": "ikurrak", "Zxxx": "idatzi gabea", "Zyyy": "ohikoa", "Zzzz": "idazkera ezezaguna" } } src/Symfony/Component/Intl/Resources/data/scripts/fa.json000066400000000000000000000103041266465517700240350ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "گورومخی", "Hang": "هانگول", "Hani": "هان", "Hano": "هانونویی", "Hans": "ساده‌شده", "Hant": "سنتی", "Hebr": "عبری", "Hira": "هیراگانا", "Hluw": "هیروگلیف آناتولی", "Hrkt": "سیلابی‌های ژاپنی", "Hung": "مجاری باستان", "Inds": "ایندوس", "Ital": "ایتالی باستان", "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": "علائم ریاضی", "Zsym": "علائم", "Zxxx": "نانوشته", "Zyyy": "مشترک", "Zzzz": "خط نامشخص" } } src/Symfony/Component/Intl/Resources/data/scripts/fa_AF.json000066400000000000000000000001171266465517700244040ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Mong": "مغلی" } } src/Symfony/Component/Intl/Resources/data/scripts/fi.json000066400000000000000000000127431266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "afaka", "Aghb": "kaukasianalbanialainen", "Arab": "arabialainen", "Armi": "valtakunnanaramealainen", "Armn": "armenialainen", "Avst": "avestalainen", "Bali": "balilainen", "Bamu": "bamum", "Bass": "bassa", "Batk": "batakilainen", "Beng": "bengalilainen", "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", "Hang": "hangul", "Hani": "kiinalainen han", "Hano": "hanunoolainen", "Hans": "yksinkertaistettu han", "Hant": "perinteinen han", "Hebr": "heprealainen", "Hira": "hiragana", "Hluw": "anatolialaiset hieroglyfit", "Hmng": "pahawh hmong", "Hrkt": "hiragana tai katakana", "Hung": "muinaisunkarilainen", "Inds": "induslainen", "Ital": "muinaisitalialainen", "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", "Maya": "maya-hieroglyfit", "Mend": "mende", "Merc": "meroiittinen kursiivikirjoitus", "Mero": "meroiittinen", "Mlym": "malajalamilainen", "Modi": "modi-aakkoset", "Mong": "mongolilainen", "Moon": "moon-kohokirjoitus", "Mroo": "mro", "Mtei": "meitei", "Mymr": "burmalainen", "Narb": "muinaispohjoisarabialainen", "Nbat": "nabatealainen", "Nkgb": "naxi geba", "Nkoo": "n’ko", "Nshu": "nüshu", "Ogam": "ogam", "Olck": "ol chiki", "Orkh": "orkhon", "Orya": "orijalainen", "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", "Zsym": "symbolit", "Zxxx": "kirjoittamaton", "Zyyy": "määrittämätön", "Zzzz": "tuntematon kirjoitusjärjestelmä" } } src/Symfony/Component/Intl/Resources/data/scripts/fo.json000066400000000000000000000001171266465517700240540ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "Latn": "latinske" } } src/Symfony/Component/Intl/Resources/data/scripts/fr.json000066400000000000000000000077451266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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î", "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", "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", "Zsym": "symboles", "Zxxx": "non écrit", "Zyyy": "commun", "Zzzz": "écriture inconnue" } } src/Symfony/Component/Intl/Resources/data/scripts/fr_CA.json000066400000000000000000000004441266465517700244250ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Deva": "devanagari", "Gujr": "gujarati", "Hans": "idéogrammes han simplifiés", "Hant": "idéogrammes han traditionnels", "Mlym": "malayâlam", "Orya": "oriyâ", "Sinh": "cingalais" } } src/Symfony/Component/Intl/Resources/data/scripts/fy.json000066400000000000000000000111611266465517700240670ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/ga.json000066400000000000000000000047701266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "Arabach", "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", "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", "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", "Ogam": "Ogham", "Orya": "Oiríseach", "Perm": "Sean-Pheirmeach", "Phnx": "Féiníceach", "Runr": "Rúnach", "Samr": "Samárach", "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", "Xpeo": "Sean-Pheirseach", "Xsux": "Dingchruthach Suiméar-Acádach", "Zmth": "Nodaireacht Mhatamaiticiúil", "Zsym": "Siombailí", "Zxxx": "Gan Scríobh", "Zyyy": "Coitianta", "Zzzz": "Script Anaithnid" } } src/Symfony/Component/Intl/Resources/data/scripts/gd.json000066400000000000000000000044021266465517700240430ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Aghb": "Albàinis Chabhcasach", "Arab": "Arabais", "Armi": "Aramais impireil", "Armn": "Airmeinis", "Avst": "Avestanais", "Bali": "Bali", "Beng": "Beangailis", "Bopo": "Bopomofo", "Brai": "Braille", "Cans": "Sgrìobhadh Lideach Aonaichte nan Tùsanach Canadach", "Copt": "Coptais", "Cprt": "Cìoprasais", "Cyrl": "Cirilis", "Cyrs": "Cirilis Seann-Slàbhais na h-Eaglaise", "Deva": "Devanagari", "Egyp": "Sealbh-sgrìobhadh Èipheiteach", "Ethi": "Ge’ez", "Geor": "Cairtbheilis", "Goth": "Gotais", "Grek": "Greugais", "Gujr": "Gujarati", "Guru": "Gurmukhi", "Hang": "Hangul", "Hani": "Han", "Hans": "Simplichte", "Hant": "Tradaiseanta", "Hebr": "Eabhra", "Hira": "Hiragana", "Hluw": "Dealbh-sgrìobhadh Anatolach", "Hrkt": "Katakana no Hiragana", "Hung": "Seann-Ungarais", "Ital": "Seann-Eadailtis", "Java": "Deàbhanais", "Jpan": "Seapanais", "Kana": "Katakana", "Khmr": "Cmèar", "Knda": "Kannada", "Kore": "Coirèanais", "Laoo": "Làtho", "Latf": "Laideann fraktur", "Latg": "Laideann Ghàidhealach", "Latn": "Laideann", "Maya": "Dealbh-sgrìobhadh Mayach", "Mlym": "Malayalam", "Mong": "Mongolais", "Mymr": "Miànmar", "Narb": "Seann-Arabach Thuathach", "Ogam": "Ogham-chraobh", "Orya": "Oriya", "Prti": "Partais snaidh-sgrìobhte", "Runr": "Rùn-sgrìobhadh", "Sarb": "Seann-Arabais Dheasach", "Sinh": "Sinealais", "Syrc": "Suraidheac", "Syrj": "Suraidheac Siarach", "Syrn": "Suraidheac Earach", "Taml": "Taimil", "Telu": "Telugu", "Tfng": "Tifinagh", "Tglg": "Tagalog", "Thaa": "Thaana", "Thai": "Tàidh", "Tibt": "Tibeitis", "Xpeo": "Seann-Pheirsis", "Zmth": "Gnìomhairean matamataig", "Zsym": "Samhlaidhean", "Zxxx": "Gun sgrìobhadh", "Zyyy": "Coitcheann", "Zzzz": "Litreadh neo-aithnichte" } } src/Symfony/Component/Intl/Resources/data/scripts/gl.json000066400000000000000000000022601266465517700240530ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "Árabe", "Armn": "Armenio", "Beng": "Bengalí", "Bopo": "Bopomofo", "Brai": "Braille", "Cans": "Silabario aborixe canadiano unificado", "Cyrl": "Cirílico", "Deva": "Devanagari", "Ethi": "Etíope", "Geor": "Xeorxiano", "Grek": "Grego", "Gujr": "guxaratí", "Guru": "Gurmukhi", "Hang": "Hangul", "Hani": "Han", "Hans": "Simplificado", "Hant": "Tradicional", "Hebr": "Hebreo", "Hira": "Hiragana", "Jpan": "Xaponés", "Kana": "Katakana", "Khmr": "Camboxano", "Knda": "canarés", "Kore": "Coreano", "Laoo": "Laosiano", "Latn": "Latino", "Mlym": "Malabar", "Mong": "Mongol", "Mymr": "Birmania", "Orya": "Oriya", "Sinh": "Cingalés", "Taml": "Támil", "Telu": "Telugú", "Thaa": "Thaana", "Thai": "Tailandés", "Tibt": "Tibetano", "Zsym": "Símbolos", "Zxxx": "Non escrita", "Zyyy": "Común", "Zzzz": "Escritura descoñecida" } } src/Symfony/Component/Intl/Resources/data/scripts/gu.json000066400000000000000000000134631266465517700240730ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ગુરૂમુખી", "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": "અજ્ઞાત લિપિ" } } src/Symfony/Component/Intl/Resources/data/scripts/he.json000066400000000000000000000041251266465517700240470ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "ערבי", "Armn": "ארמני", "Bali": "באלינזי", "Beng": "בנגלי", "Bopo": "בופומופו", "Brai": "ברייל", "Cham": "צ׳אם", "Cher": "צ׳ירוקי", "Copt": "קופטי", "Cprt": "קפריסאי", "Cyrl": "קירילי", "Cyrs": "קירילי סלאבוני כנסייתי עתיק", "Deva": "דוואנגרי", "Egyp": "כתב חרטומים", "Ethi": "אתיופי", "Geor": "גאורגי", "Goth": "גותי", "Grek": "יווני", "Gujr": "גוג׳רטי", "Guru": "גורמוקי", "Hang": "האנגול", "Hani": "האן", "Hans": "מפושט", "Hant": "מסורתי", "Hebr": "עברי", "Hira": "הירגאנה", "Hung": "הונגרי עתיק", "Inds": "אינדוס", "Ital": "איטלקי עתיק", "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": "סימון מתמטי", "Zsym": "סימנים", "Zxxx": "לא כתוב", "Zyyy": "רגיל", "Zzzz": "כתב שאינו ידוע" } } src/Symfony/Component/Intl/Resources/data/scripts/hi.json000066400000000000000000000135321266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "गुरमुखी", "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": "लीनियर 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": "गणितीय संकेतन", "Zsym": "चिह्न", "Zxxx": "अलिखित", "Zyyy": "सामान्य", "Zzzz": "अज्ञात लिपि" } } src/Symfony/Component/Intl/Resources/data/scripts/hr.json000066400000000000000000000126521266465517700240700ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangul pismo", "Hani": "han pismo", "Hano": "hanunoo pismo", "Hans": "pojednostavljeno pismo", "Hant": "tradicionalno pismo", "Hebr": "hebrejsko pismo", "Hira": "hiragana pismo", "Hluw": "anatolijski hijeroglifi", "Hmng": "pahawh hmong pismo", "Hrkt": "katakana ili hiragana pismo", "Hung": "staro mađarsko pismo", "Inds": "indijsko pismo", "Ital": "staro talijansko 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": "sudansko 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": "telugu pismo", "Teng": "tengwar pismo", "Tfng": "tifinar", "Tglg": "tagalog pismo", "Thaa": "thaana pismo", "Thai": "tajlandsko 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", "Zsym": "simboli", "Zxxx": "jezik bez pismenosti", "Zyyy": "zajedničko pismo", "Zzzz": "nepoznato pismo" } } src/Symfony/Component/Intl/Resources/data/scripts/hu.json000066400000000000000000000074611266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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", "Zsym": "Szimbólum", "Zxxx": "Íratlan nyelvek kódja", "Zyyy": "Meghatározatlan", "Zzzz": "Ismeretlen írásrendszer" } } src/Symfony/Component/Intl/Resources/data/scripts/hy.json000066400000000000000000000027451266465517700241010ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "անհայտ գիր" } } src/Symfony/Component/Intl/Resources/data/scripts/id.json000066400000000000000000000110621266465517700240450ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Gujarati", "Guru": "Gurmukhi", "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", "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", "Zsym": "Simbol", "Zxxx": "Tidak Tertulis", "Zyyy": "Umum", "Zzzz": "Skrip Tak Dikenal" } } src/Symfony/Component/Intl/Resources/data/scripts/ii.json000066400000000000000000000005211266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Arab": "ꀊꇁꀨꁱꂷ", "Cyrl": "ꀊꆨꌦꇁꃚꁱꂷ", "Hans": "ꈝꐯꉌꈲꁱꂷ", "Hant": "ꀎꋏꉌꈲꁱꂷ", "Latn": "ꇁꄀꁱꂷ", "Yiii": "ꆈꌠꁱꂷ", "Zxxx": "ꁱꀋꉆꌠ", "Zzzz": "ꅉꀋꐚꌠꁱꂷ" } } src/Symfony/Component/Intl/Resources/data/scripts/in.json000066400000000000000000000110621266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Gujarati", "Guru": "Gurmukhi", "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", "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", "Zsym": "Simbol", "Zxxx": "Tidak Tertulis", "Zyyy": "Umum", "Zzzz": "Skrip Tak Dikenal" } } src/Symfony/Component/Intl/Resources/data/scripts/is.json000066400000000000000000000022651266465517700240710ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangul", "Hani": "kínverskt", "Hans": "einfaldað", "Hant": "hefðbundið", "Hebr": "hebreskt", "Hira": "hiragana", "Hrkt": "katakana eða hiragana", "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", "Zsym": "tákn", "Zxxx": "óskrifað", "Zyyy": "almennt", "Zzzz": "óþekkt letur" } } src/Symfony/Component/Intl/Resources/data/scripts/it.json000066400000000000000000000112331266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.32", "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", "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", "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", "Zsym": "simboli", "Zxxx": "non scritto", "Zyyy": "comune", "Zzzz": "ignoto o non valido" } } src/Symfony/Component/Intl/Resources/data/scripts/iw.json000066400000000000000000000041251266465517700240720ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "ערבי", "Armn": "ארמני", "Bali": "באלינזי", "Beng": "בנגלי", "Bopo": "בופומופו", "Brai": "ברייל", "Cham": "צ׳אם", "Cher": "צ׳ירוקי", "Copt": "קופטי", "Cprt": "קפריסאי", "Cyrl": "קירילי", "Cyrs": "קירילי סלאבוני כנסייתי עתיק", "Deva": "דוואנגרי", "Egyp": "כתב חרטומים", "Ethi": "אתיופי", "Geor": "גאורגי", "Goth": "גותי", "Grek": "יווני", "Gujr": "גוג׳רטי", "Guru": "גורמוקי", "Hang": "האנגול", "Hani": "האן", "Hans": "מפושט", "Hant": "מסורתי", "Hebr": "עברי", "Hira": "הירגאנה", "Hung": "הונגרי עתיק", "Inds": "אינדוס", "Ital": "איטלקי עתיק", "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": "סימון מתמטי", "Zsym": "סימנים", "Zxxx": "לא כתוב", "Zyyy": "רגיל", "Zzzz": "כתב שאינו ידוע" } } src/Symfony/Component/Intl/Resources/data/scripts/ja.json000066400000000000000000000146411266465517700240510ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "グルムキー文字", "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": "線文字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": "数学記号", "Zsym": "記号文字", "Zxxx": "非表記", "Zyyy": "共通文字", "Zzzz": "未定義文字" } } src/Symfony/Component/Intl/Resources/data/scripts/ka.json000066400000000000000000000153551266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "გურმუხი", "Hang": "ჰანგული", "Hani": "ჰანი", "Hano": "ჰანუნოო", "Hans": "გამარტივებული", "Hant": "ტრადიციული", "Hebr": "ებრაული", "Hira": "ჰირაგანა", "Hluw": "ანატოლიური იეროგლიფური", "Hmng": "ფაჰაუ-მონი", "Hrkt": "იაპონური კანა", "Hung": "ძველი უნგრული", "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": "მათემატიკური ნოტაცია", "Zsym": "სიმბოლოები", "Zxxx": "უმწერლობო", "Zyyy": "ზოგადი", "Zzzz": "უცნობი დამწერლობა" } } src/Symfony/Component/Intl/Resources/data/scripts/kk.json000066400000000000000000000033301266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "белгісіз жазба" } } src/Symfony/Component/Intl/Resources/data/scripts/km.json000066400000000000000000000034041266465517700240610ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "មិន​ស្គាល់​អក្សរ" } } src/Symfony/Component/Intl/Resources/data/scripts/kn.json000066400000000000000000000144141266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ಗೊತ್ತಿಲ್ಲದ ಲಿಪಿ" } } src/Symfony/Component/Intl/Resources/data/scripts/ko.json000066400000000000000000000137011266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.9.31", "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": "구르무키 문자", "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": "선형 문자(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": "수학 기호", "Zsym": "기호", "Zxxx": "구전", "Zyyy": "일반 문자", "Zzzz": "기록되지 않은 문자(구전)" } } src/Symfony/Component/Intl/Resources/data/scripts/ks.json000066400000000000000000000107761266465517700241010ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "اَن زٲنۍ یا نا لَگہٕ ہار رَسمُل خظ" } } src/Symfony/Component/Intl/Resources/data/scripts/ky.json000066400000000000000000000024531266465517700241000ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "Белгисиз жазуу" } } src/Symfony/Component/Intl/Resources/data/scripts/lb.json000066400000000000000000000072351266465517700240550ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/lo.json000066400000000000000000000156551266465517700240770ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ກົວມູຄີ", "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": "ໂອຣິຢາ", "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": "ການຂຽນທີ່ບໍ່ຮູ້ຈັກ" } } src/Symfony/Component/Intl/Resources/data/scripts/lt.json000066400000000000000000000115351266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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ų", "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", "Zsym": "simbolių", "Zxxx": "neparašyta", "Zyyy": "bendri", "Zzzz": "nežinomi rašmenys" } } src/Symfony/Component/Intl/Resources/data/scripts/lv.json000066400000000000000000000043771266465517700241050ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangila", "Hani": "ķīniešu", "Hans": "ķīniešu vienkāršotā", "Hant": "ķīniešu tradicionālā", "Hebr": "ivrits", "Hira": "hiragana", "Hrkt": "katakana vai hiragana", "Hung": "senungāru", "Ital": "vecitāļu", "Java": "javiešu", "Jpan": "japāņu", "Kana": "katakana", "Khmr": "khmeru", "Knda": "kannaru", "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", "Zsym": "simboli", "Zxxx": "bez rakstības", "Zyyy": "vispārējā", "Zzzz": "nezināma rakstība" } } src/Symfony/Component/Intl/Resources/data/scripts/meta.json000066400000000000000000000051651266465517700244060ustar00rootroot00000000000000{ "Version": "2.1.7.12", "Scripts": [ "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", "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", "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", "Zsym", "Zxxx", "Zyyy", "Zzzz" ] } src/Symfony/Component/Intl/Resources/data/scripts/mk.json000066400000000000000000000152161266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "гурмуки", "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": "лидиско", "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": "математичка нотација", "Zsym": "симболи", "Zxxx": "без писмо", "Zyyy": "општо", "Zzzz": "непознато писмо" } } src/Symfony/Component/Intl/Resources/data/scripts/ml.json000066400000000000000000000137301266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "അജ്ഞാത ലിപി" } } src/Symfony/Component/Intl/Resources/data/scripts/mn.json000066400000000000000000000025001266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "тодорхойгүй бичиг" } } src/Symfony/Component/Intl/Resources/data/scripts/mr.json000066400000000000000000000136001266465517700240670ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "अज्ञात लिपी" } } src/Symfony/Component/Intl/Resources/data/scripts/ms.json000066400000000000000000000022231266465517700240670ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "Arab", "Armn": "Armenia", "Bali": "Bali", "Bamu": "Bamu", "Beng": "Bengali", "Bopo": "Bopomofo", "Brai": "Braille", "Cans": "Cans", "Cyrl": "Cyril", "Deva": "Devanagari", "Ethi": "Ethiopia", "Geor": "Georgia", "Grek": "Greek", "Gujr": "Gujarat", "Guru": "Gurmukhi", "Hang": "Hangul", "Hani": "Han", "Hans": "Ringkas", "Hant": "Tradisional", "Hebr": "Ibrani", "Hira": "Hiragana", "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", "Zsym": "Simbol", "Zxxx": "Tidak ditulis", "Zyyy": "Biasa", "Zzzz": "Skrip Tidak Diketahui" } } src/Symfony/Component/Intl/Resources/data/scripts/mt.json000066400000000000000000000005401266465517700240700ustar00rootroot00000000000000{ "Version": "2.1.8.22", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/my.json000066400000000000000000000043321266465517700241000ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "အာရေဗျ", "Armn": "အာမေးနီးယား", "Beng": "ဘင်္ဂါလီ", "Bopo": "ဘိုပို", "Brah": "ဗြဟ္မမီ", "Brai": "ဘရေ", "Cyrl": "စစ်ရိလစ်", "Deva": "ဒီဗနာဂရီ", "Ethi": "အီသီယိုးပီးယား", "Geor": "ဂျော်ဂျီယန်", "Grek": "ဂရိ", "Gujr": "ဂုဂျာရသီ", "Guru": "ဂူရူ", "Hang": "ဟန်ဂူးလ်", "Hani": "ဟန်", "Hans": "ရိုးရှင်းသော တရုတ်", "Hant": "ရှေးရိုးစဉ်လာ တရုတ်", "Hebr": "ဟီဗရူး", "Hira": "ဟိရဂဏ", "Hrkt": "ခတခဏ သို့မဟုတ် ဟိရဂဏ", "Java": "ဂျာဗားနီးစ်", "Jpan": "ဂျပန်", "Kali": "ကယားလီ", "Kana": "ခတခဏ", "Khmr": "ခမာ", "Knda": "ခန္နာဒါ", "Kore": "ကိုးရီးယား", "Laoo": "လာအို", "Latn": "လက်တင်", "Mlym": "မာလာရာလန်", "Mong": "မွန်ဂိုလီးယား", "Mymr": "မြန်မာ", "Orya": "အိုရာ", "Sinh": "ဆင်ဟာလ", "Sund": "ဆူဒန်", "Tale": "တိုင်လီ", "Taml": "တမီးလ်", "Telu": "တီလု", "Tglg": "တဂလော့ဂ်", "Thaa": "သာအ်", "Thai": "ထိုင်း", "Tibt": "တိဘက်", "Visp": "မြင်နိုင်သော စကား", "Xpeo": "ပါရှန် အဟောင်း", "Yiii": "ရီ", "Zsym": "သင်္ကေတ", "Zxxx": "မရေးထားသော", "Zyyy": "အများနှင့်သက်ဆိုင်သော", "Zzzz": "မသိ သို့မဟုတ် မရှိသော စကားလုံး" } } src/Symfony/Component/Intl/Resources/data/scripts/nb.json000066400000000000000000000111451266465517700240520ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "afaka", "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", "Ethi": "etiopisk", "Geok": "georgisk khutsuri", "Geor": "georgisk", "Glag": "glagolittisk", "Goth": "gotisk", "Gran": "gammeltamilsk", "Grek": "gresk", "Gujr": "gujarati", "Guru": "gurmukhi", "Hang": "hangul", "Hani": "han", "Hano": "hanunoo", "Hans": "forenklet", "Hant": "tradisjonell", "Hebr": "hebraisk", "Hira": "hiragana", "Hluw": "anatoliske hieroglyfer", "Hmng": "pahawh hmong", "Hrkt": "katakana eller hiragana", "Hung": "gammelungarsk", "Inds": "indus", "Ital": "gammelitalisk", "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", "Mand": "mandaisk", "Mani": "manikeisk", "Maya": "maya-hieroglyfer", "Mend": "mende", "Merc": "meroitisk kursiv", "Mero": "meroitisk", "Mlym": "malayalam", "Mong": "mongolsk", "Moon": "moon", "Mroo": "mro", "Mtei": "meitei-mayek", "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", "Perm": "gammelpermisk", "Phag": "phags-pa", "Phli": "inskripsjonspahlavi", "Phlp": "psalter pahlavi", "Phlv": "pahlavi", "Phnx": "fønikisk", "Plrd": "pollard-fonetisk", "Prti": "inskripsjonsparthisk", "Rjng": "rejang", "Roro": "rongorongo", "Runr": "runer", "Samr": "samaritansk", "Sara": "sarati", "Sarb": "gammelsørarabisk", "Saur": "saurashtra", "Sgnw": "tegnskrift", "Shaw": "shavisk", "Shrd": "sharada", "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", "Zsym": "symboler", "Zxxx": "språk uten skrift", "Zyyy": "felles", "Zzzz": "ukjent skrift" } } src/Symfony/Component/Intl/Resources/data/scripts/ne.json000066400000000000000000000127131266465517700240570ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "गुरूमुखी", "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": "लिम्बु", "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": "पुरानो पर्सियन", "Yiii": "यी", "Zinh": "इन्हेरिटेड", "Zmth": "जमथ", "Zsym": "प्रतीकहरू", "Zxxx": "नलेखिएको", "Zyyy": "साझा", "Zzzz": "अज्ञात लिपि" } } src/Symfony/Component/Intl/Resources/data/scripts/nl.json000066400000000000000000000114771266465517700240740ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "Defaka", "Aghb": "Kaukasisch Albanees", "Arab": "Arabisch", "Armi": "Keizerlijk Aramees", "Armn": "Armeens", "Avst": "Avestaans", "Bali": "Balinees", "Bamu": "Bamoun", "Bass": "Bassa Vah", "Batk": "Batak", "Beng": "Bengaals", "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", "Hang": "Hangul", "Hani": "Han", "Hano": "Hanunoo", "Hans": "vereenvoudigd", "Hant": "traditioneel", "Hebr": "Hebreeuws", "Hira": "Hiragana", "Hluw": "Anatolische hiërogliefen", "Hmng": "Pahawh Hmong", "Hrkt": "Katakana of Hiragana", "Hung": "Oudhongaars", "Inds": "Indus", "Ital": "Oud-italisch", "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 Latijn", "Latg": "Gaelisch Latijn", "Latn": "Latijn", "Lepc": "Lepcha", "Limb": "Limbu", "Lina": "Lineair A", "Linb": "Lineair B", "Lisu": "Fraser", "Loma": "Loma", "Lyci": "Lycisch", "Lydi": "Lydisch", "Mahj": "Mahajani", "Mand": "Mandaeans", "Mani": "Manicheaans", "Maya": "Mayahiërogliefen", "Mend": "Mende", "Merc": "Meroitisch cursief", "Mero": "Meroïtisch", "Mlym": "Malayalam", "Modi": "Modi", "Mong": "Mongools", "Moon": "Moon", "Mroo": "Mro", "Mtei": "Meitei", "Mymr": "Birmaans", "Narb": "Oud Noord-Arabisch", "Nbat": "Nabateaans", "Nkgb": "Naxi Geba", "Nkoo": "N’Ko", "Nshu": "Nüshu", "Ogam": "Ogham", "Olck": "Ol Chiki", "Orkh": "Orkhon", "Orya": "Odia", "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", "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", "Zsym": "Symbolen", "Zxxx": "ongeschreven", "Zyyy": "algemeen", "Zzzz": "onbekend schriftsysteem" } } src/Symfony/Component/Intl/Resources/data/scripts/nn.json000066400000000000000000000076241266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.7.72", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/no.json000066400000000000000000000111451266465517700240670ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "afaka", "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", "Ethi": "etiopisk", "Geok": "georgisk khutsuri", "Geor": "georgisk", "Glag": "glagolittisk", "Goth": "gotisk", "Gran": "gammeltamilsk", "Grek": "gresk", "Gujr": "gujarati", "Guru": "gurmukhi", "Hang": "hangul", "Hani": "han", "Hano": "hanunoo", "Hans": "forenklet", "Hant": "tradisjonell", "Hebr": "hebraisk", "Hira": "hiragana", "Hluw": "anatoliske hieroglyfer", "Hmng": "pahawh hmong", "Hrkt": "katakana eller hiragana", "Hung": "gammelungarsk", "Inds": "indus", "Ital": "gammelitalisk", "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", "Mand": "mandaisk", "Mani": "manikeisk", "Maya": "maya-hieroglyfer", "Mend": "mende", "Merc": "meroitisk kursiv", "Mero": "meroitisk", "Mlym": "malayalam", "Mong": "mongolsk", "Moon": "moon", "Mroo": "mro", "Mtei": "meitei-mayek", "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", "Perm": "gammelpermisk", "Phag": "phags-pa", "Phli": "inskripsjonspahlavi", "Phlp": "psalter pahlavi", "Phlv": "pahlavi", "Phnx": "fønikisk", "Plrd": "pollard-fonetisk", "Prti": "inskripsjonsparthisk", "Rjng": "rejang", "Roro": "rongorongo", "Runr": "runer", "Samr": "samaritansk", "Sara": "sarati", "Sarb": "gammelsørarabisk", "Saur": "saurashtra", "Sgnw": "tegnskrift", "Shaw": "shavisk", "Shrd": "sharada", "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", "Zsym": "symboler", "Zxxx": "språk uten skrift", "Zyyy": "felles", "Zzzz": "ukjent skrift" } } src/Symfony/Component/Intl/Resources/data/scripts/om.json000066400000000000000000000001141266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Latn": "Latin" } } src/Symfony/Component/Intl/Resources/data/scripts/or.json000066400000000000000000000142701266465517700240750ustar00rootroot00000000000000{ "Version": "2.1.6.69", "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": "ଅଞ୍ଜାତ କିମ୍ବା ଅବୈଧ ସ୍କ୍ରୀପ୍ଟ" } } src/Symfony/Component/Intl/Resources/data/scripts/os.json000066400000000000000000000005301266465517700240700ustar00rootroot00000000000000{ "Version": "2.1.7.53", "Names": { "Arab": "Араббаг", "Cyrl": "Киррилицӕ", "Hans": "Ӕнцонгонд китайаг", "Hant": "Традицион китайаг", "Latn": "Латинаг", "Zxxx": "Нӕфысгӕ", "Zzzz": "Нӕзонгӕ скрипт" } } src/Symfony/Component/Intl/Resources/data/scripts/pa.json000066400000000000000000000030421266465517700240500ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "ਤਿੱਬਤੀ", "Zmth": "ਗਣਿਤ ਚਿੰਨ੍ਹ-ਲਿਪੀ", "Zsym": "ਚਿੰਨ੍ਹ", "Zxxx": "ਅਲਿਖਤ", "Zyyy": "ਸਧਾਰਨ", "Zzzz": "ਅਣਪਛਾਤੀ ਲਿਪੀ" } } src/Symfony/Component/Intl/Resources/data/scripts/pa_Arab.json000066400000000000000000000001631266465517700247760ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Arab": "عربی", "Guru": "گُرمُکھی" } } src/Symfony/Component/Intl/Resources/data/scripts/pl.json000066400000000000000000000100621266465517700240630ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "devanagari", "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", "Hang": "hangyl", "Hani": "han", "Hano": "hanunoo", "Hans": "uproszczone", "Hant": "tradycyjne", "Hebr": "hebrajskie", "Hira": "hiragana", "Hmng": "pahawh hmong", "Hrkt": "katakana lub hiragana", "Hung": "starowęgierskie", "Inds": "indus", "Ital": "starowłoskie", "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", "Zsym": "symbole", "Zxxx": "język bez systemu pisma", "Zyyy": "wspólne", "Zzzz": "nieznane lub niepoprawne" } } src/Symfony/Component/Intl/Resources/data/scripts/ps.json000066400000000000000000000001171266465517700240720ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Arab": "عربي" } } src/Symfony/Component/Intl/Resources/data/scripts/pt.json000066400000000000000000000075611266465517700241050ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanunoo", "Hans": "simplificado", "Hant": "tradicional", "Hebr": "hebraico", "Hira": "hiragana", "Hmng": "pahawh hmong", "Hrkt": "katakana ou hiragana", "Hung": "húngaro antigo", "Inds": "indo", "Ital": "itálico antigo", "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": "A linear", "Linb": "B linear", "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": "zmth", "Zsym": "zsym", "Zxxx": "ágrafo", "Zyyy": "comum", "Zzzz": "escrita desconhecida" } } src/Symfony/Component/Intl/Resources/data/scripts/pt_PT.json000066400000000000000000000010621266465517700244760ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Armn": "arménio", "Blis": "símbolos Bliss", "Egyd": "egípcio demótico", "Egyh": "egípcio hierático", "Gujr": "guzerate", "Hans": "han simplificado", "Hant": "han tradicional", "Inds": "indus", "Lina": "linear A", "Linb": "linear B", "Sylo": "siloti nagri", "Tale": "tai le", "Telu": "telugu", "Xsux": "cuneiforme sumero-acadiano", "Zsym": "símbolos", "Zxxx": "não escrito" } } src/Symfony/Component/Intl/Resources/data/scripts/rm.json000066400000000000000000000076251266465517700241010ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/ro.json000066400000000000000000000043571266465517700241020ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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ă", "Zsym": "simboluri", "Zxxx": "nescrisă", "Zyyy": "comună", "Zzzz": "scriere necunoscută" } } src/Symfony/Component/Intl/Resources/data/scripts/ru.json000066400000000000000000000147021266465517700241030ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "гурмукхи", "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": "неизвестная письменность" } } src/Symfony/Component/Intl/Resources/data/scripts/se.json000066400000000000000000000006421266465517700240620ustar00rootroot00000000000000{ "Version": "2.1.7.53", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/se_FI.json000066400000000000000000000004241266465517700244360ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Arab": "arábalaš", "Hani": "kiinnálaš", "Hans": "álkes kiinnálaš", "Hant": "árbevirolaš kiinnálaš", "Zxxx": "orrut čállojuvvot", "Zzzz": "dovdameahttun čállin" } } src/Symfony/Component/Intl/Resources/data/scripts/sh.json000066400000000000000000000110031266465517700240560ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanuno", "Hans": "pojednostavljeno kinesko pismo", "Hant": "tradicionalno kinesko pismo", "Hebr": "hebrejsko pismo", "Hira": "hiragana", "Hmng": "pahav hmong pismo", "Hrkt": "Katakana ili Hiragana", "Hung": "staromađarsko pismo", "Inds": "induško pismo", "Ital": "stari italik", "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": "malajalam 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": "sudansko 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": "thana 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", "Zsym": "simboli", "Zxxx": "nepisani jezik", "Zyyy": "zajedničko pismo", "Zzzz": "nepoznato pismo" } } src/Symfony/Component/Intl/Resources/data/scripts/si.json000066400000000000000000000031201266465517700240600ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "නොදත් අක්ෂර මාලාව" } } src/Symfony/Component/Intl/Resources/data/scripts/sk.json000066400000000000000000000027111266465517700240670ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "arabské", "Armn": "arménske", "Bali": "balijský", "Beng": "bengálske", "Bopo": "bopomofo", "Brai": "braillovo písmo", "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", "Hang": "hangul", "Hani": "han", "Hans": "zjednodušené", "Hant": "tradičné", "Hebr": "hebrejské", "Hira": "hiragana", "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é", "Zsym": "symboly", "Zxxx": "bez zápisu", "Zyyy": "všeobecné", "Zzzz": "neznáme písmo" } } src/Symfony/Component/Intl/Resources/data/scripts/sl.json000066400000000000000000000075411266465517700240760ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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": "mongolski", "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" } } src/Symfony/Component/Intl/Resources/data/scripts/so.json000066400000000000000000000002111266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.7.39", "Names": { "Zxxx": "Aan la qorin", "Zzzz": "Far aan la aqoon amase aan saxnayn" } } src/Symfony/Component/Intl/Resources/data/scripts/sq.json000066400000000000000000000021301266465517700240700ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "hangul", "Hani": "han", "Hans": "i thjeshtuar", "Hant": "tradicional", "Hebr": "hebraik", "Hira": "hiragan", "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", "Zsym": "me simbole", "Zxxx": "i pashkruar", "Zyyy": "i zakonshëm", "Zzzz": "i panjohur" } } src/Symfony/Component/Intl/Resources/data/scripts/sr.json000066400000000000000000000143321266465517700241000ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "непознато писмо" } } src/Symfony/Component/Intl/Resources/data/scripts/sr_Latn.json000066400000000000000000000110031266465517700250460ustar00rootroot00000000000000{ "Version": "2.1.8.20", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanuno", "Hans": "pojednostavljeno kinesko pismo", "Hant": "tradicionalno kinesko pismo", "Hebr": "hebrejsko pismo", "Hira": "hiragana", "Hmng": "pahav hmong pismo", "Hrkt": "Katakana ili Hiragana", "Hung": "staromađarsko pismo", "Inds": "induško pismo", "Ital": "stari italik", "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": "malajalam 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": "sudansko 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": "thana 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", "Zsym": "simboli", "Zxxx": "nepisani jezik", "Zyyy": "zajedničko pismo", "Zzzz": "nepoznato pismo" } } src/Symfony/Component/Intl/Resources/data/scripts/sv.json000066400000000000000000000115261266465517700241060ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Afak": "afakiska", "Aghb": "kaukasiska albanska", "Arab": "arabiska", "Armi": "imperisk arameiska", "Armn": "armeniska", "Avst": "avestiska", "Bali": "balinesiska", "Bamu": "bamunska", "Bass": "bassaiska vah", "Batk": "batak", "Beng": "bengaliska", "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", "Hang": "hangul", "Hani": "han", "Hano": "hanunå", "Hans": "förenklade", "Hant": "traditionella", "Hebr": "hebreiska", "Hira": "hiragana", "Hluw": "hittitiska hieroglyfer", "Hmng": "pahaw mong", "Hrkt": "katakana\/hiragana", "Hung": "fornungerska", "Inds": "indus", "Ital": "fornitaliska", "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", "Maya": "mayahieroglyfer", "Mend": "mende", "Merc": "kursiv-meroitiska", "Mero": "meriotiska", "Mlym": "malayalam", "Modi": "modiska", "Mong": "mongoliska", "Moon": "moon", "Mroo": "mru", "Mtei": "meitei-mayek", "Mymr": "burmesiska", "Narb": "fornnordarabiska", "Nbat": "nabatateiska", "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": "fenikiska", "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": "sumeo-akkadisk kilskrift", "Yiii": "yi", "Zinh": "ärvda", "Zmth": "matematisk notation", "Zsym": "symboler", "Zxxx": "oskrivet språk", "Zyyy": "gemensamma", "Zzzz": "okänt skriftsystem" } } src/Symfony/Component/Intl/Resources/data/scripts/sv_FI.json000066400000000000000000000001511266465517700244540ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Hrkt": "kana", "Mero": "meroitiska" } } src/Symfony/Component/Intl/Resources/data/scripts/sw.json000066400000000000000000000022201266465517700240760ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "Hang": "Kihangul", "Hani": "Kihan", "Hans": "Rahisi", "Hant": "Kihan cha Jadi", "Hebr": "Kiebrania", "Hira": "Kihiragana", "Jpan": "Kijapani", "Kana": "Kikatakana", "Khmr": "Kikambodia", "Knda": "Kikannada", "Kore": "Kikorea", "Laoo": "Kilaosi", "Latn": "Kilatini", "Mlym": "Kimalayalam", "Mong": "Mongolia", "Mymr": "Myama", "Orya": "Kioriya", "Sinh": "Kisinhala", "Taml": "Kitamil", "Telu": "Kitelugu", "Thaa": "Kithaana", "Thai": "Kitai", "Tibt": "Kitibeti", "Zsym": "Alama", "Zxxx": "Haijaandikwa", "Zyyy": "Kawaida", "Zzzz": "Hati isiyojulikana" } } src/Symfony/Component/Intl/Resources/data/scripts/ta.json000066400000000000000000000146251266465517700240650ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "அறியப்படாத எழுத்து" } } src/Symfony/Component/Intl/Resources/data/scripts/te.json000066400000000000000000000143141266465517700240640ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "తెలియని లిపి" } } src/Symfony/Component/Intl/Resources/data/scripts/th.json000066400000000000000000000167071266465517700240770ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "กูร์มูคี", "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": "ลีเดีย", "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": "เครื่องหมายทางคณิตศาสตร์", "Zsym": "ซิมโบลส์", "Zxxx": "ไม่มีภาษาเขียน", "Zyyy": "สามัญ", "Zzzz": "สคริปต์ที่ไม่รู้จัก" } } src/Symfony/Component/Intl/Resources/data/scripts/ti.json000066400000000000000000000001551266465517700240660ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Ethi": "ፊደል", "Latn": "ላቲን" } } src/Symfony/Component/Intl/Resources/data/scripts/tl.json000066400000000000000000000021501266465517700240660ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "Arabic", "Armn": "Armenian", "Beng": "Bengali", "Bopo": "Bopomofo", "Brai": "Braille", "Cyrl": "Cyrillic", "Deva": "Devanagari", "Ethi": "Ethiopic", "Geor": "Georgian", "Grek": "Greek", "Gujr": "Gujarati", "Guru": "Gurmukhi", "Hang": "Hangul", "Hani": "Han", "Hans": "Simplified", "Hant": "Traditional", "Hebr": "Hebrew", "Hira": "Hiragana", "Jpan": "Japanese", "Kana": "Katakana", "Khmr": "Khmer", "Knda": "Kannada", "Kore": "Korean", "Laoo": "Lao", "Latn": "Latin", "Mlym": "Malayalam", "Mong": "Mongolian", "Mymr": "Myanmar", "Orya": "Oriya", "Sinh": "Sinhala", "Taml": "Tamil", "Telu": "Telugu", "Thaa": "Thaana", "Thai": "Thai", "Tibt": "Tibetan", "Zsym": "Mga Simbolo", "Zxxx": "Hindi Nakasulat", "Zyyy": "Karaniwan", "Zzzz": "Hindi Kilalang Script" } } src/Symfony/Component/Intl/Resources/data/scripts/to.json000066400000000000000000000157571266465517700241120ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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ʻinitia-ʻolāea", "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": "lea 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", "Zsym": "tohinima fakaʻilonga", "Zxxx": "tohinima taʻetohitohiʻi", "Zyyy": "tohinima fakatatau", "Zzzz": "tohinima taʻeʻiloa" } } src/Symfony/Component/Intl/Resources/data/scripts/tr.json000066400000000000000000000113151266465517700240770ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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", "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", "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", "Zsym": "Sembol", "Zxxx": "Yazılı Olmayan", "Zyyy": "Ortak", "Zzzz": "Bilinmeyen Alfabe" } } src/Symfony/Component/Intl/Resources/data/scripts/ug.json000066400000000000000000000143761266465517700240770ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "يوچۇن يېزىق" } } src/Symfony/Component/Intl/Resources/data/scripts/uk.json000066400000000000000000000127521266465517700240770ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "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": "Дезерет", "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": "Лінійний В", "Lisu": "абетка Фрейзера", "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": "невідома система письма" } } src/Symfony/Component/Intl/Resources/data/scripts/ur.json000066400000000000000000000024341266465517700241020ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "نامعلوم رسم الخط" } } src/Symfony/Component/Intl/Resources/data/scripts/uz.json000066400000000000000000000021121266465517700241030ustar00rootroot00000000000000{ "Version": "2.1.8.9", "Names": { "Arab": "Arab", "Armn": "Arman", "Beng": "Bengali", "Bopo": "Bopomofo", "Brai": "Braille", "Cyrl": "Kiril", "Deva": "Devangari", "Ethi": "Habash", "Geor": "Gruzin", "Grek": "Yunon", "Gujr": "Gujarati", "Guru": "Gurmuxi", "Hang": "Xangul", "Hani": "Xan", "Hans": "Soddalashtirilgan", "Hant": "Anʼanaviy", "Hebr": "Ibroniy", "Hira": "Xiragana", "Jpan": "Yapon", "Kana": "Katakana", "Khmr": "Xmer", "Knda": "Kannada", "Kore": "Koreya", "Laoo": "Lao", "Latn": "Lotin", "Mlym": "Malayalam", "Mong": "Moʻgʻulcha", "Mymr": "Myanma", "Orya": "Oriya", "Sinh": "Sinxala", "Taml": "Tamil", "Telu": "Telugu", "Thaa": "Taana", "Thai": "Tay", "Tibt": "Tibet", "Zsym": "Ramzlar", "Zxxx": "Yozilmagan", "Zyyy": "Umumiy", "Zzzz": "Nomaʼlum shrift" } } src/Symfony/Component/Intl/Resources/data/scripts/uz_Arab.json000066400000000000000000000001171266465517700250330ustar00rootroot00000000000000{ "Version": "2.1.6.69", "Names": { "Arab": "عربی" } } src/Symfony/Component/Intl/Resources/data/scripts/uz_Cyrl.json000066400000000000000000000024721266465517700251050ustar00rootroot00000000000000{ "Version": "2.1.7.39", "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": "Номаълум шрифт" } } src/Symfony/Component/Intl/Resources/data/scripts/vi.json000066400000000000000000000130501266465517700240660ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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ữ Bengali", "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", "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ổ", "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": "Myanma", "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ữ Oriya", "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", "Zsym": "Ký hiệu", "Zxxx": "Chưa có chữ viết", "Zyyy": "Chung", "Zzzz": "Chữ viết không xác định" } } src/Symfony/Component/Intl/Resources/data/scripts/yi.json000066400000000000000000000003511266465517700240710ustar00rootroot00000000000000{ "Version": "2.1.7.41", "Names": { "Arab": "אַראַביש", "Cyrl": "ציריליש", "Deva": "דעוואַנאַגאַרי", "Grek": "גריכיש", "Latn": "גַלחיש" } } src/Symfony/Component/Intl/Resources/data/scripts/zh.json000066400000000000000000000124221266465517700240730ustar00rootroot00000000000000{ "Version": "2.1.8.9", "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": "果鲁穆奇文", "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": "线形文字(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": "夏拉达文", "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": "未知文字" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_HK.json000066400000000000000000000003551266465517700244570ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "Cyrl": "西里爾語字母", "Deva": "梵文", "Hang": "韓文字母", "Hans": "簡體字", "Hant": "繁體字", "Latn": "拉丁字母" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_Hans_HK.json000066400000000000000000000002661266465517700254310ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Knda": "卡纳塔克文", "Sinh": "辛哈拉文", "Thaa": "塔安娜文", "Zzzz": "未知语系" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_Hans_MO.json000066400000000000000000000002661266465517700254420ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Knda": "卡纳塔克文", "Sinh": "辛哈拉文", "Thaa": "塔安娜文", "Zzzz": "未知语系" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_Hans_SG.json000066400000000000000000000002661266465517700254400ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Knda": "卡纳塔克文", "Sinh": "辛哈拉文", "Thaa": "塔安娜文", "Zzzz": "未知语系" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant.json000066400000000000000000000130441266465517700250460ustar00rootroot00000000000000{ "Version": "2.1.8.95", "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": "古魯穆奇文", "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": "線性文字(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": "數學符號", "Zsym": "符號", "Zxxx": "非書寫語言", "Zyyy": "一般文字", "Zzzz": "未知文字" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_Hant_HK.json000066400000000000000000000003551266465517700254310ustar00rootroot00000000000000{ "Version": "2.1.8.28", "Names": { "Cyrl": "西里爾語字母", "Deva": "梵文", "Hang": "韓文字母", "Hans": "簡體字", "Hant": "繁體字", "Latn": "拉丁字母" } } src/Symfony/Component/Intl/Resources/data/scripts/zh_SG.json000066400000000000000000000002661266465517700244670ustar00rootroot00000000000000{ "Version": "2.1.8.19", "Names": { "Knda": "卡纳塔克文", "Sinh": "辛哈拉文", "Thaa": "塔安娜文", "Zzzz": "未知语系" } } src/Symfony/Component/Intl/Resources/data/scripts/zu.json000066400000000000000000000022441266465517700241110ustar00rootroot00000000000000{ "Version": "2.1.8.18", "Names": { "Arab": "i-Arab", "Armn": "i-Armenian", "Beng": "i-Bengali", "Bopo": "i-Bopomofo", "Brai": "i-Braille", "Cyrl": "i-Cyrillic", "Deva": "i-Devanagari", "Ethi": "i-Ethiopic", "Geor": "i-Georgian", "Grek": "i-Greek", "Gujr": "i-Gujarati", "Guru": "i-Gurmukhi", "Hang": "i-Hangul", "Hani": "i-Han", "Hans": "i-Simplified", "Hant": "Okosiko", "Hebr": "i-Hebrew", "Hira": "i-Hiragana", "Jpan": "i-Japanese", "Kana": "i-Katakana", "Khmr": "i-Khmer", "Knda": "i-Kannada", "Kore": "i-Korean", "Laoo": "i-Lao", "Latn": "i-Latin", "Mlym": "i-Malayam", "Mong": "i-Mongolian", "Mymr": "i-Myanmar", "Orya": "i-Oriya", "Sinh": "i-Sinhala", "Taml": "i-Tamil", "Telu": "i-Telegu", "Thaa": "i-Thaana", "Thai": "i-Thai", "Tibt": "i-Tibetan", "Zsym": "Amasimbuli", "Zxxx": "Okungabhaliwe", "Zyyy": "Ejwayelekile", "Zzzz": "Iskripthi esingaziwa" } } src/Symfony/Component/Intl/Resources/data/svn-info.txt000066400000000000000000000002521266465517700233660ustar00rootroot00000000000000SVN information =============== URL: http://source.icu-project.org/repos/icu/icu/tags/release-54-rc/source Revision: 36543 Author: srl Date: 2014-09-17T00:34:36.814122Z src/Symfony/Component/Intl/Resources/data/version.txt000066400000000000000000000000051266465517700233100ustar00rootroot0000000000000054.1 src/Symfony/Component/Intl/Resources/stubs/000077500000000000000000000000001266465517700213165ustar00rootroot00000000000000src/Symfony/Component/Intl/Resources/stubs/Collator.php000066400000000000000000000007301266465517700236060ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php000066400000000000000000000010531266465517700254160ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Resources/stubs/Locale.php000066400000000000000000000007421266465517700232310ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php000066400000000000000000000010411266465517700251370ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Intl/Resources/stubs/functions.php000066400000000000000000000041261266465517700240420ustar00rootroot00000000000000 * * 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')) { /** * Stub implementation for the {@link intl_is_failure()} function of the intl * extension. * * @author Bernhard Schussek * * @param int $errorCode The error code returned by intl_get_error_code(). * * @return bool Whether the error code indicates an error. * * @see IntlGlobals::isFailure() */ function intl_is_failure($errorCode) { return IntlGlobals::isFailure($errorCode); } /** * Stub implementation for the {@link intl_get_error_code()} function of the * intl extension. * * @author Bernhard Schussek * * @return bool The error code of the last intl function call or * IntlGlobals::U_ZERO_ERROR if no error occurred. * * @see IntlGlobals::getErrorCode() */ function intl_get_error_code() { return IntlGlobals::getErrorCode(); } /** * Stub implementation for the {@link intl_get_error_code()} function of the * intl extension. * * @author Bernhard Schussek * * @return bool The error message of the last intl function call or * "U_ZERO_ERROR" if no error occurred. * * @see IntlGlobals::getErrorMessage() */ function intl_get_error_message() { return IntlGlobals::getErrorMessage(); } /** * Stub implementation for the {@link intl_error_name()} function of the intl * extension. * * @param int $errorCode The error code. * * @return string The name of the error code constant. * * @see IntlGlobals::getErrorName() */ function intl_error_name($errorCode) { return IntlGlobals::getErrorName($errorCode); } } src/Symfony/Component/Intl/Tests/000077500000000000000000000000001266465517700173065ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Collator/000077500000000000000000000000001266465517700210655ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php000066400000000000000000000027531266465517700257100ustar00rootroot00000000000000 * * 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; /** * Test case for Collator implementations. * * @author Bernhard Schussek */ abstract class AbstractCollatorTest extends \PHPUnit_Framework_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); } src/Symfony/Component/Intl/Tests/Collator/CollatorTest.php000066400000000000000000000061301266465517700242150ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Tests/Collator/Verification/000077500000000000000000000000001266465517700235075ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php000066400000000000000000000015501266465517700266400ustar00rootroot00000000000000 * * 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); parent::setUp(); } protected function getCollator($locale) { return new \Collator($locale); } } src/Symfony/Component/Intl/Tests/Data/000077500000000000000000000000001266465517700201575ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/000077500000000000000000000000001266465517700213705ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/000077500000000000000000000000001266465517700225725ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php000066400000000000000000000310661266465517700275270ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReader; /** * @author Bernhard Schussek */ class BundleEntryReaderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface'); $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)); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/000077500000000000000000000000001266465517700244035ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/NotAFile/000077500000000000000000000000001266465517700260445ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/NotAFile/en.php/000077500000000000000000000000001266465517700272345ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/NotAFile/en.php/.gitkeep000066400000000000000000000000001266465517700306530ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/build.sh000077500000000000000000000005671266465517700260510ustar00rootroot00000000000000#!/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 src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.php000066400000000000000000000004231266465517700255150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array( 'Foo' => 'Bar', ); src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.res000066400000000000000000000001241266465517700255150ustar00rootroot00000000000000 'ResBP  FooBar src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/en.txt000066400000000000000000000000251266465517700255430ustar00rootroot00000000000000en{ Foo{"Bar"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/000077500000000000000000000000001266465517700253545ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en.json000066400000000000000000000000161266465517700266460ustar00rootroot00000000000000{"Foo":"Bar"} src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/json/en_Invalid.json000066400000000000000000000000131266465517700303110ustar00rootroot00000000000000{"Foobar"} src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/000077500000000000000000000000001266465517700251725ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/php/en.php000066400000000000000000000004231266465517700263040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array( 'Foo' => 'Bar', ); src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/000077500000000000000000000000001266465517700251745ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/alias.res000066400000000000000000000001301266465517700267720ustar00rootroot00000000000000 'ResBP %%ALIASro src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/mo.res000066400000000000000000000001341266465517700263200ustar00rootroot00000000000000 'ResBP %%ALIASro_MD src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro.res000066400000000000000000000001241266465517700263240ustar00rootroot00000000000000 'ResBP  FooBar src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/ro_MD.res000066400000000000000000000001241266465517700267040ustar00rootroot00000000000000 'ResBP  BazBam src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/res/root.res000066400000000000000000000001141266465517700266660ustar00rootroot00000000000000 'ResBP  ___ src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/000077500000000000000000000000001266465517700252225ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/alias.txt000066400000000000000000000000351266465517700270520ustar00rootroot00000000000000alias{ "%%ALIAS"{"ro"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/mo.txt000066400000000000000000000000351266465517700263740ustar00rootroot00000000000000mo{ "%%ALIAS"{"ro_MD"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro.txt000066400000000000000000000000251266465517700264000ustar00rootroot00000000000000ro{ Foo{"Bar"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/ro_MD.txt000066400000000000000000000000301266465517700267540ustar00rootroot00000000000000ro_MD{ Baz{"Bam"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/Fixtures/txt/root.txt000066400000000000000000000001131266465517700267410ustar00rootroot00000000000000root{ /** * so genrb doesn't issue warnings */ ___{""} } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php000066400000000000000000000067661266465517700273450ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Data\Bundle\Reader\IntlBundleReader; /** * @author Bernhard Schussek * @requires extension intl */ class IntlBundleReaderTest extends \PHPUnit_Framework_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 (PHP_VERSION_ID < 50307 || PHP_VERSION_ID === 50400) { $this->markTestSkipped('ResourceBundle handles disabling fallback properly only as of PHP 5.3.7 and 5.4.1.'); } 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 (PHP_VERSION_ID < 50307 || PHP_VERSION_ID === 50400) { $this->markTestSkipped('ResourceBundle handles disabling fallback properly only as of PHP 5.3.7 and 5.4.1.'); } 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'); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php000066400000000000000000000034351266465517700273360ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Data\Bundle\Reader\JsonBundleReader; /** * @author Bernhard Schussek */ class JsonBundleReaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php000066400000000000000000000030671266465517700271550ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Data\Bundle\Reader\PhpBundleReader; /** * @author Bernhard Schussek */ class PhpBundleReaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/000077500000000000000000000000001266465517700226445ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/000077500000000000000000000000001266465517700244555ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.json000066400000000000000000000003541266465517700257540ustar00rootroot00000000000000{ "Entry1": { "Array": [ "foo", "bar" ], "Integer": 5, "Boolean": false, "Float": 1.23 }, "Entry2": "String", "Traversable": { "Foo": "Bar" } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.php000066400000000000000000000004551266465517700255740ustar00rootroot00000000000000 array( 'Array' => array( 0 => 'foo', 1 => 'bar', ), 'Integer' => 5, 'Boolean' => false, 'Float' => 1.23, ), 'Entry2' => 'String', 'Traversable' => array( 'Foo' => 'Bar', ), ); src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.res000066400000000000000000000004741266465517700255770ustar00rootroot00000000000000 'ResBC GG/Entry1ArrayTestIntegerIntVectorFalseBooleanTrueBooleanNullFloatEntry2foo1.23truefalseStringfoobar-``#P'Db:2]Q/``3p ` h8 `src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en.txt000066400000000000000000000013041266465517700256160ustar00rootroot00000000000000en{ 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"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/en_nofallback.txt000066400000000000000000000000661266465517700277760ustar00rootroot00000000000000en_nofallback:table(nofallback){ Entry{"Value"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/escaped.txt000066400000000000000000000001131266465517700266150ustar00rootroot00000000000000escaped{ "EntryWith:Colon"{"Value"} "Entry With Spaces"{"Value"} } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.json000066400000000000000000000000701266465517700257500ustar00rootroot00000000000000{ "Entry": { "NestedEntry": "Value" } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.php000066400000000000000000000001271266465517700255710ustar00rootroot00000000000000 array( 'NestedEntry' => 'Value', ), ); src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.res000066400000000000000000000001501266465517700255670ustar00rootroot00000000000000 'ResB  NestedEntryValue &Psrc/Symfony/Component/Intl/Tests/Data/Bundle/Writer/Fixtures/rb.txt000066400000000000000000000000641266465517700256210ustar00rootroot00000000000000rb{ Entry{ NestedEntry{"Value"} } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php000066400000000000000000000037701266465517700274640ustar00rootroot00000000000000 * * 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 Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\JsonBundleWriter; /** * @author Bernhard Schussek * @requires PHP 5.4 */ class JsonBundleWriterTest extends \PHPUnit_Framework_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() { if (PHP_VERSION_ID < 50400) { return; } $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'); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php000066400000000000000000000041521266465517700272750ustar00rootroot00000000000000 * * 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 Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\PhpBundleWriter; /** * @author Bernhard Schussek */ class PhpBundleWriterTest extends \PHPUnit_Framework_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() { if (PHP_VERSION_ID < 50315 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404)) { $this->markTestSkipped('ResourceBundle implements Traversable only as of PHP 5.3.15 and 5.4.4'); } $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false); $this->writer->write($this->directory, 'en', $bundle); $this->assertFileEquals(__DIR__.'/Fixtures/rb.php', $this->directory.'/en.php'); } } src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php000066400000000000000000000071151266465517700274740ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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'); } } src/Symfony/Component/Intl/Tests/Data/Provider/000077500000000000000000000000001266465517700217515ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php000066400000000000000000000402041266465517700311050ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php000066400000000000000000000405641266465517700274030ustar00rootroot00000000000000 * * 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\Bundle\Reader\BundleEntryReader; use Symfony\Component\Intl\Data\Bundle\Reader\BundleReaderInterface; use Symfony\Component\Intl\Locale; /** * @author Bernhard Schussek */ abstract class AbstractDataProviderTest extends \PHPUnit_Framework_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(); } src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php000066400000000000000000000412121266465517700310360ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php000066400000000000000000000053641266465517700305220ustar00rootroot00000000000000 * * 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)); } } } src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php000066400000000000000000000137611266465517700305460ustar00rootroot00000000000000 * * 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)); } } } src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php000066400000000000000000000123271266465517700305640ustar00rootroot00000000000000 * * 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)); } } } src/Symfony/Component/Intl/Tests/Data/Provider/Json/000077500000000000000000000000001266465517700226625ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonCurrencyDataProviderTest.php000066400000000000000000000016651266465517700311740ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLanguageDataProviderTest.php000066400000000000000000000016651266465517700311250ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonLocaleDataProviderTest.php000066400000000000000000000016571266465517700306020ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonRegionDataProviderTest.php000066400000000000000000000016571266465517700306260ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Tests/Data/Provider/Json/JsonScriptDataProviderTest.php000066400000000000000000000016571266465517700306470ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Intl/Tests/Data/Util/000077500000000000000000000000001266465517700210745ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php000066400000000000000000000046161266465517700251650ustar00rootroot00000000000000 * * 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 Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Util\LocaleScanner; /** * @author Bernhard Schussek */ class LocaleScannerTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php000066400000000000000000000046161266465517700245050ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Data\Util\RingBuffer; /** * @author Bernhard Schussek */ class RingBufferTest extends \PHPUnit_Framework_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])); } } src/Symfony/Component/Intl/Tests/DateFormatter/000077500000000000000000000000001266465517700220475ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php000066400000000000000000001033331266465517700304770ustar00rootroot00000000000000 * * 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; /** * Test case for IntlDateFormatter implementations. * * @author Bernhard Schussek */ abstract class AbstractIntlDateFormatterTest extends \PHPUnit_Framework_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); // In PHP 5.5 default timezone depends on `date_default_timezone_get()` method if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->assertEquals(date_default_timezone_get(), $formatter->getTimeZoneId()); } else { $this->assertNull($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() { $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'), ); $dateTime = new \DateTime('@0'); /* general, DateTime */ $formatData[] = array('y-M-d', $dateTime, '1970-1-1'); $formatData[] = array("EEE, MMM d, ''yy", $dateTime, "Thu, Jan 1, '70"); $formatData[] = array('h:mm a', $dateTime, '12:00 AM'); $formatData[] = array('yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM'); $formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 GMT'); $formatData[] = 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() { // With PHP 5.5 IntlDateFormatter accepts empty values ('0') if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { 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'), ); } $message = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object: U_ILLEGAL_ARGUMENT_ERROR'; return array( array('y-M-d', '0', $message), array('y-M-d', 'foobar', $message), ); } /** * @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'), ); // As of PHP 5.5, intl ext no longer fallbacks invalid time zones to UTC if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { // When time zone not exists, uses UTC by default $data[] = array(0, 'Foo/Bar', '1970-01-01 00:00:00'); $data[] = array(0, 'UTC+04:30', '1970-01-01 00:00:00'); $data[] = array(0, 'UTC+04:AA', '1970-01-01 00:00:00'); } return $data; } public function testFormatWithGmtTimezone() { $formatter = $this->getDefaultDateFormatter('zzzz'); if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $formatter->setTimeZone('GMT+03:00'); } else { $formatter->setTimeZoneId('GMT+03:00'); } $this->assertEquals('GMT+03:00', $formatter->format(0)); } public function testFormatWithGmtTimeZoneAndMinutesOffset() { $formatter = $this->getDefaultDateFormatter('zzzz'); if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $formatter->setTimeZone('GMT+00:30'); } else { $formatter->setTimeZoneId('GMT+00:30'); } $this->assertEquals('GMT+00:30', $formatter->format(0)); } public function testFormatWithNonStandardTimezone() { $formatter = $this->getDefaultDateFormatter('zzzz'); if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $formatter->setTimeZone('Pacific/Fiji'); } else { $formatter->setTimeZoneId('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() { if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.'); } $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 (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.'); } $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 testFormatWithTimezoneFromEnvironmentVariable() { if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->markTestSkipped('IntlDateFormatter in PHP 5.5 no longer depends on TZ environment.'); } $tz = getenv('TZ'); putenv('TZ=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', getenv('TZ')); // Restores TZ. putenv('TZ='.$tz); } public function testFormatWithTimezoneFromPhp() { if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->markTestSkipped('Only in PHP 5.5 IntlDateFormatter depends on default timezone (`date_default_timezone_get()`).'); } $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(); if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $formatter->setTimeZone($timeZoneId); } else { $formatter->setTimeZoneId($timeZoneId); } $this->assertEquals($expectedTimeZoneId, $formatter->getTimeZoneId()); } public function setTimeZoneIdProvider() { $isPhp55 = PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone')); return array( array('UTC', 'UTC'), array('GMT', 'GMT'), array('GMT-03:00', 'GMT-03:00'), array('Europe/Zurich', 'Europe/Zurich'), array(null, $isPhp55 ? date_default_timezone_get() : null), array('Foo/Bar', $isPhp55 ? 'UTC' : 'Foo/Bar'), array('GMT+00:AA', $isPhp55 ? 'UTC' : 'GMT+00:AA'), array('GMT+00AA', $isPhp55 ? 'UTC' : 'GMT+00AA'), ); } 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); if (null !== $timeZone) { $dateTime->setTimezone(new \DateTimeZone($timeZone)); } 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); } src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php000066400000000000000000000160121266465517700270100ustar00rootroot00000000000000 * * 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()); } /** * @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); } } src/Symfony/Component/Intl/Tests/DateFormatter/Verification/000077500000000000000000000000001266465517700244715ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php000066400000000000000000000041001266465517700314250ustar00rootroot00000000000000 * * 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); parent::setUp(); } /** * It seems IntlDateFormatter caches the timezone id when not explicitly set via constructor or by the * setTimeZoneId() method. Since testFormatWithDefaultTimezoneIntl() runs using the default environment * time zone, this test would use it too if not running in a separated process. * * @runInSeparateProcess * @preserveGlobalState disabled */ public function testFormatWithTimezoneFromEnvironmentVariable() { parent::testFormatWithTimezoneFromEnvironmentVariable(); } protected function getDateFormatter($locale, $datetype, $timetype, $timezone = null, $calendar = IntlDateFormatter::GREGORIAN, $pattern = null) { 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); } } src/Symfony/Component/Intl/Tests/Globals/000077500000000000000000000000001266465517700206715ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php000066400000000000000000000020311266465517700261340ustar00rootroot00000000000000 * * 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; /** * Test case for intl function implementations. * * @author Bernhard Schussek */ abstract class AbstractIntlGlobalsTest extends \PHPUnit_Framework_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); } src/Symfony/Component/Intl/Tests/Globals/IntlGlobalsTest.php000066400000000000000000000010001266465517700244430ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Tests/Globals/Verification/000077500000000000000000000000001266465517700233135ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php000066400000000000000000000015701266465517700271010ustar00rootroot00000000000000 * * 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); parent::setUp(); } protected function getIntlErrorName($errorCode) { return intl_error_name($errorCode); } } src/Symfony/Component/Intl/Tests/Locale/000077500000000000000000000000001266465517700205055ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php000066400000000000000000000012401266465517700247360ustar00rootroot00000000000000 * * 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; /** * Test case for Locale implementations. * * @author Bernhard Schussek */ abstract class AbstractLocaleTest extends \PHPUnit_Framework_TestCase { public function testSetDefault() { $this->call('setDefault', 'en_GB'); $this->assertSame('en_GB', $this->call('getDefault')); } abstract protected function call($methodName); } src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php000066400000000000000000000103101266465517700232500ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Tests/Locale/Verification/000077500000000000000000000000001266465517700231275ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php000066400000000000000000000016551266465517700257060ustar00rootroot00000000000000 * * 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); parent::setUp(); } protected function call($methodName) { $args = array_slice(func_get_args(), 1); return call_user_func_array(array('Locale', $methodName), $args); } } src/Symfony/Component/Intl/Tests/NumberFormatter/000077500000000000000000000000001266465517700224225ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php000066400000000000000000000741601266465517700306030ustar00rootroot00000000000000 * * 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; 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 \PHPUnit_Framework_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) { $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'), array(-100, 'CRC', 'CRC', '(%s100)'), array(1000.12, 'CRC', 'CRC', '%s1,000'), ); } /** * @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 * @expectedException \PHPUnit_Framework_Error_Warning */ public function testFormatTypeCurrency($formatter, $value) { $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), ); } /** * @expectedException \PHPUnit_Framework_Error_Warning */ public function testParseTypeDefault() { $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); } 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); // Bug #59597 was fixed on PHP 5.3.14 and 5.4.4 // The negative PHP_INT_MAX was being converted to float if ((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->assertInternalType('int', $parsedValue); } else { $this->assertInternalType('float', $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); // Bug #59597 was fixed on PHP 5.3.14 and 5.4.4 // A 32 bit integer was being generated instead of a 64 bit integer if (PHP_VERSION_ID < 50314 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404)) { $this->assertEquals(-2147483648, $parsedValue, '->parse() TYPE_INT64 does not use true 64 bit integers, using only the 32 bit range (PHP < 5.3.14 and PHP < 5.4.4).'); } else { $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); // Bug #59597 was fixed on PHP 5.3.14 and 5.4.4 // A 32 bit integer was being generated instead of a 64 bit integer if (PHP_VERSION_ID < 50314 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404)) { $this->assertEquals(2147483647, $parsedValue, '->parse() TYPE_INT64 does not use true 64 bit integers, using only the 32 bit range (PHP < 5.3.14 and PHP < 5.4.4).'); } else { $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), ); } /** * @expectedException \PHPUnit_Framework_Error_Warning */ public function testParseTypeCurrency() { $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); } src/Symfony/Component/Intl/Tests/NumberFormatter/NumberFormatterTest.php000066400000000000000000000152721266465517700271160ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/000077500000000000000000000000001266465517700250445ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php000066400000000000000000000025451266465517700315370ustar00rootroot00000000000000 * * 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); parent::setUp(); } public function testCreate() { $this->assertInstanceOf('\NumberFormatter', \NumberFormatter::create('en', \NumberFormatter::DECIMAL)); } 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); } } src/Symfony/Component/Intl/Tests/Util/000077500000000000000000000000001266465517700202235ustar00rootroot00000000000000src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php000066400000000000000000000073471266465517700236750ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Util\IcuVersion; /** * @author Bernhard Schussek */ class IcuVersionTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Intl/Tests/Util/VersionTest.php000066400000000000000000000051271266465517700232260ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Util\Version; /** * @author Bernhard Schussek */ class VersionTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Intl/Util/000077500000000000000000000000001266465517700171215ustar00rootroot00000000000000src/Symfony/Component/Intl/Util/IcuVersion.php000066400000000000000000000062211266465517700217210ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Intl/Util/IntlTestHelper.php000066400000000000000000000076361266465517700225540ustar00rootroot00000000000000 * * 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\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. * * @param \PhpUnit_Framework_TestCase $testCase */ public static function requireIntl(\PhpUnit_Framework_TestCase $testCase) { // 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 (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) { $testCase->markTestSkipped('ICU version '.Intl::getIcuStubVersion().' 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. * * @param \PhpUnit_Framework_TestCase $testCase */ public static function requireFullIntl(\PhpUnit_Framework_TestCase $testCase) { // We only run tests if the intl extension is loaded... if (!Intl::isExtensionLoaded()) { $testCase->markTestSkipped('Extension intl is required.'); } // ... and only if the version is *one specific version* if (IcuVersion::compare(Intl::getIcuVersion(), Intl::getIcuStubVersion(), '!=', 1)) { $testCase->markTestSkipped('ICU version '.Intl::getIcuStubVersion().' 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. // * always use the C intl classes } /** * Skips the test unless the current system has a 32bit architecture. * * @param \PhpUnit_Framework_TestCase $testCase */ public static function require32Bit(\PhpUnit_Framework_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. * * @param \PhpUnit_Framework_TestCase $testCase */ public static function require64Bit(\PhpUnit_Framework_TestCase $testCase) { if (8 !== PHP_INT_SIZE) { $testCase->markTestSkipped('PHP 64 bit is required.'); } } /** * Must not be instantiated. */ private function __construct() { } } src/Symfony/Component/Intl/Util/SvnCommit.php000066400000000000000000000025201266465517700215500ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Intl/Util/SvnRepository.php000066400000000000000000000064401266465517700225040ustar00rootroot00000000000000 * * 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 SvnRepository The directory where the data is stored. * * @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; } } src/Symfony/Component/Intl/Util/Version.php000066400000000000000000000051761266465517700212700ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Intl/composer.json000066400000000000000000000025301266465517700207260ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/filesystem": "~2.1" }, "suggest": { "ext-intl": "to use the component with locales other than \"en\"" }, "autoload": { "psr-4": { "Symfony\\Component\\Intl\\": "" }, "classmap": [ "Resources/stubs" ], "files": [ "Resources/stubs/functions.php" ], "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Intl/phpunit.xml.dist000066400000000000000000000016361266465517700213650ustar00rootroot00000000000000 ./Tests/ intl-data ./ ./Resources ./Tests ./vendor src/Symfony/Component/Locale/000077500000000000000000000000001266465517700164755ustar00rootroot00000000000000src/Symfony/Component/Locale/.gitignore000066400000000000000000000000421266465517700204610ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Locale/CHANGELOG.md000066400000000000000000000007441266465517700203130ustar00rootroot00000000000000CHANGELOG ========= 2.3.0 ----- The Locale component is deprecated since version 2.3 and will be removed in Symfony 3.0. You should use the more capable Intl component instead. 2.1.0 ----- * added Locale::getIntlIcuVersion(), Locale::getIntlIcuDataVersion(), Locale::getIcuDataVersion() and Locale::getIcuDataDirectory() * renamed update-data.php to build-data.php, the script usage changed, now it is easier to update the ICU data * updated the ICU data to the release 49.1.2 src/Symfony/Component/Locale/Exception/000077500000000000000000000000001266465517700204335ustar00rootroot00000000000000src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php000066400000000000000000000021151266465517700306120ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Exception; @trigger_error('The '.__NAMESPACE__.'\MethodArgumentNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as BaseMethodArgumentNotImplementedException; /** * Alias of {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException} * instead. */ class MethodArgumentNotImplementedException extends BaseMethodArgumentNotImplementedException { } src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php000066400000000000000000000021651266465517700316140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Exception; @trigger_error('The '.__NAMESPACE__.'\MethodArgumentValueNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException as BaseMethodArgumentValueNotImplementedException; /** * Alias of {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException} * instead. */ class MethodArgumentValueNotImplementedException extends BaseMethodArgumentValueNotImplementedException { } src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php000066400000000000000000000020151266465517700271060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Exception; @trigger_error('The '.__NAMESPACE__.'\MethodNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethodNotImplementedException; /** * Alias of {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException} * instead. */ class MethodNotImplementedException extends BaseMethodNotImplementedException { } src/Symfony/Component/Locale/Exception/NotImplementedException.php000066400000000000000000000017351266465517700257550ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Exception; @trigger_error('The '.__NAMESPACE__.'\NotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\NotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplementedException; /** * Alias of {@link \Symfony\Component\Intl\Exception\NotImplementedException}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Exception\NotImplementedException} * instead. */ class NotImplementedException extends BaseNotImplementedException { } src/Symfony/Component/Locale/LICENSE000066400000000000000000000020511266465517700175000ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Locale/Locale.php000066400000000000000000000124101266465517700204030ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale; @trigger_error('The '.__NAMESPACE__.'\Locale class is deprecated since version 2.7, to be removed in Symfony 3.0. Use the methods provided by the \Symfony\Component\Intl\Intl class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Intl; /** * Helper class for dealing with locale strings. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Locale} and {@link \Symfony\Component\Intl\Intl} instead. */ class Locale extends \Locale { /** * Caches the countries in different locales. * * @var array */ protected static $countries = array(); /** * Caches the languages in different locales. * * @var array */ protected static $languages = array(); /** * Caches the different locales. * * @var array */ protected static $locales = array(); /** * Returns the country names for a locale. * * @param string $locale The locale to use for the country names * * @return array The country names with their codes as keys * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayCountries($locale) { if (!isset(self::$countries[$locale])) { self::$countries[$locale] = Intl::getRegionBundle()->getCountryNames($locale); } return self::$countries[$locale]; } /** * Returns all available country codes. * * @return array The country codes * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getCountries() { return array_keys(self::getDisplayCountries(self::getDefault())); } /** * Returns the language names for a locale. * * @param string $locale The locale to use for the language names * * @return array The language names with their codes as keys * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayLanguages($locale) { if (!isset(self::$languages[$locale])) { self::$languages[$locale] = Intl::getLanguageBundle()->getLanguageNames($locale); } return self::$languages[$locale]; } /** * Returns all available language codes. * * @return array The language codes * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getLanguages() { return array_keys(self::getDisplayLanguages(self::getDefault())); } /** * Returns the locale names for a locale. * * @param string $locale The locale to use for the locale names * * @return array The locale names with their codes as keys * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayLocales($locale) { if (!isset(self::$locales[$locale])) { self::$locales[$locale] = Intl::getLocaleBundle()->getLocaleNames($locale); } return self::$locales[$locale]; } /** * Returns all available locale codes. * * @return array The locale codes * * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getLocales() { return array_keys(self::getDisplayLocales(self::getDefault())); } /** * Returns the ICU version as defined by the intl extension. * * @return string|null The ICU version */ public static function getIntlIcuVersion() { return Intl::getIcuVersion(); } /** * Returns the ICU Data version as defined by the intl extension. * * @return string|null The ICU Data version */ public static function getIntlIcuDataVersion() { return Intl::getIcuDataVersion(); } /** * Returns the ICU data version that ships with Symfony. If the environment variable USE_INTL_ICU_DATA_VERSION is * defined, it will try use the ICU data version as defined by the intl extension, if available. * * @return string The ICU data version that ships with Symfony */ public static function getIcuDataVersion() { return Intl::getIcuDataVersion(); } /** * Returns the directory path of the ICU data that ships with Symfony. * * @return string The path to the ICU data directory */ public static function getIcuDataDirectory() { return Intl::getDataDirectory(); } /** * Returns the fallback locale for a given locale, if any. * * @param string $locale The locale to find the fallback for. * * @return string|null The fallback locale, or null if no parent exists */ protected static function getFallbackLocale($locale) { if (false === $pos = strrpos($locale, '_')) { return; } return substr($locale, 0, $pos); } } src/Symfony/Component/Locale/README.md000066400000000000000000000004131266465517700177520ustar00rootroot00000000000000Locale Component ================ Locale provides fallback code to handle cases when the ``intl`` extension is missing. The Locale component is deprecated since version 2.3 and will be removed in Symfony 3.0. You should use the more capable Intl component instead. src/Symfony/Component/Locale/Stub/000077500000000000000000000000001266465517700174125ustar00rootroot00000000000000src/Symfony/Component/Locale/Stub/DateFormat/000077500000000000000000000000001266465517700214405ustar00rootroot00000000000000src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php000066400000000000000000000017471266465517700252370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\AmPmTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer} * instead. */ class AmPmTransformer extends BaseAmPmTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php000066400000000000000000000020171266465517700262120ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\DayOfWeekTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as BaseDayOfWeekTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer} * instead. */ class DayOfWeekTransformer extends BaseDayOfWeekTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php000066400000000000000000000020071266465517700262160ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\DayOfYearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as BaseDayOfYearTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer} * instead. */ class DayOfYearTransformer extends BaseDayOfYearTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php000066400000000000000000000017271266465517700251200ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\DayTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer} * instead. */ class DayTransformer extends BaseDayTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php000066400000000000000000000017371266465517700253060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\FullTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer} * instead. */ class FullTransformer extends BaseFullTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php000066400000000000000000000017771266465517700256300ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\Hour1200Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseHour1200Transformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer} * instead. */ class Hour1200Transformer extends BaseHour1200Transformer { } src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php000066400000000000000000000017771266465517700256310ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\Hour1201Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseHour1201Transformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer} * instead. */ class Hour1201Transformer extends BaseHour1201Transformer { } src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php000066400000000000000000000017771266465517700256330ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\Hour2400Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer as BaseHour2400Transformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer} * instead. */ class Hour2400Transformer extends BaseHour2400Transformer { } src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php000066400000000000000000000017771266465517700256340ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\Hour2401Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer as BaseHour2401Transformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer} * instead. */ class Hour2401Transformer extends BaseHour2401Transformer { } src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php000066400000000000000000000017501266465517700253140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\HourTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer as BaseHourTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer} * instead. */ abstract class HourTransformer extends BaseHourTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php000066400000000000000000000017571266465517700256470ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\MinuteTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer as BaseMinuteTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer} * instead. */ class MinuteTransformer extends BaseMinuteTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php000066400000000000000000000017471266465517700254720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\MonthTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer as BaseMonthTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer} * instead. */ class MonthTransformer extends BaseMonthTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php000066400000000000000000000017671266465517700260320ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\QuarterTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer as BaseQuarterTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer} * instead. */ class QuarterTransformer extends BaseQuarterTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php000066400000000000000000000017571266465517700256210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\SecondTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer as BaseSecondTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer} * instead. */ class SecondTransformer extends BaseSecondTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php000066400000000000000000000017771266465517700261420ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\TimeZoneTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer as BaseTimeZoneTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer} * instead. */ class TimeZoneTransformer extends BaseTimeZoneTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php000066400000000000000000000017101266465517700244520ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Transformer as BaseTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer} * instead. */ abstract class Transformer extends BaseTransformer { } src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php000066400000000000000000000017371266465517700253040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub\DateFormat; @trigger_error('The '.__NAMESPACE__.'\YearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer as BaseYearTransformer; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer} * instead. */ class YearTransformer extends BaseYearTransformer { } src/Symfony/Component/Locale/Stub/StubCollator.php000066400000000000000000000015011266465517700225350ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub; @trigger_error('The '.__NAMESPACE__.'\StubCollator class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Collator\Collator class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Collator\Collator; /** * Alias of {@link \Symfony\Component\Intl\Collator\Collator}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Collator\Collator} instead. */ class StubCollator extends Collator { } src/Symfony/Component/Locale/Stub/StubIntl.php000066400000000000000000000015151266465517700216710ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub; @trigger_error('The '.__NAMESPACE__.'\StubIntl class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Globals\IntlGlobals class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Globals\IntlGlobals; /** * Alias of {@link \Symfony\Component\Intl\Globals\IntlGlobals}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Globals\IntlGlobals} instead. */ abstract class StubIntl extends IntlGlobals { } src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php000066400000000000000000000016431266465517700243550ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub; @trigger_error('The '.__NAMESPACE__.'\StubIntlDateFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\IntlDateFormatter class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; /** * Alias of {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter} * instead. */ class StubIntlDateFormatter extends IntlDateFormatter { } src/Symfony/Component/Locale/Stub/StubLocale.php000066400000000000000000000057121266465517700221650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub; @trigger_error('The '.__NAMESPACE__.'\StubLocale class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Locale\Locale and Symfony\Component\Intl\Intl classes instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Locale\Locale; /** * Alias of {@link \Symfony\Component\Intl\Locale\Locale}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\Locale\Locale} and * {@link \Symfony\Component\Intl\Intl} instead. */ class StubLocale extends Locale { /** * Caches the currencies. * * @var array */ protected static $currencies; /** * Caches the currencies names. * * @var array */ protected static $currenciesNames; /** * Returns the currencies data. * * @param string $locale * * @return array The currencies data */ public static function getCurrenciesData($locale) { if (null === self::$currencies) { self::prepareCurrencies($locale); } return self::$currencies; } /** * Returns the currencies names for a locale. * * @param string $locale The locale to use for the currencies names * * @return array The currencies names with their codes as keys * * @throws \InvalidArgumentException When the locale is different than 'en' */ public static function getDisplayCurrencies($locale) { if (null === self::$currenciesNames) { self::prepareCurrencies($locale); } return self::$currenciesNames; } /** * Returns all available currencies codes. * * @return array The currencies codes */ public static function getCurrencies() { return array_keys(self::getCurrenciesData(self::getDefault())); } public static function getDataDirectory() { return Intl::getDataDirectory(); } private static function prepareCurrencies($locale) { self::$currencies = array(); self::$currenciesNames = array(); $bundle = Intl::getCurrencyBundle(); foreach ($bundle->getCurrencyNames($locale) as $currency => $name) { self::$currencies[$currency] = array( 'name' => $name, 'symbol' => $bundle->getCurrencySymbol($currency, $locale), 'fractionDigits' => $bundle->getFractionDigits($currency), 'roundingIncrement' => $bundle->getRoundingIncrement($currency), ); self::$currenciesNames[$currency] = $name; } } } src/Symfony/Component/Locale/Stub/StubNumberFormatter.php000066400000000000000000000016351266465517700241020ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Stub; @trigger_error('The '.__NAMESPACE__.'\StubNumberFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\NumberFormatter\NumberFormatter class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\NumberFormatter\NumberFormatter; /** * Alias of {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter}. * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter} * instead. */ class StubNumberFormatter extends NumberFormatter { } src/Symfony/Component/Locale/Tests/000077500000000000000000000000001266465517700175775ustar00rootroot00000000000000src/Symfony/Component/Locale/Tests/LocaleTest.php000066400000000000000000000037041266465517700223530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Tests; use Symfony\Component\Locale\Locale; use Symfony\Component\Intl\Util\IntlTestHelper; /** * Test case for the {@link Locale} class. * * @author Bernhard Schussek * * @group legacy */ class LocaleTest extends \PHPUnit_Framework_TestCase { protected function setUp() { \Locale::setDefault('en'); } public function testGetDisplayCountries() { $countries = Locale::getDisplayCountries('en'); $this->assertEquals('Brazil', $countries['BR']); } public function testGetDisplayCountriesForSwitzerland() { IntlTestHelper::requireFullIntl($this); $countries = Locale::getDisplayCountries('de_CH'); $this->assertEquals('Schweiz', $countries['CH']); } public function testGetCountries() { $countries = Locale::getCountries(); $this->assertContains('BR', $countries); } public function testGetCountriesForSwitzerland() { $countries = Locale::getCountries(); $this->assertContains('CH', $countries); } public function testGetDisplayLanguages() { $languages = Locale::getDisplayLanguages('en'); $this->assertEquals('Brazilian Portuguese', $languages['pt_BR']); } public function testGetLanguages() { $languages = Locale::getLanguages(); $this->assertContains('pt_BR', $languages); } public function testGetDisplayLocales() { $locales = Locale::getDisplayLocales('en'); $this->assertEquals('Portuguese', $locales['pt']); } public function testGetLocales() { $locales = Locale::getLocales(); $this->assertContains('pt', $locales); } } src/Symfony/Component/Locale/Tests/Stub/000077500000000000000000000000001266465517700205145ustar00rootroot00000000000000src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php000066400000000000000000000025701266465517700241260ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Locale\Tests\Stub; use Symfony\Component\Locale\Stub\StubLocale; /** * @author Bernhard Schussek * * @group legacy */ class StubLocaleTest extends \PHPUnit_Framework_TestCase { public function testGetCurrenciesData() { $currencies = StubLocale::getCurrenciesData('en'); $this->assertEquals('R$', $currencies['BRL']['symbol']); $this->assertEquals('Brazilian Real', $currencies['BRL']['name']); $this->assertEquals(2, $currencies['BRL']['fractionDigits']); $this->assertEquals(0, $currencies['BRL']['roundingIncrement']); } public function testGetDisplayCurrencies() { $currencies = StubLocale::getDisplayCurrencies('en'); $this->assertEquals('Brazilian Real', $currencies['BRL']); // Checking that the cache is being used $currencies = StubLocale::getDisplayCurrencies('en'); $this->assertEquals('Argentine Peso', $currencies['ARS']); } public function testGetCurrencies() { $currencies = StubLocale::getCurrencies(); $this->assertTrue(in_array('BRL', $currencies)); } } src/Symfony/Component/Locale/composer.json000066400000000000000000000014231266465517700212170ustar00rootroot00000000000000{ "name": "symfony/locale", "type": "library", "description": "Symfony Locale 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.3.9", "symfony/intl": "~2.7" }, "autoload": { "psr-4": { "Symfony\\Component\\Locale\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Locale/phpunit.xml.dist000066400000000000000000000014721266465517700216540ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/OptionsResolver/000077500000000000000000000000001266465517700204535ustar00rootroot00000000000000src/Symfony/Component/OptionsResolver/.gitignore000066400000000000000000000000421266465517700224370ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/OptionsResolver/CHANGELOG.md000066400000000000000000000041161266465517700222660ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/OptionsResolver/Exception/000077500000000000000000000000001266465517700224115ustar00rootroot00000000000000src/Symfony/Component/OptionsResolver/Exception/AccessException.php000066400000000000000000000010771266465517700262070ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/ExceptionInterface.php000066400000000000000000000007251266465517700267050ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/InvalidArgumentException.php000066400000000000000000000007561266465517700301020ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php000066400000000000000000000010641266465517700277440ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php000066400000000000000000000010201266465517700277570ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/NoSuchOptionException.php000066400000000000000000000014771266465517700274020ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php000066400000000000000000000007701266465517700302660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/Exception/UndefinedOptionsException.php000066400000000000000000000010761266465517700302620ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/LICENSE000066400000000000000000000020511266465517700214560ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/OptionsResolver/Options.php000066400000000000000000000007431266465517700226230ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/OptionsResolver/OptionsResolver.php000066400000000000000000001146231266465517700243500ustar00rootroot00000000000000 * * 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, OptionsResolverInterface { /** * The fully qualified name of the {@link Options} interface. * * @internal */ const OPTIONS_INTERFACE = 'Symfony\\Component\\OptionsResolver\\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 OptionsResolver This instance * * @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()) && self::OPTIONS_INTERFACE === $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 OptionsResolver This instance * * @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 OptionsResolver This instance * * @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 OptionsResolver This instance * * @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 OptionsResolver This instance * * @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 the normalizers for an array of options. * * @param array $normalizers An array of closures * * @return OptionsResolver This instance * * @throws UndefinedOptionsException If the option is undefined * @throws AccessException If called from a lazy option or normalizer * * @see setNormalizer() * @deprecated since version 2.6, to be removed in 3.0. */ public function setNormalizers(array $normalizers) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use setNormalizer() instead.', E_USER_DEPRECATED); foreach ($normalizers as $option => $normalizer) { $this->setNormalizer($option, $normalizer); } 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 OptionsResolver This instance * * @throws UndefinedOptionsException If the option is undefined * @throws AccessException If called from a lazy option or normalizer */ public function setAllowedValues($option, $allowedValues = null) { if ($this->locked) { throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.'); } // BC if (is_array($option) && null === $allowedValues) { @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionValues) { $this->setAllowedValues($optionName, $optionValues); } return $this; } 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 OptionsResolver This instance * * @throws UndefinedOptionsException If the option is undefined * @throws AccessException If called from a lazy option or normalizer */ public function addAllowedValues($option, $allowedValues = null) { if ($this->locked) { throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); } // BC if (is_array($option) && null === $allowedValues) { @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionValues) { $this->addAllowedValues($optionName, $optionValues); } return $this; } 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 OptionsResolver This instance * * @throws UndefinedOptionsException If the option is undefined * @throws AccessException If called from a lazy option or normalizer */ public function setAllowedTypes($option, $allowedTypes = null) { if ($this->locked) { throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.'); } // BC if (is_array($option) && null === $allowedTypes) { @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionTypes) { $this->setAllowedTypes($optionName, $optionTypes); } return $this; } 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 OptionsResolver This instance * * @throws UndefinedOptionsException If the option is undefined * @throws AccessException If called from a lazy option or normalizer */ public function addAllowedTypes($option, $allowedTypes = null) { if ($this->locked) { throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.'); } // BC if (is_array($option) && null === $allowedTypes) { @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionTypes) { $this->addAllowedTypes($optionName, $optionTypes); } return $this; } 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 OptionsResolver This instance * * @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 OptionsResolver This instance * * @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); } } catch (\Exception $e) { unset($this->calling[$option]); throw $e; } 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); } catch (\Exception $e) { unset($this->calling[$option]); throw $e; } 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); } /** * Alias of {@link setDefault()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function set($option, $value) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefaults() method instead.', E_USER_DEPRECATED); return $this->setDefault($option, $value); } /** * Shortcut for {@link clear()} and {@link setDefaults()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function replace(array $defaults) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); $this->clear(); return $this->setDefaults($defaults); } /** * Alias of {@link setDefault()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function overload($option, $value) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefault() method instead.', E_USER_DEPRECATED); return $this->setDefault($option, $value); } /** * Alias of {@link offsetGet()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function get($option) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); return $this->offsetGet($option); } /** * Alias of {@link offsetExists()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function has($option) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); return $this->offsetExists($option); } /** * Shortcut for {@link clear()} and {@link setDefaults()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function replaceDefaults(array $defaultValues) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); $this->clear(); return $this->setDefaults($defaultValues); } /** * Alias of {@link setDefined()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function setOptional(array $optionNames) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefined() method instead.', E_USER_DEPRECATED); return $this->setDefined($optionNames); } /** * Alias of {@link isDefined()}. * * @deprecated since version 2.6, to be removed in 3.0. */ public function isKnown($option) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the isDefined() method instead.', E_USER_DEPRECATED); return $this->isDefined($option); } /** * 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); } } src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php000066400000000000000000000167351266465517700261760ustar00rootroot00000000000000 * * 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\InvalidOptionsException; use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; /** * @author Bernhard Schussek * * @deprecated since version 2.6, to be removed in 3.0. Use {@link OptionsResolver} instead. */ interface OptionsResolverInterface { /** * Sets default option values. * * The options can either be values of any types or closures that * evaluate the option value lazily. These closures must have one * of the following signatures: * * * function (Options $options) * function (Options $options, $value) * * * The second parameter passed to the closure is the previously * set default value, in case you are overwriting an existing * default value. * * The closures should return the lazily created option value. * * @param array $defaultValues A list of option names as keys and default * values or closures as values. * * @return OptionsResolverInterface The resolver instance. */ public function setDefaults(array $defaultValues); /** * Replaces default option values. * * Old defaults are erased, which means that closures passed here cannot * access the previous default value. This may be useful to improve * performance if the previous default value is calculated by an expensive * closure. * * @param array $defaultValues A list of option names as keys and default * values or closures as values. * * @return OptionsResolverInterface The resolver instance. */ public function replaceDefaults(array $defaultValues); /** * Sets optional options. * * This method declares valid option names without setting default values for them. * If these options are not passed to {@link resolve()} and no default has been set * for them, they will be missing in the final options array. This can be helpful * if you want to determine whether an option has been set or not because otherwise * {@link resolve()} would trigger an exception for unknown options. * * @param array $optionNames A list of option names. * * @return OptionsResolverInterface The resolver instance. */ public function setOptional(array $optionNames); /** * Sets required options. * * If these options are not passed to {@link resolve()} and no default has been set for * them, an exception will be thrown. * * @param array $optionNames A list of option names. * * @return OptionsResolverInterface The resolver instance. */ public function setRequired($optionNames); /** * Sets allowed values for a list of options. * * @param array $allowedValues A list of option names as keys and arrays * with values acceptable for that option as * values. * * @return OptionsResolverInterface The resolver instance. * * @throws InvalidOptionsException If an option has not been defined * (see {@link isKnown()}) for which * an allowed value is set. */ public function setAllowedValues($allowedValues); /** * Adds allowed values for a list of options. * * The values are merged with the allowed values defined previously. * * @param array $allowedValues A list of option names as keys and arrays * with values acceptable for that option as * values. * * @return OptionsResolverInterface The resolver instance. * * @throws InvalidOptionsException If an option has not been defined * (see {@link isKnown()}) for which * an allowed value is set. */ public function addAllowedValues($allowedValues); /** * Sets allowed types for a list of options. * * @param array $allowedTypes A list of option names as keys and type * names passed as string or array as values. * * @return OptionsResolverInterface The resolver instance. * * @throws InvalidOptionsException If an option has not been defined for * which an allowed type is set. */ public function setAllowedTypes($allowedTypes); /** * Adds allowed types for a list of options. * * The types are merged with the allowed types defined previously. * * @param array $allowedTypes A list of option names as keys and type * names passed as string or array as values. * * @return OptionsResolverInterface The resolver instance. * * @throws InvalidOptionsException If an option has not been defined for * which an allowed type is set. */ public function addAllowedTypes($allowedTypes); /** * Sets normalizers that are applied on resolved options. * * The normalizers should be closures with the following signature: * * * function (Options $options, $value) * * * The second parameter passed to the closure is the value of * the option. * * The closure should return the normalized value. * * @param array $normalizers An array of closures. * * @return OptionsResolverInterface The resolver instance. */ public function setNormalizers(array $normalizers); /** * Returns whether an option is known. * * An option is known if it has been passed to either {@link setDefaults()}, * {@link setRequired()} or {@link setOptional()} before. * * @param string $option The name of the option. * * @return bool Whether the option is known. */ public function isKnown($option); /** * Returns whether an option is required. * * An option is required if it has been passed to {@link setRequired()}, * but not to {@link setDefaults()}. That is, the option has been declared * as required and no default value has been set. * * @param string $option The name of the option. * * @return bool Whether the option is required. */ public function isRequired($option); /** * Returns the combination of the default and the passed options. * * @param array $options The custom option values. * * @return array A list of options and their values. * * @throws InvalidOptionsException If any of the passed options has not * been defined or does not contain an * allowed value. * @throws MissingOptionsException If a required option is missing. * @throws OptionDefinitionException If a cyclic dependency is detected * between two lazy options. */ public function resolve(array $options = array()); } src/Symfony/Component/OptionsResolver/README.md000066400000000000000000000006661266465517700217420ustar00rootroot00000000000000OptionsResolver Component ========================= This component processes and validates option arrays. Documentation ------------- The documentation for the component can be found [online] [1]. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/OptionsResolver/ $ composer install $ phpunit [1]: https://symfony.com/doc/current/components/options_resolver.html src/Symfony/Component/OptionsResolver/Tests/000077500000000000000000000000001266465517700215555ustar00rootroot00000000000000src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php000066400000000000000000000432161266465517700274360ustar00rootroot00000000000000 * * 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 Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\Options; /** * @group legacy */ class LegacyOptionsResolverTest extends \PHPUnit_Framework_TestCase { /** * @var OptionsResolver */ private $resolver; protected function setUp() { $this->resolver = new OptionsResolver(); } public function testResolve() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => '2', )); $options = array( 'two' => '20', ); $this->assertEquals(array( 'one' => '1', 'two' => '20', ), $this->resolver->resolve($options)); } public function testResolveNumericOptions() { $this->resolver->setDefaults(array( '1' => '1', '2' => '2', )); $options = array( '2' => '20', ); $this->assertEquals(array( '1' => '1', '2' => '20', ), $this->resolver->resolve($options)); } public function testResolveLazy() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => function (Options $options) { return '20'; }, )); $this->assertEquals(array( 'one' => '1', 'two' => '20', ), $this->resolver->resolve(array())); } public function testTypeAliasesForAllowedTypes() { $this->resolver->setDefaults(array( 'force' => false, )); $this->resolver->setAllowedTypes(array( 'force' => 'boolean', )); $this->resolver->resolve(array( 'force' => true, )); } public function testResolveLazyDependencyOnOptional() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => function (Options $options) { return $options['one'].'2'; }, )); $options = array( 'one' => '10', ); $this->assertEquals(array( 'one' => '10', 'two' => '102', ), $this->resolver->resolve($options)); } public function testResolveLazyDependencyOnMissingOptionalWithoutDefault() { $test = $this; $this->resolver->setOptional(array( 'one', )); $this->resolver->setDefaults(array( 'two' => function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertFalse(isset($options['one'])); return '2'; }, )); $options = array(); $this->assertEquals(array( 'two' => '2', ), $this->resolver->resolve($options)); } public function testResolveLazyDependencyOnOptionalWithoutDefault() { $test = $this; $this->resolver->setOptional(array( 'one', )); $this->resolver->setDefaults(array( 'two' => function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertTrue(isset($options['one'])); return $options['one'].'2'; }, )); $options = array( 'one' => '10', ); $this->assertEquals(array( 'one' => '10', 'two' => '102', ), $this->resolver->resolve($options)); } public function testResolveLazyDependencyOnRequired() { $this->resolver->setRequired(array( 'one', )); $this->resolver->setDefaults(array( 'two' => function (Options $options) { return $options['one'].'2'; }, )); $options = array( 'one' => '10', ); $this->assertEquals(array( 'one' => '10', 'two' => '102', ), $this->resolver->resolve($options)); } public function testResolveLazyReplaceDefaults() { $test = $this; $this->resolver->setDefaults(array( 'one' => function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->fail('Previous closure should not be executed'); }, )); $this->resolver->replaceDefaults(array( 'one' => function (Options $options, $previousValue) { return '1'; }, )); $this->assertEquals(array( 'one' => '1', ), $this->resolver->resolve(array())); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException * @expectedExceptionMessage The option "foo" does not exist. Defined options are: "one", "three", "two". */ public function testResolveFailsIfNonExistingOption() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setRequired(array( 'two', )); $this->resolver->setOptional(array( 'three', )); $this->resolver->resolve(array( 'foo' => 'bar', )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException */ public function testResolveFailsIfMissingRequiredOption() { $this->resolver->setRequired(array( 'one', )); $this->resolver->setDefaults(array( 'two' => '2', )); $this->resolver->resolve(array( 'two' => '20', )); } public function testResolveSucceedsIfOptionValueAllowed() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedValues(array( 'one' => array('1', 'one'), )); $options = array( 'one' => 'one', ); $this->assertEquals(array( 'one' => 'one', ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionValueAllowed2() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => '2', )); $this->resolver->setAllowedValues(array( 'one' => '1', 'two' => '2', )); $this->resolver->addAllowedValues(array( 'one' => 'one', 'two' => 'two', )); $options = array( 'one' => '1', 'two' => 'two', ); $this->assertEquals(array( 'one' => '1', 'two' => 'two', ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionalWithAllowedValuesNotSet() { $this->resolver->setRequired(array( 'one', )); $this->resolver->setOptional(array( 'two', )); $this->resolver->setAllowedValues(array( 'one' => array('1', 'one'), 'two' => array('2', 'two'), )); $options = array( 'one' => '1', ); $this->assertEquals(array( 'one' => '1', ), $this->resolver->resolve($options)); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testResolveFailsIfOptionValueNotAllowed() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedValues(array( 'one' => array('1', 'one'), )); $this->resolver->resolve(array( 'one' => '2', )); } public function testResolveSucceedsIfOptionTypeAllowed() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => 'string', )); $options = array( 'one' => 'one', ); $this->assertEquals(array( 'one' => 'one', ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionTypeAllowedPassArray() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => array('string', 'bool'), )); $options = array( 'one' => true, ); $this->assertEquals(array( 'one' => true, ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionTypeAllowedPassObject() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => 'object', )); $object = new \stdClass(); $options = array( 'one' => $object, ); $this->assertEquals(array( 'one' => $object, ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionTypeAllowedPassClass() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => '\stdClass', )); $object = new \stdClass(); $options = array( 'one' => $object, ); $this->assertEquals(array( 'one' => $object, ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionTypeAllowedAddTypes() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => '2', )); $this->resolver->setAllowedTypes(array( 'one' => 'string', 'two' => 'bool', )); $this->resolver->addAllowedTypes(array( 'one' => 'float', 'two' => 'integer', )); $options = array( 'one' => 1.23, 'two' => false, ); $this->assertEquals(array( 'one' => 1.23, 'two' => false, ), $this->resolver->resolve($options)); } public function testResolveSucceedsIfOptionalWithTypeAndWithoutValue() { $this->resolver->setOptional(array( 'one', 'two', )); $this->resolver->setAllowedTypes(array( 'one' => 'string', 'two' => 'int', )); $options = array( 'two' => 1, ); $this->assertEquals(array( 'two' => 1, ), $this->resolver->resolve($options)); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testResolveFailsIfOptionTypeNotAllowed() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => array('string', 'bool'), )); $this->resolver->resolve(array( 'one' => 1.23, )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testResolveFailsIfOptionTypeNotAllowedMultipleOptions() { $this->resolver->setDefaults(array( 'one' => '1', 'two' => '2', )); $this->resolver->setAllowedTypes(array( 'one' => 'string', 'two' => 'bool', )); $this->resolver->resolve(array( 'one' => 'foo', 'two' => 1.23, )); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testResolveFailsIfOptionTypeNotAllowedAddTypes() { $this->resolver->setDefaults(array( 'one' => '1', )); $this->resolver->setAllowedTypes(array( 'one' => 'string', )); $this->resolver->addAllowedTypes(array( 'one' => 'bool', )); $this->resolver->resolve(array( 'one' => 1.23, )); } public function testFluidInterface() { $this->resolver->setDefaults(array('one' => '1')) ->replaceDefaults(array('one' => '2')) ->setAllowedValues(array('one' => array('1', '2'))) ->addAllowedValues(array('one' => array('3'))) ->setRequired(array('two')) ->setOptional(array('three')); $options = array( 'two' => '2', ); $this->assertEquals(array( 'one' => '2', 'two' => '2', ), $this->resolver->resolve($options)); } public function testKnownIfDefaultWasSet() { $this->assertFalse($this->resolver->isKnown('foo')); $this->resolver->setDefaults(array( 'foo' => 'bar', )); $this->assertTrue($this->resolver->isKnown('foo')); } public function testKnownIfRequired() { $this->assertFalse($this->resolver->isKnown('foo')); $this->resolver->setRequired(array( 'foo', )); $this->assertTrue($this->resolver->isKnown('foo')); } public function testKnownIfOptional() { $this->assertFalse($this->resolver->isKnown('foo')); $this->resolver->setOptional(array( 'foo', )); $this->assertTrue($this->resolver->isKnown('foo')); } public function testRequiredIfRequired() { $this->assertFalse($this->resolver->isRequired('foo')); $this->resolver->setRequired(array( 'foo', )); $this->assertTrue($this->resolver->isRequired('foo')); } public function testNormalizersTransformFinalOptions() { $this->resolver->setDefaults(array( 'foo' => 'bar', 'bam' => 'baz', )); $this->resolver->setNormalizers(array( 'foo' => function (Options $options, $value) { return $options['bam'].'['.$value.']'; }, )); $expected = array( 'foo' => 'baz[bar]', 'bam' => 'baz', ); $this->assertEquals($expected, $this->resolver->resolve(array())); $expected = array( 'foo' => 'boo[custom]', 'bam' => 'boo', ); $this->assertEquals($expected, $this->resolver->resolve(array( 'foo' => 'custom', 'bam' => 'boo', ))); } public function testResolveWithoutOptionSucceedsIfRequiredAndDefaultValue() { $this->resolver->setRequired(array( 'foo', )); $this->resolver->setDefaults(array( 'foo' => 'bar', )); $this->assertEquals(array( 'foo' => 'bar', ), $this->resolver->resolve(array())); } public function testResolveWithoutOptionSucceedsIfDefaultValueAndRequired() { $this->resolver->setDefaults(array( 'foo' => 'bar', )); $this->resolver->setRequired(array( 'foo', )); $this->assertEquals(array( 'foo' => 'bar', ), $this->resolver->resolve(array())); } public function testResolveSucceedsIfOptionRequiredAndValueAllowed() { $this->resolver->setRequired(array( 'one', 'two', )); $this->resolver->setAllowedValues(array( 'two' => array('2'), )); $options = array( 'one' => '1', 'two' => '2', ); $this->assertEquals($options, $this->resolver->resolve($options)); } public function testResolveSucceedsIfValueAllowedCallbackReturnsTrue() { $this->resolver->setRequired(array( 'test', )); $this->resolver->setAllowedValues(array( 'test' => function ($value) { return true; }, )); $options = array( 'test' => true, ); $this->assertEquals($options, $this->resolver->resolve($options)); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException */ public function testResolveFailsIfValueAllowedCallbackReturnsFalse() { $this->resolver->setRequired(array( 'test', )); $this->resolver->setAllowedValues(array( 'test' => function ($value) { return false; }, )); $options = array( 'test' => true, ); $this->assertEquals($options, $this->resolver->resolve($options)); } public function testClone() { $this->resolver->setDefaults(array('one' => '1')); $clone = clone $this->resolver; // Changes after cloning don't affect each other $this->resolver->setDefaults(array('two' => '2')); $clone->setDefaults(array('three' => '3')); $this->assertEquals(array( 'one' => '1', 'two' => '2', ), $this->resolver->resolve()); $this->assertEquals(array( 'one' => '1', 'three' => '3', ), $clone->resolve()); } public function testOverloadReturnsThis() { $this->assertSame($this->resolver, $this->resolver->overload('foo', 'bar')); } public function testOverloadCallsSet() { $this->resolver->overload('foo', 'bar'); $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); } } src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php000066400000000000000000000230301266465517700257040ustar00rootroot00000000000000 * * 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 Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; /** * @group legacy */ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase { /** * @var OptionsResolver */ private $options; protected function setUp() { $this->options = new OptionsResolver(); } public function testSetLazyOption() { $test = $this; $this->options->set('foo', function (Options $options) use ($test) { return 'dynamic'; }); $this->assertEquals(array('foo' => 'dynamic'), $this->options->resolve()); } public function testOverloadKeepsPreviousValue() { $test = $this; // defined by superclass $this->options->set('foo', 'bar'); // defined by subclass $this->options->overload('foo', function (Options $options, $previousValue) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $previousValue); return 'dynamic'; }); $this->assertEquals(array('foo' => 'dynamic'), $this->options->resolve()); } public function testPreviousValueIsEvaluatedIfLazy() { $test = $this; // defined by superclass $this->options->set('foo', function (Options $options) { return 'bar'; }); // defined by subclass $this->options->overload('foo', function (Options $options, $previousValue) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $previousValue); return 'dynamic'; }); $this->assertEquals(array('foo' => 'dynamic'), $this->options->resolve()); } public function testPreviousValueIsNotEvaluatedIfNoSecondArgument() { $test = $this; // defined by superclass $this->options->set('foo', function (Options $options) use ($test) { $test->fail('Should not be called'); }); // defined by subclass, no $previousValue argument defined! $this->options->overload('foo', function (Options $options) use ($test) { return 'dynamic'; }); $this->assertEquals(array('foo' => 'dynamic'), $this->options->resolve()); } public function testLazyOptionCanAccessOtherOptions() { $test = $this; $this->options->set('foo', 'bar'); $this->options->set('bam', function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $options->get('foo')); return 'dynamic'; }); $this->assertEquals(array('foo' => 'bar', 'bam' => 'dynamic'), $this->options->resolve()); } public function testLazyOptionCanAccessOtherLazyOptions() { $test = $this; $this->options->set('foo', function (Options $options) { return 'bar'; }); $this->options->set('bam', function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $options->get('foo')); return 'dynamic'; }); $this->assertEquals(array('foo' => 'bar', 'bam' => 'dynamic'), $this->options->resolve()); } public function testNormalizer() { $this->options->set('foo', 'bar'); $this->options->setNormalizer('foo', function () { return 'normalized'; }); $this->assertEquals(array('foo' => 'normalized'), $this->options->resolve()); } public function testNormalizerReceivesUnnormalizedValue() { $this->options->set('foo', 'bar'); $this->options->setNormalizer('foo', function (Options $options, $value) { return 'normalized['.$value.']'; }); $this->assertEquals(array('foo' => 'normalized[bar]'), $this->options->resolve()); } public function testNormalizerCanAccessOtherOptions() { $test = $this; $this->options->set('foo', 'bar'); $this->options->set('bam', 'baz'); $this->options->setNormalizer('bam', function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $options->get('foo')); return 'normalized'; }); $this->assertEquals(array('foo' => 'bar', 'bam' => 'normalized'), $this->options->resolve()); } public function testNormalizerCanAccessOtherLazyOptions() { $test = $this; $this->options->set('foo', function (Options $options) { return 'bar'; }); $this->options->set('bam', 'baz'); $this->options->setNormalizer('bam', function (Options $options) use ($test) { /* @var \PHPUnit_Framework_TestCase $test */ $test->assertEquals('bar', $options->get('foo')); return 'normalized'; }); $this->assertEquals(array('foo' => 'bar', 'bam' => 'normalized'), $this->options->resolve()); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException */ public function testFailForCyclicDependencies() { $this->options->set('foo', function (Options $options) { $options->get('bam'); }); $this->options->set('bam', function (Options $options) { $options->get('foo'); }); $this->options->resolve(); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException */ public function testFailForCyclicDependenciesBetweenNormalizers() { $this->options->set('foo', 'bar'); $this->options->set('bam', 'baz'); $this->options->setNormalizer('foo', function (Options $options) { $options->get('bam'); }); $this->options->setNormalizer('bam', function (Options $options) { $options->get('foo'); }); $this->options->resolve(); } /** * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException */ public function testFailForCyclicDependenciesBetweenNormalizerAndLazyOption() { $this->options->set('foo', function (Options $options) { $options->get('bam'); }); $this->options->set('bam', 'baz'); $this->options->setNormalizer('bam', function (Options $options) { $options->get('foo'); }); $this->options->resolve(); } public function testReplaceClearsAndSets() { $this->options->set('one', '1'); $this->options->replace(array( 'two' => '2', 'three' => function (Options $options) { return '2' === $options['two'] ? '3' : 'foo'; }, )); $this->assertEquals(array( 'two' => '2', 'three' => '3', ), $this->options->resolve()); } public function testClearRemovesAllOptions() { $this->options->set('one', 1); $this->options->set('two', 2); $this->options->clear(); $this->assertEmpty($this->options->resolve()); } public function testOverloadCannotBeEvaluatedLazilyWithoutExpectedClosureParams() { $this->options->set('foo', 'bar'); $this->options->overload('foo', function () { return 'test'; }); $resolved = $this->options->resolve(); $this->assertTrue(is_callable($resolved['foo'])); } public function testOverloadCannotBeEvaluatedLazilyWithoutFirstParamTypeHint() { $this->options->set('foo', 'bar'); $this->options->overload('foo', function ($object) { return 'test'; }); $resolved = $this->options->resolve(); $this->assertTrue(is_callable($resolved['foo'])); } public function testRemoveOptionAndNormalizer() { $this->options->set('foo1', 'bar'); $this->options->setNormalizer('foo1', function (Options $options) { return ''; }); $this->options->set('foo2', 'bar'); $this->options->setNormalizer('foo2', function (Options $options) { return ''; }); $this->options->remove('foo2'); $this->assertEquals(array('foo1' => ''), $this->options->resolve()); } public function testReplaceOptionAndNormalizer() { $this->options->set('foo1', 'bar'); $this->options->setNormalizer('foo1', function (Options $options) { return ''; }); $this->options->set('foo2', 'bar'); $this->options->setNormalizer('foo2', function (Options $options) { return ''; }); $this->options->replace(array('foo1' => 'new')); $this->assertEquals(array('foo1' => 'new'), $this->options->resolve()); } public function testClearOptionAndNormalizer() { $this->options->set('foo1', 'bar'); $this->options->setNormalizer('foo1', function (Options $options) { return ''; }); $this->options->set('foo2', 'bar'); $this->options->setNormalizer('foo2', function (Options $options) { return ''; }); $this->options->clear(); $this->assertEmpty($this->options->resolve()); } } src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php000066400000000000000000001427571266465517700271420ustar00rootroot00000000000000 * * 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 Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; class OptionsResolver2Dot6Test extends \PHPUnit_Framework_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) { \PHPUnit_Framework_Assert::fail('Should not be called'); }; $this->resolver->setDefault('foo', $closure); $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); } public function testClosureWithoutParametersNotInvoked() { $closure = function () { \PHPUnit_Framework_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) { \PHPUnit_Framework_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) { \PHPUnit_Framework_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 () { \PHPUnit_Framework_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) { \PHPUnit_Framework_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) { \PHPUnit_Framework_Assert::assertSame(1, ++$calls); $options['lazy2']; }); $this->resolver->setDefault('lazy2', function (Options $options) use (&$calls) { \PHPUnit_Framework_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); $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 () { \PHPUnit_Framework_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 () { \PHPUnit_Framework_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 \PHPUnit_Framework_TestCase $test */ \PHPUnit_Framework_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 \PHPUnit_Framework_TestCase $test */ \PHPUnit_Framework_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) { \PHPUnit_Framework_Assert::assertSame(1, ++$calls); $options['norm2']; }); $this->resolver->setNormalizer('norm2', function () use (&$calls) { \PHPUnit_Framework_Assert::assertSame(2, ++$calls); }); $this->resolver->resolve(); $this->assertSame(2, $calls); } public function testNormalizerNotCalledForUnsetOptions() { $this->resolver->setDefined('norm'); $this->resolver->setNormalizer('norm', function () { \PHPUnit_Framework_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) { \PHPUnit_Framework_Assert::assertTrue(isset($options['default1'])); \PHPUnit_Framework_Assert::assertTrue(isset($options['default2'])); \PHPUnit_Framework_Assert::assertTrue(isset($options['required'])); \PHPUnit_Framework_Assert::assertTrue(isset($options['lazy1'])); \PHPUnit_Framework_Assert::assertTrue(isset($options['lazy2'])); \PHPUnit_Framework_Assert::assertFalse(isset($options['defined'])); \PHPUnit_Framework_Assert::assertSame(0, $options['default1']); \PHPUnit_Framework_Assert::assertSame(42, $options['default2']); \PHPUnit_Framework_Assert::assertSame('value', $options['required']); \PHPUnit_Framework_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) { \PHPUnit_Framework_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); } } src/Symfony/Component/OptionsResolver/composer.json000066400000000000000000000014631266465517700232010ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/OptionsResolver/phpunit.xml.dist000066400000000000000000000015031266465517700236250ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Process/000077500000000000000000000000001266465517700167145ustar00rootroot00000000000000src/Symfony/Component/Process/.gitignore000066400000000000000000000000421266465517700207000ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Process/CHANGELOG.md000066400000000000000000000020751266465517700205310ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Process/Exception/000077500000000000000000000000001266465517700206525ustar00rootroot00000000000000src/Symfony/Component/Process/Exception/ExceptionInterface.php000066400000000000000000000006571266465517700251520ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Process/Exception/InvalidArgumentException.php000066400000000000000000000007601266465517700263360ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Process/Exception/LogicException.php000066400000000000000000000007221266465517700243000ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Process/Exception/ProcessFailedException.php000066400000000000000000000025051266465517700257670ustar00rootroot00000000000000 * * 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.'."\nExit Code: %s(%s)", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText() ); 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; } } src/Symfony/Component/Process/Exception/ProcessTimedOutException.php000066400000000000000000000031731266465517700263370ustar00rootroot00000000000000 * * 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)); } } } src/Symfony/Component/Process/Exception/RuntimeException.php000066400000000000000000000007411266465517700246670ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Process/ExecutableFinder.php000066400000000000000000000050151266465517700226370ustar00rootroot00000000000000 * * 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 = $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; } } src/Symfony/Component/Process/LICENSE000066400000000000000000000020511266465517700177170ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Process/PhpExecutableFinder.php000066400000000000000000000043471266465517700233160ustar00rootroot00000000000000 * * 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 (defined('PHP_BINARY') && 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; } } src/Symfony/Component/Process/PhpProcess.php000066400000000000000000000045751266465517700215260ustar00rootroot00000000000000 * * 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($callback = null) { if (null === $this->getCommandLine()) { throw new RuntimeException('Unable to find the PHP executable.'); } parent::start($callback); } } src/Symfony/Component/Process/Pipes/000077500000000000000000000000001266465517700177745ustar00rootroot00000000000000src/Symfony/Component/Process/Pipes/AbstractPipes.php000066400000000000000000000031171266465517700232530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Process\Pipes; /** * @author Romain Neutron * * @internal */ abstract class AbstractPipes implements PipesInterface { /** @var array */ public $pipes = array(); /** @var string */ protected $inputBuffer = ''; /** @var resource|null */ protected $input; /** @var bool */ private $blocked = true; /** * {@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 (null !== $this->input) { stream_set_blocking($this->input, 0); } $this->blocked = false; } } src/Symfony/Component/Process/Pipes/PipesInterface.php000066400000000000000000000025671266465517700234200ustar00rootroot00000000000000 * * 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(); /** * Closes file handles and pipes. */ public function close(); } src/Symfony/Component/Process/Pipes/UnixPipes.php000066400000000000000000000132451266465517700224360ustar00rootroot00000000000000 * * 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 $disableOutput; public function __construct($ttyMode, $ptyMode, $input, $disableOutput) { $this->ttyMode = (bool) $ttyMode; $this->ptyMode = (bool) $ptyMode; $this->disableOutput = (bool) $disableOutput; if (is_resource($input)) { $this->input = $input; } else { $this->inputBuffer = (string) $input; } } public function __destruct() { $this->close(); } /** * {@inheritdoc} */ public function getDescriptors() { if ($this->disableOutput) { $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) { // only stdin is left open, job has been done ! // we can now close it if (1 === count($this->pipes) && array(0) === array_keys($this->pipes)) { fclose($this->pipes[0]); unset($this->pipes[0]); } if (empty($this->pipes)) { return array(); } $this->unblock(); $read = array(); if (null !== $this->input) { // if input is a resource, let's add it to stream_select argument to // fill a buffer $r = array_merge($this->pipes, array('input' => $this->input)); } else { $r = $this->pipes; } // discard read on stdin unset($r[0]); $w = isset($this->pipes[0]) ? array($this->pipes[0]) : null; $e = null; // let's have a look if something changed in streams if (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; } // nothing has changed if (0 === $n) { 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 $type = (false !== $found = array_search($pipe, $this->pipes)) ? $found : 'input'; $data = ''; while ('' !== $dataread = (string) fread($pipe, self::CHUNK_SIZE)) { $data .= $dataread; } if ('' !== $data) { if ($type === 'input') { $this->inputBuffer .= $data; } else { $read[$type] = $data; } } if (false === $data || (true === $close && feof($pipe) && '' === $data)) { if ($type === 'input') { // no more data to read on input resource // use an empty buffer in the next reads $this->input = null; } else { fclose($this->pipes[$type]); unset($this->pipes[$type]); } } } if (null !== $w && 0 < count($w)) { while (strlen($this->inputBuffer)) { $written = fwrite($w[0], $this->inputBuffer, 2 << 18); // write 512k if ($written > 0) { $this->inputBuffer = (string) substr($this->inputBuffer, $written); } else { break; } } } // no input to read on resource, buffer is empty and stdin still open if ('' === $this->inputBuffer && null === $this->input && isset($this->pipes[0])) { fclose($this->pipes[0]); unset($this->pipes[0]); } return $read; } /** * {@inheritdoc} */ public function areOpen() { return (bool) $this->pipes; } /** * Creates a new UnixPipes instance. * * @param Process $process * @param string|resource $input * * @return UnixPipes */ public static function create(Process $process, $input) { return new static($process->isTty(), $process->isPty(), $input, $process->isOutputDisabled()); } } src/Symfony/Component/Process/Pipes/WindowsPipes.php000066400000000000000000000160101266465517700231360ustar00rootroot00000000000000 * * 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 $disableOutput; public function __construct($disableOutput, $input) { $this->disableOutput = (bool) $disableOutput; if (!$this->disableOutput) { // 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 $this->files = array( Process::STDOUT => tempnam(sys_get_temp_dir(), 'out_sf_proc'), Process::STDERR => tempnam(sys_get_temp_dir(), 'err_sf_proc'), ); foreach ($this->files as $offset => $file) { if (false === $file || false === $this->fileHandles[$offset] = fopen($file, 'rb')) { throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); } } } if (is_resource($input)) { $this->input = $input; } else { $this->inputBuffer = $input; } } public function __destruct() { $this->close(); $this->removeFiles(); } /** * {@inheritdoc} */ public function getDescriptors() { if ($this->disableOutput) { $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->write($blocking, $close); $read = array(); $fh = $this->fileHandles; foreach ($fh as $type => $fileHandle) { if (0 !== fseek($fileHandle, $this->readBytes[$type])) { continue; } $data = ''; $dataread = null; while (!feof($fileHandle)) { if (false !== $dataread = fread($fileHandle, self::CHUNK_SIZE)) { $data .= $dataread; } } if (0 < $length = strlen($data)) { $this->readBytes[$type] += $length; $read[$type] = $data; } if (false === $dataread || (true === $close && feof($fileHandle) && '' === $data)) { fclose($this->fileHandles[$type]); unset($this->fileHandles[$type]); } } return $read; } /** * {@inheritdoc} */ public function areOpen() { return (bool) $this->pipes && (bool) $this->fileHandles; } /** * {@inheritdoc} */ public function close() { parent::close(); foreach ($this->fileHandles as $handle) { fclose($handle); } $this->fileHandles = array(); } /** * Creates a new WindowsPipes instance. * * @param Process $process The process * @param $input * * @return WindowsPipes */ public static function create(Process $process, $input) { return new static($process->isOutputDisabled(), $input); } /** * Removes temporary files. */ private function removeFiles() { foreach ($this->files as $filename) { if (file_exists($filename)) { @unlink($filename); } } $this->files = array(); } /** * Writes input to stdin. * * @param bool $blocking * @param bool $close */ private function write($blocking, $close) { if (empty($this->pipes)) { return; } $this->unblock(); $r = null !== $this->input ? array('input' => $this->input) : null; $w = isset($this->pipes[0]) ? array($this->pipes[0]) : null; $e = null; // let's have a look if something changed in streams if (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; } // nothing has changed if (0 === $n) { return; } if (null !== $w && 0 < count($r)) { $data = ''; while ($dataread = fread($r['input'], self::CHUNK_SIZE)) { $data .= $dataread; } $this->inputBuffer .= $data; if (false === $data || (true === $close && feof($r['input']) && '' === $data)) { // no more data to read on input resource // use an empty buffer in the next reads $this->input = null; } } if (null !== $w && 0 < count($w)) { while (strlen($this->inputBuffer)) { $written = fwrite($w[0], $this->inputBuffer, 2 << 18); if ($written > 0) { $this->inputBuffer = (string) substr($this->inputBuffer, $written); } else { break; } } } // no input to read on resource, buffer is empty and stdin still open if ('' === $this->inputBuffer && null === $this->input && isset($this->pipes[0])) { fclose($this->pipes[0]); unset($this->pipes[0]); } } } src/Symfony/Component/Process/Process.php000066400000000000000000001321771266465517700210560ustar00rootroot00000000000000 * * 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 { 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; private $callback; 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 $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 string|null $input The 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->input = $input; $this->setTimeout($timeout); $this->useFileHandles = '\\' === DIRECTORY_SEPARATOR; $this->pty = false; $this->enhanceWindowsCompatibility = true; $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($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($callback = null) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); } if ($this->outputDisabled && null !== $callback) { throw new LogicException('Output has been disabled, enable it to allow the use of a callback.'); } $this->resetProcessData(); $this->starttime = $this->lastOutputTime = microtime(true); $this->callback = $this->buildCallback($callback); $descriptors = $this->getDescriptors(); $commandline = $this->commandline; 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, $this->env, $this->options); 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 Process The new process * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running * * @see start() */ public function restart($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($callback = null) { $this->requireProcessIsStarted(__FUNCTION__); $this->updateStatus(false); if (null !== $callback) { $this->callback = $this->buildCallback($callback); } do { $this->checkTimeout(); $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); $close = '\\' !== DIRECTORY_SEPARATOR || !$running; $this->readPipes(true, $close); } 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 Process * * @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 Process * * @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 Process * * @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() { if ($this->outputDisabled) { throw new LogicException('Output has been disabled.'); } $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); 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. * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process output since the last call */ public function getIncrementalOutput() { if ($this->outputDisabled) { throw new LogicException('Output has been disabled.'); } $this->requireProcessIsStarted(__FUNCTION__); $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); $this->incrementalOutputOffset = ftell($this->stdout); if (false === $latest) { return ''; } return $latest; } /** * Clears the process output. * * @return Process */ 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() { if ($this->outputDisabled) { throw new LogicException('Output has been disabled.'); } $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); 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. * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process error output since the last call */ public function getIncrementalErrorOutput() { if ($this->outputDisabled) { throw new LogicException('Output has been disabled.'); } $this->requireProcessIsStarted(__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 Process */ 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 && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) { throw new RuntimeException('TTY mode requires /dev/tty to be readable.'); } $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 = array(); foreach ($env as $key => $value) { $this->env[$key] = (string) $value; } return $this; } /** * Gets the contents of STDIN. * * @return string|null The current contents * * @deprecated since version 2.5, to be removed in 3.0. * Use setInput() instead. * This method is deprecated in favor of getInput. */ public function getStdin() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getInput() method instead.', E_USER_DEPRECATED); return $this->getInput(); } /** * Gets the Process input. * * @return null|string The Process input */ public function getInput() { return $this->input; } /** * Sets the contents of STDIN. * * @param string|null $stdin The new contents * * @return self The current Process instance * * @deprecated since version 2.5, to be removed in 3.0. * Use setInput() instead. * * @throws LogicException In case the process is running * @throws InvalidArgumentException In case the argument is invalid */ public function setStdin($stdin) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the setInput() method instead.', E_USER_DEPRECATED); return $this->setInput($stdin); } /** * Sets the input. * * This content will be passed to the underlying process standard input. * * @param mixed $input The content * * @return self The current Process instance * * @throws LogicException In case the process is running * * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public function setInput($input) { if ($this->isRunning()) { throw new LogicException('Input can not be set while the process is running.'); } $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $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; } /** * 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', array(array('pty'), array('pty'), array('pty')), $pipes); } /** * Creates the descriptors needed by the proc_open. * * @return array */ private function getDescriptors() { if ('\\' === DIRECTORY_SEPARATOR) { $this->processPipes = WindowsPipes::create($this, $this->input); } else { $this->processPipes = UnixPipes::create($this, $this->input); } 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($callback) { $that = $this; $out = self::OUT; $callback = function ($type, $data) use ($that, $callback, $out) { if ($out == $type) { $that->addOutput($data); } else { $that->addErrorOutput($data); } if (null !== $callback) { call_user_func($callback, $type, $data); } }; return $callback; } /** * 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); $this->readPipes($blocking, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); if ($this->fallbackStatus && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { $this->processInformation = $this->fallbackStatus + $this->processInformation; } if (!$this->processInformation['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'); } /** * 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)); } } } src/Symfony/Component/Process/ProcessBuilder.php000066400000000000000000000150711266465517700223560ustar00rootroot00000000000000 * * 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 ProcessBuilder */ 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 ProcessBuilder */ 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 ProcessBuilder */ 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 ProcessBuilder */ public function setArguments(array $arguments) { $this->arguments = $arguments; return $this; } /** * Sets the working directory. * * @param null|string $cwd The working directory * * @return ProcessBuilder */ public function setWorkingDirectory($cwd) { $this->cwd = $cwd; return $this; } /** * Sets whether environment variables will be inherited or not. * * @param bool $inheritEnv * * @return ProcessBuilder */ 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 ProcessBuilder */ 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 ProcessBuilder */ public function addEnvironmentVariables(array $variables) { $this->env = array_replace($this->env, $variables); return $this; } /** * Sets the input of the process. * * @param mixed $input The input as a string * * @return ProcessBuilder * * @throws InvalidArgumentException In case the argument is invalid * * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public function setInput($input) { $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); return $this; } /** * Sets the process timeout. * * To disable the timeout, set this value to null. * * @param float|null $timeout * * @return ProcessBuilder * * @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 ProcessBuilder */ public function setOption($name, $value) { $this->options[$name] = $value; return $this; } /** * Disables fetching output and error output from the underlying process. * * @return ProcessBuilder */ public function disableOutput() { $this->outputDisabled = true; return $this; } /** * Enables fetching output and error output from the underlying process. * * @return ProcessBuilder */ 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)); if ($this->inheritEnv) { // include $_ENV for BC purposes $env = array_replace($_ENV, $_SERVER, $this->env); } else { $env = $this->env; } $process = new Process($script, $this->cwd, $env, $this->input, $this->timeout, $options); if ($this->outputDisabled) { $process->disableOutput(); } return $process; } } src/Symfony/Component/Process/ProcessUtils.php000066400000000000000000000070651266465517700220740ustar00rootroot00000000000000 * * 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 escapeshellarg($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 string The validated input * * @throws InvalidArgumentException In case the input is not valid * * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public static function validateInput($caller, $input) { if (null !== $input) { if (is_resource($input)) { return $input; } if (is_scalar($input)) { return (string) $input; } // deprecated as of Symfony 2.5, to be removed in 3.0 if (is_object($input) && method_exists($input, '__toString')) { @trigger_error('Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return (string) $input; } throw new InvalidArgumentException(sprintf('%s only accepts strings or stream resources.', $caller)); } return $input; } private static function isSurroundedBy($arg, $char) { return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1]; } } src/Symfony/Component/Process/README.md000066400000000000000000000032201266465517700201700ustar00rootroot00000000000000Process Component ================= Process executes commands in sub-processes. In this example, we run a simple directory listing and get the result back: ```php use Symfony\Component\Process\Process; use Symfony\Component\Process\Exception\ProcessFailedException; $process = new Process('ls -lsa'); $process->setTimeout(3600); $process->run(); if (!$process->isSuccessful()) { throw new ProcessFailedException($process); } print $process->getOutput(); ``` You can think that this is easy to achieve with plain PHP but it's not especially if you want to take care of the subtle differences between the different platforms. You can simplify the code by using `mustRun()` instead of `run()`, which will throw a `ProcessFailedException` automatically in case of a problem: ```php use Symfony\Component\Process\Process; $process = new Process('ls -lsa'); $process->setTimeout(3600); $process->mustRun(); print $process->getOutput(); ``` And if you want to be able to get some feedback in real-time, just pass an anonymous function to the ``run()`` method and you will get the output buffer as it becomes available: ```php use Symfony\Component\Process\Process; $process = new Process('ls -lsa'); $process->run(function ($type, $buffer) { if (Process::ERR === $type) { echo 'ERR > '.$buffer; } else { echo 'OUT > '.$buffer; } }); ``` That's great if you want to execute a long running command (like rsync-ing files to a remote server) and give feedback to the user in real-time. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Process/ $ composer install $ phpunit src/Symfony/Component/Process/Tests/000077500000000000000000000000001266465517700200165ustar00rootroot00000000000000src/Symfony/Component/Process/Tests/ExecutableFinderTest.php000066400000000000000000000072541266465517700246100ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\ExecutableFinder; /** * @author Chris Smith */ class ExecutableFinderTest extends \PHPUnit_Framework_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); } /** * @requires PHP 5.4 */ 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); } /** * @requires PHP 5.4 */ 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); } /** * @requires PHP 5.4 */ 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); } /** * @requires PHP 5.4 */ 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' : ''); } } src/Symfony/Component/Process/Tests/NonStopableProcess.php000066400000000000000000000020451266465517700243130ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php000066400000000000000000000061601266465517700252530ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\PhpExecutableFinder; /** * @author Robert Schönthal */ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase { /** * tests find() with the env var PHP_PATH. */ public function testFindWithPhpPath() { if (defined('PHP_BINARY')) { $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4'); } $f = new PhpExecutableFinder(); $current = $f->find(); //not executable PHP_PATH putenv('PHP_PATH=/not/executable/php'); $this->assertFalse($f->find(), '::find() returns false for not executable PHP'); $this->assertFalse($f->find(false), '::find() returns false for not executable PHP'); //executable PHP_PATH putenv('PHP_PATH='.$current); $this->assertEquals($f->find(), $current, '::find() returns the executable PHP'); $this->assertEquals($f->find(false), $current, '::find() returns the executable PHP'); } /** * tests find() with the env var PHP_PATH. */ 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'); } } /** * tests find() with default executable. */ public function testFindWithSuffix() { if (defined('PHP_BINARY')) { $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4'); } putenv('PHP_PATH='); putenv('PHP_PEAR_PHP_BIN='); $f = new PhpExecutableFinder(); $current = $f->find(); //TODO maybe php executable is custom or even Windows if ('\\' === DIRECTORY_SEPARATOR) { $this->assertTrue(is_executable($current)); $this->assertTrue((bool) preg_match('/'.addslashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes'); } } } src/Symfony/Component/Process/Tests/PhpProcessTest.php000066400000000000000000000025731266465517700234640ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\PhpProcess; class PhpProcessTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php000066400000000000000000000033311266465517700275600ustar00rootroot00000000000000 * * 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); } } } } src/Symfony/Component/Process/Tests/ProcessBuilderTest.php000066400000000000000000000152751266465517700243260ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\ProcessBuilder; class ProcessBuilderTest extends \PHPUnit_Framework_TestCase { public function testInheritEnvironmentVars() { $_ENV['MY_VAR_1'] = 'foo'; $proc = ProcessBuilder::create() ->add('foo') ->getProcess(); unset($_ENV['MY_VAR_1']); $env = $proc->getEnv(); $this->assertArrayHasKey('MY_VAR_1', $env); $this->assertEquals('foo', $env['MY_VAR_1']); } 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()); } public function testProcessShouldInheritAndOverrideEnvironmentVars() { $_ENV['MY_VAR_1'] = 'foo'; $proc = ProcessBuilder::create() ->setEnv('MY_VAR_1', 'bar') ->add('foo') ->getProcess(); unset($_ENV['MY_VAR_1']); $env = $proc->getEnv(); $this->assertArrayHasKey('MY_VAR_1', $env); $this->assertEquals('bar', $env['MY_VAR_1']); } /** * @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 or stream resources. */ public function testInvalidInput() { $builder = ProcessBuilder::create(); $builder->setInput(array()); } } src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php000066400000000000000000000103311266465517700257670ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\Exception\ProcessFailedException; /** * @author Sebastian Marek */ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase { /** * tests ProcessFailedException throws exception if the process was successful. */ public function testProcessFailedExceptionThrowsException() { $process = $this->getMock( 'Symfony\Component\Process\Process', array('isSuccessful'), array('php') ); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(true)); $this->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'; $process = $this->getMock( 'Symfony\Component\Process\Process', array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled'), array($cmd) ); $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)); $exception = new ProcessFailedException($process); $this->assertEquals( "The command \"$cmd\" failed.\nExit Code: $exitCode($exitText)\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'; $process = $this->getMock( 'Symfony\Component\Process\Process', array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput'), array($cmd) ); $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)); $exception = new ProcessFailedException($process); $this->assertEquals( "The command \"$cmd\" failed.\nExit Code: $exitCode($exitText)", $exception->getMessage() ); } } src/Symfony/Component/Process/Tests/ProcessTest.php000066400000000000000000001144771266465517700230230ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\Exception\LogicException; use Symfony\Component\Process\Exception\ProcessTimedOutException; use Symfony\Component\Process\Exception\RuntimeException; use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Pipes\PipesInterface; use Symfony\Component\Process\Process; /** * @author Robert Schönthal */ class ProcessTest extends \PHPUnit_Framework_TestCase { private static $phpBin; private static $process; private static $sigchild; private static $notEnhancedSigchild = false; public static function setUpBeforeClass() { $phpBin = new PhpExecutableFinder(); self::$phpBin = '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() { @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) { if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestIncomplete('This test fails with a timeout on Windows, can someone investigate please?'); } $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())); } /** * @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 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'), ); } /** * @dataProvider provideLegacyInputValues * @group legacy */ public function testLegacyValidInput($expected, $value) { $process = $this->getProcess(self::$phpBin.' -v'); $process->setInput($value); $this->assertSame($expected, $process->getInput()); } public function provideLegacyInputValues() { return array( array('stringifiable', new Stringifiable()), ); } 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 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; } 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() { if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestIncomplete('This test fails with a timeout on Windows, can someone investigate please?'); } $process = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('while (true) {echo "foo\n"; usleep(10000);}'))); $process->setTimeout(1); $process->start(); while (false === strpos($process->getOutput(), 'foo')) { usleep(1000); } $process->setIdleTimeout(0.1); try { $process->wait(); $this->fail('A timeout exception was expected.'); } catch (ProcessTimedOutException $ex) { $this->assertTrue($ex->isGeneralTimeout(), 'A general timeout is expected.'); $this->assertFalse($ex->isIdleTimeout(), 'No idle timeout is expected.'); $this->assertEquals(1, $ex->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'); $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 provideStartMethods */ public function testStartWithACallbackAndDisabledOutput($startMethod, $exception, $exceptionMessage) { $p = $this->getProcess('foo'); $p->disableOutput(); $this->setExpectedException($exception, $exceptionMessage); if ('mustRun' === $startMethod) { $this->skipIfNotEnhancedSigchild(); } $p->{$startMethod}(function () {}); } public function provideStartMethods() { return array( array('start', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), array('run', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), array('mustRun', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), ); } /** * @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; } /** * provides default method names for simple getter/setter. */ public function methodProvider() { $defaults = array( array('CommandLine'), array('Timeout'), array('WorkingDirectory'), array('Env'), array('Stdin'), array('Input'), array('Options'), ); return $defaults; } /** * @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) { $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild.'); } } } } class Stringifiable { public function __toString() { return 'stringifiable'; } } class NonStringifiable { } src/Symfony/Component/Process/Tests/ProcessUtilsTest.php000066400000000000000000000025151266465517700240310ustar00rootroot00000000000000 * * 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 Symfony\Component\Process\ProcessUtils; class ProcessUtilsTest extends \PHPUnit_Framework_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\\'), ); } } src/Symfony/Component/Process/Tests/SignalListener.php000066400000000000000000000006141266465517700234530ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Process/composer.json000066400000000000000000000013661266465517700214440ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Process/phpunit.xml.dist000066400000000000000000000014101266465517700220630ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/PropertyAccess/000077500000000000000000000000001266465517700202445ustar00rootroot00000000000000src/Symfony/Component/PropertyAccess/.gitignore000066400000000000000000000000421266465517700222300ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/PropertyAccess/CHANGELOG.md000066400000000000000000000022071266465517700220560ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/PropertyAccess/Exception/000077500000000000000000000000001266465517700222025ustar00rootroot00000000000000src/Symfony/Component/PropertyAccess/Exception/AccessException.php000066400000000000000000000007221266465517700257740ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/ExceptionInterface.php000066400000000000000000000006721266465517700264770ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/InvalidArgumentException.php000066400000000000000000000010111266465517700276540ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/InvalidPropertyPathException.php000066400000000000000000000007201266465517700305410ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/NoSuchIndexException.php000066400000000000000000000007161266465517700267650ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/NoSuchPropertyException.php000066400000000000000000000007101266465517700275340ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/OutOfBoundsException.php000066400000000000000000000007751266465517700270120ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/RuntimeException.php000066400000000000000000000007611266465517700262210ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.php000066400000000000000000000034401266465517700275410ustar00rootroot00000000000000 * * 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, $path, $pathIndex = null) { if (func_num_args() === 3 && $path instanceof PropertyPathInterface) { $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) ); } else { @trigger_error('The '.__CLASS__.' constructor now expects 3 arguments: the invalid property value, the '.__NAMESPACE__.'\PropertyPathInterface object and the current index of the property path.', E_USER_DEPRECATED); $message = sprintf( 'Expected argument of type "%s", "%s" given', $path, is_object($value) ? get_class($value) : gettype($value) ); } parent::__construct($message); } } src/Symfony/Component/PropertyAccess/LICENSE000066400000000000000000000020511266465517700212470ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/PropertyAccess/PropertyAccess.php000066400000000000000000000031351266465517700237250ustar00rootroot00000000000000 * * 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 The new property accessor */ public static function createPropertyAccessor() { return self::createPropertyAccessorBuilder()->getPropertyAccessor(); } /** * Creates a property accessor builder. * * @return PropertyAccessorBuilder The new property accessor builder */ public static function createPropertyAccessorBuilder() { return new PropertyAccessorBuilder(); } /** * Alias of {@link createPropertyAccessor}. * * @return PropertyAccessor The new property accessor * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link createPropertyAccessor()} instead. */ public static function getPropertyAccessor() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the createPropertyAccessor() method instead.', E_USER_DEPRECATED); return self::createPropertyAccessor(); } /** * This class cannot be instantiated. */ private function __construct() { } } src/Symfony/Component/PropertyAccess/PropertyAccessor.php000066400000000000000000000722351266465517700242750ustar00rootroot00000000000000 * * 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\AccessException; 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 */ class PropertyAccessor implements PropertyAccessorInterface { /** * @internal */ const VALUE = 0; /** * @internal */ const IS_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; /** * @var bool */ private $magicCall; /** * @var bool */ private $ignoreInvalidIndices; /** * @var array */ private $readPropertyCache = array(); /** * @var array */ private $writePropertyCache = array(); /** * Should not be used by application code. Use * {@link PropertyAccess::createPropertyAccessor()} instead. * * @param bool $magicCall * @param bool $throwExceptionOnInvalidIndex */ public function __construct($magicCall = false, $throwExceptionOnInvalidIndex = false) { $this->magicCall = $magicCall; $this->ignoreInvalidIndices = !$throwExceptionOnInvalidIndex; } /** * {@inheritdoc} */ public function getValue($objectOrArray, $propertyPath) { if (!$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } $propertyValues = &$this->readPropertiesUntil($objectOrArray, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); return $propertyValues[count($propertyValues) - 1][self::VALUE]; } /** * {@inheritdoc} */ public function setValue(&$objectOrArray, $propertyPath, $value) { if (!$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } $propertyValues = &$this->readPropertiesUntil($objectOrArray, $propertyPath, $propertyPath->getLength() - 1); // Add the root object to the list array_unshift($propertyValues, array( self::VALUE => &$objectOrArray, self::IS_REF => true, self::IS_REF_CHAINED => true, )); $propertyMaxIndex = count($propertyValues) - 1; for ($i = $propertyMaxIndex; $i >= 0; --$i) { $objectOrArray = &$propertyValues[$i][self::VALUE]; $property = $propertyPath->getElement($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 ($i === $propertyMaxIndex || !$propertyValues[$i + 1][self::IS_REF]) { if ($propertyPath->isIndex($i)) { $this->writeIndex($objectOrArray, $property, $value); } else { $this->writeProperty($objectOrArray, $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($propertyValues[$i][self::VALUE]) || $propertyValues[$i][self::IS_REF_CHAINED]) { return; } } $value = &$objectOrArray; } } /** * {@inheritdoc} */ public function isReadable($objectOrArray, $propertyPath) { if (!$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } try { $this->readPropertiesUntil($objectOrArray, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); return true; } catch (AccessException $e) { return false; } catch (UnexpectedTypeException $e) { return false; } } /** * {@inheritdoc} */ public function isWritable($objectOrArray, $propertyPath) { if (!$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } try { $propertyValues = $this->readPropertiesUntil($objectOrArray, $propertyPath, $propertyPath->getLength() - 1); // Add the root object to the list array_unshift($propertyValues, array( self::VALUE => $objectOrArray, self::IS_REF => true, self::IS_REF_CHAINED => true, )); for ($i = count($propertyValues) - 1; $i >= 0; --$i) { $objectOrArray = $propertyValues[$i][self::VALUE]; $property = $propertyPath->getElement($i); if ($propertyPath->isIndex($i)) { if (!$objectOrArray instanceof \ArrayAccess && !is_array($objectOrArray)) { return false; } } else { if (!$this->isPropertyWritable($objectOrArray, $property)) { return false; } } if (is_object($propertyValues[$i][self::VALUE]) || $propertyValues[$i][self::IS_REF_CHAINED]) { 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 object|array $objectOrArray 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(&$objectOrArray, PropertyPathInterface $propertyPath, $lastIndex, $ignoreInvalidIndices = true) { if (!is_object($objectOrArray) && !is_array($objectOrArray)) { throw new UnexpectedTypeException($objectOrArray, $propertyPath, 0); } $propertyValues = array(); for ($i = 0; $i < $lastIndex; ++$i) { $property = $propertyPath->getElement($i); $isIndex = $propertyPath->isIndex($i); // Create missing nested arrays on demand if ($isIndex && ( ($objectOrArray instanceof \ArrayAccess && !isset($objectOrArray[$property])) || (is_array($objectOrArray) && !array_key_exists($property, $objectOrArray)) ) ) { if (!$ignoreInvalidIndices) { if (!is_array($objectOrArray)) { if (!$objectOrArray instanceof \Traversable) { throw new NoSuchIndexException(sprintf( 'Cannot read index "%s" while trying to traverse path "%s".', $property, (string) $propertyPath )); } $objectOrArray = iterator_to_array($objectOrArray); } 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($objectOrArray), true) )); } if ($i + 1 < $propertyPath->getLength()) { $objectOrArray[$property] = array(); } } if ($isIndex) { $propertyValue = &$this->readIndex($objectOrArray, $property); } else { $propertyValue = &$this->readProperty($objectOrArray, $property); } $objectOrArray = &$propertyValue[self::VALUE]; // the final value of the path must not be validated if ($i + 1 < $propertyPath->getLength() && !is_object($objectOrArray) && !is_array($objectOrArray)) { throw new UnexpectedTypeException($objectOrArray, $propertyPath, $i + 1); } // 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 $propertyValue[self::IS_REF_CHAINED] = $propertyValue[self::IS_REF] && (0 === $i || $propertyValues[$i - 1][self::IS_REF_CHAINED]); $propertyValues[] = &$propertyValue; } return $propertyValues; } /** * Reads a key from an array-like structure. * * @param \ArrayAccess|array $array The array or \ArrayAccess object to read from * @param string|int $index The key to read * * @return mixed The value of the key * * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array */ private function &readIndex(&$array, $index) { if (!$array instanceof \ArrayAccess && !is_array($array)) { throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_class($array))); } // Use an array instead of an object since performance is very crucial here $result = array( self::VALUE => null, self::IS_REF => false, ); if (isset($array[$index])) { if (is_array($array)) { $result[self::VALUE] = &$array[$index]; $result[self::IS_REF] = true; } else { $result[self::VALUE] = $array[$index]; // Objects are always passed around by reference $result[self::IS_REF] = is_object($array[$index]) ? true : false; } } return $result; } /** * Reads the a property from an object or array. * * @param object $object The object to read from. * @param string $property The property to read. * * @return mixed The value of the read property * * @throws NoSuchPropertyException If the property does not exist or is not * public. */ private function &readProperty(&$object, $property) { // Use an array instead of an object since performance is // very crucial here $result = array( self::VALUE => null, self::IS_REF => false, ); if (!is_object($object)) { throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%s]" instead.', $property, $property)); } $access = $this->getReadAccessInfo($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]) { if ($access[self::ACCESS_REF]) { $result[self::VALUE] = &$object->{$access[self::ACCESS_NAME]}; $result[self::IS_REF] = true; } else { $result[self::VALUE] = $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; $result[self::IS_REF] = true; } 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 (is_object($result[self::VALUE])) { $result[self::IS_REF] = true; } return $result; } /** * Guesses how to read the property value. * * @param string $object * @param string $property * * @return array */ private function getReadAccessInfo($object, $property) { $key = get_class($object).'::'.$property; if (isset($this->readPropertyCache[$key])) { $access = $this->readPropertyCache[$key]; } else { $access = array(); $reflClass = new \ReflectionClass($object); $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 ); } $this->readPropertyCache[$key] = $access; } return $access; } /** * Sets the value of an index in a given array-accessible value. * * @param \ArrayAccess|array $array An 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(&$array, $index, $value) { if (!$array instanceof \ArrayAccess && !is_array($array)) { throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($array))); } $array[$index] = $value; } /** * Sets the value of a property in the given object. * * @param object $object 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(&$object, $property, $value) { if (!is_object($object)) { throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%s]" instead?', $property, $property)); } $access = $this->getWriteAccessInfo($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($object, $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); } else { throw new NoSuchPropertyException($access[self::ACCESS_NAME]); } } /** * Adjusts a collection-valued property by calling add*() and remove*() * methods. * * @param object $object 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($object, $property, $collection, $addMethod, $removeMethod) { // At this point the add and remove methods have been found // Use iterator_to_array() instead of clone in order to prevent side effects // see https://github.com/symfony/symfony/issues/4670 $itemsToAdd = is_object($collection) ? iterator_to_array($collection) : $collection; $itemToRemove = array(); $propertyValue = &$this->readProperty($object, $property); $previousValue = $propertyValue[self::VALUE]; // remove reference to avoid modifications unset($propertyValue); if (is_array($previousValue) || $previousValue instanceof \Traversable) { foreach ($previousValue as $previousItem) { foreach ($collection as $key => $item) { if ($item === $previousItem) { // Item found, don't add unset($itemsToAdd[$key]); // Next $previousItem continue 2; } } // Item not found, add to remove list $itemToRemove[] = $previousItem; } } foreach ($itemToRemove as $item) { $object->{$removeMethod}($item); } foreach ($itemsToAdd as $item) { $object->{$addMethod}($item); } } /** * Guesses how to write the property value. * * @param string $object * @param string $property * @param mixed $value * * @return array */ private function getWriteAccessInfo($object, $property, $value) { $key = get_class($object).'::'.$property; if (isset($this->writePropertyCache[$key])) { $access = $this->writePropertyCache[$key]; } else { $access = array(); $reflClass = new \ReflectionClass($object); $access[self::ACCESS_HAS_PROPERTY] = $reflClass->hasProperty($property); $camelized = $this->camelize($property); $singulars = (array) StringUtil::singularify($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; } 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 ); } } $this->writePropertyCache[$key] = $access; } return $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; } $reflClass = new \ReflectionClass($object); $camelized = $this->camelize($property); $setter = 'set'.$camelized; $getsetter = lcfirst($camelized); // jQuery style, e.g. read: last(), write: last($item) $classHasProperty = $reflClass->hasProperty($property); if ($this->isMethodAccessible($reflClass, $setter, 1) || $this->isMethodAccessible($reflClass, $getsetter, 1) || $this->isMethodAccessible($reflClass, '__set', 2) || ($classHasProperty && $reflClass->getProperty($property)->isPublic()) || (!$classHasProperty && property_exists($object, $property)) || ($this->magicCall && $this->isMethodAccessible($reflClass, '__call', 2))) { return true; } $singulars = (array) StringUtil::singularify($camelized); // Any of the two methods is required, but not yet known if (null !== $this->findAdderAndRemover($reflClass, $singulars)) { return true; } return false; } /** * Camelizes a given string. * * @param string $string Some string * * @return string The camelized version of the string */ private function camelize($string) { return strtr(ucwords(strtr($string, array('_' => ' '))), array(' ' => '')); } /** * 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; } } src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php000066400000000000000000000051441266465517700255770ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PropertyAccess; /** * A configurable builder to create a PropertyAccessor. * * @author Jérémie Augustin */ class PropertyAccessorBuilder { /** * @var bool */ private $magicCall = false; /** * @var bool */ private $throwExceptionOnInvalidIndex = false; /** * Enables the use of "__call" by the PropertyAccessor. * * @return PropertyAccessorBuilder The builder object */ public function enableMagicCall() { $this->magicCall = true; return $this; } /** * Disables the use of "__call" by the PropertyAccessor. * * @return PropertyAccessorBuilder The builder object */ 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 PropertyAccessorBuilder The builder object */ 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 PropertyAccessorBuilder The builder object */ 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; } /** * Builds and returns a new PropertyAccessor object. * * @return PropertyAccessorInterface The built PropertyAccessor */ public function getPropertyAccessor() { return new PropertyAccessor($this->magicCall, $this->throwExceptionOnInvalidIndex); } } src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php000066400000000000000000000111151266465517700261040ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/PropertyAccess/PropertyPath.php000066400000000000000000000131221266465517700234150ustar00rootroot00000000000000 * * 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]; } } src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php000066400000000000000000000234121266465517700247270ustar00rootroot00000000000000 * * 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]; } } } } src/Symfony/Component/PropertyAccess/PropertyPathInterface.php000066400000000000000000000043711266465517700252440ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/PropertyAccess/PropertyPathIterator.php000066400000000000000000000022671266465517700251370ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/PropertyAccess/PropertyPathIteratorInterface.php000066400000000000000000000013641266465517700267550ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/PropertyAccess/README.md000066400000000000000000000004701266465517700215240ustar00rootroot00000000000000PropertyAccess Component ======================== PropertyAccess reads/writes values from/to object/array graphs using a simple string notation. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/PropertyAccess/ $ composer install $ phpunit src/Symfony/Component/PropertyAccess/StringUtil.php000066400000000000000000000163301266465517700230640ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PropertyAccess; /** * Creates singulars from plurals. * * @author Bernhard Schussek */ class StringUtil { /** * Map english plural to singular suffixes. * * @var array * * @see http://english-zone.com/spelling/plurals.html * @see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English */ 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'), // 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'), ); /** * 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 */ public static function singularify($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; } } } // Convert teeth to tooth, feet to foot if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3 && 'feedback' !== $plural) { return substr_replace($plural, 'oo', $pos, 2); } // Assume that plural and singular is identical return $plural; } } src/Symfony/Component/PropertyAccess/Tests/000077500000000000000000000000001266465517700213465ustar00rootroot00000000000000src/Symfony/Component/PropertyAccess/Tests/Fixtures/000077500000000000000000000000001266465517700231575ustar00rootroot00000000000000src/Symfony/Component/PropertyAccess/Tests/Fixtures/NonTraversableArrayObject.php000066400000000000000000000026651266465517700307540ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php000066400000000000000000000076561266465517700256130ustar00rootroot00000000000000 * * 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; 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; } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php000066400000000000000000000007731266465517700275720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicCall.php000066400000000000000000000015121266465517700273310ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassMagicGet.php000066400000000000000000000015561266465517700272050ustar00rootroot00000000000000 * * 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'; } } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php000066400000000000000000000011121266465517700272410ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/Ticket5775Object.php000066400000000000000000000010701266465517700265700ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/PropertyAccess/Tests/Fixtures/TraversableArrayObject.php000066400000000000000000000030461266465517700302730ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php000066400000000000000000000046761266465517700303640ustar00rootroot00000000000000 * * 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\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessor; abstract class PropertyAccessorArrayAccessTest extends \PHPUnit_Framework_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, 'Updated')); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayObjectTest.php000066400000000000000000000007311266465517700303550ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayTest.php000066400000000000000000000007011266465517700272230ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php000066400000000000000000000030411266465517700275330ustar00rootroot00000000000000 * * 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\PropertyAccessorBuilder; class PropertyAccessorBuilderTest extends \PHPUnit_Framework_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('Symfony\Component\PropertyAccess\PropertyAccessor', $this->builder->getPropertyAccessor()); $this->assertInstanceOf('Symfony\Component\PropertyAccess\PropertyAccessor', $this->builder->enableMagicCall()->getPropertyAccessor()); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php000066400000000000000000000132711266465517700302460ustar00rootroot00000000000000 * * 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->getMock(__CLASS__.'_CompositeCar'); $structure = $this->getMock(__CLASS__.'_CarStructure'); $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 Neither the property "axes" nor one of the methods "addAx()"/"removeAx()", "addAxe()"/"removeAxe()", "addAxis()"/"removeAxis()", "setAxes()", "axes()", "__set()" or "__call()" exist and have public access in class "Mock_PropertyAccessorCollectionTest_CarNoAdderAndRemover */ public function testSetValueFailsIfNoAdderNorRemoverFound() { $car = $this->getMock(__CLASS__.'_CarNoAdderAndRemover'); $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->getMock(__CLASS__.'_Car'); $axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); $this->assertTrue($this->propertyAccessor->isWritable($car, 'axes', $axes)); } public function testIsWritableReturnsFalseIfOnlyAdderExists() { $car = $this->getMock(__CLASS__.'_CarOnlyAdder'); $axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes)); } public function testIsWritableReturnsFalseIfOnlyRemoverExists() { $car = $this->getMock(__CLASS__.'_CarOnlyRemover'); $axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes)); } public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists() { $car = $this->getMock(__CLASS__.'_CarNoAdderAndRemover'); $axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third')); $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes)); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorNonTraversableArrayObjectTest.php000066400000000000000000000011051266465517700332170ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php000066400000000000000000000475551266465517700262460ustar00rootroot00000000000000 * * 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\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; class PropertyAccessorTest extends \PHPUnit_Framework_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')); } // 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() { $this->propertyAccessor->setValue(new \stdClass(), '[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() { $this->propertyAccessor->setValue(new TestClass('Bernhard'), '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)); } } src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTraversableArrayObjectTest.php000066400000000000000000000010731266465517700325500ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php000066400000000000000000000173551266465517700267020ustar00rootroot00000000000000 * * 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\PropertyPath; use Symfony\Component\PropertyAccess\PropertyPathBuilder; /** * @author Bernhard Schussek */ class PropertyPathBuilderTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php000066400000000000000000000123271266465517700253650ustar00rootroot00000000000000 * * 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\PropertyPath; class PropertyPathTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php000066400000000000000000000163241266465517700250310ustar00rootroot00000000000000 * * 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\StringUtil; class StringUtilTest extends \PHPUnit_Framework_TestCase { public function singularifyProvider() { // 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('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('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 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); } } src/Symfony/Component/PropertyAccess/composer.json000066400000000000000000000015661266465517700227760ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\PropertyAccess\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/PropertyAccess/phpunit.xml.dist000066400000000000000000000015021266465517700234150ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Routing/000077500000000000000000000000001266465517700167255ustar00rootroot00000000000000src/Symfony/Component/Routing/.gitignore000066400000000000000000000000421266465517700207110ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Routing/Annotation/000077500000000000000000000000001266465517700210375ustar00rootroot00000000000000src/Symfony/Component/Routing/Annotation/Route.php000066400000000000000000000106451266465517700226540ustar00rootroot00000000000000 * * 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); } } /** * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. */ public function setPattern($pattern) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); $this->path = $pattern; } /** * @deprecated since version 2.2, to be removed in 3.0. Use getPath instead. */ public function getPattern() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); return $this->path; } 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) { if (isset($requirements['_method'])) { if (0 === count($this->methods)) { $this->methods = explode('|', $requirements['_method']); } @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { if (0 === count($this->schemes)) { $this->schemes = explode('|', $requirements['_scheme']); } @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED); } $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; } } src/Symfony/Component/Routing/CHANGELOG.md000066400000000000000000000170371266465517700205460ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Routing/CompiledRoute.php000066400000000000000000000102411266465517700222070ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Exception/000077500000000000000000000000001266465517700206635ustar00rootroot00000000000000src/Symfony/Component/Routing/Exception/ExceptionInterface.php000066400000000000000000000006331266465517700251550ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Exception/InvalidParameterException.php000066400000000000000000000007721266465517700265100ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php000066400000000000000000000020771266465517700264720ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php000066400000000000000000000010621266465517700305660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Exception/ResourceNotFoundException.php000066400000000000000000000010441266465517700265160ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Exception/RouteNotFoundException.php000066400000000000000000000007651266465517700260360ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Generator/000077500000000000000000000000001266465517700206535ustar00rootroot00000000000000src/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php000066400000000000000000000043241266465517700302140ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Routing/Generator/Dumper/000077500000000000000000000000001266465517700221075ustar00rootroot00000000000000src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php000066400000000000000000000016461266465517700257320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php000066400000000000000000000017361266465517700275530ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php000066400000000000000000000070701266465517700263770ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Generator/UrlGenerator.php000066400000000000000000000323271266465517700240040ustar00rootroot00000000000000 * * 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; 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].'$#', $mergedParams[$token[3]])) { $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); if ($this->strictRequirements) { throw new InvalidParameterException($message); } if ($this->logger) { $this->logger->error($message); } 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) { $schemeMatched = false; foreach ($requiredSchemes as $requiredScheme) { if ($scheme === $requiredScheme) { $schemeMatched = true; break; } } if (!$schemeMatched) { $referenceType = self::ABSOLUTE_URL; $scheme = current($requiredSchemes); } } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { // We do this for BC; to be removed if _scheme is not supported anymore $referenceType = self::ABSOLUTE_URL; $scheme = $req; } if ($hostTokens) { $routeHost = ''; foreach ($hostTokens as $token) { if ('variable' === $token[0]) { if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i', $mergedParams[$token[3]])) { $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); if ($this->strictRequirements) { throw new InvalidParameterException($message); } if ($this->logger) { $this->logger->error($message); } 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_diff_key($parameters, $variables, $defaults); if ($extra && $query = http_build_query($extra, '', '&')) { // "/" and "?" can be left decoded for better user experience, see // http://tools.ietf.org/html/rfc3986#section-3.4 $url .= '?'.strtr($query, array('%2F' => '/')); } 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; } } src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php000066400000000000000000000070401266465517700256170ustar00rootroot00000000000000 * * 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 = true; /** * Generates an absolute path, e.g. "/dir/file". */ const ABSOLUTE_PATH = false; /** * Generates a relative path based on the current request path, e.g. "../parent-file". * * @see UrlGenerator::getRelativePath() */ const RELATIVE_PATH = 'relative'; /** * Generates a network path, e.g. "//example.com/dir/file". * Such reference reuses the current scheme but specifies the host. */ const NETWORK_PATH = 'network'; /** * 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. * * @param string $name The name of the route * @param mixed $parameters An array of parameters * @param bool|string $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); } src/Symfony/Component/Routing/LICENSE000066400000000000000000000020511266465517700177300ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Routing/Loader/000077500000000000000000000000001266465517700201335ustar00rootroot00000000000000src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php000066400000000000000000000177751266465517700251140ustar00rootroot00000000000000 * * 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 (!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)) { // for BC reasons if (null !== $annot->getPath()) { $globals['path'] = $annot->getPath(); } elseif (null !== $annot->getPattern()) { $globals['path'] = $annot->getPattern(); } 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); } src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php000066400000000000000000000044721266465517700260010ustar00rootroot00000000000000 * * 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 \RecursiveDirectoryIterator($dir), \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); } } src/Symfony/Component/Routing/Loader/AnnotationFileLoader.php000066400000000000000000000071051266465517700247100ustar00rootroot00000000000000 * * 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)); for ($i = 0; isset($tokens[$i]); ++$i) { $token = $tokens[$i]; if (!isset($token[1])) { continue; } if (true === $class && T_STRING === $token[0]) { return $namespace.'\\'.$token[1]; } if (true === $namespace && T_STRING === $token[0]) { $namespace = $token[1]; while (isset($tokens[++$i][1]) && in_array($tokens[$i][0], array(T_NS_SEPARATOR, T_STRING))) { $namespace .= $tokens[$i][1]; } $token = $tokens[$i]; } if (T_CLASS === $token[0]) { $class = true; } if (T_NAMESPACE === $token[0]) { $namespace = true; } } return false; } } src/Symfony/Component/Routing/Loader/ClosureLoader.php000066400000000000000000000020511266465517700234050ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Routing/Loader/PhpFileLoader.php000066400000000000000000000033061266465517700233240ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Loader/XmlFileLoader.php000066400000000000000000000246731266465517700233470ustar00rootroot00000000000000 * * 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('pattern') && !$node->hasAttribute('path'))) { throw new \InvalidArgumentException(sprintf('The element in file "%s" must have an "id" and a "path" attribute.', $path)); } if ($node->hasAttribute('pattern')) { if ($node->hasAttribute('path')) { throw new \InvalidArgumentException(sprintf('The element in file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path)); } @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); $node->setAttribute('path', $node->getAttribute('pattern')); $node->removeAttribute('pattern'); } $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); if (isset($requirements['_method'])) { if (0 === count($methods)) { $methods = explode('|', $requirements['_method']); } unset($requirements['_method']); @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { if (0 === count($schemes)) { $schemes = explode('|', $requirements['_scheme']); } unset($requirements['_scheme']); @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED); } $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) { switch ($n->localName) { case 'default': if ($this->isElementValueNull($n)) { $defaults[$n->getAttribute('key')] = null; } else { $defaults[$n->getAttribute('key')] = trim($n->textContent); } 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); } 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'); } } src/Symfony/Component/Routing/Loader/YamlFileLoader.php000066400000000000000000000226321266465517700235020ustar00rootroot00000000000000 * * 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', 'pattern', '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) { if (isset($config['pattern'])) { if (isset($config['path'])) { throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path)); } @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); $config['path'] = $config['pattern']; unset($config['pattern']); } $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; if (isset($requirements['_method'])) { if (0 === count($methods)) { $methods = explode('|', $requirements['_method']); } unset($requirements['_method']); @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { if (0 === count($schemes)) { $schemes = explode('|', $requirements['_scheme']); } unset($requirements['_scheme']); @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED); } $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 )); } } } src/Symfony/Component/Routing/Loader/schema/000077500000000000000000000000001266465517700213735ustar00rootroot00000000000000src/Symfony/Component/Routing/Loader/schema/routing/000077500000000000000000000000001266465517700230625ustar00rootroot00000000000000src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd000066400000000000000000000044611266465517700255720ustar00rootroot00000000000000 src/Symfony/Component/Routing/Matcher/000077500000000000000000000000001266465517700203105ustar00rootroot00000000000000src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php000066400000000000000000000074531266465517700242020ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Matcher; @trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper). * * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * * @author Fabien Potencier * @author Arnaud Le Blanc */ class ApacheUrlMatcher extends UrlMatcher { /** * Tries to match a URL based on Apache mod_rewrite matching. * * Returns false if no route matches the URL. * * @param string $pathinfo The pathinfo to be parsed * * @return array An array of parameters * * @throws MethodNotAllowedException If the current method is not allowed */ public function match($pathinfo) { $parameters = array(); $defaults = array(); $allow = array(); $route = null; foreach ($this->denormalizeValues($_SERVER) as $key => $value) { $name = $key; // skip non-routing variables // this improves performance when $_SERVER contains many usual // variables like HTTP_*, DOCUMENT_ROOT, REQUEST_URI, ... if (false === strpos($name, '_ROUTING_')) { continue; } while (0 === strpos($name, 'REDIRECT_')) { $name = substr($name, 9); } // expect _ROUTING__ // or _ROUTING_ if (0 !== strpos($name, '_ROUTING_')) { continue; } if (false !== $pos = strpos($name, '_', 9)) { $type = substr($name, 9, $pos - 9); $name = substr($name, $pos + 1); } else { $type = substr($name, 9); } if ('param' === $type) { if ('' !== $value) { $parameters[$name] = $value; } } elseif ('default' === $type) { $defaults[$name] = $value; } elseif ('route' === $type) { $route = $value; } elseif ('allow' === $type) { $allow[] = $name; } unset($_SERVER[$key]); } if (null !== $route) { $parameters['_route'] = $route; return $this->mergeDefaults($parameters, $defaults); } elseif (0 < count($allow)) { throw new MethodNotAllowedException($allow); } else { return parent::match($pathinfo); } } /** * Denormalizes an array of values. * * @param string[] $values * * @return array */ private function denormalizeValues(array $values) { $normalizedValues = array(); foreach ($values as $key => $value) { if (preg_match('~^(.*)\[(\d+)\]$~', $key, $matches)) { if (!isset($normalizedValues[$matches[1]])) { $normalizedValues[$matches[1]] = array(); } $normalizedValues[$matches[1]][(int) $matches[2]] = $value; } else { $normalizedValues[$key] = $value; } } return $normalizedValues; } } src/Symfony/Component/Routing/Matcher/Dumper/000077500000000000000000000000001266465517700215445ustar00rootroot00000000000000src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php000066400000000000000000000221211266465517700261150ustar00rootroot00000000000000 * * 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; @trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Route; /** * Dumps a set of Apache mod_rewrite rules. * * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * * @author Fabien Potencier * @author Kris Wallsmith */ class ApacheMatcherDumper extends MatcherDumper { /** * Dumps a set of Apache mod_rewrite rules. * * Available options: * * * script_name: The script name (app.php by default) * * base_uri: The base URI ("" by default) * * @param array $options An array of options * * @return string A string to be used as Apache rewrite rules * * @throws \LogicException When the route regex is invalid */ public function dump(array $options = array()) { $options = array_merge(array( 'script_name' => 'app.php', 'base_uri' => '', ), $options); $options['script_name'] = self::escape($options['script_name'], ' ', '\\'); $rules = array("# skip \"real\" requests\nRewriteCond %{REQUEST_FILENAME} -f\nRewriteRule .* - [QSA,L]"); $methodVars = array(); $hostRegexUnique = 0; $prevHostRegex = ''; foreach ($this->getRoutes()->all() as $name => $route) { if ($route->getCondition()) { throw new \LogicException(sprintf('Unable to dump the routes for Apache as route "%s" has a condition.', $name)); } $compiledRoute = $route->compile(); $hostRegex = $compiledRoute->getHostRegex(); if (null !== $hostRegex && $prevHostRegex !== $hostRegex) { $prevHostRegex = $hostRegex; ++$hostRegexUnique; $rule = array(); $regex = $this->regexToApacheRegex($hostRegex); $regex = self::escape($regex, ' ', '\\'); $rule[] = sprintf('RewriteCond %%{HTTP:Host} %s', $regex); $variables = array(); $variables[] = sprintf('E=__ROUTING_host_%s:1', $hostRegexUnique); foreach ($compiledRoute->getHostVariables() as $i => $variable) { $variables[] = sprintf('E=__ROUTING_host_%s_%s:%%%d', $hostRegexUnique, $variable, $i + 1); } $variables = implode(',', $variables); $rule[] = sprintf('RewriteRule .? - [%s]', $variables); $rules[] = implode("\n", $rule); } $rules[] = $this->dumpRoute($name, $route, $options, $hostRegexUnique); $methodVars = array_merge($methodVars, $route->getMethods()); } if (0 < count($methodVars)) { $rule = array('# 405 Method Not Allowed'); $methodVars = array_values(array_unique($methodVars)); if (in_array('GET', $methodVars) && !in_array('HEAD', $methodVars)) { $methodVars[] = 'HEAD'; } foreach ($methodVars as $i => $methodVar) { $rule[] = sprintf('RewriteCond %%{ENV:_ROUTING__allow_%s} =1%s', $methodVar, isset($methodVars[$i + 1]) ? ' [OR]' : ''); } $rule[] = sprintf('RewriteRule .* %s [QSA,L]', $options['script_name']); $rules[] = implode("\n", $rule); } return implode("\n\n", $rules)."\n"; } /** * Dumps a single route. * * @param string $name Route name * @param Route $route The route * @param array $options Options * @param bool $hostRegexUnique Unique identifier for the host regex * * @return string The compiled route */ private function dumpRoute($name, $route, array $options, $hostRegexUnique) { $compiledRoute = $route->compile(); // prepare the apache regex $regex = $this->regexToApacheRegex($compiledRoute->getRegex()); $regex = '^'.self::escape(preg_quote($options['base_uri']).substr($regex, 1), ' ', '\\'); $methods = $this->getRouteMethods($route); $hasTrailingSlash = (!$methods || in_array('HEAD', $methods)) && '/$' === substr($regex, -2) && '^/$' !== $regex; $variables = array('E=_ROUTING_route:'.$name); foreach ($compiledRoute->getHostVariables() as $variable) { $variables[] = sprintf('E=_ROUTING_param_%s:%%{ENV:__ROUTING_host_%s_%s}', $variable, $hostRegexUnique, $variable); } foreach ($compiledRoute->getPathVariables() as $i => $variable) { $variables[] = 'E=_ROUTING_param_'.$variable.':%'.($i + 1); } foreach ($this->normalizeValues($route->getDefaults()) as $key => $value) { $variables[] = 'E=_ROUTING_default_'.$key.':'.strtr($value, array( ':' => '\\:', '=' => '\\=', '\\' => '\\\\', ' ' => '\\ ', )); } $variables = implode(',', $variables); $rule = array("# $name"); // method mismatch if (0 < count($methods)) { $allow = array(); foreach ($methods as $method) { $allow[] = 'E=_ROUTING_allow_'.$method.':1'; } if ($compiledRoute->getHostRegex()) { $rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique); } $rule[] = "RewriteCond %{REQUEST_URI} $regex"; $rule[] = sprintf('RewriteCond %%{REQUEST_METHOD} !^(%s)$ [NC]', implode('|', $methods)); $rule[] = sprintf('RewriteRule .* - [S=%d,%s]', $hasTrailingSlash ? 2 : 1, implode(',', $allow)); } // redirect with trailing slash appended if ($hasTrailingSlash) { if ($compiledRoute->getHostRegex()) { $rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique); } $rule[] = 'RewriteCond %{REQUEST_URI} '.substr($regex, 0, -2).'$'; $rule[] = 'RewriteRule .* $0/ [QSA,L,R=301]'; } // the main rule if ($compiledRoute->getHostRegex()) { $rule[] = sprintf('RewriteCond %%{ENV:__ROUTING_host_%s} =1', $hostRegexUnique); } $rule[] = "RewriteCond %{REQUEST_URI} $regex"; $rule[] = "RewriteRule .* {$options['script_name']} [QSA,L,$variables]"; return implode("\n", $rule); } /** * Returns methods allowed for a route. * * @param Route $route The route * * @return array The methods */ private function getRouteMethods(Route $route) { $methods = $route->getMethods(); // GET and HEAD are equivalent if (in_array('GET', $methods) && !in_array('HEAD', $methods)) { $methods[] = 'HEAD'; } return $methods; } /** * Converts a regex to make it suitable for mod_rewrite. * * @param string $regex The regex * * @return string The converted regex */ private function regexToApacheRegex($regex) { $regexPatternEnd = strrpos($regex, $regex[0]); return preg_replace('/\?P<.+?>/', '', substr($regex, 1, $regexPatternEnd - 1)); } /** * Escapes a string. * * @param string $string The string to be escaped * @param string $char The character to be escaped * @param string $with The character to be used for escaping * * @return string The escaped string */ private static function escape($string, $char, $with) { $escaped = false; $output = ''; foreach (str_split($string) as $symbol) { if ($escaped) { $output .= $symbol; $escaped = false; continue; } if ($symbol === $char) { $output .= $with.$char; continue; } if ($symbol === $with) { $escaped = true; } $output .= $symbol; } return $output; } /** * Normalizes an array of values. * * @param array $values * * @return string[] */ private function normalizeValues(array $values) { $normalizedValues = array(); foreach ($values as $key => $value) { if (is_array($value)) { foreach ($value as $index => $bit) { $normalizedValues[sprintf('%s[%s]', $key, $index)] = $bit; } } else { $normalizedValues[$key] = (string) $value; } } return $normalizedValues; } } src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php000066400000000000000000000070121266465517700255250ustar00rootroot00000000000000 * * 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 (DumperCollection|DumperRoute)[] Array of DumperCollection|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 The iterator */ public function getIterator() { return new \ArrayIterator($this->children); } /** * Returns the root of the collection. * * @return DumperCollection The root collection */ public function getRoot() { return (null !== $this->parent) ? $this->parent->getRoot() : $this; } /** * Returns the parent collection. * * @return DumperCollection|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; } } src/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php000066400000000000000000000052551266465517700267120ustar00rootroot00000000000000 * * 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 DumperPrefixCollection The node the route was added to * * @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); } } src/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php000066400000000000000000000021471266465517700245340ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php000066400000000000000000000016401266465517700250160ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php000066400000000000000000000017341266465517700266430ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php000066400000000000000000000327111266465517700254710ustar00rootroot00000000000000 * * 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)); if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P.*?)\$\1#', $compiledRoute->getRegex(), $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)); } $regex = $compiledRoute->getRegex(); 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; } } src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php000066400000000000000000000035731266465517700254050ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php000066400000000000000000000015101266465517700272130ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php000066400000000000000000000022631266465517700256010ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php000066400000000000000000000113251266465517700246740ustar00rootroot00000000000000 * * 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\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; } 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, ); } } src/Symfony/Component/Routing/Matcher/UrlMatcher.php000066400000000000000000000166231266465517700230770ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php000066400000000000000000000023521266465517700247120ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Routing/README.md000066400000000000000000000016601266465517700202070ustar00rootroot00000000000000Routing Component ================= Routing associates a request with the code that will convert it to a response. The example below demonstrates how you can set up a fully working routing system: ```php use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; $routes = new RouteCollection(); $routes->add('hello', new Route('/hello', array('controller' => 'foo'))); $context = new RequestContext(); // this is optional and can be done without a Request instance $context->fromRequest(Request::createFromGlobals()); $matcher = new UrlMatcher($routes, $context); $parameters = $matcher->match('/hello'); ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Routing/ $ composer install $ phpunit src/Symfony/Component/Routing/RequestContext.php000066400000000000000000000175711266465517700224460ustar00rootroot00000000000000 * * 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ 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 RequestContext The current instance, implementing a fluent interface */ public function setParameter($name, $parameter) { $this->parameters[$name] = $parameter; return $this; } } src/Symfony/Component/Routing/RequestContextAwareInterface.php000066400000000000000000000011471266465517700252370ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Routing/Route.php000066400000000000000000000415021266465517700205360ustar00rootroot00000000000000 * * 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) * * @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); // The conditions make sure that an initial empty $schemes/$methods does not override the corresponding requirement. // They can be removed when the BC layer is removed. if ($schemes) { $this->setSchemes($schemes); } if ($methods) { $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 pattern * * @deprecated since version 2.2, to be removed in 3.0. Use getPath instead. */ public function getPattern() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); return $this->path; } /** * Sets the pattern for the path. * * This method implements a fluent interface. * * @param string $pattern The path pattern * * @return Route The current Route instance * * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. */ public function setPattern($pattern) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead.', E_USER_DEPRECATED); return $this->setPath($pattern); } /** * 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ public function setSchemes($schemes) { $this->schemes = array_map('strtolower', (array) $schemes); // this is to keep BC and will be removed in a future version if ($this->schemes) { $this->requirements['_scheme'] = implode('|', $this->schemes); } else { unset($this->requirements['_scheme']); } $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 Route The current Route instance */ public function setMethods($methods) { $this->methods = array_map('strtoupper', (array) $methods); // this is to keep BC and will be removed in a future version if ($this->methods) { $this->requirements['_method'] = implode('|', $this->methods); } else { unset($this->requirements['_method']); } $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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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 Route The current Route instance */ 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) { if ('_scheme' === $key) { @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED); } elseif ('_method' === $key) { @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED); } 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 Route The current Route instance */ 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 Route The current Route instance */ 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)); } // this is to keep BC and will be removed in a future version if ('_scheme' === $key) { @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED); $this->setSchemes(explode('|', $regex)); } elseif ('_method' === $key) { @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED); $this->setMethods(explode('|', $regex)); } return $regex; } } src/Symfony/Component/Routing/RouteCollection.php000066400000000000000000000161421266465517700225540ustar00rootroot00000000000000 * * 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 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; } } src/Symfony/Component/Routing/RouteCompiler.php000066400000000000000000000235411266465517700222340ustar00rootroot00000000000000 * * 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 = '/,;.:-_~+*=@|'; /** * {@inheritdoc} * * @throws \LogicException If a variable is referenced more than once * @throws \DomainException If a variable name is numeric because PHP raises an error for such * subpatterns in PCRE and thus would break matching, e.g. "(?P<123>.+)". */ 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']; $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 ? '.' : '/'; // 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]); $precedingChar = strlen($precedingText) > 0 ? substr($precedingText, -1) : ''; $isSeparator = '' !== $precedingChar && false !== strpos(static::SEPARATORS, $precedingChar); if (is_numeric($varName)) { throw new \DomainException(sprintf('Variable name "%s" cannot be numeric 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 ($isSeparator && strlen($precedingText) > 1) { $tokens[] = array('text', substr($precedingText, 0, -1)); } 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); $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 .= '+'; } } $tokens[] = array('variable', $isSeparator ? $precedingChar : '', $regexp, $varName); $variables[] = $varName; } if ($pos < strlen($pattern)) { $tokens[] = array('text', substr($pattern, $pos)); } // find the first optional token $firstOptional = PHP_INT_MAX; if (!$isHost) { for ($i = count($tokens) - 1; $i >= 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); } return array( 'staticPrefix' => 'text' === $tokens[0][0] ? $tokens[0][1] : '', 'regex' => self::REGEX_DELIMITER.'^'.$regexp.'$'.self::REGEX_DELIMITER.'s'.($isHost ? 'i' : ''), '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 * * @return string The next static character that functions as separator (or empty string when none available) */ private static function findNextSeparator($pattern) { 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 $pattern = preg_replace('#\{\w+\}#', '', $pattern); return isset($pattern[0]) && 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; } } } } src/Symfony/Component/Routing/RouteCompilerInterface.php000066400000000000000000000014761266465517700240600ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Routing/Router.php000066400000000000000000000303321266465517700207170ustar00rootroot00000000000000 * * 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) * * resource_type: Type hint for the main resource (optional) * * @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; } $class = $this->options['matcher_cache_class']; $baseClass = $this->options['matcher_base_class']; $expressionLanguageProviders = $this->expressionLanguageProviders; $that = $this; // required for PHP 5.3 where "$this" cannot be use()d in anonymous functions. Change in Symfony 3.0. $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$class.'.php', function (ConfigCacheInterface $cache) use ($that, $class, $baseClass, $expressionLanguageProviders) { $dumper = $that->getMatcherDumperInstance(); if (method_exists($dumper, 'addExpressionLanguageProvider')) { foreach ($expressionLanguageProviders as $provider) { $dumper->addExpressionLanguageProvider($provider); } } $options = array( 'class' => $class, 'base_class' => $baseClass, ); $cache->write($dumper->dump($options), $that->getRouteCollection()->getResources()); } ); require_once $cache->getPath(); return $this->matcher = new $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 { $class = $this->options['generator_cache_class']; $baseClass = $this->options['generator_base_class']; $that = $this; // required for PHP 5.3 where "$this" cannot be use()d in anonymous functions. Change in Symfony 3.0. $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$class.'.php', function (ConfigCacheInterface $cache) use ($that, $class, $baseClass) { $dumper = $that->getGeneratorDumperInstance(); $options = array( 'class' => $class, 'base_class' => $baseClass, ); $cache->write($dumper->dump($options), $that->getRouteCollection()->getResources()); } ); require_once $cache->getPath(); $this->generator = new $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; } /** * This method is public because it needs to be callable from a closure in PHP 5.3. It should be converted back to protected in 3.0. * * @internal * * @return GeneratorDumperInterface */ public function getGeneratorDumperInstance() { return new $this->options['generator_dumper_class']($this->getRouteCollection()); } /** * This method is public because it needs to be callable from a closure in PHP 5.3. It should be converted back to protected in 3.0. * * @internal * * @return MatcherDumperInterface */ public 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; } } src/Symfony/Component/Routing/RouterInterface.php000066400000000000000000000016051266465517700225410ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Routing/Tests/000077500000000000000000000000001266465517700200275ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Annotation/000077500000000000000000000000001266465517700221415ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php000066400000000000000000000033311266465517700246100ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Annotation\Route; class RouteTest extends \PHPUnit_Framework_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'), ); } /** * @group legacy */ public function testLegacyGetPattern() { $route = new Route(array('value' => '/Blog')); $this->assertEquals($route->getPattern(), '/Blog'); } } src/Symfony/Component/Routing/Tests/CompiledRouteTest.php000066400000000000000000000021071266465517700241530ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\CompiledRoute; class CompiledRouteTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Routing/Tests/Fixtures/000077500000000000000000000000001266465517700216405ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/000077500000000000000000000000001266465517700250735ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php000066400000000000000000000005251266465517700303370ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php000066400000000000000000000006541266465517700273030ustar00rootroot00000000000000 * * 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') { } } src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php000066400000000000000000000005071266465517700273170ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php000066400000000000000000000011571266465517700262370ustar00rootroot00000000000000 * * 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; }); } } src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/000077500000000000000000000000001266465517700260755ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php000066400000000000000000000006111266465517700313140ustar00rootroot00000000000000 * * 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) { } } src/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php000066400000000000000000000014311266465517700267240ustar00rootroot00000000000000 * * 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, ); } } src/Symfony/Component/Routing/Tests/Fixtures/annotated.php000066400000000000000000000000001266465517700243140ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/bad_format.yml000066400000000000000000000001241266465517700244560ustar00rootroot00000000000000blog_show: path: /blog/{slug} defaults: { _controller: "MyBundle:Blog:show" } src/Symfony/Component/Routing/Tests/Fixtures/bar.xml000066400000000000000000000000001266465517700231140ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/dumper/000077500000000000000000000000001266465517700231345ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache000066400000000000000000000130221266465517700266630ustar00rootroot00000000000000# 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] src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php000066400000000000000000000254631266465517700262450ustar00rootroot00000000000000context = $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(); } } src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache000066400000000000000000000002701266465517700266650ustar00rootroot00000000000000# 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] src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php000066400000000000000000000277041266465517700262460ustar00rootroot00000000000000context = $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(); } } src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php000066400000000000000000000026471266465517700262460ustar00rootroot00000000000000context = $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(); } } src/Symfony/Component/Routing/Tests/Fixtures/empty.yml000066400000000000000000000000001266465517700235070ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/foo.xml000066400000000000000000000000001266465517700231330ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/foo1.xml000066400000000000000000000000001266465517700232140ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml000066400000000000000000000001021266465517700245130ustar00rootroot00000000000000blog_show: defaults: { _controller: MyBlogBundle:Blog:show } src/Symfony/Component/Routing/Tests/Fixtures/legacy_validpattern.xml000066400000000000000000000014071266465517700264050ustar00rootroot00000000000000 MyBundle:Blog:show GET|POST|put|OpTiOnS hTTps \w+ context.getMethod() == "GET" src/Symfony/Component/Routing/Tests/Fixtures/legacy_validpattern.yml000066400000000000000000000005171266465517700264070ustar00rootroot00000000000000blog_show_legacy: pattern: /blog/{slug} defaults: { _controller: "MyBundle:Blog:show" } host: "{locale}.example.com" requirements: { '_method': 'GET|POST|put|OpTiOnS', _scheme: https, 'locale': '\w+' } condition: 'context.getMethod() == "GET"' options: compiler_class: RouteCompiler src/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml000066400000000000000000000004571266465517700245150ustar00rootroot00000000000000 src/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml000066400000000000000000000004571266465517700250550ustar00rootroot00000000000000 src/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml000066400000000000000000000012761266465517700255420ustar00rootroot00000000000000 MyBundle:Blog:show \w+ en|fr|de RouteCompiler src/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml000066400000000000000000000000761266465517700303510ustar00rootroot00000000000000blog_show: resource: validpattern.yml path: /test src/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml000066400000000000000000000000711266465517700311110ustar00rootroot00000000000000blog_show: path: /blog/{slug} type: custom src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml000066400000000000000000000006231266465517700241750ustar00rootroot00000000000000 MyBundle:Blog:show src/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml000066400000000000000000000000041266465517700241670ustar00rootroot00000000000000foo src/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml000066400000000000000000000000161266465517700242540ustar00rootroot00000000000000route: string src/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml000066400000000000000000000000751266465517700250730ustar00rootroot00000000000000someroute: resource: path/to/some.yml name_prefix: test_ src/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml000066400000000000000000000004411266465517700250410ustar00rootroot00000000000000 bar src/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml000066400000000000000000000007471266465517700252630ustar00rootroot00000000000000 MyBundle:Blog:show baz src/Symfony/Component/Routing/Tests/Fixtures/null_values.xml000066400000000000000000000010211266465517700247050ustar00rootroot00000000000000 foo bar src/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml000066400000000000000000000000371266465517700262210ustar00rootroot00000000000000"#$péß^a|": path: "true" src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php000066400000000000000000000007321266465517700250500ustar00rootroot00000000000000add('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; src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml000066400000000000000000000012761266465517700250650ustar00rootroot00000000000000 MyBundle:Blog:show \w+ context.getMethod() == "GET" src/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml000066400000000000000000000006241266465517700250620ustar00rootroot00000000000000blog_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} src/Symfony/Component/Routing/Tests/Fixtures/validresource.php000066400000000000000000000007361266465517700252260ustar00rootroot00000000000000import('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; src/Symfony/Component/Routing/Tests/Fixtures/validresource.xml000066400000000000000000000010331266465517700252260ustar00rootroot00000000000000 123 \d+ context.getMethod() == "POST" src/Symfony/Component/Routing/Tests/Fixtures/validresource.yml000066400000000000000000000003631266465517700252340ustar00rootroot00000000000000_blog: resource: validpattern.yml prefix: /{foo} defaults: { 'foo': '123' } requirements: { 'foo': '\d+' } options: { 'foo': 'bar' } host: "" condition: 'context.getMethod() == "POST"' src/Symfony/Component/Routing/Tests/Fixtures/with_define_path_variable.php000066400000000000000000000001231266465517700275130ustar00rootroot00000000000000 src/Symfony/Component/Routing/Tests/Generator/000077500000000000000000000000001266465517700217555ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Generator/Dumper/000077500000000000000000000000001266465517700232115ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php000066400000000000000000000165531266465517700303470ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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($absoluteUrlWithParameter, 'http://localhost/app.php/testing/bar'); $this->assertEquals($absoluteUrlWithoutParameter, 'http://localhost/app.php/testing2'); $this->assertEquals($relativeUrlWithParameter, '/app.php/testing/bar'); $this->assertEquals($relativeUrlWithoutParameter, '/app.php/testing2'); } 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($absoluteUrlWithParameter, 'http://localhost/app.php/testing/bar'); $this->assertEquals($absoluteUrlWithoutParameter, 'http://localhost/app.php/testing2'); $this->assertEquals($relativeUrlWithParameter, '/app.php/testing/bar'); $this->assertEquals($relativeUrlWithoutParameter, '/app.php/testing2'); } /** * @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($url, '/testing'); } 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($absoluteUrl, 'ftp://localhost/app.php/testing'); $this->assertEquals($relativeUrl, 'ftp://localhost/app.php/testing'); $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($absoluteUrl, 'https://localhost/app.php/testing'); $this->assertEquals($relativeUrl, '/app.php/testing'); } } src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php000066400000000000000000000713731266465517700257520ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Psr\Log\LoggerInterface'); $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 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('default' => 'value'))); $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'foo'))); $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'value'))); $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() { // 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('/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+%2B%2C%3B-._%7E%26%24%3C%3E%7C%7B%7D%25%5C%5E%60%21%3Ffoo%3Dbar%23id', $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->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)); } /** * @group legacy */ public function testLegacyGenerateNetworkPath() { $routes = $this->getRoutes('test', new Route('/{name}', array(), array('_scheme' => 'http'), array(), '{locale}.example.com')); $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 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/', ), ); } 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; } } src/Symfony/Component/Routing/Tests/Loader/000077500000000000000000000000001266465517700212355ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php000066400000000000000000000014641266465517700275400ustar00rootroot00000000000000 * * 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; abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_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() ; } } src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php000066400000000000000000000156571266465517700270530ustar00rootroot00000000000000 * * 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' ); $defaults = array_replace($methodArgs, $routeData['defaults']); $this->assertCount( count($defaults), array_intersect_assoc($defaults, $route->getDefaults()), '->load preserves defaults annotation and merges them with default arguments in method signature' ); $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); } } src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php000066400000000000000000000032521266465517700277360ustar00rootroot00000000000000 * * 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 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'); } } src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php000066400000000000000000000037731266465517700266610ustar00rootroot00000000000000 * * 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.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'); } } src/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php000066400000000000000000000027121266465517700253530ustar00rootroot00000000000000 * * 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\ClosureLoader; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class ClosureLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php000066400000000000000000000067571266465517700253030ustar00rootroot00000000000000 * * 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\Config\FileLocator; use Symfony\Component\Routing\Loader\PhpFileLoader; class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $loader = new PhpFileLoader($this->getMock('Symfony\Component\Config\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'); $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 ); } } src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php000066400000000000000000000146141266465517700253030ustar00rootroot00000000000000 * * 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\Config\FileLocator; use Symfony\Component\Routing\Loader\XmlFileLoader; use Symfony\Component\Routing\Tests\Fixtures\CustomXmlFileLoader; class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $loader = new XmlFileLoader($this->getMock('Symfony\Component\Config\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'); $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()); } /** * @group legacy */ public function testLegacyRouteDefinitionLoading() { $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); $routeCollection = $loader->load('legacy_validpattern.xml'); $route = $routeCollection->get('blog_show_legacy'); $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')); } public function testLoadWithImport() { $loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); $routeCollection = $loader->load('validresource.xml'); $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()); } } /** * @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')); } } src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php000066400000000000000000000130001266465517700254310ustar00rootroot00000000000000 * * 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\Config\FileLocator; use Symfony\Component\Routing\Loader\YamlFileLoader; use Symfony\Component\Config\Resource\FileResource; class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $loader = new YamlFileLoader($this->getMock('Symfony\Component\Config\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'); $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()); } /** * @group legacy */ public function testLegacyRouteDefinitionLoading() { $loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures'))); $routeCollection = $loader->load('legacy_validpattern.yml'); $route = $routeCollection->get('blog_show_legacy'); $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()); } } } src/Symfony/Component/Routing/Tests/Matcher/000077500000000000000000000000001266465517700214125ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Matcher/Dumper/000077500000000000000000000000001266465517700226465ustar00rootroot00000000000000src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php000066400000000000000000000013371266465517700274730ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Matcher\Dumper\DumperCollection; class DumperCollectionTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php000066400000000000000000000076671266465517700306650ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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; } } src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php000066400000000000000000000154241266465517700312140ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper; /** * @group legacy */ class LegacyApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/'); } public function testDump() { $dumper = new ApacheMatcherDumper($this->getRouteCollection()); $this->assertStringEqualsFile(self::$fixturesPath.'/dumper/url_matcher1.apache', $dumper->dump(), '->dump() dumps basic routes to the correct apache format.'); } /** * @dataProvider provideEscapeFixtures */ public function testEscapePattern($src, $dest, $char, $with, $message) { $r = new \ReflectionMethod(new ApacheMatcherDumper($this->getRouteCollection()), 'escape'); $r->setAccessible(true); $this->assertEquals($dest, $r->invoke(null, $src, $char, $with), $message); } public function provideEscapeFixtures() { return array( array('foo', 'foo', ' ', '-', 'Preserve string that should not be escaped'), array('fo-o', 'fo-o', ' ', '-', 'Preserve string that should not be escaped'), array('fo o', 'fo- o', ' ', '-', 'Escape special characters'), array('fo-- o', 'fo--- o', ' ', '-', 'Escape special characters'), array('fo- o', 'fo- o', ' ', '-', 'Do not escape already escaped string'), ); } public function testEscapeScriptName() { $collection = new RouteCollection(); $collection->add('foo', new Route('/foo')); $dumper = new ApacheMatcherDumper($collection); $this->assertStringEqualsFile(self::$fixturesPath.'/dumper/url_matcher2.apache', $dumper->dump(array('script_name' => 'ap p_d\ ev.php'))); } private function getRouteCollection() { $collection = new RouteCollection(); // defaults and requirements $collection->add('foo', new Route( '/foo/{bar}', array('def' => 'test'), array('bar' => 'baz|symfony') )); // defaults parameters in pattern $collection->add('foobar', new Route( '/foo/{bar}', array('bar' => 'toto') )); // method requirement $collection->add('bar', new Route( '/bar/{foo}', array(), array(), array(), '', array(), array('GET', 'head') )); // method requirement (again) $collection->add('baragain', new Route( '/baragain/{foo}', array(), array(), array(), '', array(), array('get', 'post') )); // 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 safe method $collection->add('baz5', new Route( '/test/{foo}/', array(), array(), array(), '', array(), array('GET') )); // trailing slash and unsafe method $collection->add('baz5unsafe', new Route( '/testunsafe/{foo}/', array(), array(), array(), '', array(), array('post') )); // complex $collection->add('baz6', new Route( '/test/baz', array('foo' => 'bar baz') )); // space in path $collection->add('baz7', new Route( '/te st/baz' )); // space preceded with \ in path $collection->add('baz8', new Route( '/te\\ st/baz' )); // space preceded with \ in requirement $collection->add('baz9', new Route( '/test/{baz}', array(), array( 'baz' => 'te\\\\ st', ) )); $collection1 = new RouteCollection(); $route1 = new Route('/route1', array(), array(), array(), 'a.example.com'); $collection1->add('route1', $route1); $collection2 = new RouteCollection(); $route2 = new Route('/route2', array(), array(), array(), 'a.example.com'); $collection2->add('route2', $route2); $route3 = new Route('/route3', array(), array(), array(), 'b.example.com'); $collection2->add('route3', $route3); $collection2->addPrefix('/c2'); $collection1->addCollection($collection2); $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); return $collection; } } src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php000066400000000000000000000231451266465517700274340ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class PhpMatcherDumperTest extends \PHPUnit_Framework_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()), ); } } src/Symfony/Component/Routing/Tests/Matcher/LegacyApacheUrlMatcherTest.php000066400000000000000000000121711266465517700272620ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Matcher\ApacheUrlMatcher; /** * @group legacy */ class LegacyApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase { protected $server; protected function setUp() { $this->server = $_SERVER; } protected function tearDown() { $_SERVER = $this->server; } /** * @dataProvider getMatchData */ public function testMatch($name, $pathinfo, $server, $expect) { $collection = new RouteCollection(); $context = new RequestContext(); $matcher = new ApacheUrlMatcher($collection, $context); $_SERVER = $server; $result = $matcher->match($pathinfo); $this->assertSame(var_export($expect, true), var_export($result, true)); } public function getMatchData() { return array( array( 'Simple route', '/hello/world', array( '_ROUTING_route' => 'hello', '_ROUTING_param__controller' => 'AcmeBundle:Default:index', '_ROUTING_param_name' => 'world', ), array( '_controller' => 'AcmeBundle:Default:index', 'name' => 'world', '_route' => 'hello', ), ), array( 'Route with params and defaults', '/hello/hugo', array( '_ROUTING_route' => 'hello', '_ROUTING_param__controller' => 'AcmeBundle:Default:index', '_ROUTING_param_name' => 'hugo', '_ROUTING_default_name' => 'world', ), array( 'name' => 'hugo', '_controller' => 'AcmeBundle:Default:index', '_route' => 'hello', ), ), array( 'Route with defaults only', '/hello', array( '_ROUTING_route' => 'hello', '_ROUTING_param__controller' => 'AcmeBundle:Default:index', '_ROUTING_default_name' => 'world', ), array( 'name' => 'world', '_controller' => 'AcmeBundle:Default:index', '_route' => 'hello', ), ), array( 'Redirect with many ignored attributes', '/legacy/{cat1}/{cat2}/{id}.html', array( '_ROUTING_route' => 'product_view', '_ROUTING_param__controller' => 'FrameworkBundle:Redirect:redirect', '_ROUTING_default_ignoreAttributes[0]' => 'attr_a', '_ROUTING_default_ignoreAttributes[1]' => 'attr_b', ), array( 'ignoreAttributes' => array('attr_a', 'attr_b'), '_controller' => 'FrameworkBundle:Redirect:redirect', '_route' => 'product_view', ), ), array( 'REDIRECT_ envs', '/hello/world', array( 'REDIRECT__ROUTING_route' => 'hello', 'REDIRECT__ROUTING_param__controller' => 'AcmeBundle:Default:index', 'REDIRECT__ROUTING_param_name' => 'world', ), array( '_controller' => 'AcmeBundle:Default:index', 'name' => 'world', '_route' => 'hello', ), ), array( 'REDIRECT_REDIRECT_ envs', '/hello/world', array( 'REDIRECT_REDIRECT__ROUTING_route' => 'hello', 'REDIRECT_REDIRECT__ROUTING_param__controller' => 'AcmeBundle:Default:index', 'REDIRECT_REDIRECT__ROUTING_param_name' => 'world', ), array( '_controller' => 'AcmeBundle:Default:index', 'name' => 'world', '_route' => 'hello', ), ), array( 'REDIRECT_REDIRECT_ envs', '/hello/world', array( 'REDIRECT_REDIRECT__ROUTING_route' => 'hello', 'REDIRECT_REDIRECT__ROUTING_param__controller' => 'AcmeBundle:Default:index', 'REDIRECT_REDIRECT__ROUTING_param_name' => 'world', ), array( '_controller' => 'AcmeBundle:Default:index', 'name' => 'world', '_route' => 'hello', ), ), ); } } src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php000066400000000000000000000047001266465517700273400ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; class RedirectableUrlMatcherTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php000066400000000000000000000066361266465517700266470ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; class TraceableUrlMatcherTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php000066400000000000000000000433071266465517700250400ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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).']+'))); $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->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->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->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('/')); } } src/Symfony/Component/Routing/Tests/RequestContextTest.php000066400000000000000000000130071266465517700243760ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RequestContext; class RequestContextTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Routing/Tests/RouteCollectionTest.php000066400000000000000000000335121266465517700245160ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; use Symfony\Component\Config\Resource\FileResource; class RouteCollectionTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Routing/Tests/RouteCompilerTest.php000066400000000000000000000251511266465517700241750ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; class RouteCompilerTest extends \PHPUnit_Framework_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'), ), ), ); } /** * @expectedException \LogicException */ public function testRouteWithSameVariableTwice() { $route = new Route('/{name}/{name}'); $compiled = $route->compile(); } /** * @dataProvider getNumericVariableNames * @expectedException \DomainException */ public function testRouteWithNumericVariableName($name) { $route = new Route('/{'.$name.'}'); $route->compile(); } public function getNumericVariableNames() { 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'), ), ), ); } } src/Symfony/Component/Routing/Tests/RouteTest.php000066400000000000000000000337271266465517700225120ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Route; class RouteTest extends \PHPUnit_Framework_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')); } /** * @group legacy */ public function testLegacySchemeRequirement() { $route = new Route('/'); $route->setRequirement('_scheme', 'http|https'); $this->assertEquals('http|https', $route->getRequirement('_scheme')); $this->assertEquals(array('http', 'https'), $route->getSchemes()); $this->assertTrue($route->hasScheme('https')); $this->assertTrue($route->hasScheme('http')); $this->assertFalse($route->hasScheme('ftp')); $route->setSchemes(array('hTTp')); $this->assertEquals('http', $route->getRequirement('_scheme')); $route->setSchemes(array()); $this->assertNull($route->getRequirement('_scheme')); } 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'); } /** * @group legacy */ public function testLegacyMethodRequirement() { $route = new Route('/'); $route->setRequirement('_method', 'GET|POST'); $this->assertEquals('GET|POST', $route->getRequirement('_method')); $this->assertEquals(array('GET', 'POST'), $route->getMethods()); $route->setMethods(array('gEt')); $this->assertEquals('GET', $route->getRequirement('_method')); $route->setMethods(array()); $this->assertNull($route->getRequirement('_method')); } 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'); } /** * @group legacy */ public function testLegacyPattern() { $route = new Route('/{foo}'); $this->assertEquals('/{foo}', $route->getPattern()); $route->setPattern('/bar'); $this->assertEquals('/bar', $route->getPattern()); } 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); } } src/Symfony/Component/Routing/Tests/RouterTest.php000066400000000000000000000120351266465517700226610ustar00rootroot00000000000000 * * 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 Symfony\Component\Routing\Router; use Symfony\Component\HttpFoundation\Request; class RouterTest extends \PHPUnit_Framework_TestCase { private $router = null; private $loader = null; protected function setUp() { $this->loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Routing\RouteCollection'); $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->getMock('Symfony\Component\Routing\RouteCollection'))); $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->getMock('Symfony\Component\Routing\RouteCollection'))); $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->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); $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->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $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('/')); } } src/Symfony/Component/Routing/composer.json000066400000000000000000000027411266465517700214530ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/config": "~2.7", "symfony/http-foundation": "~2.3", "symfony/yaml": "~2.0,>=2.0.5", "symfony/expression-language": "~2.4", "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0" }, "conflict": { "symfony/config": "<2.7" }, "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" }, "autoload": { "psr-4": { "Symfony\\Component\\Routing\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Routing/phpunit.xml.dist000066400000000000000000000014101266465517700220740ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Security/000077500000000000000000000000001266465517700171055ustar00rootroot00000000000000src/Symfony/Component/Security/.gitignore000066400000000000000000000000421266465517700210710ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Security/Acl/000077500000000000000000000000001266465517700176045ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/.gitignore000066400000000000000000000000421266465517700215700ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Security/Acl/Dbal/000077500000000000000000000000001266465517700204465ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Dbal/AclProvider.php000066400000000000000000000637671266465517700234140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\Statement; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Domain\Entry; use Symfony\Component\Security\Acl\Domain\FieldEntry; 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\AclNotFoundException; use Symfony\Component\Security\Acl\Exception\NotAllAclsFoundException; use Symfony\Component\Security\Acl\Model\AclCacheInterface; use Symfony\Component\Security\Acl\Model\AclProviderInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; /** * An ACL provider implementation. * * This provider assumes that all ACLs share the same PermissionGrantingStrategy. * * @author Johannes M. Schmitt */ class AclProvider implements AclProviderInterface { const MAX_BATCH_SIZE = 30; /** * @var AclCacheInterface|null */ protected $cache; /** * @var Connection */ protected $connection; protected $loadedAces = array(); protected $loadedAcls = array(); protected $options; /** * @var PermissionGrantingStrategyInterface */ private $permissionGrantingStrategy; /** * Constructor. * * @param Connection $connection * @param PermissionGrantingStrategyInterface $permissionGrantingStrategy * @param array $options * @param AclCacheInterface $cache */ public function __construct(Connection $connection, PermissionGrantingStrategyInterface $permissionGrantingStrategy, array $options, AclCacheInterface $cache = null) { $this->cache = $cache; $this->connection = $connection; $this->options = $options; $this->permissionGrantingStrategy = $permissionGrantingStrategy; } /** * {@inheritdoc} */ public function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false) { $sql = $this->getFindChildrenSql($parentOid, $directChildrenOnly); $children = array(); foreach ($this->connection->executeQuery($sql)->fetchAll() as $data) { $children[] = new ObjectIdentity($data['object_identifier'], $data['class_type']); } return $children; } /** * {@inheritdoc} */ public function findAcl(ObjectIdentityInterface $oid, array $sids = array()) { return $this->findAcls(array($oid), $sids)->offsetGet($oid); } /** * {@inheritdoc} */ public function findAcls(array $oids, array $sids = array()) { $result = new \SplObjectStorage(); $currentBatch = array(); $oidLookup = array(); for ($i = 0, $c = count($oids); $i < $c; ++$i) { $oid = $oids[$i]; $oidLookupKey = $oid->getIdentifier().$oid->getType(); $oidLookup[$oidLookupKey] = $oid; $aclFound = false; // check if result already contains an ACL if ($result->contains($oid)) { $aclFound = true; } // check if this ACL has already been hydrated if (!$aclFound && isset($this->loadedAcls[$oid->getType()][$oid->getIdentifier()])) { $acl = $this->loadedAcls[$oid->getType()][$oid->getIdentifier()]; if (!$acl->isSidLoaded($sids)) { // FIXME: we need to load ACEs for the missing SIDs. This is never // reached by the default implementation, since we do not // filter by SID throw new \RuntimeException('This is not supported by the default implementation.'); } else { $result->attach($oid, $acl); $aclFound = true; } } // check if we can locate the ACL in the cache if (!$aclFound && null !== $this->cache) { $acl = $this->cache->getFromCacheByIdentity($oid); if (null !== $acl) { if ($acl->isSidLoaded($sids)) { // check if any of the parents has been loaded since we need to // ensure that there is only ever one ACL per object identity $parentAcl = $acl->getParentAcl(); while (null !== $parentAcl) { $parentOid = $parentAcl->getObjectIdentity(); if (isset($this->loadedAcls[$parentOid->getType()][$parentOid->getIdentifier()])) { $acl->setParentAcl($this->loadedAcls[$parentOid->getType()][$parentOid->getIdentifier()]); break; } else { $this->loadedAcls[$parentOid->getType()][$parentOid->getIdentifier()] = $parentAcl; $this->updateAceIdentityMap($parentAcl); } $parentAcl = $parentAcl->getParentAcl(); } $this->loadedAcls[$oid->getType()][$oid->getIdentifier()] = $acl; $this->updateAceIdentityMap($acl); $result->attach($oid, $acl); $aclFound = true; } else { $this->cache->evictFromCacheByIdentity($oid); foreach ($this->findChildren($oid) as $childOid) { $this->cache->evictFromCacheByIdentity($childOid); } } } } // looks like we have to load the ACL from the database if (!$aclFound) { $currentBatch[] = $oid; } // Is it time to load the current batch? $currentBatchesCount = count($currentBatch); if ($currentBatchesCount > 0 && (self::MAX_BATCH_SIZE === $currentBatchesCount || ($i + 1) === $c)) { try { $loadedBatch = $this->lookupObjectIdentities($currentBatch, $sids, $oidLookup); } catch (AclNotFoundException $e) { if ($result->count()) { $partialResultException = new NotAllAclsFoundException('The provider could not find ACLs for all object identities.'); $partialResultException->setPartialResult($result); throw $partialResultException; } else { throw $e; } } foreach ($loadedBatch as $loadedOid) { $loadedAcl = $loadedBatch->offsetGet($loadedOid); if (null !== $this->cache) { $this->cache->putInCache($loadedAcl); } if (isset($oidLookup[$loadedOid->getIdentifier().$loadedOid->getType()])) { $result->attach($loadedOid, $loadedAcl); } } $currentBatch = array(); } } // check that we got ACLs for all the identities foreach ($oids as $oid) { if (!$result->contains($oid)) { if (1 === count($oids)) { $objectName = method_exists($oid, '__toString') ? $oid : get_class($oid); throw new AclNotFoundException(sprintf('No ACL found for %s.', $objectName)); } $partialResultException = new NotAllAclsFoundException('The provider could not find ACLs for all object identities.'); $partialResultException->setPartialResult($result); throw $partialResultException; } } return $result; } /** * Constructs the query used for looking up object identities and associated * ACEs, and security identities. * * @param array $ancestorIds * * @return string */ protected function getLookupSql(array $ancestorIds) { // FIXME: add support for filtering by sids (right now we select all sids) $sql = <<options['oid_table_name']} o INNER JOIN {$this->options['class_table_name']} c ON c.id = o.class_id LEFT JOIN {$this->options['entry_table_name']} e ON ( e.class_id = o.class_id AND (e.object_identity_id = o.id OR {$this->connection->getDatabasePlatform()->getIsNullExpression('e.object_identity_id')}) ) LEFT JOIN {$this->options['sid_table_name']} s ON ( s.id = e.security_identity_id ) WHERE (o.id = SELECTCLAUSE; $sql .= implode(' OR o.id = ', $ancestorIds).')'; return $sql; } protected function getAncestorLookupSql(array $batch) { $sql = <<options['oid_table_name']} o INNER JOIN {$this->options['class_table_name']} c ON c.id = o.class_id INNER JOIN {$this->options['oid_ancestors_table_name']} a ON a.object_identity_id = o.id WHERE ( SELECTCLAUSE; $types = array(); $count = count($batch); for ($i = 0; $i < $count; ++$i) { if (!isset($types[$batch[$i]->getType()])) { $types[$batch[$i]->getType()] = true; // if there is more than one type we can safely break out of the // loop, because it is the differentiator factor on whether to // query for only one or more class types if (count($types) > 1) { break; } } } if (1 === count($types)) { $ids = array(); for ($i = 0; $i < $count; ++$i) { $identifier = (string) $batch[$i]->getIdentifier(); $ids[] = $this->connection->quote($identifier); } $sql .= sprintf( '(o.object_identifier IN (%s) AND c.class_type = %s)', implode(',', $ids), $this->connection->quote($batch[0]->getType()) ); } else { $where = '(o.object_identifier = %s AND c.class_type = %s)'; for ($i = 0; $i < $count; ++$i) { $sql .= sprintf( $where, $this->connection->quote($batch[$i]->getIdentifier()), $this->connection->quote($batch[$i]->getType()) ); if ($i + 1 < $count) { $sql .= ' OR '; } } } $sql .= ')'; return $sql; } /** * Constructs the SQL for retrieving child object identities for the given * object identities. * * @param ObjectIdentityInterface $oid * @param bool $directChildrenOnly * * @return string */ protected function getFindChildrenSql(ObjectIdentityInterface $oid, $directChildrenOnly) { if (false === $directChildrenOnly) { $query = <<options['oid_table_name']} o INNER JOIN {$this->options['class_table_name']} c ON c.id = o.class_id INNER JOIN {$this->options['oid_ancestors_table_name']} a ON a.object_identity_id = o.id WHERE a.ancestor_id = %d AND a.object_identity_id != a.ancestor_id FINDCHILDREN; } else { $query = <<options['oid_table_name']} o INNER JOIN {$this->options['class_table_name']} c ON c.id = o.class_id WHERE o.parent_object_identity_id = %d FINDCHILDREN; } return sprintf($query, $this->retrieveObjectIdentityPrimaryKey($oid)); } /** * Constructs the SQL for retrieving the primary key of the given object * identity. * * @param ObjectIdentityInterface $oid * * @return string */ protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid) { $query = <<<'QUERY' SELECT o.id FROM %s o INNER JOIN %s c ON c.id = o.class_id WHERE o.object_identifier = %s AND c.class_type = %s QUERY; return sprintf( $query, $this->options['oid_table_name'], $this->options['class_table_name'], $this->connection->quote((string) $oid->getIdentifier()), $this->connection->quote((string) $oid->getType()) ); } /** * Returns the primary key of the passed object identity. * * @param ObjectIdentityInterface $oid * * @return int */ final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid) { return $this->connection->executeQuery($this->getSelectObjectIdentityIdSql($oid))->fetchColumn(); } /** * This method is called when an ACL instance is retrieved from the cache. * * @param AclInterface $acl */ private function updateAceIdentityMap(AclInterface $acl) { foreach (array('classAces', 'classFieldAces', 'objectAces', 'objectFieldAces') as $property) { $reflection = new \ReflectionProperty($acl, $property); $reflection->setAccessible(true); $value = $reflection->getValue($acl); if ('classAces' === $property || 'objectAces' === $property) { $this->doUpdateAceIdentityMap($value); } else { foreach ($value as $field => $aces) { $this->doUpdateAceIdentityMap($value[$field]); } } $reflection->setValue($acl, $value); $reflection->setAccessible(false); } } /** * Retrieves all the ids which need to be queried from the database * including the ids of parent ACLs. * * @param array $batch * * @return array */ private function getAncestorIds(array $batch) { $sql = $this->getAncestorLookupSql($batch); $ancestorIds = array(); foreach ($this->connection->executeQuery($sql)->fetchAll() as $data) { // FIXME: skip ancestors which are cached // Fix: Oracle returns keys in uppercase $ancestorIds[] = reset($data); } return $ancestorIds; } /** * Does either overwrite the passed ACE, or saves it in the global identity * map to ensure every ACE only gets instantiated once. * * @param array &$aces */ private function doUpdateAceIdentityMap(array &$aces) { foreach ($aces as $index => $ace) { if (isset($this->loadedAces[$ace->getId()])) { $aces[$index] = $this->loadedAces[$ace->getId()]; } else { $this->loadedAces[$ace->getId()] = $ace; } } } /** * This method is called for object identities which could not be retrieved * from the cache, and for which thus a database query is required. * * @param array $batch * @param array $sids * @param array $oidLookup * * @return \SplObjectStorage mapping object identities to ACL instances * * @throws AclNotFoundException */ private function lookupObjectIdentities(array $batch, array $sids, array $oidLookup) { $ancestorIds = $this->getAncestorIds($batch); if (!$ancestorIds) { throw new AclNotFoundException('There is no ACL for the given object identity.'); } $sql = $this->getLookupSql($ancestorIds); $stmt = $this->connection->executeQuery($sql); return $this->hydrateObjectIdentities($stmt, $oidLookup, $sids); } /** * This method is called to hydrate ACLs and ACEs. * * This method was designed for performance; thus, a lot of code has been * inlined at the cost of readability, and maintainability. * * Keep in mind that changes to this method might severely reduce the * performance of the entire ACL system. * * @param Statement $stmt * @param array $oidLookup * @param array $sids * * @return \SplObjectStorage * * @throws \RuntimeException */ private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, array $sids) { $parentIdToFill = new \SplObjectStorage(); $acls = $aces = $emptyArray = array(); $oidCache = $oidLookup; $result = new \SplObjectStorage(); $loadedAces = &$this->loadedAces; $loadedAcls = &$this->loadedAcls; $permissionGrantingStrategy = $this->permissionGrantingStrategy; // we need these to set protected properties on hydrated objects $aclReflection = new \ReflectionClass('Symfony\Component\Security\Acl\Domain\Acl'); $aclClassAcesProperty = $aclReflection->getProperty('classAces'); $aclClassAcesProperty->setAccessible(true); $aclClassFieldAcesProperty = $aclReflection->getProperty('classFieldAces'); $aclClassFieldAcesProperty->setAccessible(true); $aclObjectAcesProperty = $aclReflection->getProperty('objectAces'); $aclObjectAcesProperty->setAccessible(true); $aclObjectFieldAcesProperty = $aclReflection->getProperty('objectFieldAces'); $aclObjectFieldAcesProperty->setAccessible(true); $aclParentAclProperty = $aclReflection->getProperty('parentAcl'); $aclParentAclProperty->setAccessible(true); // fetchAll() consumes more memory than consecutive calls to fetch(), // but it is faster foreach ($stmt->fetchAll(\PDO::FETCH_NUM) as $data) { list($aclId, $objectIdentifier, $parentObjectIdentityId, $entriesInheriting, $classType, $aceId, $objectIdentityId, $fieldName, $aceOrder, $mask, $granting, $grantingStrategy, $auditSuccess, $auditFailure, $username, $securityIdentifier) = array_values($data); // has the ACL been hydrated during this hydration cycle? if (isset($acls[$aclId])) { $acl = $acls[$aclId]; // has the ACL been hydrated during any previous cycle, or was possibly loaded // from cache? } elseif (isset($loadedAcls[$classType][$objectIdentifier])) { $acl = $loadedAcls[$classType][$objectIdentifier]; // keep reference in local array (saves us some hash calculations) $acls[$aclId] = $acl; // attach ACL to the result set; even though we do not enforce that every // object identity has only one instance, we must make sure to maintain // referential equality with the oids passed to findAcls() $oidCacheKey = $objectIdentifier.$classType; if (!isset($oidCache[$oidCacheKey])) { $oidCache[$oidCacheKey] = $acl->getObjectIdentity(); } $result->attach($oidCache[$oidCacheKey], $acl); // so, this hasn't been hydrated yet } else { // create object identity if we haven't done so yet $oidLookupKey = $objectIdentifier.$classType; if (!isset($oidCache[$oidLookupKey])) { $oidCache[$oidLookupKey] = new ObjectIdentity($objectIdentifier, $classType); } $acl = new Acl((int) $aclId, $oidCache[$oidLookupKey], $permissionGrantingStrategy, $emptyArray, (bool) $entriesInheriting); // keep a local, and global reference to this ACL $loadedAcls[$classType][$objectIdentifier] = $acl; $acls[$aclId] = $acl; // try to fill in parent ACL, or defer until all ACLs have been hydrated if (null !== $parentObjectIdentityId) { if (isset($acls[$parentObjectIdentityId])) { $aclParentAclProperty->setValue($acl, $acls[$parentObjectIdentityId]); } else { $parentIdToFill->attach($acl, $parentObjectIdentityId); } } $result->attach($oidCache[$oidLookupKey], $acl); } // check if this row contains an ACE record if (null !== $aceId) { // have we already hydrated ACEs for this ACL? if (!isset($aces[$aclId])) { $aces[$aclId] = array($emptyArray, $emptyArray, $emptyArray, $emptyArray); } // has this ACE already been hydrated during a previous cycle, or // possible been loaded from cache? // It is important to only ever have one ACE instance per actual row since // some ACEs are shared between ACL instances if (!isset($loadedAces[$aceId])) { if (!isset($sids[$key = ($username ? '1' : '0').$securityIdentifier])) { if ($username) { $sids[$key] = new UserSecurityIdentity( substr($securityIdentifier, 1 + $pos = strpos($securityIdentifier, '-')), substr($securityIdentifier, 0, $pos) ); } else { $sids[$key] = new RoleSecurityIdentity($securityIdentifier); } } if (null === $fieldName) { $loadedAces[$aceId] = new Entry((int) $aceId, $acl, $sids[$key], $grantingStrategy, (int) $mask, (bool) $granting, (bool) $auditFailure, (bool) $auditSuccess); } else { $loadedAces[$aceId] = new FieldEntry((int) $aceId, $acl, $fieldName, $sids[$key], $grantingStrategy, (int) $mask, (bool) $granting, (bool) $auditFailure, (bool) $auditSuccess); } } $ace = $loadedAces[$aceId]; // assign ACE to the correct property if (null === $objectIdentityId) { if (null === $fieldName) { $aces[$aclId][0][$aceOrder] = $ace; } else { $aces[$aclId][1][$fieldName][$aceOrder] = $ace; } } else { if (null === $fieldName) { $aces[$aclId][2][$aceOrder] = $ace; } else { $aces[$aclId][3][$fieldName][$aceOrder] = $ace; } } } } // We do not sort on database level since we only want certain subsets to be sorted, // and we are going to read the entire result set anyway. // Sorting on DB level increases query time by an order of magnitude while it is // almost negligible when we use PHPs array sort functions. foreach ($aces as $aclId => $aceData) { $acl = $acls[$aclId]; ksort($aceData[0]); $aclClassAcesProperty->setValue($acl, $aceData[0]); foreach (array_keys($aceData[1]) as $fieldName) { ksort($aceData[1][$fieldName]); } $aclClassFieldAcesProperty->setValue($acl, $aceData[1]); ksort($aceData[2]); $aclObjectAcesProperty->setValue($acl, $aceData[2]); foreach (array_keys($aceData[3]) as $fieldName) { ksort($aceData[3][$fieldName]); } $aclObjectFieldAcesProperty->setValue($acl, $aceData[3]); } // fill-in parent ACLs where this hasn't been done yet cause the parent ACL was not // yet available $processed = 0; foreach ($parentIdToFill as $acl) { $parentId = $parentIdToFill->offsetGet($acl); // let's see if we have already hydrated this if (isset($acls[$parentId])) { $aclParentAclProperty->setValue($acl, $acls[$parentId]); ++$processed; continue; } } // reset reflection changes $aclClassAcesProperty->setAccessible(false); $aclClassFieldAcesProperty->setAccessible(false); $aclObjectAcesProperty->setAccessible(false); $aclObjectFieldAcesProperty->setAccessible(false); $aclParentAclProperty->setAccessible(false); // this should never be true if the database integrity hasn't been compromised if ($processed < count($parentIdToFill)) { throw new \RuntimeException('Not all parent ids were populated. This implies an integrity problem.'); } return $result; } } src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php000066400000000000000000001101101266465517700246750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\Common\PropertyChangedListener; use Doctrine\DBAL\Connection; 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\Exception\ConcurrentModificationException; use Symfony\Component\Security\Acl\Model\AclCacheInterface; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\MutableAclInterface; use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * An implementation of the MutableAclProviderInterface using Doctrine DBAL. * * @author Johannes M. Schmitt */ class MutableAclProvider extends AclProvider implements MutableAclProviderInterface, PropertyChangedListener { private $propertyChanges; /** * {@inheritdoc} */ public function __construct(Connection $connection, PermissionGrantingStrategyInterface $permissionGrantingStrategy, array $options, AclCacheInterface $cache = null) { parent::__construct($connection, $permissionGrantingStrategy, $options, $cache); $this->propertyChanges = new \SplObjectStorage(); } /** * {@inheritdoc} */ public function createAcl(ObjectIdentityInterface $oid) { if (false !== $this->retrieveObjectIdentityPrimaryKey($oid)) { $objectName = method_exists($oid, '__toString') ? $oid : get_class($oid); throw new AclAlreadyExistsException(sprintf('%s is already associated with an ACL.', $objectName)); } $this->connection->beginTransaction(); try { $this->createObjectIdentity($oid); $pk = $this->retrieveObjectIdentityPrimaryKey($oid); $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk)); $this->connection->commit(); } catch (\Exception $e) { $this->connection->rollBack(); throw $e; } // re-read the ACL from the database to ensure proper caching, etc. return $this->findAcl($oid); } /** * {@inheritdoc} */ public function deleteAcl(ObjectIdentityInterface $oid) { $this->connection->beginTransaction(); try { foreach ($this->findChildren($oid, true) as $childOid) { $this->deleteAcl($childOid); } $oidPK = $this->retrieveObjectIdentityPrimaryKey($oid); $this->deleteAccessControlEntries($oidPK); $this->deleteObjectIdentityRelations($oidPK); $this->deleteObjectIdentity($oidPK); $this->connection->commit(); } catch (\Exception $e) { $this->connection->rollBack(); throw $e; } // evict the ACL from the in-memory identity map if (isset($this->loadedAcls[$oid->getType()][$oid->getIdentifier()])) { $this->propertyChanges->offsetUnset($this->loadedAcls[$oid->getType()][$oid->getIdentifier()]); unset($this->loadedAcls[$oid->getType()][$oid->getIdentifier()]); } // evict the ACL from any caches if (null !== $this->cache) { $this->cache->evictFromCacheByIdentity($oid); } } /** * Deletes the security identity from the database. * ACL entries have the CASCADE option on their foreign key so they will also get deleted. * * @param SecurityIdentityInterface $sid * * @throws \InvalidArgumentException */ public function deleteSecurityIdentity(SecurityIdentityInterface $sid) { $this->connection->executeQuery($this->getDeleteSecurityIdentityIdSql($sid)); } /** * {@inheritdoc} */ public function findAcls(array $oids, array $sids = array()) { $result = parent::findAcls($oids, $sids); foreach ($result as $oid) { $acl = $result->offsetGet($oid); if (false === $this->propertyChanges->contains($acl) && $acl instanceof MutableAclInterface) { $acl->addPropertyChangedListener($this); $this->propertyChanges->attach($acl, array()); } $parentAcl = $acl->getParentAcl(); while (null !== $parentAcl) { if (false === $this->propertyChanges->contains($parentAcl) && $acl instanceof MutableAclInterface) { $parentAcl->addPropertyChangedListener($this); $this->propertyChanges->attach($parentAcl, array()); } $parentAcl = $parentAcl->getParentAcl(); } } return $result; } /** * Implementation of PropertyChangedListener. * * This allows us to keep track of which values have been changed, so we don't * have to do a full introspection when ->updateAcl() is called. * * @param mixed $sender * @param string $propertyName * @param mixed $oldValue * @param mixed $newValue * * @throws \InvalidArgumentException */ public function propertyChanged($sender, $propertyName, $oldValue, $newValue) { if (!$sender instanceof MutableAclInterface && !$sender instanceof EntryInterface) { throw new \InvalidArgumentException('$sender must be an instance of MutableAclInterface, or EntryInterface.'); } if ($sender instanceof EntryInterface) { if (null === $sender->getId()) { return; } $ace = $sender; $sender = $ace->getAcl(); } else { $ace = null; } if (false === $this->propertyChanges->contains($sender)) { throw new \InvalidArgumentException('$sender is not being tracked by this provider.'); } $propertyChanges = $this->propertyChanges->offsetGet($sender); if (null === $ace) { if (isset($propertyChanges[$propertyName])) { $oldValue = $propertyChanges[$propertyName][0]; if ($oldValue === $newValue) { unset($propertyChanges[$propertyName]); } else { $propertyChanges[$propertyName] = array($oldValue, $newValue); } } else { $propertyChanges[$propertyName] = array($oldValue, $newValue); } } else { if (!isset($propertyChanges['aces'])) { $propertyChanges['aces'] = new \SplObjectStorage(); } $acePropertyChanges = $propertyChanges['aces']->contains($ace) ? $propertyChanges['aces']->offsetGet($ace) : array(); if (isset($acePropertyChanges[$propertyName])) { $oldValue = $acePropertyChanges[$propertyName][0]; if ($oldValue === $newValue) { unset($acePropertyChanges[$propertyName]); } else { $acePropertyChanges[$propertyName] = array($oldValue, $newValue); } } else { $acePropertyChanges[$propertyName] = array($oldValue, $newValue); } if (count($acePropertyChanges) > 0) { $propertyChanges['aces']->offsetSet($ace, $acePropertyChanges); } else { $propertyChanges['aces']->offsetUnset($ace); if (0 === count($propertyChanges['aces'])) { unset($propertyChanges['aces']); } } } $this->propertyChanges->offsetSet($sender, $propertyChanges); } /** * {@inheritdoc} */ public function updateAcl(MutableAclInterface $acl) { if (!$this->propertyChanges->contains($acl)) { throw new \InvalidArgumentException('$acl is not tracked by this provider.'); } $propertyChanges = $this->propertyChanges->offsetGet($acl); // check if any changes were made to this ACL if (0 === count($propertyChanges)) { return; } $sets = $sharedPropertyChanges = array(); $this->connection->beginTransaction(); try { if (isset($propertyChanges['entriesInheriting'])) { $sets[] = 'entries_inheriting = '.$this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['entriesInheriting'][1]); } if (isset($propertyChanges['parentAcl'])) { if (null === $propertyChanges['parentAcl'][1]) { $sets[] = 'parent_object_identity_id = NULL'; } else { $sets[] = 'parent_object_identity_id = '.(int) $propertyChanges['parentAcl'][1]->getId(); } $this->regenerateAncestorRelations($acl); $childAcls = $this->findAcls($this->findChildren($acl->getObjectIdentity(), false)); foreach ($childAcls as $childOid) { $this->regenerateAncestorRelations($childAcls[$childOid]); } } // check properties for deleted, and created ACEs, and perform deletions // we need to perform deletions before updating existing ACEs, in order to // preserve uniqueness of the order field if (isset($propertyChanges['classAces'])) { $this->updateOldAceProperty('classAces', $propertyChanges['classAces']); } if (isset($propertyChanges['classFieldAces'])) { $this->updateOldFieldAceProperty('classFieldAces', $propertyChanges['classFieldAces']); } if (isset($propertyChanges['objectAces'])) { $this->updateOldAceProperty('objectAces', $propertyChanges['objectAces']); } if (isset($propertyChanges['objectFieldAces'])) { $this->updateOldFieldAceProperty('objectFieldAces', $propertyChanges['objectFieldAces']); } // this includes only updates of existing ACEs, but neither the creation, nor // the deletion of ACEs; these are tracked by changes to the ACL's respective // properties (classAces, classFieldAces, objectAces, objectFieldAces) if (isset($propertyChanges['aces'])) { $this->updateAces($propertyChanges['aces']); } // check properties for deleted, and created ACEs, and perform creations if (isset($propertyChanges['classAces'])) { $this->updateNewAceProperty('classAces', $propertyChanges['classAces']); $sharedPropertyChanges['classAces'] = $propertyChanges['classAces']; } if (isset($propertyChanges['classFieldAces'])) { $this->updateNewFieldAceProperty('classFieldAces', $propertyChanges['classFieldAces']); $sharedPropertyChanges['classFieldAces'] = $propertyChanges['classFieldAces']; } if (isset($propertyChanges['objectAces'])) { $this->updateNewAceProperty('objectAces', $propertyChanges['objectAces']); } if (isset($propertyChanges['objectFieldAces'])) { $this->updateNewFieldAceProperty('objectFieldAces', $propertyChanges['objectFieldAces']); } // if there have been changes to shared properties, we need to synchronize other // ACL instances for object identities of the same type that are already in-memory if (count($sharedPropertyChanges) > 0) { $classAcesProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Acl', 'classAces'); $classAcesProperty->setAccessible(true); $classFieldAcesProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Acl', 'classFieldAces'); $classFieldAcesProperty->setAccessible(true); foreach ($this->loadedAcls[$acl->getObjectIdentity()->getType()] as $sameTypeAcl) { if (isset($sharedPropertyChanges['classAces'])) { if ($acl !== $sameTypeAcl && $classAcesProperty->getValue($sameTypeAcl) !== $sharedPropertyChanges['classAces'][0]) { throw new ConcurrentModificationException('The "classAces" property has been modified concurrently.'); } $classAcesProperty->setValue($sameTypeAcl, $sharedPropertyChanges['classAces'][1]); } if (isset($sharedPropertyChanges['classFieldAces'])) { if ($acl !== $sameTypeAcl && $classFieldAcesProperty->getValue($sameTypeAcl) !== $sharedPropertyChanges['classFieldAces'][0]) { throw new ConcurrentModificationException('The "classFieldAces" property has been modified concurrently.'); } $classFieldAcesProperty->setValue($sameTypeAcl, $sharedPropertyChanges['classFieldAces'][1]); } } } // persist any changes to the acl_object_identities table if (count($sets) > 0) { $this->connection->executeQuery($this->getUpdateObjectIdentitySql($acl->getId(), $sets)); } $this->connection->commit(); } catch (\Exception $e) { $this->connection->rollBack(); throw $e; } $this->propertyChanges->offsetSet($acl, array()); if (null !== $this->cache) { if (count($sharedPropertyChanges) > 0) { // FIXME: Currently, there is no easy way to clear the cache for ACLs // of a certain type. The problem here is that we need to make // sure to clear the cache of all child ACLs as well, and these // child ACLs might be of a different class type. $this->cache->clearCache(); } else { // if there are no shared property changes, it's sufficient to just delete // the cache for this ACL $this->cache->evictFromCacheByIdentity($acl->getObjectIdentity()); foreach ($this->findChildren($acl->getObjectIdentity()) as $childOid) { $this->cache->evictFromCacheByIdentity($childOid); } } } } /** * Updates a user security identity when the user's username changes. * * @param UserSecurityIdentity $usid * @param string $oldUsername */ public function updateUserSecurityIdentity(UserSecurityIdentity $usid, $oldUsername) { $this->connection->executeQuery($this->getUpdateUserSecurityIdentitySql($usid, $oldUsername)); } /** * Constructs the SQL for deleting access control entries. * * @param int $oidPK * * @return string */ protected function getDeleteAccessControlEntriesSql($oidPK) { return sprintf( 'DELETE FROM %s WHERE object_identity_id = %d', $this->options['entry_table_name'], $oidPK ); } /** * Constructs the SQL for deleting a specific ACE. * * @param int $acePK * * @return string */ protected function getDeleteAccessControlEntrySql($acePK) { return sprintf( 'DELETE FROM %s WHERE id = %d', $this->options['entry_table_name'], $acePK ); } /** * Constructs the SQL for deleting an object identity. * * @param int $pk * * @return string */ protected function getDeleteObjectIdentitySql($pk) { return sprintf( 'DELETE FROM %s WHERE id = %d', $this->options['oid_table_name'], $pk ); } /** * Constructs the SQL for deleting relation entries. * * @param int $pk * * @return string */ protected function getDeleteObjectIdentityRelationsSql($pk) { return sprintf( 'DELETE FROM %s WHERE object_identity_id = %d', $this->options['oid_ancestors_table_name'], $pk ); } /** * Constructs the SQL for inserting an ACE. * * @param int $classId * @param int|null $objectIdentityId * @param string|null $field * @param int $aceOrder * @param int $securityIdentityId * @param string $strategy * @param int $mask * @param bool $granting * @param bool $auditSuccess * @param bool $auditFailure * * @return string */ protected function getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $aceOrder, $securityIdentityId, $strategy, $mask, $granting, $auditSuccess, $auditFailure) { $query = <<<'QUERY' INSERT INTO %s ( class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure ) VALUES (%d, %s, %s, %d, %d, %d, %s, %s, %s, %s) QUERY; return sprintf( $query, $this->options['entry_table_name'], $classId, null === $objectIdentityId ? 'NULL' : (int) $objectIdentityId, null === $field ? 'NULL' : $this->connection->quote($field), $aceOrder, $securityIdentityId, $mask, $this->connection->getDatabasePlatform()->convertBooleans($granting), $this->connection->quote($strategy), $this->connection->getDatabasePlatform()->convertBooleans($auditSuccess), $this->connection->getDatabasePlatform()->convertBooleans($auditFailure) ); } /** * Constructs the SQL for inserting a new class type. * * @param string $classType * * @return string */ protected function getInsertClassSql($classType) { return sprintf( 'INSERT INTO %s (class_type) VALUES (%s)', $this->options['class_table_name'], $this->connection->quote($classType) ); } /** * Constructs the SQL for inserting a relation entry. * * @param int $objectIdentityId * @param int $ancestorId * * @return string */ protected function getInsertObjectIdentityRelationSql($objectIdentityId, $ancestorId) { return sprintf( 'INSERT INTO %s (object_identity_id, ancestor_id) VALUES (%d, %d)', $this->options['oid_ancestors_table_name'], $objectIdentityId, $ancestorId ); } /** * Constructs the SQL for inserting an object identity. * * @param string $identifier * @param int $classId * @param bool $entriesInheriting * * @return string */ protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInheriting) { $query = <<<'QUERY' INSERT INTO %s (class_id, object_identifier, entries_inheriting) VALUES (%d, %s, %s) QUERY; return sprintf( $query, $this->options['oid_table_name'], $classId, $this->connection->quote($identifier), $this->connection->getDatabasePlatform()->convertBooleans($entriesInheriting) ); } /** * Constructs the SQL for inserting a security identity. * * @param SecurityIdentityInterface $sid * * @throws \InvalidArgumentException * * @return string */ protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid) { if ($sid instanceof UserSecurityIdentity) { $identifier = $sid->getClass().'-'.$sid->getUsername(); $username = true; } elseif ($sid instanceof RoleSecurityIdentity) { $identifier = $sid->getRole(); $username = false; } else { throw new \InvalidArgumentException('$sid must either be an instance of UserSecurityIdentity, or RoleSecurityIdentity.'); } return sprintf( 'INSERT INTO %s (identifier, username) VALUES (%s, %s)', $this->options['sid_table_name'], $this->connection->quote($identifier), $this->connection->getDatabasePlatform()->convertBooleans($username) ); } /** * Constructs the SQL for selecting an ACE. * * @param int $classId * @param int $oid * @param string $field * @param int $order * * @return string */ protected function getSelectAccessControlEntryIdSql($classId, $oid, $field, $order) { return sprintf( 'SELECT id FROM %s WHERE class_id = %d AND %s AND %s AND ace_order = %d', $this->options['entry_table_name'], $classId, null === $oid ? $this->connection->getDatabasePlatform()->getIsNullExpression('object_identity_id') : 'object_identity_id = '.(int) $oid, null === $field ? $this->connection->getDatabasePlatform()->getIsNullExpression('field_name') : 'field_name = '.$this->connection->quote($field), $order ); } /** * Constructs the SQL for selecting the primary key associated with * the passed class type. * * @param string $classType * * @return string */ protected function getSelectClassIdSql($classType) { return sprintf( 'SELECT id FROM %s WHERE class_type = %s', $this->options['class_table_name'], $this->connection->quote($classType) ); } /** * Constructs the SQL for selecting the primary key of a security identity. * * @param SecurityIdentityInterface $sid * * @throws \InvalidArgumentException * * @return string */ protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid) { if ($sid instanceof UserSecurityIdentity) { $identifier = $sid->getClass().'-'.$sid->getUsername(); $username = true; } elseif ($sid instanceof RoleSecurityIdentity) { $identifier = $sid->getRole(); $username = false; } else { throw new \InvalidArgumentException('$sid must either be an instance of UserSecurityIdentity, or RoleSecurityIdentity.'); } return sprintf( 'SELECT id FROM %s WHERE identifier = %s AND username = %s', $this->options['sid_table_name'], $this->connection->quote($identifier), $this->connection->getDatabasePlatform()->convertBooleans($username) ); } /** * Constructs the SQL to delete a security identity. * * @param SecurityIdentityInterface $sid * * @throws \InvalidArgumentException * * @return string */ protected function getDeleteSecurityIdentityIdSql(SecurityIdentityInterface $sid) { $select = $this->getSelectSecurityIdentityIdSql($sid); $delete = preg_replace('/^SELECT id FROM/', 'DELETE FROM', $select); return $delete; } /** * Constructs the SQL for updating an object identity. * * @param int $pk * @param array $changes * * @throws \InvalidArgumentException * * @return string */ protected function getUpdateObjectIdentitySql($pk, array $changes) { if (0 === count($changes)) { throw new \InvalidArgumentException('There are no changes.'); } return sprintf( 'UPDATE %s SET %s WHERE id = %d', $this->options['oid_table_name'], implode(', ', $changes), $pk ); } /** * Constructs the SQL for updating a user security identity. * * @param UserSecurityIdentity $usid * @param string $oldUsername * * @return string */ protected function getUpdateUserSecurityIdentitySql(UserSecurityIdentity $usid, $oldUsername) { if ($usid->getUsername() == $oldUsername) { throw new \InvalidArgumentException('There are no changes.'); } $oldIdentifier = $usid->getClass().'-'.$oldUsername; $newIdentifier = $usid->getClass().'-'.$usid->getUsername(); return sprintf( 'UPDATE %s SET identifier = %s WHERE identifier = %s AND username = %s', $this->options['sid_table_name'], $this->connection->quote($newIdentifier), $this->connection->quote($oldIdentifier), $this->connection->getDatabasePlatform()->convertBooleans(true) ); } /** * Constructs the SQL for updating an ACE. * * @param int $pk * @param array $sets * * @throws \InvalidArgumentException * * @return string */ protected function getUpdateAccessControlEntrySql($pk, array $sets) { if (0 === count($sets)) { throw new \InvalidArgumentException('There are no changes.'); } return sprintf( 'UPDATE %s SET %s WHERE id = %d', $this->options['entry_table_name'], implode(', ', $sets), $pk ); } /** * Creates the ACL for the passed object identity. * * @param ObjectIdentityInterface $oid */ private function createObjectIdentity(ObjectIdentityInterface $oid) { $classId = $this->createOrRetrieveClassId($oid->getType()); $this->connection->executeQuery($this->getInsertObjectIdentitySql($oid->getIdentifier(), $classId, true)); } /** * Returns the primary key for the passed class type. * * If the type does not yet exist in the database, it will be created. * * @param string $classType * * @return int */ private function createOrRetrieveClassId($classType) { if (false !== $id = $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn()) { return $id; } $this->connection->executeQuery($this->getInsertClassSql($classType)); return $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn(); } /** * Returns the primary key for the passed security identity. * * If the security identity does not yet exist in the database, it will be * created. * * @param SecurityIdentityInterface $sid * * @return int */ private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) { if (false !== $id = $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn()) { return $id; } $this->connection->executeQuery($this->getInsertSecurityIdentitySql($sid)); return $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn(); } /** * Deletes all ACEs for the given object identity primary key. * * @param int $oidPK */ private function deleteAccessControlEntries($oidPK) { $this->connection->executeQuery($this->getDeleteAccessControlEntriesSql($oidPK)); } /** * Deletes the object identity from the database. * * @param int $pk */ private function deleteObjectIdentity($pk) { $this->connection->executeQuery($this->getDeleteObjectIdentitySql($pk)); } /** * Deletes all entries from the relations table from the database. * * @param int $pk */ private function deleteObjectIdentityRelations($pk) { $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); } /** * This regenerates the ancestor table which is used for fast read access. * * @param AclInterface $acl */ private function regenerateAncestorRelations(AclInterface $acl) { $pk = $acl->getId(); $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk)); $parentAcl = $acl->getParentAcl(); while (null !== $parentAcl) { $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $parentAcl->getId())); $parentAcl = $parentAcl->getParentAcl(); } } /** * This processes new entries changes on an ACE related property (classFieldAces, or objectFieldAces). * * @param string $name * @param array $changes */ private function updateNewFieldAceProperty($name, array $changes) { $sids = new \SplObjectStorage(); $classIds = new \SplObjectStorage(); foreach ($changes[1] as $field => $new) { for ($i = 0, $c = count($new); $i < $c; ++$i) { $ace = $new[$i]; if (null === $ace->getId()) { if ($sids->contains($ace->getSecurityIdentity())) { $sid = $sids->offsetGet($ace->getSecurityIdentity()); } else { $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); } $oid = $ace->getAcl()->getObjectIdentity(); if ($classIds->contains($oid)) { $classId = $classIds->offsetGet($oid); } else { $classId = $this->createOrRetrieveClassId($oid->getType()); } $objectIdentityId = $name === 'classFieldAces' ? null : $ace->getAcl()->getId(); $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, $field, $i))->fetchColumn(); $this->loadedAces[$aceId] = $ace; $aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id'); $aceIdProperty->setAccessible(true); $aceIdProperty->setValue($ace, (int) $aceId); } } } } /** * This processes old entries changes on an ACE related property (classFieldAces, or objectFieldAces). * * @param string $name * @param array $changes */ private function updateOldFieldAceProperty($name, array $changes) { $currentIds = array(); foreach ($changes[1] as $field => $new) { for ($i = 0, $c = count($new); $i < $c; ++$i) { $ace = $new[$i]; if (null !== $ace->getId()) { $currentIds[$ace->getId()] = true; } } } foreach ($changes[0] as $old) { for ($i = 0, $c = count($old); $i < $c; ++$i) { $ace = $old[$i]; if (!isset($currentIds[$ace->getId()])) { $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); unset($this->loadedAces[$ace->getId()]); } } } } /** * This processes new entries changes on an ACE related property (classAces, or objectAces). * * @param string $name * @param array $changes */ private function updateNewAceProperty($name, array $changes) { list(, $new) = $changes; $sids = new \SplObjectStorage(); $classIds = new \SplObjectStorage(); for ($i = 0, $c = count($new); $i < $c; ++$i) { $ace = $new[$i]; if (null === $ace->getId()) { if ($sids->contains($ace->getSecurityIdentity())) { $sid = $sids->offsetGet($ace->getSecurityIdentity()); } else { $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); } $oid = $ace->getAcl()->getObjectIdentity(); if ($classIds->contains($oid)) { $classId = $classIds->offsetGet($oid); } else { $classId = $this->createOrRetrieveClassId($oid->getType()); } $objectIdentityId = $name === 'classAces' ? null : $ace->getAcl()->getId(); $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, null, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, null, $i))->fetchColumn(); $this->loadedAces[$aceId] = $ace; $aceIdProperty = new \ReflectionProperty($ace, 'id'); $aceIdProperty->setAccessible(true); $aceIdProperty->setValue($ace, (int) $aceId); } } } /** * This processes old entries changes on an ACE related property (classAces, or objectAces). * * @param string $name * @param array $changes */ private function updateOldAceProperty($name, array $changes) { list($old, $new) = $changes; $currentIds = array(); for ($i = 0, $c = count($new); $i < $c; ++$i) { $ace = $new[$i]; if (null !== $ace->getId()) { $currentIds[$ace->getId()] = true; } } for ($i = 0, $c = count($old); $i < $c; ++$i) { $ace = $old[$i]; if (!isset($currentIds[$ace->getId()])) { $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); unset($this->loadedAces[$ace->getId()]); } } } /** * Persists the changes which were made to ACEs to the database. * * @param \SplObjectStorage $aces */ private function updateAces(\SplObjectStorage $aces) { foreach ($aces as $ace) { $this->updateAce($aces, $ace); } } private function updateAce(\SplObjectStorage $aces, $ace) { $propertyChanges = $aces->offsetGet($ace); $sets = array(); if (isset($propertyChanges['aceOrder']) && $propertyChanges['aceOrder'][1] > $propertyChanges['aceOrder'][0] && $propertyChanges == $aces->offsetGet($ace)) { $aces->next(); if ($aces->valid()) { $this->updateAce($aces, $aces->current()); } } if (isset($propertyChanges['mask'])) { $sets[] = sprintf('mask = %d', $propertyChanges['mask'][1]); } if (isset($propertyChanges['strategy'])) { $sets[] = sprintf('granting_strategy = %s', $this->connection->quote($propertyChanges['strategy'])); } if (isset($propertyChanges['aceOrder'])) { $sets[] = sprintf('ace_order = %d', $propertyChanges['aceOrder'][1]); } if (isset($propertyChanges['auditSuccess'])) { $sets[] = sprintf('audit_success = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditSuccess'][1])); } if (isset($propertyChanges['auditFailure'])) { $sets[] = sprintf('audit_failure = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditFailure'][1])); } $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets)); } } src/Symfony/Component/Security/Acl/Dbal/Schema.php000066400000000000000000000137531266465517700223700ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\DBAL\Schema\Schema as BaseSchema; use Doctrine\DBAL\Connection; /** * The schema used for the ACL system. * * @author Johannes M. Schmitt */ final class Schema extends BaseSchema { protected $options; /** * Constructor. * * @param array $options the names for tables * @param Connection $connection */ public function __construct(array $options, Connection $connection = null) { $schemaConfig = null === $connection ? null : $connection->getSchemaManager()->createSchemaConfig(); parent::__construct(array(), array(), $schemaConfig); $this->options = $options; $this->addClassTable(); $this->addSecurityIdentitiesTable(); $this->addObjectIdentitiesTable(); $this->addObjectIdentityAncestorsTable(); $this->addEntryTable(); } /** * Merges ACL schema with the given schema. * * @param BaseSchema $schema */ public function addToSchema(BaseSchema $schema) { foreach ($this->getTables() as $table) { $schema->_addTable($table); } foreach ($this->getSequences() as $sequence) { $schema->_addSequence($sequence); } } /** * Adds the class table to the schema. */ protected function addClassTable() { $table = $this->createTable($this->options['class_table_name']); $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('class_type', 'string', array('length' => 200)); $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('class_type')); } /** * Adds the entry table to the schema. */ protected function addEntryTable() { $table = $this->createTable($this->options['entry_table_name']); $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('class_id', 'integer', array('unsigned' => true)); $table->addColumn('object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false)); $table->addColumn('field_name', 'string', array('length' => 50, 'notnull' => false)); $table->addColumn('ace_order', 'smallint', array('unsigned' => true)); $table->addColumn('security_identity_id', 'integer', array('unsigned' => true)); $table->addColumn('mask', 'integer'); $table->addColumn('granting', 'boolean'); $table->addColumn('granting_strategy', 'string', array('length' => 30)); $table->addColumn('audit_success', 'boolean'); $table->addColumn('audit_failure', 'boolean'); $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('class_id', 'object_identity_id', 'field_name', 'ace_order')); $table->addIndex(array('class_id', 'object_identity_id', 'security_identity_id')); $table->addForeignKeyConstraint($this->getTable($this->options['class_table_name']), array('class_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); $table->addForeignKeyConstraint($this->getTable($this->options['oid_table_name']), array('object_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); $table->addForeignKeyConstraint($this->getTable($this->options['sid_table_name']), array('security_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); } /** * Adds the object identity table to the schema. */ protected function addObjectIdentitiesTable() { $table = $this->createTable($this->options['oid_table_name']); $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('class_id', 'integer', array('unsigned' => true)); $table->addColumn('object_identifier', 'string', array('length' => 100)); $table->addColumn('parent_object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false)); $table->addColumn('entries_inheriting', 'boolean'); $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('object_identifier', 'class_id')); $table->addIndex(array('parent_object_identity_id')); $table->addForeignKeyConstraint($table, array('parent_object_identity_id'), array('id')); } /** * Adds the object identity relation table to the schema. */ protected function addObjectIdentityAncestorsTable() { $table = $this->createTable($this->options['oid_ancestors_table_name']); $table->addColumn('object_identity_id', 'integer', array('unsigned' => true)); $table->addColumn('ancestor_id', 'integer', array('unsigned' => true)); $table->setPrimaryKey(array('object_identity_id', 'ancestor_id')); $oidTable = $this->getTable($this->options['oid_table_name']); $table->addForeignKeyConstraint($oidTable, array('object_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); $table->addForeignKeyConstraint($oidTable, array('ancestor_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); } /** * Adds the security identity table to the schema. */ protected function addSecurityIdentitiesTable() { $table = $this->createTable($this->options['sid_table_name']); $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('identifier', 'string', array('length' => 200)); $table->addColumn('username', 'boolean'); $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('identifier', 'username')); } } src/Symfony/Component/Security/Acl/Domain/000077500000000000000000000000001266465517700210135ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Domain/Acl.php000066400000000000000000000466541266465517700222420ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Doctrine\Common\NotifyPropertyChanged; use Doctrine\Common\PropertyChangedListener; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\AuditableAclInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * An ACL implementation. * * Each object identity has exactly one associated ACL. Each ACL can have four * different types of ACEs (class ACEs, object ACEs, class field ACEs, object field * ACEs). * * You should not iterate over the ACEs yourself, but instead use isGranted(), * or isFieldGranted(). These will utilize an implementation of PermissionGrantingStrategy * internally. * * @author Johannes M. Schmitt */ class Acl implements AuditableAclInterface, NotifyPropertyChanged { private $parentAcl; private $permissionGrantingStrategy; private $objectIdentity; private $classAces = array(); private $classFieldAces = array(); private $objectAces = array(); private $objectFieldAces = array(); private $id; private $loadedSids; private $entriesInheriting; private $listeners = array(); /** * Constructor. * * @param int $id * @param ObjectIdentityInterface $objectIdentity * @param PermissionGrantingStrategyInterface $permissionGrantingStrategy * @param array $loadedSids * @param bool $entriesInheriting */ public function __construct($id, ObjectIdentityInterface $objectIdentity, PermissionGrantingStrategyInterface $permissionGrantingStrategy, array $loadedSids, $entriesInheriting) { $this->id = $id; $this->objectIdentity = $objectIdentity; $this->permissionGrantingStrategy = $permissionGrantingStrategy; $this->loadedSids = $loadedSids; $this->entriesInheriting = $entriesInheriting; } /** * Adds a property changed listener. * * @param PropertyChangedListener $listener */ public function addPropertyChangedListener(PropertyChangedListener $listener) { $this->listeners[] = $listener; } /** * {@inheritdoc} */ public function deleteClassAce($index) { $this->deleteAce('classAces', $index); } /** * {@inheritdoc} */ public function deleteClassFieldAce($index, $field) { $this->deleteFieldAce('classFieldAces', $index, $field); } /** * {@inheritdoc} */ public function deleteObjectAce($index) { $this->deleteAce('objectAces', $index); } /** * {@inheritdoc} */ public function deleteObjectFieldAce($index, $field) { $this->deleteFieldAce('objectFieldAces', $index, $field); } /** * {@inheritdoc} */ public function getClassAces() { return $this->classAces; } /** * {@inheritdoc} */ public function getClassFieldAces($field) { return isset($this->classFieldAces[$field]) ? $this->classFieldAces[$field] : array(); } /** * {@inheritdoc} */ public function getObjectAces() { return $this->objectAces; } /** * {@inheritdoc} */ public function getObjectFieldAces($field) { return isset($this->objectFieldAces[$field]) ? $this->objectFieldAces[$field] : array(); } /** * {@inheritdoc} */ public function getId() { return $this->id; } /** * {@inheritdoc} */ public function getObjectIdentity() { return $this->objectIdentity; } /** * {@inheritdoc} */ public function getParentAcl() { return $this->parentAcl; } /** * {@inheritdoc} */ public function insertClassAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null) { $this->insertAce('classAces', $index, $mask, $sid, $granting, $strategy); } /** * {@inheritdoc} */ public function insertClassFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null) { $this->insertFieldAce('classFieldAces', $index, $field, $mask, $sid, $granting, $strategy); } /** * {@inheritdoc} */ public function insertObjectAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null) { $this->insertAce('objectAces', $index, $mask, $sid, $granting, $strategy); } /** * {@inheritdoc} */ public function insertObjectFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null) { $this->insertFieldAce('objectFieldAces', $index, $field, $mask, $sid, $granting, $strategy); } /** * {@inheritdoc} */ public function isEntriesInheriting() { return $this->entriesInheriting; } /** * {@inheritdoc} */ public function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false) { return $this->permissionGrantingStrategy->isFieldGranted($this, $field, $masks, $securityIdentities, $administrativeMode); } /** * {@inheritdoc} */ public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false) { return $this->permissionGrantingStrategy->isGranted($this, $masks, $securityIdentities, $administrativeMode); } /** * {@inheritdoc} */ public function isSidLoaded($sids) { if (!$this->loadedSids) { return true; } if (!is_array($sids)) { $sids = array($sids); } foreach ($sids as $sid) { if (!$sid instanceof SecurityIdentityInterface) { throw new \InvalidArgumentException( '$sid must be an instance of SecurityIdentityInterface.'); } foreach ($this->loadedSids as $loadedSid) { if ($loadedSid->equals($sid)) { continue 2; } } return false; } return true; } /** * Implementation for the \Serializable interface. * * @return string */ public function serialize() { return serialize(array( null === $this->parentAcl ? null : $this->parentAcl->getId(), $this->objectIdentity, $this->classAces, $this->classFieldAces, $this->objectAces, $this->objectFieldAces, $this->id, $this->loadedSids, $this->entriesInheriting, )); } /** * Implementation for the \Serializable interface. * * @param string $serialized */ public function unserialize($serialized) { list($this->parentAcl, $this->objectIdentity, $this->classAces, $this->classFieldAces, $this->objectAces, $this->objectFieldAces, $this->id, $this->loadedSids, $this->entriesInheriting ) = unserialize($serialized); $this->listeners = array(); } /** * {@inheritdoc} */ public function setEntriesInheriting($boolean) { if ($this->entriesInheriting !== $boolean) { $this->onPropertyChanged('entriesInheriting', $this->entriesInheriting, $boolean); $this->entriesInheriting = $boolean; } } /** * {@inheritdoc} */ public function setParentAcl(AclInterface $acl = null) { if (null !== $acl && null === $acl->getId()) { throw new \InvalidArgumentException('$acl must have an ID.'); } if ($this->parentAcl !== $acl) { $this->onPropertyChanged('parentAcl', $this->parentAcl, $acl); $this->parentAcl = $acl; } } /** * {@inheritdoc} */ public function updateClassAce($index, $mask, $strategy = null) { $this->updateAce('classAces', $index, $mask, $strategy); } /** * {@inheritdoc} */ public function updateClassFieldAce($index, $field, $mask, $strategy = null) { $this->updateFieldAce('classFieldAces', $index, $field, $mask, $strategy); } /** * {@inheritdoc} */ public function updateObjectAce($index, $mask, $strategy = null) { $this->updateAce('objectAces', $index, $mask, $strategy); } /** * {@inheritdoc} */ public function updateObjectFieldAce($index, $field, $mask, $strategy = null) { $this->updateFieldAce('objectFieldAces', $index, $field, $mask, $strategy); } /** * {@inheritdoc} */ public function updateClassAuditing($index, $auditSuccess, $auditFailure) { $this->updateAuditing($this->classAces, $index, $auditSuccess, $auditFailure); } /** * {@inheritdoc} */ public function updateClassFieldAuditing($index, $field, $auditSuccess, $auditFailure) { if (!isset($this->classFieldAces[$field])) { throw new \InvalidArgumentException(sprintf('There are no ACEs for field "%s".', $field)); } $this->updateAuditing($this->classFieldAces[$field], $index, $auditSuccess, $auditFailure); } /** * {@inheritdoc} */ public function updateObjectAuditing($index, $auditSuccess, $auditFailure) { $this->updateAuditing($this->objectAces, $index, $auditSuccess, $auditFailure); } /** * {@inheritdoc} */ public function updateObjectFieldAuditing($index, $field, $auditSuccess, $auditFailure) { if (!isset($this->objectFieldAces[$field])) { throw new \InvalidArgumentException(sprintf('There are no ACEs for field "%s".', $field)); } $this->updateAuditing($this->objectFieldAces[$field], $index, $auditSuccess, $auditFailure); } /** * Deletes an ACE. * * @param string $property * @param int $index * * @throws \OutOfBoundsException */ private function deleteAce($property, $index) { $aces = &$this->$property; if (!isset($aces[$index])) { throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index)); } $oldValue = $this->$property; unset($aces[$index]); $this->$property = array_values($this->$property); $this->onPropertyChanged($property, $oldValue, $this->$property); for ($i = $index, $c = count($this->$property); $i < $c; ++$i) { $this->onEntryPropertyChanged($aces[$i], 'aceOrder', $i + 1, $i); } } /** * Deletes a field-based ACE. * * @param string $property * @param int $index * @param string $field * * @throws \OutOfBoundsException */ private function deleteFieldAce($property, $index, $field) { $aces = &$this->$property; if (!isset($aces[$field][$index])) { throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index)); } $oldValue = $this->$property; unset($aces[$field][$index]); $aces[$field] = array_values($aces[$field]); $this->onPropertyChanged($property, $oldValue, $this->$property); for ($i = $index, $c = count($aces[$field]); $i < $c; ++$i) { $this->onEntryPropertyChanged($aces[$field][$i], 'aceOrder', $i + 1, $i); } } /** * Inserts an ACE. * * @param string $property * @param int $index * @param int $mask * @param SecurityIdentityInterface $sid * @param bool $granting * @param string $strategy * * @throws \OutOfBoundsException * @throws \InvalidArgumentException */ private function insertAce($property, $index, $mask, SecurityIdentityInterface $sid, $granting, $strategy = null) { if ($index < 0 || $index > count($this->$property)) { throw new \OutOfBoundsException(sprintf('The index must be in the interval [0, %d].', count($this->$property))); } if (!is_int($mask)) { throw new \InvalidArgumentException('$mask must be an integer.'); } if (null === $strategy) { if (true === $granting) { $strategy = PermissionGrantingStrategy::ALL; } else { $strategy = PermissionGrantingStrategy::ANY; } } $aces = &$this->$property; $oldValue = $this->$property; if (isset($aces[$index])) { $this->$property = array_merge( array_slice($this->$property, 0, $index), array(true), array_slice($this->$property, $index) ); for ($i = $index, $c = count($this->$property) - 1; $i < $c; ++$i) { $this->onEntryPropertyChanged($aces[$i + 1], 'aceOrder', $i, $i + 1); } } $aces[$index] = new Entry(null, $this, $sid, $strategy, $mask, $granting, false, false); $this->onPropertyChanged($property, $oldValue, $this->$property); } /** * Inserts a field-based ACE. * * @param string $property * @param int $index * @param string $field * @param int $mask * @param SecurityIdentityInterface $sid * @param bool $granting * @param string $strategy * * @throws \InvalidArgumentException * @throws \OutOfBoundsException */ private function insertFieldAce($property, $index, $field, $mask, SecurityIdentityInterface $sid, $granting, $strategy = null) { if (0 === strlen($field)) { throw new \InvalidArgumentException('$field cannot be empty.'); } if (!is_int($mask)) { throw new \InvalidArgumentException('$mask must be an integer.'); } if (null === $strategy) { if (true === $granting) { $strategy = PermissionGrantingStrategy::ALL; } else { $strategy = PermissionGrantingStrategy::ANY; } } $aces = &$this->$property; if (!isset($aces[$field])) { $aces[$field] = array(); } if ($index < 0 || $index > count($aces[$field])) { throw new \OutOfBoundsException(sprintf('The index must be in the interval [0, %d].', count($this->$property))); } $oldValue = $aces; if (isset($aces[$field][$index])) { $aces[$field] = array_merge( array_slice($aces[$field], 0, $index), array(true), array_slice($aces[$field], $index) ); for ($i = $index, $c = count($aces[$field]) - 1; $i < $c; ++$i) { $this->onEntryPropertyChanged($aces[$field][$i + 1], 'aceOrder', $i, $i + 1); } } $aces[$field][$index] = new FieldEntry(null, $this, $field, $sid, $strategy, $mask, $granting, false, false); $this->onPropertyChanged($property, $oldValue, $this->$property); } /** * Updates an ACE. * * @param string $property * @param int $index * @param int $mask * @param string $strategy * * @throws \OutOfBoundsException */ private function updateAce($property, $index, $mask, $strategy = null) { $aces = &$this->$property; if (!isset($aces[$index])) { throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index)); } $ace = $aces[$index]; if ($mask !== $oldMask = $ace->getMask()) { $this->onEntryPropertyChanged($ace, 'mask', $oldMask, $mask); $ace->setMask($mask); } if (null !== $strategy && $strategy !== $oldStrategy = $ace->getStrategy()) { $this->onEntryPropertyChanged($ace, 'strategy', $oldStrategy, $strategy); $ace->setStrategy($strategy); } } /** * Updates auditing for an ACE. * * @param array &$aces * @param int $index * @param bool $auditSuccess * @param bool $auditFailure * * @throws \OutOfBoundsException */ private function updateAuditing(array &$aces, $index, $auditSuccess, $auditFailure) { if (!isset($aces[$index])) { throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index)); } if ($auditSuccess !== $aces[$index]->isAuditSuccess()) { $this->onEntryPropertyChanged($aces[$index], 'auditSuccess', !$auditSuccess, $auditSuccess); $aces[$index]->setAuditSuccess($auditSuccess); } if ($auditFailure !== $aces[$index]->isAuditFailure()) { $this->onEntryPropertyChanged($aces[$index], 'auditFailure', !$auditFailure, $auditFailure); $aces[$index]->setAuditFailure($auditFailure); } } /** * Updates a field-based ACE. * * @param string $property * @param int $index * @param string $field * @param int $mask * @param string $strategy * * @throws \InvalidArgumentException * @throws \OutOfBoundsException */ private function updateFieldAce($property, $index, $field, $mask, $strategy = null) { if (0 === strlen($field)) { throw new \InvalidArgumentException('$field cannot be empty.'); } $aces = &$this->$property; if (!isset($aces[$field][$index])) { throw new \OutOfBoundsException(sprintf('The index "%d" does not exist.', $index)); } $ace = $aces[$field][$index]; if ($mask !== $oldMask = $ace->getMask()) { $this->onEntryPropertyChanged($ace, 'mask', $oldMask, $mask); $ace->setMask($mask); } if (null !== $strategy && $strategy !== $oldStrategy = $ace->getStrategy()) { $this->onEntryPropertyChanged($ace, 'strategy', $oldStrategy, $strategy); $ace->setStrategy($strategy); } } /** * Called when a property of the ACL changes. * * @param string $name * @param mixed $oldValue * @param mixed $newValue */ private function onPropertyChanged($name, $oldValue, $newValue) { foreach ($this->listeners as $listener) { $listener->propertyChanged($this, $name, $oldValue, $newValue); } } /** * Called when a property of an ACE associated with this ACL changes. * * @param EntryInterface $entry * @param string $name * @param mixed $oldValue * @param mixed $newValue */ private function onEntryPropertyChanged(EntryInterface $entry, $name, $oldValue, $newValue) { foreach ($this->listeners as $listener) { $listener->propertyChanged($entry, $name, $oldValue, $newValue); } } } src/Symfony/Component/Security/Acl/Domain/AclCollectionCache.php000066400000000000000000000044571266465517700251750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AclProviderInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** * This service caches ACLs for an entire collection of objects. * * @author Johannes M. Schmitt */ class AclCollectionCache { private $aclProvider; private $objectIdentityRetrievalStrategy; private $securityIdentityRetrievalStrategy; /** * Constructor. * * @param AclProviderInterface $aclProvider * @param ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy * @param SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy */ public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy) { $this->aclProvider = $aclProvider; $this->objectIdentityRetrievalStrategy = $oidRetrievalStrategy; $this->securityIdentityRetrievalStrategy = $sidRetrievalStrategy; } /** * Batch loads ACLs for an entire collection; thus, it reduces the number * of required queries considerably. * * @param mixed $collection anything that can be passed to foreach() * @param TokenInterface[] $tokens an array of TokenInterface implementations */ public function cache($collection, array $tokens = array()) { $sids = array(); foreach ($tokens as $token) { $sids = array_merge($sids, $this->securityIdentityRetrievalStrategy->getSecurityIdentities($token)); } $oids = array(); foreach ($collection as $domainObject) { $oids[] = $this->objectIdentityRetrievalStrategy->getObjectIdentity($domainObject); } $this->aclProvider->findAcls($oids, $sids); } } src/Symfony/Component/Security/Acl/Domain/AuditLogger.php000066400000000000000000000025401266465517700237330ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AuditableEntryInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\AuditLoggerInterface; /** * Base audit logger implementation. * * @author Johannes M. Schmitt */ abstract class AuditLogger implements AuditLoggerInterface { /** * Performs some checks if logging was requested. * * @param bool $granted * @param EntryInterface $ace */ public function logIfNeeded($granted, EntryInterface $ace) { if (!$ace instanceof AuditableEntryInterface) { return; } if ($granted && $ace->isAuditSuccess()) { $this->doLog($granted, $ace); } elseif (!$granted && $ace->isAuditFailure()) { $this->doLog($granted, $ace); } } /** * This method is only called when logging is needed. * * @param bool $granted * @param EntryInterface $ace */ abstract protected function doLog($granted, EntryInterface $ace); } src/Symfony/Component/Security/Acl/Domain/DoctrineAclCache.php000066400000000000000000000144141266465517700246430ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\CacheProvider; use Symfony\Component\Security\Acl\Model\AclCacheInterface; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; /** * This class is a wrapper around the actual cache implementation. * * @author Johannes M. Schmitt */ class DoctrineAclCache implements AclCacheInterface { const PREFIX = 'sf2_acl_'; private $cache; private $prefix; private $permissionGrantingStrategy; /** * Constructor. * * @param Cache $cache * @param PermissionGrantingStrategyInterface $permissionGrantingStrategy * @param string $prefix * * @throws \InvalidArgumentException */ public function __construct(Cache $cache, PermissionGrantingStrategyInterface $permissionGrantingStrategy, $prefix = self::PREFIX) { if (0 === strlen($prefix)) { throw new \InvalidArgumentException('$prefix cannot be empty.'); } $this->cache = $cache; $this->permissionGrantingStrategy = $permissionGrantingStrategy; $this->prefix = $prefix; } /** * {@inheritdoc} */ public function clearCache() { if ($this->cache instanceof CacheProvider) { $this->cache->deleteAll(); } } /** * {@inheritdoc} */ public function evictFromCacheById($aclId) { $lookupKey = $this->getAliasKeyForIdentity($aclId); if (!$this->cache->contains($lookupKey)) { return; } $key = $this->cache->fetch($lookupKey); if ($this->cache->contains($key)) { $this->cache->delete($key); } $this->cache->delete($lookupKey); } /** * {@inheritdoc} */ public function evictFromCacheByIdentity(ObjectIdentityInterface $oid) { $key = $this->getDataKeyByIdentity($oid); if (!$this->cache->contains($key)) { return; } $this->cache->delete($key); } /** * {@inheritdoc} */ public function getFromCacheById($aclId) { $lookupKey = $this->getAliasKeyForIdentity($aclId); if (!$this->cache->contains($lookupKey)) { return; } $key = $this->cache->fetch($lookupKey); if (!$this->cache->contains($key)) { $this->cache->delete($lookupKey); return; } return $this->unserializeAcl($this->cache->fetch($key)); } /** * {@inheritdoc} */ public function getFromCacheByIdentity(ObjectIdentityInterface $oid) { $key = $this->getDataKeyByIdentity($oid); if (!$this->cache->contains($key)) { return; } return $this->unserializeAcl($this->cache->fetch($key)); } /** * {@inheritdoc} */ public function putInCache(AclInterface $acl) { if (null === $acl->getId()) { throw new \InvalidArgumentException('Transient ACLs cannot be cached.'); } if (null !== $parentAcl = $acl->getParentAcl()) { $this->putInCache($parentAcl); } $key = $this->getDataKeyByIdentity($acl->getObjectIdentity()); $this->cache->save($key, serialize($acl)); $this->cache->save($this->getAliasKeyForIdentity($acl->getId()), $key); } /** * Unserializes the ACL. * * @param string $serialized * * @return AclInterface */ private function unserializeAcl($serialized) { $acl = unserialize($serialized); if (null !== $parentId = $acl->getParentAcl()) { $parentAcl = $this->getFromCacheById($parentId); if (null === $parentAcl) { return; } $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 ObjectIdentityInterface $oid * * @return string */ private function getDataKeyByIdentity(ObjectIdentityInterface $oid) { return $this->prefix.md5($oid->getType()).sha1($oid->getType()) .'_'.md5($oid->getIdentifier()).sha1($oid->getIdentifier()); } /** * Returns the alias key for the object identity key. * * @param string $aclId * * @return string */ private function getAliasKeyForIdentity($aclId) { return $this->prefix.$aclId; } } src/Symfony/Component/Security/Acl/Domain/Entry.php000066400000000000000000000107771266465517700226410ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\AuditableEntryInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * Auditable ACE implementation. * * @author Johannes M. Schmitt */ class Entry implements AuditableEntryInterface { private $acl; private $mask; private $id; private $securityIdentity; private $strategy; private $auditFailure; private $auditSuccess; private $granting; /** * Constructor. * * @param int $id * @param AclInterface $acl * @param SecurityIdentityInterface $sid * @param string $strategy * @param int $mask * @param bool $granting * @param bool $auditFailure * @param bool $auditSuccess */ public function __construct($id, AclInterface $acl, SecurityIdentityInterface $sid, $strategy, $mask, $granting, $auditFailure, $auditSuccess) { $this->id = $id; $this->acl = $acl; $this->securityIdentity = $sid; $this->strategy = $strategy; $this->mask = $mask; $this->granting = $granting; $this->auditFailure = $auditFailure; $this->auditSuccess = $auditSuccess; } /** * {@inheritdoc} */ public function getAcl() { return $this->acl; } /** * {@inheritdoc} */ public function getMask() { return $this->mask; } /** * {@inheritdoc} */ public function getId() { return $this->id; } /** * {@inheritdoc} */ public function getSecurityIdentity() { return $this->securityIdentity; } /** * {@inheritdoc} */ public function getStrategy() { return $this->strategy; } /** * {@inheritdoc} */ public function isAuditFailure() { return $this->auditFailure; } /** * {@inheritdoc} */ public function isAuditSuccess() { return $this->auditSuccess; } /** * {@inheritdoc} */ public function isGranting() { return $this->granting; } /** * Turns on/off auditing on permissions denials. * * Do never call this method directly. Use the respective methods on the * AclInterface instead. * * @param bool $boolean */ public function setAuditFailure($boolean) { $this->auditFailure = $boolean; } /** * Turns on/off auditing on permission grants. * * Do never call this method directly. Use the respective methods on the * AclInterface instead. * * @param bool $boolean */ public function setAuditSuccess($boolean) { $this->auditSuccess = $boolean; } /** * Sets the permission mask. * * Do never call this method directly. Use the respective methods on the * AclInterface instead. * * @param int $mask */ public function setMask($mask) { $this->mask = $mask; } /** * Sets the mask comparison strategy. * * Do never call this method directly. Use the respective methods on the * AclInterface instead. * * @param string $strategy */ public function setStrategy($strategy) { $this->strategy = $strategy; } /** * Implementation of \Serializable. * * @return string */ public function serialize() { return serialize(array( $this->mask, $this->id, $this->securityIdentity, $this->strategy, $this->auditFailure, $this->auditSuccess, $this->granting, )); } /** * Implementation of \Serializable. * * @param string $serialized */ public function unserialize($serialized) { list($this->mask, $this->id, $this->securityIdentity, $this->strategy, $this->auditFailure, $this->auditSuccess, $this->granting ) = unserialize($serialized); } } src/Symfony/Component/Security/Acl/Domain/FieldEntry.php000066400000000000000000000036501266465517700235750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\FieldEntryInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * Field-aware ACE implementation which is auditable. * * @author Johannes M. Schmitt */ class FieldEntry extends Entry implements FieldEntryInterface { private $field; /** * Constructor. * * @param int $id * @param AclInterface $acl * @param string $field * @param SecurityIdentityInterface $sid * @param string $strategy * @param int $mask * @param bool $granting * @param bool $auditFailure * @param bool $auditSuccess */ public function __construct($id, AclInterface $acl, $field, SecurityIdentityInterface $sid, $strategy, $mask, $granting, $auditFailure, $auditSuccess) { parent::__construct($id, $acl, $sid, $strategy, $mask, $granting, $auditFailure, $auditSuccess); $this->field = $field; } /** * {@inheritdoc} */ public function getField() { return $this->field; } /** * {@inheritdoc} */ public function serialize() { return serialize(array( $this->field, parent::serialize(), )); } /** * {@inheritdoc} */ public function unserialize($serialized) { list($this->field, $parentStr) = unserialize($serialized); parent::unserialize($parentStr); } } src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php000066400000000000000000000061411266465517700244460ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Core\Util\ClassUtils; use Symfony\Component\Security\Acl\Exception\InvalidDomainObjectException; use Symfony\Component\Security\Acl\Model\DomainObjectInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; /** * ObjectIdentity implementation. * * @author Johannes M. Schmitt */ final class ObjectIdentity implements ObjectIdentityInterface { private $identifier; private $type; /** * Constructor. * * @param string $identifier * @param string $type * * @throws \InvalidArgumentException */ public function __construct($identifier, $type) { if ('' === $identifier) { throw new \InvalidArgumentException('$identifier cannot be empty.'); } if (empty($type)) { throw new \InvalidArgumentException('$type cannot be empty.'); } $this->identifier = $identifier; $this->type = $type; } /** * Constructs an ObjectIdentity for the given domain object. * * @param object $domainObject * * @throws InvalidDomainObjectException * * @return ObjectIdentity */ public static function fromDomainObject($domainObject) { if (!is_object($domainObject)) { throw new InvalidDomainObjectException('$domainObject must be an object.'); } try { if ($domainObject instanceof DomainObjectInterface) { return new self($domainObject->getObjectIdentifier(), ClassUtils::getRealClass($domainObject)); } elseif (method_exists($domainObject, 'getId')) { return new self((string) $domainObject->getId(), ClassUtils::getRealClass($domainObject)); } } catch (\InvalidArgumentException $e) { throw new InvalidDomainObjectException($e->getMessage(), 0, $e); } throw new InvalidDomainObjectException('$domainObject must either implement the DomainObjectInterface, or have a method named "getId".'); } /** * {@inheritdoc} */ public function getIdentifier() { return $this->identifier; } /** * {@inheritdoc} */ public function getType() { return $this->type; } /** * {@inheritdoc} */ public function equals(ObjectIdentityInterface $identity) { // comparing the identifier with === might lead to problems, so we // waive this restriction return $this->identifier == $identity->getIdentifier() && $this->type === $identity->getType(); } /** * Returns a textual representation of this object identity. * * @return string */ public function __toString() { return sprintf('ObjectIdentity(%s, %s)', $this->identifier, $this->type); } } src/Symfony/Component/Security/Acl/Domain/ObjectIdentityRetrievalStrategy.php000066400000000000000000000016651266465517700300550ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Exception\InvalidDomainObjectException; use Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface; /** * Strategy to be used for retrieving object identities from domain objects. * * @author Johannes M. Schmitt */ class ObjectIdentityRetrievalStrategy implements ObjectIdentityRetrievalStrategyInterface { /** * {@inheritdoc} */ public function getObjectIdentity($domainObject) { try { return ObjectIdentity::fromDomainObject($domainObject); } catch (InvalidDomainObjectException $e) { return; } } } src/Symfony/Component/Security/Acl/Domain/PermissionGrantingStrategy.php000066400000000000000000000165721266465517700271040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Exception\NoAceFoundException; use Symfony\Component\Security\Acl\Model\AclInterface; use Symfony\Component\Security\Acl\Model\AuditLoggerInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * The permission granting strategy to apply to the access control list. * * @author Johannes M. Schmitt */ class PermissionGrantingStrategy implements PermissionGrantingStrategyInterface { const EQUAL = 'equal'; const ALL = 'all'; const ANY = 'any'; private $auditLogger; /** * Sets the audit logger. * * @param AuditLoggerInterface $auditLogger */ public function setAuditLogger(AuditLoggerInterface $auditLogger) { $this->auditLogger = $auditLogger; } /** * {@inheritdoc} */ public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false) { try { try { $aces = $acl->getObjectAces(); if (!$aces) { throw new NoAceFoundException(); } return $this->hasSufficientPermissions($acl, $aces, $masks, $sids, $administrativeMode); } catch (NoAceFoundException $e) { $aces = $acl->getClassAces(); if (!$aces) { throw $e; } return $this->hasSufficientPermissions($acl, $aces, $masks, $sids, $administrativeMode); } } catch (NoAceFoundException $e) { if ($acl->isEntriesInheriting() && null !== $parentAcl = $acl->getParentAcl()) { return $parentAcl->isGranted($masks, $sids, $administrativeMode); } throw $e; } } /** * {@inheritdoc} */ public function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false) { try { try { $aces = $acl->getObjectFieldAces($field); if (!$aces) { throw new NoAceFoundException(); } return $this->hasSufficientPermissions($acl, $aces, $masks, $sids, $administrativeMode); } catch (NoAceFoundException $e) { $aces = $acl->getClassFieldAces($field); if (!$aces) { throw $e; } return $this->hasSufficientPermissions($acl, $aces, $masks, $sids, $administrativeMode); } } catch (NoAceFoundException $e) { if ($acl->isEntriesInheriting() && null !== $parentAcl = $acl->getParentAcl()) { return $parentAcl->isFieldGranted($field, $masks, $sids, $administrativeMode); } throw $e; } } /** * Makes an authorization decision. * * The order of ACEs, and SIDs is significant; the order of permission masks * not so much. It is important to note that the more specific security * identities should be at the beginning of the SIDs array in order for this * strategy to produce intuitive authorization decisions. * * First, we will iterate over permissions, then over security identities. * For each combination of permission, and identity we will test the * available ACEs until we find one which is applicable. * * The first applicable ACE will make the ultimate decision for the * permission/identity combination. If it is granting, this method will return * true, if it is denying, the method will continue to check the next * permission/identity combination. * * This process is repeated until either a granting ACE is found, or no * permission/identity combinations are left. Finally, we will either throw * an NoAceFoundException, or deny access. * * @param AclInterface $acl * @param EntryInterface[] $aces An array of ACE to check against * @param array $masks An array of permission masks * @param SecurityIdentityInterface[] $sids An array of SecurityIdentityInterface implementations * @param bool $administrativeMode True turns off audit logging * * @return bool true, or false; either granting, or denying access respectively. * * @throws NoAceFoundException */ private function hasSufficientPermissions(AclInterface $acl, array $aces, array $masks, array $sids, $administrativeMode) { $firstRejectedAce = null; foreach ($masks as $requiredMask) { foreach ($sids as $sid) { foreach ($aces as $ace) { if ($sid->equals($ace->getSecurityIdentity()) && $this->isAceApplicable($requiredMask, $ace)) { if ($ace->isGranting()) { if (!$administrativeMode && null !== $this->auditLogger) { $this->auditLogger->logIfNeeded(true, $ace); } return true; } if (null === $firstRejectedAce) { $firstRejectedAce = $ace; } break 2; } } } } if (null !== $firstRejectedAce) { if (!$administrativeMode && null !== $this->auditLogger) { $this->auditLogger->logIfNeeded(false, $firstRejectedAce); } return false; } throw new NoAceFoundException(); } /** * Determines whether the ACE is applicable to the given permission/security * identity combination. * * Per default, we support three different comparison strategies. * * Strategy ALL: * The ACE will be considered applicable when all the turned-on bits in the * required mask are also turned-on in the ACE mask. * * Strategy ANY: * The ACE will be considered applicable when any of the turned-on bits in * the required mask is also turned-on the in the ACE mask. * * Strategy EQUAL: * The ACE will be considered applicable when the bitmasks are equal. * * @param int $requiredMask * @param EntryInterface $ace * * @return bool * * @throws \RuntimeException if the ACE strategy is not supported */ private function isAceApplicable($requiredMask, EntryInterface $ace) { $strategy = $ace->getStrategy(); if (self::ALL === $strategy) { return $requiredMask === ($ace->getMask() & $requiredMask); } elseif (self::ANY === $strategy) { return 0 !== ($ace->getMask() & $requiredMask); } elseif (self::EQUAL === $strategy) { return $requiredMask === $ace->getMask(); } throw new \RuntimeException(sprintf('The strategy "%s" is not supported.', $strategy)); } } src/Symfony/Component/Security/Acl/Domain/RoleSecurityIdentity.php000066400000000000000000000030601266465517700256660ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; use Symfony\Component\Security\Core\Role\Role; /** * A SecurityIdentity implementation for roles. * * @author Johannes M. Schmitt */ final class RoleSecurityIdentity implements SecurityIdentityInterface { private $role; /** * Constructor. * * @param mixed $role a Role instance, or its string representation */ public function __construct($role) { if ($role instanceof Role) { $role = $role->getRole(); } $this->role = $role; } /** * Returns the role name. * * @return string */ public function getRole() { return $this->role; } /** * {@inheritdoc} */ public function equals(SecurityIdentityInterface $sid) { if (!$sid instanceof self) { return false; } return $this->role === $sid->getRole(); } /** * Returns a textual representation of this security identity. * * This is solely used for debugging purposes, not to make an equality decision. * * @return string */ public function __toString() { return sprintf('RoleSecurityIdentity(%s)', $this->role); } } src/Symfony/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategy.php000066400000000000000000000056431266465517700304560ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; /** * Strategy for retrieving security identities. * * @author Johannes M. Schmitt */ class SecurityIdentityRetrievalStrategy implements SecurityIdentityRetrievalStrategyInterface { private $roleHierarchy; private $authenticationTrustResolver; /** * Constructor. * * @param RoleHierarchyInterface $roleHierarchy * @param AuthenticationTrustResolver $authenticationTrustResolver */ public function __construct(RoleHierarchyInterface $roleHierarchy, AuthenticationTrustResolver $authenticationTrustResolver) { $this->roleHierarchy = $roleHierarchy; $this->authenticationTrustResolver = $authenticationTrustResolver; } /** * {@inheritdoc} */ public function getSecurityIdentities(TokenInterface $token) { $sids = array(); // add user security identity if (!$token instanceof AnonymousToken) { try { $sids[] = UserSecurityIdentity::fromToken($token); } catch (\InvalidArgumentException $e) { // ignore, user has no user security identity } } // add all reachable roles foreach ($this->roleHierarchy->getReachableRoles($token->getRoles()) as $role) { $sids[] = new RoleSecurityIdentity($role); } // add built-in special roles if ($this->authenticationTrustResolver->isFullFledged($token)) { $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_FULLY); $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED); $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY); } elseif ($this->authenticationTrustResolver->isRememberMe($token)) { $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED); $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY); } elseif ($this->authenticationTrustResolver->isAnonymous($token)) { $sids[] = new RoleSecurityIdentity(AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY); } return $sids; } } src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php000066400000000000000000000061041266465517700257050ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Domain; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\Util\ClassUtils; use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface; /** * A SecurityIdentity implementation used for actual users. * * @author Johannes M. Schmitt */ final class UserSecurityIdentity implements SecurityIdentityInterface { private $username; private $class; /** * Constructor. * * @param string $username the username representation * @param string $class the user's fully qualified class name * * @throws \InvalidArgumentException */ public function __construct($username, $class) { if ('' === $username || null === $username) { throw new \InvalidArgumentException('$username must not be empty.'); } if (empty($class)) { throw new \InvalidArgumentException('$class must not be empty.'); } $this->username = (string) $username; $this->class = $class; } /** * Creates a user security identity from a UserInterface. * * @param UserInterface $user * * @return UserSecurityIdentity */ public static function fromAccount(UserInterface $user) { return new self($user->getUsername(), ClassUtils::getRealClass($user)); } /** * Creates a user security identity from a TokenInterface. * * @param TokenInterface $token * * @return UserSecurityIdentity */ public static function fromToken(TokenInterface $token) { $user = $token->getUser(); if ($user instanceof UserInterface) { return self::fromAccount($user); } return new self((string) $user, is_object($user) ? ClassUtils::getRealClass($user) : ClassUtils::getRealClass($token)); } /** * Returns the username. * * @return string */ public function getUsername() { return $this->username; } /** * Returns the user's class name. * * @return string */ public function getClass() { return $this->class; } /** * {@inheritdoc} */ public function equals(SecurityIdentityInterface $sid) { if (!$sid instanceof self) { return false; } return $this->username === $sid->getUsername() && $this->class === $sid->getClass(); } /** * A textual representation of this security identity. * * This is not used for equality comparison, but only for debugging. * * @return string */ public function __toString() { return sprintf('UserSecurityIdentity(%s, %s)', $this->username, $this->class); } } src/Symfony/Component/Security/Acl/Exception/000077500000000000000000000000001266465517700215425ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Exception/AclAlreadyExistsException.php000066400000000000000000000010121266465517700273250ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when someone tries to create an ACL for an object * identity that already has one. * * @author Johannes M. Schmitt */ class AclAlreadyExistsException extends Exception { } src/Symfony/Component/Security/Acl/Exception/AclNotFoundException.php000066400000000000000000000007751266465517700263170ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when we cannot locate an ACL for a passed * ObjectIdentity implementation. * * @author Johannes M. Schmitt */ class AclNotFoundException extends Exception { } src/Symfony/Component/Security/Acl/Exception/ConcurrentModificationException.php000066400000000000000000000010371266465517700306030ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown whenever you change shared properties of more than * one ACL of the same class type concurrently. * * @author Johannes M. Schmitt */ class ConcurrentModificationException extends Exception { } src/Symfony/Component/Security/Acl/Exception/Exception.php000066400000000000000000000006511266465517700242130ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * Base ACL exception. * * @author Johannes M. Schmitt */ class Exception extends \RuntimeException { } src/Symfony/Component/Security/Acl/Exception/InvalidDomainObjectException.php000066400000000000000000000010251266465517700277750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when ObjectIdentity fails to construct an object * identity from the passed domain object. * * @author Johannes M. Schmitt */ class InvalidDomainObjectException extends Exception { } src/Symfony/Component/Security/Acl/Exception/NoAceFoundException.php000066400000000000000000000012051266465517700261110ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when we cannot locate an ACE that matches the * combination of permission masks and security identities. * * @author Johannes M. Schmitt */ class NoAceFoundException extends Exception { public function __construct() { parent::__construct('No applicable ACE was found.'); } } src/Symfony/Component/Security/Acl/Exception/NotAllAclsFoundException.php000066400000000000000000000020441266465517700271220ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when you have requested ACLs for multiple object * identities, but the AclProvider implementation failed to find ACLs for all * identities. * * This exception contains the partial result. * * @author Johannes M. Schmitt */ class NotAllAclsFoundException extends AclNotFoundException { private $partialResult; /** * Sets the partial result. * * @param \SplObjectStorage $result */ public function setPartialResult(\SplObjectStorage $result) { $this->partialResult = $result; } /** * Returns the partial result. * * @return \SplObjectStorage */ public function getPartialResult() { return $this->partialResult; } } src/Symfony/Component/Security/Acl/Exception/SidNotLoadedException.php000066400000000000000000000010051266465517700264370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Exception; /** * This exception is thrown when ACEs for an SID are requested which has not * been loaded from the database. * * @author Johannes M. Schmitt */ class SidNotLoadedException extends Exception { } src/Symfony/Component/Security/Acl/LICENSE000066400000000000000000000020511266465517700206070ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Security/Acl/Model/000077500000000000000000000000001266465517700206445ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Model/AclCacheInterface.php000066400000000000000000000030141266465517700246170ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * AclCache Interface. * * @author Johannes M. Schmitt */ interface AclCacheInterface { /** * Removes an ACL from the cache. * * @param string $primaryKey a serialized primary key */ public function evictFromCacheById($primaryKey); /** * Removes an ACL from the cache. * * The ACL which is returned, must reference the passed object identity. * * @param ObjectIdentityInterface $oid */ public function evictFromCacheByIdentity(ObjectIdentityInterface $oid); /** * Retrieves an ACL for the given object identity primary key from the cache. * * @param int $primaryKey * * @return AclInterface */ public function getFromCacheById($primaryKey); /** * Retrieves an ACL for the given object identity from the cache. * * @param ObjectIdentityInterface $oid * * @return AclInterface */ public function getFromCacheByIdentity(ObjectIdentityInterface $oid); /** * Stores a new ACL in the cache. * * @param AclInterface $acl */ public function putInCache(AclInterface $acl); /** * Removes all ACLs from the cache. */ public function clearCache(); } src/Symfony/Component/Security/Acl/Model/AclInterface.php000066400000000000000000000057301266465517700237020ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; use Symfony\Component\Security\Acl\Exception\NoAceFoundException; /** * This interface represents an access control list (ACL) for a domain object. * Each domain object can have exactly one associated ACL. * * An ACL contains all access control entries (ACE) for a given domain object. * In order to avoid needing references to the domain object itself, implementations * use ObjectIdentity implementations as an additional level of indirection. * * @author Johannes M. Schmitt */ interface AclInterface extends \Serializable { /** * Returns all class-based ACEs associated with this ACL. * * @return array */ public function getClassAces(); /** * Returns all class-field-based ACEs associated with this ACL. * * @param string $field * * @return array */ public function getClassFieldAces($field); /** * Returns all object-based ACEs associated with this ACL. * * @return array */ public function getObjectAces(); /** * Returns all object-field-based ACEs associated with this ACL. * * @param string $field * * @return array */ public function getObjectFieldAces($field); /** * Returns the object identity associated with this ACL. * * @return ObjectIdentityInterface */ public function getObjectIdentity(); /** * Returns the parent ACL, or null if there is none. * * @return AclInterface|null */ public function getParentAcl(); /** * Whether this ACL is inheriting ACEs from a parent ACL. * * @return bool */ public function isEntriesInheriting(); /** * Determines whether field access is granted. * * @param string $field * @param array $masks * @param array $securityIdentities * @param bool $administrativeMode * * @return bool */ public function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false); /** * Determines whether access is granted. * * @param array $masks * @param array $securityIdentities * @param bool $administrativeMode * * @throws NoAceFoundException when no ACE was applicable for this request * * @return bool */ public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false); /** * Whether the ACL has loaded ACEs for all of the passed security identities. * * @param mixed $securityIdentities an implementation of SecurityIdentityInterface, or an array thereof * * @return bool */ public function isSidLoaded($securityIdentities); } src/Symfony/Component/Security/Acl/Model/AclProviderInterface.php000066400000000000000000000033541266465517700254150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; use Symfony\Component\Security\Acl\Exception\AclNotFoundException; /** * Provides a common interface for retrieving ACLs. * * @author Johannes M. Schmitt */ interface AclProviderInterface { /** * Retrieves all child object identities from the database. * * @param ObjectIdentityInterface $parentOid * @param bool $directChildrenOnly * * @return array returns an array of child 'ObjectIdentity's */ public function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false); /** * Returns the ACL that belongs to the given object identity. * * @param ObjectIdentityInterface $oid * @param SecurityIdentityInterface[] $sids * * @return AclInterface * * @throws AclNotFoundException when there is no ACL */ public function findAcl(ObjectIdentityInterface $oid, array $sids = array()); /** * Returns the ACLs that belong to the given object identities. * * @param ObjectIdentityInterface[] $oids an array of ObjectIdentityInterface implementations * @param SecurityIdentityInterface[] $sids an array of SecurityIdentityInterface implementations * * @return \SplObjectStorage mapping the passed object identities to ACLs * * @throws AclNotFoundException when we cannot find an ACL for all identities */ public function findAcls(array $oids, array $sids = array()); } src/Symfony/Component/Security/Acl/Model/AuditLoggerInterface.php000066400000000000000000000012641266465517700254070ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * Interface for audit loggers. * * @author Johannes M. Schmitt */ interface AuditLoggerInterface { /** * This method is called whenever access is granted, or denied, and * administrative mode is turned off. * * @param bool $granted * @param EntryInterface $ace */ public function logIfNeeded($granted, EntryInterface $ace); } src/Symfony/Component/Security/Acl/Model/AuditableAclInterface.php000066400000000000000000000030061266465517700255070ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * This interface adds auditing capabilities to the ACL. * * @author Johannes M. Schmitt */ interface AuditableAclInterface extends MutableAclInterface { /** * Updates auditing for class-based ACE. * * @param int $index * @param bool $auditSuccess * @param bool $auditFailure */ public function updateClassAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for class-field-based ACE. * * @param int $index * @param string $field * @param bool $auditSuccess * @param bool $auditFailure */ public function updateClassFieldAuditing($index, $field, $auditSuccess, $auditFailure); /** * Updates auditing for object-based ACE. * * @param int $index * @param bool $auditSuccess * @param bool $auditFailure */ public function updateObjectAuditing($index, $auditSuccess, $auditFailure); /** * Updates auditing for object-field-based ACE. * * @param int $index * @param string $field * @param bool $auditSuccess * @param bool $auditFailure */ public function updateObjectFieldAuditing($index, $field, $auditSuccess, $auditFailure); } src/Symfony/Component/Security/Acl/Model/AuditableEntryInterface.php000066400000000000000000000014041266465517700261110ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * ACEs can implement this interface if they support auditing capabilities. * * @author Johannes M. Schmitt */ interface AuditableEntryInterface extends EntryInterface { /** * Whether auditing for successful grants is turned on. * * @return bool */ public function isAuditFailure(); /** * Whether auditing for successful denies is turned on. * * @return bool */ public function isAuditSuccess(); } src/Symfony/Component/Security/Acl/Model/DomainObjectInterface.php000066400000000000000000000013101266465517700255270ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * This method can be implemented by domain objects which you want to store * ACLs for if they do not have a getId() method, or getId() does not return * a unique identifier. * * @author Johannes M. Schmitt */ interface DomainObjectInterface { /** * Returns a unique identifier for this domain object. * * @return string */ public function getObjectIdentifier(); } src/Symfony/Component/Security/Acl/Model/EntryInterface.php000066400000000000000000000025001266465517700242740ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * This class represents an individual entry in the ACL list. * * Instances MUST be immutable, as they are returned by the ACL and should not * allow client modification. * * @author Johannes M. Schmitt */ interface EntryInterface extends \Serializable { /** * The ACL this ACE is associated with. * * @return AclInterface */ public function getAcl(); /** * The primary key of this ACE. * * @return int */ public function getId(); /** * The permission mask of this ACE. * * @return int */ public function getMask(); /** * The security identity associated with this ACE. * * @return SecurityIdentityInterface */ public function getSecurityIdentity(); /** * The strategy for comparing masks. * * @return string */ public function getStrategy(); /** * Returns whether this ACE is granting, or denying. * * @return bool */ public function isGranting(); } src/Symfony/Component/Security/Acl/Model/FieldEntryInterface.php000066400000000000000000000011261266465517700252430ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * Interface for entries which are restricted to specific fields. * * @author Johannes M. Schmitt */ interface FieldEntryInterface extends EntryInterface { /** * Returns the field used for this entry. * * @return string */ public function getField(); } src/Symfony/Component/Security/Acl/Model/MutableAclInterface.php000066400000000000000000000107171266465517700252150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * This interface adds mutators for the AclInterface. * * All changes to Access Control Entries must go through this interface. Access * Control Entries must never be modified directly. * * @author Johannes M. Schmitt */ interface MutableAclInterface extends AclInterface { /** * Deletes a class-based ACE. * * @param int $index */ public function deleteClassAce($index); /** * Deletes a class-field-based ACE. * * @param int $index * @param string $field */ public function deleteClassFieldAce($index, $field); /** * Deletes an object-based ACE. * * @param int $index */ public function deleteObjectAce($index); /** * Deletes an object-field-based ACE. * * @param int $index * @param string $field */ public function deleteObjectFieldAce($index, $field); /** * Returns the primary key of this ACL. * * @return int */ public function getId(); /** * Inserts a class-based ACE. * * @param SecurityIdentityInterface $sid * @param int $mask * @param int $index * @param bool $granting * @param string $strategy */ public function insertClassAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts a class-field-based ACE. * * @param string $field * @param SecurityIdentityInterface $sid * @param int $mask * @param int $index * @param bool $granting * @param string $strategy */ public function insertClassFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts an object-based ACE. * * @param SecurityIdentityInterface $sid * @param int $mask * @param int $index * @param bool $granting * @param string $strategy */ public function insertObjectAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Inserts an object-field-based ACE. * * @param string $field * @param SecurityIdentityInterface $sid * @param int $mask * @param int $index * @param bool $granting * @param string $strategy */ public function insertObjectFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null); /** * Sets whether entries are inherited. * * @param bool $boolean */ public function setEntriesInheriting($boolean); /** * Sets the parent ACL. * * @param AclInterface|null $acl */ public function setParentAcl(AclInterface $acl = null); /** * Updates a class-based ACE. * * @param int $index * @param int $mask * @param string $strategy if null the strategy should not be changed */ public function updateClassAce($index, $mask, $strategy = null); /** * Updates a class-field-based ACE. * * @param int $index * @param string $field * @param int $mask * @param string $strategy if null the strategy should not be changed */ public function updateClassFieldAce($index, $field, $mask, $strategy = null); /** * Updates an object-based ACE. * * @param int $index * @param int $mask * @param string $strategy if null the strategy should not be changed */ public function updateObjectAce($index, $mask, $strategy = null); /** * Updates an object-field-based ACE. * * @param int $index * @param string $field * @param int $mask * @param string $strategy if null the strategy should not be changed */ public function updateObjectFieldAce($index, $field, $mask, $strategy = null); } src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php000066400000000000000000000030331266465517700267210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException; /** * Provides support for creating and storing ACL instances. * * @author Johannes M. Schmitt */ interface MutableAclProviderInterface extends AclProviderInterface { /** * Creates a new ACL for the given object identity. * * @param ObjectIdentityInterface $oid * * @throws AclAlreadyExistsException when there already is an ACL for the given * object identity * * @return MutableAclInterface */ public function createAcl(ObjectIdentityInterface $oid); /** * Deletes the ACL for a given object identity. * * This will automatically trigger a delete for any child ACLs. If you don't * want child ACLs to be deleted, you will have to set their parent ACL to null. * * @param ObjectIdentityInterface $oid */ public function deleteAcl(ObjectIdentityInterface $oid); /** * Persists any changes which were made to the ACL, or any associated * access control entries. * * Changes to parent ACLs are not persisted. * * @param MutableAclInterface $acl */ public function updateAcl(MutableAclInterface $acl); } src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php000066400000000000000000000025751266465517700261270ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * Represents the identity of an individual domain object instance. * * @author Johannes M. Schmitt */ interface ObjectIdentityInterface { /** * We specifically require this method so we can check for object equality * explicitly, and do not have to rely on referencial equality instead. * * Though in most cases, both checks should result in the same outcome. * * Referential Equality: $object1 === $object2 * Example for Object Equality: $object1->getId() === $object2->getId() * * @param ObjectIdentityInterface $identity * * @return bool */ public function equals(ObjectIdentityInterface $identity); /** * Obtains a unique identifier for this object. The identifier must not be * re-used for other objects with the same type. * * @return string cannot return null */ public function getIdentifier(); /** * Returns a type for the domain object. Typically, this is the PHP class name. * * @return string cannot return null */ public function getType(); } src/Symfony/Component/Security/Acl/Model/ObjectIdentityRetrievalStrategyInterface.php000066400000000000000000000012541266465517700315210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * Retrieves the object identity for a given domain object. * * @author Johannes M. Schmitt */ interface ObjectIdentityRetrievalStrategyInterface { /** * Retrieves the object identity from a domain object. * * @param object $domainObject * * @return ObjectIdentityInterface */ public function getObjectIdentity($domainObject); } src/Symfony/Component/Security/Acl/Model/PermissionGrantingStrategyInterface.php000066400000000000000000000023541266465517700305470ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * Interface used by permission granting implementations. * * @author Johannes M. Schmitt */ interface PermissionGrantingStrategyInterface { /** * Determines whether access to a domain object is to be granted. * * @param AclInterface $acl * @param array $masks * @param array $sids * @param bool $administrativeMode * * @return bool */ public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false); /** * Determines whether access to a domain object's field is to be granted. * * @param AclInterface $acl * @param string $field * @param array $masks * @param array $sids * @param bool $administrativeMode * * @return bool */ public function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false); } src/Symfony/Component/Security/Acl/Model/SecurityIdentityInterface.php000066400000000000000000000014671266465517700265270ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; /** * This interface provides an additional level of indirection, so that * we can work with abstracted versions of security objects and do * not have to save the entire objects. * * @author Johannes M. Schmitt */ interface SecurityIdentityInterface { /** * This method is used to compare two security identities in order to * not rely on referential equality. * * @param SecurityIdentityInterface $identity */ public function equals(SecurityIdentityInterface $identity); } src/Symfony/Component/Security/Acl/Model/SecurityIdentityRetrievalStrategyInterface.php000066400000000000000000000020101266465517700321110ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Model; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** * Interface for retrieving security identities from tokens. * * @author Johannes M. Schmitt */ interface SecurityIdentityRetrievalStrategyInterface { /** * Retrieves the available security identities for the given token. * * The order in which the security identities are returned is significant. * Typically, security identities should be ordered from most specific to * least specific. * * @param TokenInterface $token * * @return SecurityIdentityInterface[] An array of SecurityIdentityInterface implementations */ public function getSecurityIdentities(TokenInterface $token); } src/Symfony/Component/Security/Acl/Permission/000077500000000000000000000000001266465517700217345ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Permission/AbstractMaskBuilder.php000066400000000000000000000026771266465517700263470ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * This abstract class implements nearly all the MaskBuilderInterface methods. */ abstract class AbstractMaskBuilder implements MaskBuilderInterface { /** * @var int */ protected $mask; /** * Constructor. * * @param int $mask optional; defaults to 0 */ public function __construct($mask = 0) { $this->set($mask); } /** * {@inheritdoc} */ public function set($mask) { if (!is_int($mask)) { throw new \InvalidArgumentException('$mask must be an integer.'); } $this->mask = $mask; return $this; } /** * {@inheritdoc} */ public function get() { return $this->mask; } /** * {@inheritdoc} */ public function add($mask) { $this->mask |= $this->resolveMask($mask); return $this; } /** * {@inheritdoc} */ public function remove($mask) { $this->mask &= ~$this->resolveMask($mask); return $this; } /** * {@inheritdoc} */ public function reset() { $this->mask = 0; return $this; } } src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php000066400000000000000000000060531266465517700262010ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * This is basic permission map complements the masks which have been defined * on the standard implementation of the MaskBuilder. * * @author Johannes M. Schmitt */ class BasicPermissionMap implements PermissionMapInterface, MaskBuilderRetrievalInterface { const PERMISSION_VIEW = 'VIEW'; const PERMISSION_EDIT = 'EDIT'; const PERMISSION_CREATE = 'CREATE'; const PERMISSION_DELETE = 'DELETE'; const PERMISSION_UNDELETE = 'UNDELETE'; const PERMISSION_OPERATOR = 'OPERATOR'; const PERMISSION_MASTER = 'MASTER'; const PERMISSION_OWNER = 'OWNER'; protected $map; public function __construct() { $this->map = array( self::PERMISSION_VIEW => array( MaskBuilder::MASK_VIEW, MaskBuilder::MASK_EDIT, MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_EDIT => array( MaskBuilder::MASK_EDIT, MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_CREATE => array( MaskBuilder::MASK_CREATE, MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_DELETE => array( MaskBuilder::MASK_DELETE, MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_UNDELETE => array( MaskBuilder::MASK_UNDELETE, MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_OPERATOR => array( MaskBuilder::MASK_OPERATOR, MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_MASTER => array( MaskBuilder::MASK_MASTER, MaskBuilder::MASK_OWNER, ), self::PERMISSION_OWNER => array( MaskBuilder::MASK_OWNER, ), ); } /** * {@inheritdoc} */ public function getMasks($permission, $object) { if (!isset($this->map[$permission])) { return; } return $this->map[$permission]; } /** * {@inheritdoc} */ public function contains($permission) { return isset($this->map[$permission]); } /** * {@inheritdoc} */ public function getMaskBuilder() { return new MaskBuilder(); } } src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php000066400000000000000000000112011266465517700246420ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * This class allows you to build cumulative permissions easily, or convert * masks to a human-readable format. * * * $builder = new MaskBuilder(); * $builder * ->add('view') * ->add('create') * ->add('edit') * ; * var_dump($builder->get()); // int(7) * var_dump($builder->getPattern()); // string(32) ".............................ECV" * * * We have defined some commonly used base permissions which you can use: * - VIEW: the SID is allowed to view the domain object / field * - CREATE: the SID is allowed to create new instances of the domain object / fields * - EDIT: the SID is allowed to edit existing instances of the domain object / field * - DELETE: the SID is allowed to delete domain objects * - UNDELETE: the SID is allowed to recover domain objects from trash * - OPERATOR: the SID is allowed to perform any action on the domain object * except for granting others permissions * - MASTER: the SID is allowed to perform any action on the domain object, * and is allowed to grant other SIDs any permission except for * MASTER and OWNER permissions * - OWNER: the SID is owning the domain object in question and can perform any * action on the domain object as well as grant any permission * * @author Johannes M. Schmitt */ class MaskBuilder extends AbstractMaskBuilder { const MASK_VIEW = 1; // 1 << 0 const MASK_CREATE = 2; // 1 << 1 const MASK_EDIT = 4; // 1 << 2 const MASK_DELETE = 8; // 1 << 3 const MASK_UNDELETE = 16; // 1 << 4 const MASK_OPERATOR = 32; // 1 << 5 const MASK_MASTER = 64; // 1 << 6 const MASK_OWNER = 128; // 1 << 7 const MASK_IDDQD = 1073741823; // 1 << 0 | 1 << 1 | ... | 1 << 30 const CODE_VIEW = 'V'; const CODE_CREATE = 'C'; const CODE_EDIT = 'E'; const CODE_DELETE = 'D'; const CODE_UNDELETE = 'U'; const CODE_OPERATOR = 'O'; const CODE_MASTER = 'M'; const CODE_OWNER = 'N'; const ALL_OFF = '................................'; const OFF = '.'; const ON = '*'; /** * Returns a human-readable representation of the permission. * * @return string */ public function getPattern() { $pattern = self::ALL_OFF; $length = strlen($pattern); $bitmask = str_pad(decbin($this->mask), $length, '0', STR_PAD_LEFT); for ($i = $length - 1; $i >= 0; --$i) { if ('1' === $bitmask[$i]) { try { $pattern[$i] = self::getCode(1 << ($length - $i - 1)); } catch (\Exception $e) { $pattern[$i] = self::ON; } } } return $pattern; } /** * Returns the code for the passed mask. * * @param int $mask * * @throws \InvalidArgumentException * @throws \RuntimeException * * @return string */ public static function getCode($mask) { if (!is_int($mask)) { throw new \InvalidArgumentException('$mask must be an integer.'); } $reflection = new \ReflectionClass(get_called_class()); foreach ($reflection->getConstants() as $name => $cMask) { if (0 !== strpos($name, 'MASK_') || $mask !== $cMask) { continue; } if (!defined($cName = 'static::CODE_'.substr($name, 5))) { throw new \RuntimeException('There was no code defined for this mask.'); } return constant($cName); } throw new \InvalidArgumentException(sprintf('The mask "%d" is not supported.', $mask)); } /** * Returns the mask for the passed code. * * @param mixed $code * * @return int * * @throws \InvalidArgumentException */ public function resolveMask($code) { if (is_string($code)) { if (!defined($name = sprintf('static::MASK_%s', strtoupper($code)))) { throw new \InvalidArgumentException(sprintf('The code "%s" is not supported', $code)); } return constant($name); } if (!is_int($code)) { throw new \InvalidArgumentException('$code must be an integer.'); } return $code; } } src/Symfony/Component/Security/Acl/Permission/MaskBuilderInterface.php000066400000000000000000000027571266465517700265030ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * This is the interface that must be implemented by mask builders. */ interface MaskBuilderInterface { /** * Set the mask of this permission. * * @param int $mask * * @return MaskBuilderInterface * * @throws \InvalidArgumentException if $mask is not an integer */ public function set($mask); /** * Returns the mask of this permission. * * @return int */ public function get(); /** * Adds a mask to the permission. * * @param mixed $mask * * @return MaskBuilderInterface * * @throws \InvalidArgumentException */ public function add($mask); /** * Removes a mask from the permission. * * @param mixed $mask * * @return MaskBuilderInterface * * @throws \InvalidArgumentException */ public function remove($mask); /** * Resets the PermissionBuilder. * * @return MaskBuilderInterface */ public function reset(); /** * Returns the mask for the passed code. * * @param mixed $code * * @return int * * @throws \InvalidArgumentException */ public function resolveMask($code); } src/Symfony/Component/Security/Acl/Permission/MaskBuilderRetrievalInterface.php000066400000000000000000000010431266465517700303440ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * Retrieves the MaskBuilder. */ interface MaskBuilderRetrievalInterface { /** * Returns a new instance of the MaskBuilder used in the permissionMap. * * @return MaskBuilderInterface */ public function getMaskBuilder(); } src/Symfony/Component/Security/Acl/Permission/PermissionMapInterface.php000066400000000000000000000017761266465517700270670ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Permission; /** * This is the interface that must be implemented by permission maps. * * @author Johannes M. Schmitt */ interface PermissionMapInterface { /** * Returns an array of bitmasks. * * The security identity must have been granted access to at least one of * these bitmasks. * * @param string $permission * @param object $object * * @return array may return null if permission/object combination is not supported */ public function getMasks($permission, $object); /** * Whether this map contains the given permission. * * @param string $permission * * @return bool */ public function contains($permission); } src/Symfony/Component/Security/Acl/README.md000066400000000000000000000011361266465517700210640ustar00rootroot00000000000000Security Component - ACL (Access Control List) ============================================== 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/2.7/book/security.html Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/Acl/ $ composer.phar install --dev $ phpunit src/Symfony/Component/Security/Acl/Resources/000077500000000000000000000000001266465517700215565ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Resources/bin/000077500000000000000000000000001266465517700223265ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php000066400000000000000000000034441266465517700253160ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require_once __DIR__.'/../../../../ClassLoader/ClassLoader.php'; use Symfony\Component\ClassLoader\ClassLoader; use Symfony\Component\Finder\Finder; use Symfony\Component\Security\Acl\Dbal\Schema; $loader = new ClassLoader(); $loader->addPrefixes(array( 'Symfony' => __DIR__.'/../../../../../..', 'Doctrine\\Common' => __DIR__.'/../../../../../../../vendor/doctrine-common/lib', 'Doctrine\\DBAL\\Migrations' => __DIR__.'/../../../../../../../vendor/doctrine-migrations/lib', 'Doctrine\\DBAL' => __DIR__.'/../../../../../../../vendor/doctrine/dbal/lib', 'Doctrine' => __DIR__.'/../../../../../../../vendor/doctrine/lib', )); $loader->register(); $schema = new Schema(array( 'class_table_name' => 'acl_classes', 'entry_table_name' => 'acl_entries', 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', 'sid_table_name' => 'acl_security_identities', )); $reflection = new ReflectionClass('Doctrine\\DBAL\\Platforms\\AbstractPlatform'); $finder = new Finder(); $finder->name('*Platform.php')->in(dirname($reflection->getFileName())); foreach ($finder as $file) { require_once $file->getPathName(); $className = 'Doctrine\\DBAL\\Platforms\\'.$file->getBasename('.php'); $reflection = new ReflectionClass($className); if ($reflection->isAbstract()) { continue; } $platform = $reflection->newInstance(); $targetFile = sprintf(__DIR__.'/../schema/%s.sql', $platform->getName()); file_put_contents($targetFile, implode("\n\n", $schema->toSql($platform))); } src/Symfony/Component/Security/Acl/Resources/schema/000077500000000000000000000000001266465517700230165ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Resources/schema/db2.sql000066400000000000000000000061061266465517700242110ustar00rootroot00000000000000CREATE TABLE acl_classes (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, class_type VARCHAR(200) NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) CREATE TABLE acl_security_identities (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, identifier VARCHAR(200) NOT NULL, username SMALLINT NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) CREATE TABLE acl_object_identities (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, parent_object_identity_id INTEGER DEFAULT NULL, class_id INTEGER NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting SMALLINT NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id INTEGER NOT NULL, ancestor_id INTEGER NOT NULL, PRIMARY KEY(object_identity_id, ancestor_id)) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, class_id INTEGER NOT NULL, object_identity_id INTEGER DEFAULT NULL, security_identity_id INTEGER NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order SMALLINT NOT NULL, mask INTEGER NOT NULL, granting SMALLINT NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success SMALLINT NOT NULL, audit_failure SMALLINT NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id) ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/drizzle.sql000066400000000000000000000055261266465517700252320ustar00rootroot00000000000000CREATE TABLE acl_classes (id INT AUTO_INCREMENT NOT NULL, class_type VARCHAR(200) NOT NULL, UNIQUE INDEX UNIQ_69DD750638A36066 (class_type), PRIMARY KEY(id)) COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_security_identities (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(200) NOT NULL, username BOOLEAN NOT NULL, UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 (identifier, username), PRIMARY KEY(id)) COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_object_identities (id INT AUTO_INCREMENT NOT NULL, parent_object_identity_id INT DEFAULT NULL, class_id INT NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting BOOLEAN NOT NULL, UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 (object_identifier, class_id), INDEX IDX_9407E54977FA751A (parent_object_identity_id), PRIMARY KEY(id)) COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_object_identity_ancestors (object_identity_id INT NOT NULL, ancestor_id INT NOT NULL, INDEX IDX_825DE2993D9AB4A6 (object_identity_id), INDEX IDX_825DE299C671CEA1 (ancestor_id), PRIMARY KEY(object_identity_id, ancestor_id)) COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_entries (id INT AUTO_INCREMENT NOT NULL, class_id INT NOT NULL, object_identity_id INT DEFAULT NULL, security_identity_id INT NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order INT NOT NULL, mask INT NOT NULL, granting BOOLEAN NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success BOOLEAN NOT NULL, audit_failure BOOLEAN NOT NULL, UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 (class_id, object_identity_id, field_name, ace_order), INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 (class_id, object_identity_id, security_identity_id), INDEX IDX_46C8B806EA000B10 (class_id), INDEX IDX_46C8B8063D9AB4A6 (object_identity_id), INDEX IDX_46C8B806DF9183C9 (security_identity_id), PRIMARY KEY(id)) COLLATE utf8_unicode_ci ENGINE = InnoDB ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/mssql.sql000066400000000000000000000062031266465517700246770ustar00rootroot00000000000000CREATE TABLE acl_classes (id INT IDENTITY NOT NULL, class_type NVARCHAR(200) NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) WHERE class_type IS NOT NULL CREATE TABLE acl_security_identities (id INT IDENTITY NOT NULL, identifier NVARCHAR(200) NOT NULL, username BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) WHERE identifier IS NOT NULL AND username IS NOT NULL CREATE TABLE acl_object_identities (id INT IDENTITY NOT NULL, parent_object_identity_id INT, class_id INT NOT NULL, object_identifier NVARCHAR(100) NOT NULL, entries_inheriting BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) WHERE object_identifier IS NOT NULL AND class_id IS NOT NULL CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id INT NOT NULL, ancestor_id INT NOT NULL, PRIMARY KEY (object_identity_id, ancestor_id)) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id INT IDENTITY NOT NULL, class_id INT NOT NULL, object_identity_id INT, security_identity_id INT NOT NULL, field_name NVARCHAR(50), ace_order SMALLINT NOT NULL, mask INT NOT NULL, granting BIT NOT NULL, granting_strategy NVARCHAR(30) NOT NULL, audit_success BIT NOT NULL, audit_failure BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) WHERE class_id IS NOT NULL AND object_identity_id IS NOT NULL AND field_name IS NOT NULL AND ace_order IS NOT NULL CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id) ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/mysql.sql000066400000000000000000000061351266465517700247110ustar00rootroot00000000000000CREATE TABLE acl_classes (id INT UNSIGNED AUTO_INCREMENT NOT NULL, class_type VARCHAR(200) NOT NULL, UNIQUE INDEX UNIQ_69DD750638A36066 (class_type), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_security_identities (id INT UNSIGNED AUTO_INCREMENT NOT NULL, identifier VARCHAR(200) NOT NULL, username TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 (identifier, username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_object_identities (id INT UNSIGNED AUTO_INCREMENT NOT NULL, parent_object_identity_id INT UNSIGNED DEFAULT NULL, class_id INT UNSIGNED NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 (object_identifier, class_id), INDEX IDX_9407E54977FA751A (parent_object_identity_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_object_identity_ancestors (object_identity_id INT UNSIGNED NOT NULL, ancestor_id INT UNSIGNED NOT NULL, INDEX IDX_825DE2993D9AB4A6 (object_identity_id), INDEX IDX_825DE299C671CEA1 (ancestor_id), PRIMARY KEY(object_identity_id, ancestor_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB CREATE TABLE acl_entries (id INT UNSIGNED AUTO_INCREMENT NOT NULL, class_id INT UNSIGNED NOT NULL, object_identity_id INT UNSIGNED DEFAULT NULL, security_identity_id INT UNSIGNED NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order SMALLINT UNSIGNED NOT NULL, mask INT NOT NULL, granting TINYINT(1) NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success TINYINT(1) NOT NULL, audit_failure TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 (class_id, object_identity_id, field_name, ace_order), INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 (class_id, object_identity_id, security_identity_id), INDEX IDX_46C8B806EA000B10 (class_id), INDEX IDX_46C8B8063D9AB4A6 (object_identity_id), INDEX IDX_46C8B806DF9183C9 (security_identity_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/oracle.sql000066400000000000000000000165121266465517700250110ustar00rootroot00000000000000CREATE TABLE acl_classes (id NUMBER(10) NOT NULL, class_type VARCHAR2(200) NOT NULL, PRIMARY KEY(id)) DECLARE constraints_Count NUMBER; BEGIN SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'ACL_CLASSES' AND CONSTRAINT_TYPE = 'P'; IF constraints_Count = 0 OR constraints_Count = '' THEN EXECUTE IMMEDIATE 'ALTER TABLE ACL_CLASSES ADD CONSTRAINT ACL_CLASSES_AI_PK PRIMARY KEY (ID)'; END IF; END; CREATE SEQUENCE ACL_CLASSES_SEQ START WITH 1 MINVALUE 1 INCREMENT BY 1 CREATE TRIGGER ACL_CLASSES_AI_PK BEFORE INSERT ON ACL_CLASSES FOR EACH ROW DECLARE last_Sequence NUMBER; last_InsertID NUMBER; BEGIN SELECT ACL_CLASSES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; IF (:NEW.ID IS NULL OR :NEW.ID = 0) THEN SELECT ACL_CLASSES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; ELSE SELECT NVL(Last_Number, 0) INTO last_Sequence FROM User_Sequences WHERE Sequence_Name = 'ACL_CLASSES_SEQ'; SELECT :NEW.ID INTO last_InsertID FROM DUAL; WHILE (last_InsertID > last_Sequence) LOOP SELECT ACL_CLASSES_SEQ.NEXTVAL INTO last_Sequence FROM DUAL; END LOOP; END IF; END; CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) CREATE TABLE acl_security_identities (id NUMBER(10) NOT NULL, identifier VARCHAR2(200) NOT NULL, username NUMBER(1) NOT NULL, PRIMARY KEY(id)) DECLARE constraints_Count NUMBER; BEGIN SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'ACL_SECURITY_IDENTITIES' AND CONSTRAINT_TYPE = 'P'; IF constraints_Count = 0 OR constraints_Count = '' THEN EXECUTE IMMEDIATE 'ALTER TABLE ACL_SECURITY_IDENTITIES ADD CONSTRAINT ACL_SECURITY_IDENTITIES_AI_PK PRIMARY KEY (ID)'; END IF; END; CREATE SEQUENCE ACL_SECURITY_IDENTITIES_SEQ START WITH 1 MINVALUE 1 INCREMENT BY 1 CREATE TRIGGER ACL_SECURITY_IDENTITIES_AI_PK BEFORE INSERT ON ACL_SECURITY_IDENTITIES FOR EACH ROW DECLARE last_Sequence NUMBER; last_InsertID NUMBER; BEGIN SELECT ACL_SECURITY_IDENTITIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; IF (:NEW.ID IS NULL OR :NEW.ID = 0) THEN SELECT ACL_SECURITY_IDENTITIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; ELSE SELECT NVL(Last_Number, 0) INTO last_Sequence FROM User_Sequences WHERE Sequence_Name = 'ACL_SECURITY_IDENTITIES_SEQ'; SELECT :NEW.ID INTO last_InsertID FROM DUAL; WHILE (last_InsertID > last_Sequence) LOOP SELECT ACL_SECURITY_IDENTITIES_SEQ.NEXTVAL INTO last_Sequence FROM DUAL; END LOOP; END IF; END; CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) CREATE TABLE acl_object_identities (id NUMBER(10) NOT NULL, parent_object_identity_id NUMBER(10) DEFAULT NULL NULL, class_id NUMBER(10) NOT NULL, object_identifier VARCHAR2(100) NOT NULL, entries_inheriting NUMBER(1) NOT NULL, PRIMARY KEY(id)) DECLARE constraints_Count NUMBER; BEGIN SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'ACL_OBJECT_IDENTITIES' AND CONSTRAINT_TYPE = 'P'; IF constraints_Count = 0 OR constraints_Count = '' THEN EXECUTE IMMEDIATE 'ALTER TABLE ACL_OBJECT_IDENTITIES ADD CONSTRAINT ACL_OBJECT_IDENTITIES_AI_PK PRIMARY KEY (ID)'; END IF; END; CREATE SEQUENCE ACL_OBJECT_IDENTITIES_SEQ START WITH 1 MINVALUE 1 INCREMENT BY 1 CREATE TRIGGER ACL_OBJECT_IDENTITIES_AI_PK BEFORE INSERT ON ACL_OBJECT_IDENTITIES FOR EACH ROW DECLARE last_Sequence NUMBER; last_InsertID NUMBER; BEGIN SELECT ACL_OBJECT_IDENTITIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; IF (:NEW.ID IS NULL OR :NEW.ID = 0) THEN SELECT ACL_OBJECT_IDENTITIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; ELSE SELECT NVL(Last_Number, 0) INTO last_Sequence FROM User_Sequences WHERE Sequence_Name = 'ACL_OBJECT_IDENTITIES_SEQ'; SELECT :NEW.ID INTO last_InsertID FROM DUAL; WHILE (last_InsertID > last_Sequence) LOOP SELECT ACL_OBJECT_IDENTITIES_SEQ.NEXTVAL INTO last_Sequence FROM DUAL; END LOOP; END IF; END; CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id NUMBER(10) NOT NULL, ancestor_id NUMBER(10) NOT NULL, PRIMARY KEY(object_identity_id, ancestor_id)) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id NUMBER(10) NOT NULL, class_id NUMBER(10) NOT NULL, object_identity_id NUMBER(10) DEFAULT NULL NULL, security_identity_id NUMBER(10) NOT NULL, field_name VARCHAR2(50) DEFAULT NULL NULL, ace_order NUMBER(5) NOT NULL, mask NUMBER(10) NOT NULL, granting NUMBER(1) NOT NULL, granting_strategy VARCHAR2(30) NOT NULL, audit_success NUMBER(1) NOT NULL, audit_failure NUMBER(1) NOT NULL, PRIMARY KEY(id)) DECLARE constraints_Count NUMBER; BEGIN SELECT COUNT(CONSTRAINT_NAME) INTO constraints_Count FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'ACL_ENTRIES' AND CONSTRAINT_TYPE = 'P'; IF constraints_Count = 0 OR constraints_Count = '' THEN EXECUTE IMMEDIATE 'ALTER TABLE ACL_ENTRIES ADD CONSTRAINT ACL_ENTRIES_AI_PK PRIMARY KEY (ID)'; END IF; END; CREATE SEQUENCE ACL_ENTRIES_SEQ START WITH 1 MINVALUE 1 INCREMENT BY 1 CREATE TRIGGER ACL_ENTRIES_AI_PK BEFORE INSERT ON ACL_ENTRIES FOR EACH ROW DECLARE last_Sequence NUMBER; last_InsertID NUMBER; BEGIN SELECT ACL_ENTRIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; IF (:NEW.ID IS NULL OR :NEW.ID = 0) THEN SELECT ACL_ENTRIES_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; ELSE SELECT NVL(Last_Number, 0) INTO last_Sequence FROM User_Sequences WHERE Sequence_Name = 'ACL_ENTRIES_SEQ'; SELECT :NEW.ID INTO last_InsertID FROM DUAL; WHILE (last_InsertID > last_Sequence) LOOP SELECT ACL_ENTRIES_SEQ.NEXTVAL INTO last_Sequence FROM DUAL; END LOOP; END IF; END; CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id) ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/postgresql.sql000066400000000000000000000061531266465517700257470ustar00rootroot00000000000000CREATE TABLE acl_classes (id SERIAL NOT NULL, class_type VARCHAR(200) NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) CREATE TABLE acl_security_identities (id SERIAL NOT NULL, identifier VARCHAR(200) NOT NULL, username BOOLEAN NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) CREATE TABLE acl_object_identities (id SERIAL NOT NULL, parent_object_identity_id INT DEFAULT NULL, class_id INT NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting BOOLEAN NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id INT NOT NULL, ancestor_id INT NOT NULL, PRIMARY KEY(object_identity_id, ancestor_id)) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id SERIAL NOT NULL, class_id INT NOT NULL, object_identity_id INT DEFAULT NULL, security_identity_id INT NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order SMALLINT NOT NULL, mask INT NOT NULL, granting BOOLEAN NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success BOOLEAN NOT NULL, audit_failure BOOLEAN NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id) ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) NOT DEFERRABLE INITIALLY IMMEDIATE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATEsrc/Symfony/Component/Security/Acl/Resources/schema/sqlanywhere.sql000066400000000000000000000060161266465517700261040ustar00rootroot00000000000000CREATE TABLE acl_classes (id UNSIGNED INT IDENTITY NOT NULL, class_type VARCHAR(200) NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) CREATE TABLE acl_security_identities (id UNSIGNED INT IDENTITY NOT NULL, identifier VARCHAR(200) NOT NULL, username BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) CREATE TABLE acl_object_identities (id UNSIGNED INT IDENTITY NOT NULL, parent_object_identity_id UNSIGNED INT DEFAULT NULL, class_id UNSIGNED INT NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id UNSIGNED INT NOT NULL, ancestor_id UNSIGNED INT NOT NULL, PRIMARY KEY (object_identity_id, ancestor_id)) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id UNSIGNED INT IDENTITY NOT NULL, class_id UNSIGNED INT NOT NULL, object_identity_id UNSIGNED INT DEFAULT NULL, security_identity_id UNSIGNED INT NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order UNSIGNED SMALLINT NOT NULL, mask INT NOT NULL, granting BIT NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success BIT NOT NULL, audit_failure BIT NOT NULL, PRIMARY KEY (id)) CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id) ALTER TABLE acl_object_identities ADD CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_object_identity_ancestors ADD CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON UPDATE CASCADE ON DELETE CASCADE ALTER TABLE acl_entries ADD CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON UPDATE CASCADE ON DELETE CASCADEsrc/Symfony/Component/Security/Acl/Resources/schema/sqlite.sql000066400000000000000000000056471266465517700250540ustar00rootroot00000000000000CREATE TABLE acl_classes (id INTEGER NOT NULL, class_type VARCHAR(200) NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_69DD750638A36066 ON acl_classes (class_type) CREATE TABLE acl_security_identities (id INTEGER NOT NULL, identifier VARCHAR(200) NOT NULL, username BOOLEAN NOT NULL, PRIMARY KEY(id)) CREATE UNIQUE INDEX UNIQ_8835EE78772E836AF85E0677 ON acl_security_identities (identifier, username) CREATE TABLE acl_object_identities (id INTEGER NOT NULL, parent_object_identity_id INTEGER UNSIGNED DEFAULT NULL, class_id INTEGER UNSIGNED NOT NULL, object_identifier VARCHAR(100) NOT NULL, entries_inheriting BOOLEAN NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_9407E54977FA751A FOREIGN KEY (parent_object_identity_id) REFERENCES acl_object_identities (id) NOT DEFERRABLE INITIALLY IMMEDIATE) CREATE UNIQUE INDEX UNIQ_9407E5494B12AD6EA000B10 ON acl_object_identities (object_identifier, class_id) CREATE INDEX IDX_9407E54977FA751A ON acl_object_identities (parent_object_identity_id) CREATE TABLE acl_object_identity_ancestors (object_identity_id INTEGER UNSIGNED NOT NULL, ancestor_id INTEGER UNSIGNED NOT NULL, PRIMARY KEY(object_identity_id, ancestor_id), CONSTRAINT FK_825DE2993D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_825DE299C671CEA1 FOREIGN KEY (ancestor_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) CREATE INDEX IDX_825DE2993D9AB4A6 ON acl_object_identity_ancestors (object_identity_id) CREATE INDEX IDX_825DE299C671CEA1 ON acl_object_identity_ancestors (ancestor_id) CREATE TABLE acl_entries (id INTEGER NOT NULL, class_id INTEGER UNSIGNED NOT NULL, object_identity_id INTEGER UNSIGNED DEFAULT NULL, security_identity_id INTEGER UNSIGNED NOT NULL, field_name VARCHAR(50) DEFAULT NULL, ace_order SMALLINT UNSIGNED NOT NULL, mask INTEGER NOT NULL, granting BOOLEAN NOT NULL, granting_strategy VARCHAR(30) NOT NULL, audit_success BOOLEAN NOT NULL, audit_failure BOOLEAN NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_46C8B806EA000B10 FOREIGN KEY (class_id) REFERENCES acl_classes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_46C8B8063D9AB4A6 FOREIGN KEY (object_identity_id) REFERENCES acl_object_identities (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_46C8B806DF9183C9 FOREIGN KEY (security_identity_id) REFERENCES acl_security_identities (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE) CREATE UNIQUE INDEX UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4 ON acl_entries (class_id, object_identity_id, field_name, ace_order) CREATE INDEX IDX_46C8B806EA000B103D9AB4A6DF9183C9 ON acl_entries (class_id, object_identity_id, security_identity_id) CREATE INDEX IDX_46C8B806EA000B10 ON acl_entries (class_id) CREATE INDEX IDX_46C8B8063D9AB4A6 ON acl_entries (object_identity_id) CREATE INDEX IDX_46C8B806DF9183C9 ON acl_entries (security_identity_id)src/Symfony/Component/Security/Acl/Tests/000077500000000000000000000000001266465517700207065ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Tests/Dbal/000077500000000000000000000000001266465517700215505ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderBenchmarkTest.php000066400000000000000000000203201266465517700271430ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Dbal; use Symfony\Component\Security\Acl\Dbal\AclProvider; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Dbal\Schema; use Doctrine\DBAL\DriverManager; /** * @group benchmark */ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase { /** @var \Doctrine\DBAL\Connection */ protected $con; protected $insertClassStmt; protected $insertSidStmt; protected $insertOidAncestorStmt; protected $insertOidStmt; protected $insertEntryStmt; protected function setUp() { try { $this->con = DriverManager::getConnection(array( 'driver' => 'pdo_mysql', 'host' => 'localhost', 'user' => 'root', 'dbname' => 'testdb', )); $this->con->connect(); } catch (\Exception $e) { $this->markTestSkipped('Unable to connect to the database: '.$e->getMessage()); } } protected function tearDown() { $this->con = null; } public function testFindAcls() { // $this->generateTestData(); // get some random test object identities from the database $oids = array(); $stmt = $this->con->executeQuery('SELECT object_identifier, class_type FROM acl_object_identities o INNER JOIN acl_classes c ON c.id = o.class_id ORDER BY RAND() LIMIT 25'); foreach ($stmt->fetchAll() as $oid) { $oids[] = new ObjectIdentity($oid['object_identifier'], $oid['class_type']); } $provider = $this->getProvider(); $start = microtime(true); $provider->findAcls($oids); $time = microtime(true) - $start; echo 'Total Time: '.$time."s\n"; } /** * This generates a huge amount of test data to be used mainly for benchmarking * purposes, not so much for testing. That's why it's not called by default. */ protected function generateTestData() { $sm = $this->con->getSchemaManager(); $sm->dropAndCreateDatabase('testdb'); $this->con->exec('USE testdb'); // import the schema $schema = new Schema($options = $this->getOptions()); foreach ($schema->toSql($this->con->getDatabasePlatform()) as $sql) { $this->con->exec($sql); } // setup prepared statements $this->insertClassStmt = $this->con->prepare('INSERT INTO acl_classes (id, class_type) VALUES (?, ?)'); $this->insertSidStmt = $this->con->prepare('INSERT INTO acl_security_identities (id, identifier, username) VALUES (?, ?, ?)'); $this->insertOidStmt = $this->con->prepare('INSERT INTO acl_object_identities (id, class_id, object_identifier, parent_object_identity_id, entries_inheriting) VALUES (?, ?, ?, ?, ?)'); $this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); $this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)'); for ($i = 0; $i < 40000; ++$i) { $this->generateAclHierarchy(); } } protected function generateAclHierarchy() { $rootId = $this->generateAcl($this->chooseClassId(), null, array()); $this->generateAclLevel(rand(1, 15), $rootId, array($rootId)); } protected function generateAclLevel($depth, $parentId, $ancestors) { $level = count($ancestors); for ($i = 0, $t = rand(1, 10); $i < $t; ++$i) { $id = $this->generateAcl($this->chooseClassId(), $parentId, $ancestors); if ($level < $depth) { $this->generateAclLevel($depth, $id, array_merge($ancestors, array($id))); } } } protected function chooseClassId() { static $id = 1000; if ($id === 1000 || ($id < 1500 && rand(0, 1))) { $this->insertClassStmt->execute(array($id, $this->getRandomString(rand(20, 100), 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\\_'))); ++$id; return $id - 1; } else { return rand(1000, $id - 1); } } protected function generateAcl($classId, $parentId, $ancestors) { static $id = 1000; $this->insertOidStmt->execute(array( $id, $classId, $this->getRandomString(rand(20, 50)), $parentId, rand(0, 1), )); $this->insertOidAncestorStmt->execute(array($id, $id)); foreach ($ancestors as $ancestor) { $this->insertOidAncestorStmt->execute(array($id, $ancestor)); } $this->generateAces($classId, $id); ++$id; return $id - 1; } protected function chooseSid() { static $id = 1000; if ($id === 1000 || ($id < 11000 && rand(0, 1))) { $this->insertSidStmt->execute(array( $id, $this->getRandomString(rand(5, 30)), rand(0, 1), )); ++$id; return $id - 1; } else { return rand(1000, $id - 1); } } protected function generateAces($classId, $objectId) { static $id = 1000; $sids = array(); $fieldOrder = array(); for ($i = 0; $i <= 30; ++$i) { $fieldName = rand(0, 1) ? null : $this->getRandomString(rand(10, 20)); do { $sid = $this->chooseSid(); } while (array_key_exists($sid, $sids) && in_array($fieldName, $sids[$sid], true)); $fieldOrder[$fieldName] = array_key_exists($fieldName, $fieldOrder) ? $fieldOrder[$fieldName] + 1 : 0; if (!isset($sids[$sid])) { $sids[$sid] = array(); } $sids[$sid][] = $fieldName; $strategy = rand(0, 2); if ($strategy === 0) { $strategy = PermissionGrantingStrategy::ALL; } elseif ($strategy === 1) { $strategy = PermissionGrantingStrategy::ANY; } else { $strategy = PermissionGrantingStrategy::EQUAL; } // id, cid, oid, field, order, sid, mask, granting, strategy, a success, a failure $this->insertEntryStmt->execute(array( $id, $classId, rand(0, 5) ? $objectId : null, $fieldName, $fieldOrder[$fieldName], $sid, $this->generateMask(), rand(0, 1), $strategy, rand(0, 1), rand(0, 1), )); ++$id; } } protected function generateMask() { $i = rand(1, 30); $mask = 0; while ($i <= 30) { $mask |= 1 << rand(0, 30); ++$i; } return $mask; } protected function getRandomString($length, $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') { $s = ''; $cLength = strlen($chars); while (strlen($s) < $length) { $s .= $chars[mt_rand(0, $cLength - 1)]; } return $s; } protected function getOptions() { return array( 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', 'class_table_name' => 'acl_classes', 'sid_table_name' => 'acl_security_identities', 'entry_table_name' => 'acl_entries', ); } protected function getStrategy() { return new PermissionGrantingStrategy(); } protected function getProvider() { return new AclProvider($this->con, $this->getStrategy(), $this->getOptions()); } } src/Symfony/Component/Security/Acl/Tests/Dbal/AclProviderTest.php000066400000000000000000000234311266465517700253360ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Dbal; use Symfony\Component\Security\Acl\Dbal\AclProvider; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Dbal\Schema; use Doctrine\DBAL\DriverManager; /** * @requires extension pdo_sqlite */ class AclProviderTest extends \PHPUnit_Framework_TestCase { protected $con; protected $insertClassStmt; protected $insertEntryStmt; protected $insertOidStmt; protected $insertOidAncestorStmt; protected $insertSidStmt; /** * @expectedException \Symfony\Component\Security\Acl\Exception\AclNotFoundException * @expectedMessage There is no ACL for the given object identity. */ public function testFindAclThrowsExceptionWhenNoAclExists() { $this->getProvider()->findAcl(new ObjectIdentity('foo', 'foo')); } public function testFindAclsThrowsExceptionUnlessAnACLIsFoundForEveryOID() { $oids = array(); $oids[] = new ObjectIdentity('1', 'foo'); $oids[] = new ObjectIdentity('foo', 'foo'); try { $this->getProvider()->findAcls($oids); $this->fail('Provider did not throw an expected exception.'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Security\Acl\Exception\AclNotFoundException', $e); $this->assertInstanceOf('Symfony\Component\Security\Acl\Exception\NotAllAclsFoundException', $e); $partialResult = $e->getPartialResult(); $this->assertTrue($partialResult->contains($oids[0])); $this->assertFalse($partialResult->contains($oids[1])); } } public function testFindAcls() { $oids = array(); $oids[] = new ObjectIdentity('1', 'foo'); $oids[] = new ObjectIdentity('2', 'foo'); $provider = $this->getProvider(); $acls = $provider->findAcls($oids); $this->assertInstanceOf('SplObjectStorage', $acls); $this->assertCount(2, $acls); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl0 = $acls->offsetGet($oids[0])); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl1 = $acls->offsetGet($oids[1])); $this->assertTrue($oids[0]->equals($acl0->getObjectIdentity())); $this->assertTrue($oids[1]->equals($acl1->getObjectIdentity())); } public function testFindAclsWithDifferentTypes() { $oids = array(); $oids[] = new ObjectIdentity('123', 'Bundle\SomeVendor\MyBundle\Entity\SomeEntity'); $oids[] = new ObjectIdentity('123', 'Bundle\MyBundle\Entity\AnotherEntity'); $provider = $this->getProvider(); $acls = $provider->findAcls($oids); $this->assertInstanceOf('SplObjectStorage', $acls); $this->assertCount(2, $acls); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl0 = $acls->offsetGet($oids[0])); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl1 = $acls->offsetGet($oids[1])); $this->assertTrue($oids[0]->equals($acl0->getObjectIdentity())); $this->assertTrue($oids[1]->equals($acl1->getObjectIdentity())); } public function testFindAclCachesAclInMemory() { $oid = new ObjectIdentity('1', 'foo'); $provider = $this->getProvider(); $acl = $provider->findAcl($oid); $this->assertSame($acl, $cAcl = $provider->findAcl($oid)); $cAces = $cAcl->getObjectAces(); foreach ($acl->getObjectAces() as $index => $ace) { $this->assertSame($ace, $cAces[$index]); } } public function testFindAcl() { $oid = new ObjectIdentity('1', 'foo'); $provider = $this->getProvider(); $acl = $provider->findAcl($oid); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl); $this->assertTrue($oid->equals($acl->getObjectIdentity())); $this->assertEquals(4, $acl->getId()); $this->assertCount(0, $acl->getClassAces()); $this->assertCount(0, $this->getField($acl, 'classFieldAces')); $this->assertCount(3, $acl->getObjectAces()); $this->assertCount(0, $this->getField($acl, 'objectFieldAces')); $aces = $acl->getObjectAces(); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Entry', $aces[0]); $this->assertTrue($aces[0]->isGranting()); $this->assertTrue($aces[0]->isAuditSuccess()); $this->assertTrue($aces[0]->isAuditFailure()); $this->assertEquals('all', $aces[0]->getStrategy()); $this->assertSame(2, $aces[0]->getMask()); // check ACE are in correct order $i = 0; foreach ($aces as $index => $ace) { $this->assertEquals($i, $index); ++$i; } $sid = $aces[0]->getSecurityIdentity(); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\UserSecurityIdentity', $sid); $this->assertEquals('john.doe', $sid->getUsername()); $this->assertEquals('SomeClass', $sid->getClass()); } protected function setUp() { $this->con = DriverManager::getConnection(array( 'driver' => 'pdo_sqlite', 'memory' => true, )); // import the schema $schema = new Schema($options = $this->getOptions()); foreach ($schema->toSql($this->con->getDatabasePlatform()) as $sql) { $this->con->exec($sql); } // populate the schema with some test data $this->insertClassStmt = $this->con->prepare('INSERT INTO acl_classes (id, class_type) VALUES (?, ?)'); foreach ($this->getClassData() as $data) { $this->insertClassStmt->execute($data); } $this->insertSidStmt = $this->con->prepare('INSERT INTO acl_security_identities (id, identifier, username) VALUES (?, ?, ?)'); foreach ($this->getSidData() as $data) { $this->insertSidStmt->execute($data); } $this->insertOidStmt = $this->con->prepare('INSERT INTO acl_object_identities (id, class_id, object_identifier, parent_object_identity_id, entries_inheriting) VALUES (?, ?, ?, ?, ?)'); foreach ($this->getOidData() as $data) { $this->insertOidStmt->execute($data); } $this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); foreach ($this->getEntryData() as $data) { $this->insertEntryStmt->execute($data); } $this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)'); foreach ($this->getOidAncestorData() as $data) { $this->insertOidAncestorStmt->execute($data); } } protected function tearDown() { $this->con = null; } protected function getField($object, $field) { $reflection = new \ReflectionProperty($object, $field); $reflection->setAccessible(true); return $reflection->getValue($object); } protected function getEntryData() { // id, cid, oid, field, order, sid, mask, granting, strategy, a success, a failure return array( array(1, 1, 1, null, 0, 1, 1, 1, 'all', 1, 1), array(2, 1, 1, null, 1, 2, 1 << 2 | 1 << 1, 0, 'any', 0, 0), array(3, 3, 4, null, 0, 1, 2, 1, 'all', 1, 1), array(4, 3, 4, null, 2, 2, 1, 1, 'all', 1, 1), array(5, 3, 4, null, 1, 3, 1, 1, 'all', 1, 1), ); } protected function getOidData() { // id, cid, oid, parent_oid, entries_inheriting return array( array(1, 1, '123', null, 1), array(2, 2, '123', 1, 1), array(3, 2, 'i:3:123', 1, 1), array(4, 3, '1', 2, 1), array(5, 3, '2', 2, 1), ); } protected function getOidAncestorData() { return array( array(1, 1), array(2, 1), array(2, 2), array(3, 1), array(3, 3), array(4, 2), array(4, 1), array(4, 4), array(5, 2), array(5, 1), array(5, 5), ); } protected function getSidData() { return array( array(1, 'SomeClass-john.doe', 1), array(2, 'MyClass-john.doe@foo.com', 1), array(3, 'FooClass-123', 1), array(4, 'MooClass-ROLE_USER', 1), array(5, 'ROLE_USER', 0), array(6, 'IS_AUTHENTICATED_FULLY', 0), ); } protected function getClassData() { return array( array(1, 'Bundle\SomeVendor\MyBundle\Entity\SomeEntity'), array(2, 'Bundle\MyBundle\Entity\AnotherEntity'), array(3, 'foo'), ); } protected function getOptions() { return array( 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', 'class_table_name' => 'acl_classes', 'sid_table_name' => 'acl_security_identities', 'entry_table_name' => 'acl_entries', ); } protected function getStrategy() { return new PermissionGrantingStrategy(); } protected function getProvider() { return new AclProvider($this->con, $this->getStrategy(), $this->getOptions()); } } src/Symfony/Component/Security/Acl/Tests/Dbal/MutableAclProviderTest.php000066400000000000000000000527751266465517700266650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Dbal; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Model\FieldEntryInterface; use Symfony\Component\Security\Acl\Model\AuditableEntryInterface; use Symfony\Component\Security\Acl\Model\EntryInterface; use Symfony\Component\Security\Acl\Domain\Entry; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Exception\AclNotFoundException; use Symfony\Component\Security\Acl\Exception\ConcurrentModificationException; use Symfony\Component\Security\Acl\Dbal\AclProvider; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Dbal\MutableAclProvider; use Symfony\Component\Security\Acl\Dbal\Schema; use Doctrine\DBAL\DriverManager; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; /** * @requires extension pdo_sqlite */ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase { protected $con; public static function assertAceEquals(EntryInterface $a, EntryInterface $b) { self::assertInstanceOf(get_class($a), $b); foreach (array('getId', 'getMask', 'getStrategy', 'isGranting') as $getter) { self::assertSame($a->$getter(), $b->$getter()); } self::assertTrue($a->getSecurityIdentity()->equals($b->getSecurityIdentity())); self::assertSame($a->getAcl()->getId(), $b->getAcl()->getId()); if ($a instanceof AuditableEntryInterface) { self::assertSame($a->isAuditSuccess(), $b->isAuditSuccess()); self::assertSame($a->isAuditFailure(), $b->isAuditFailure()); } if ($a instanceof FieldEntryInterface) { self::assertSame($a->getField(), $b->getField()); } } /** * @expectedException \Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException */ public function testCreateAclThrowsExceptionWhenAclAlreadyExists() { $provider = $this->getProvider(); $oid = new ObjectIdentity('123456', 'FOO'); $provider->createAcl($oid); $provider->createAcl($oid); } public function testCreateAcl() { $provider = $this->getProvider(); $oid = new ObjectIdentity('123456', 'FOO'); $acl = $provider->createAcl($oid); $cachedAcl = $provider->findAcl($oid); $this->assertInstanceOf('Symfony\Component\Security\Acl\Domain\Acl', $acl); $this->assertSame($acl, $cachedAcl); $this->assertTrue($acl->getObjectIdentity()->equals($oid)); } public function testDeleteAcl() { $provider = $this->getProvider(); $oid = new ObjectIdentity(1, 'Foo'); $acl = $provider->createAcl($oid); $provider->deleteAcl($oid); $loadedAcls = $this->getField($provider, 'loadedAcls'); $this->assertCount(0, $loadedAcls['Foo']); try { $provider->findAcl($oid); $this->fail('ACL has not been properly deleted.'); } catch (AclNotFoundException $e) { } } public function testDeleteAclDeletesChildren() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $parentAcl = $provider->createAcl(new ObjectIdentity(2, 'Foo')); $acl->setParentAcl($parentAcl); $provider->updateAcl($acl); $provider->deleteAcl($parentAcl->getObjectIdentity()); try { $provider->findAcl(new ObjectIdentity(1, 'Foo')); $this->fail('Child-ACLs have not been deleted.'); } catch (AclNotFoundException $e) { } } public function testFindAclsAddsPropertyListener() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $propertyChanges = $this->getField($provider, 'propertyChanges'); $this->assertCount(1, $propertyChanges); $this->assertTrue($propertyChanges->contains($acl)); $this->assertEquals(array(), $propertyChanges->offsetGet($acl)); $listeners = $this->getField($acl, 'listeners'); $this->assertSame($provider, $listeners[0]); } public function testFindAclsAddsPropertyListenerOnlyOnce() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $acl = $provider->findAcl(new ObjectIdentity(1, 'Foo')); $propertyChanges = $this->getField($provider, 'propertyChanges'); $this->assertCount(1, $propertyChanges); $this->assertTrue($propertyChanges->contains($acl)); $this->assertEquals(array(), $propertyChanges->offsetGet($acl)); $listeners = $this->getField($acl, 'listeners'); $this->assertCount(1, $listeners); $this->assertSame($provider, $listeners[0]); } public function testFindAclsAddsPropertyListenerToParentAcls() { $provider = $this->getProvider(); $this->importAcls($provider, array( 'main' => array( 'object_identifier' => '1', 'class_type' => 'foo', 'parent_acl' => 'parent', ), 'parent' => array( 'object_identifier' => '1', 'class_type' => 'anotherFoo', ), )); $propertyChanges = $this->getField($provider, 'propertyChanges'); $this->assertCount(0, $propertyChanges); $acl = $provider->findAcl(new ObjectIdentity('1', 'foo')); $this->assertCount(2, $propertyChanges); $this->assertTrue($propertyChanges->contains($acl)); $this->assertTrue($propertyChanges->contains($acl->getParentAcl())); } /** * @expectedException \InvalidArgumentException */ public function testPropertyChangedDoesNotTrackUnmanagedAcls() { $provider = $this->getProvider(); $acl = new Acl(1, new ObjectIdentity(1, 'foo'), new PermissionGrantingStrategy(), array(), false); $provider->propertyChanged($acl, 'classAces', array(), array('foo')); } public function testPropertyChangedTracksChangesToAclProperties() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $propertyChanges = $this->getField($provider, 'propertyChanges'); $provider->propertyChanged($acl, 'entriesInheriting', false, true); $changes = $propertyChanges->offsetGet($acl); $this->assertTrue(isset($changes['entriesInheriting'])); $this->assertFalse($changes['entriesInheriting'][0]); $this->assertTrue($changes['entriesInheriting'][1]); $provider->propertyChanged($acl, 'entriesInheriting', true, false); $provider->propertyChanged($acl, 'entriesInheriting', false, true); $provider->propertyChanged($acl, 'entriesInheriting', true, false); $changes = $propertyChanges->offsetGet($acl); $this->assertFalse(isset($changes['entriesInheriting'])); } public function testPropertyChangedTracksChangesToAceProperties() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $ace = new Entry(1, $acl, new UserSecurityIdentity('foo', 'FooClass'), 'all', 1, true, true, true); $ace2 = new Entry(2, $acl, new UserSecurityIdentity('foo', 'FooClass'), 'all', 1, true, true, true); $propertyChanges = $this->getField($provider, 'propertyChanges'); $provider->propertyChanged($ace, 'mask', 1, 3); $changes = $propertyChanges->offsetGet($acl); $this->assertTrue(isset($changes['aces'])); $this->assertInstanceOf('\SplObjectStorage', $changes['aces']); $this->assertTrue($changes['aces']->contains($ace)); $aceChanges = $changes['aces']->offsetGet($ace); $this->assertTrue(isset($aceChanges['mask'])); $this->assertEquals(1, $aceChanges['mask'][0]); $this->assertEquals(3, $aceChanges['mask'][1]); $provider->propertyChanged($ace, 'strategy', 'all', 'any'); $changes = $propertyChanges->offsetGet($acl); $this->assertTrue(isset($changes['aces'])); $this->assertInstanceOf('\SplObjectStorage', $changes['aces']); $this->assertTrue($changes['aces']->contains($ace)); $aceChanges = $changes['aces']->offsetGet($ace); $this->assertTrue(isset($aceChanges['mask'])); $this->assertTrue(isset($aceChanges['strategy'])); $this->assertEquals('all', $aceChanges['strategy'][0]); $this->assertEquals('any', $aceChanges['strategy'][1]); $provider->propertyChanged($ace, 'mask', 3, 1); $changes = $propertyChanges->offsetGet($acl); $aceChanges = $changes['aces']->offsetGet($ace); $this->assertFalse(isset($aceChanges['mask'])); $this->assertTrue(isset($aceChanges['strategy'])); $provider->propertyChanged($ace2, 'mask', 1, 3); $provider->propertyChanged($ace, 'strategy', 'any', 'all'); $changes = $propertyChanges->offsetGet($acl); $this->assertTrue(isset($changes['aces'])); $this->assertFalse($changes['aces']->contains($ace)); $this->assertTrue($changes['aces']->contains($ace2)); $provider->propertyChanged($ace2, 'mask', 3, 4); $provider->propertyChanged($ace2, 'mask', 4, 1); $changes = $propertyChanges->offsetGet($acl); $this->assertFalse(isset($changes['aces'])); } /** * @expectedException \InvalidArgumentException */ public function testUpdateAclDoesNotAcceptUntrackedAcls() { $provider = $this->getProvider(); $acl = new Acl(1, new ObjectIdentity(1, 'Foo'), new PermissionGrantingStrategy(), array(), true); $provider->updateAcl($acl); } public function testUpdateDoesNothingWhenThereAreNoChanges() { $con = $this->getMock('Doctrine\DBAL\Connection', array(), array(), '', false); $con ->expects($this->never()) ->method('beginTransaction') ; $con ->expects($this->never()) ->method('executeQuery') ; $provider = new MutableAclProvider($con, new PermissionGrantingStrategy(), array()); $acl = new Acl(1, new ObjectIdentity(1, 'Foo'), new PermissionGrantingStrategy(), array(), true); $propertyChanges = $this->getField($provider, 'propertyChanges'); $propertyChanges->offsetSet($acl, array()); $provider->updateAcl($acl); } public function testUpdateAclThrowsExceptionOnConcurrentModificationOfSharedProperties() { $provider = $this->getProvider(); $acl1 = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $acl2 = $provider->createAcl(new ObjectIdentity(2, 'Foo')); $acl3 = $provider->createAcl(new ObjectIdentity(1, 'AnotherFoo')); $sid = new RoleSecurityIdentity('ROLE_FOO'); $acl1->insertClassAce($sid, 1); $acl3->insertClassAce($sid, 1); $provider->updateAcl($acl1); $provider->updateAcl($acl3); $acl2->insertClassAce($sid, 16); $provider->updateAcl($acl2); $acl1->insertClassAce($sid, 3); $acl2->insertClassAce($sid, 5); try { $provider->updateAcl($acl1); $this->fail('Provider failed to detect a concurrent modification.'); } catch (ConcurrentModificationException $e) { } } public function testUpdateAcl() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $sid = new UserSecurityIdentity('johannes', 'FooClass'); $acl->setEntriesInheriting(!$acl->isEntriesInheriting()); $acl->insertObjectAce($sid, 1); $acl->insertClassAce($sid, 5, 0, false); $acl->insertObjectAce($sid, 2, 1, true); $acl->insertClassFieldAce('field', $sid, 2, 0, true); $provider->updateAcl($acl); $acl->updateObjectAce(0, 3); $acl->deleteObjectAce(1); $acl->updateObjectAuditing(0, true, false); $acl->updateClassFieldAce(0, 'field', 15); $provider->updateAcl($acl); $reloadProvider = $this->getProvider(); $reloadedAcl = $reloadProvider->findAcl(new ObjectIdentity(1, 'Foo')); $this->assertNotSame($acl, $reloadedAcl); $this->assertSame($acl->isEntriesInheriting(), $reloadedAcl->isEntriesInheriting()); $aces = $acl->getObjectAces(); $reloadedAces = $reloadedAcl->getObjectAces(); $this->assertEquals(count($aces), count($reloadedAces)); foreach ($aces as $index => $ace) { $this->assertAceEquals($ace, $reloadedAces[$index]); } } public function testUpdateAclWorksForChangingTheParentAcl() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $parentAcl = $provider->createAcl(new ObjectIdentity(1, 'AnotherFoo')); $acl->setParentAcl($parentAcl); $provider->updateAcl($acl); $reloadProvider = $this->getProvider(); $reloadedAcl = $reloadProvider->findAcl(new ObjectIdentity(1, 'Foo')); $this->assertNotSame($acl, $reloadedAcl); $this->assertSame($parentAcl->getId(), $reloadedAcl->getParentAcl()->getId()); } public function testUpdateAclUpdatesChildAclsCorrectly() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $parentAcl = $provider->createAcl(new ObjectIdentity(1, 'Bar')); $acl->setParentAcl($parentAcl); $provider->updateAcl($acl); $parentParentAcl = $provider->createAcl(new ObjectIdentity(1, 'Baz')); $parentAcl->setParentAcl($parentParentAcl); $provider->updateAcl($parentAcl); $newParentParentAcl = $provider->createAcl(new ObjectIdentity(2, 'Baz')); $parentAcl->setParentAcl($newParentParentAcl); $provider->updateAcl($parentAcl); $reloadProvider = $this->getProvider(); $reloadedAcl = $reloadProvider->findAcl(new ObjectIdentity(1, 'Foo')); $this->assertEquals($newParentParentAcl->getId(), $reloadedAcl->getParentAcl()->getParentAcl()->getId()); } public function testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations() { $provider = $this->getProvider(); $oid = new ObjectIdentity(1, 'Foo'); $sid1 = new UserSecurityIdentity('johannes', 'FooClass'); $sid2 = new UserSecurityIdentity('guilro', 'FooClass'); $sid3 = new UserSecurityIdentity('bmaz', 'FooClass'); $fieldName = 'fieldName'; $acl = $provider->createAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid1, 4); $provider->updateAcl($acl); $acl = $provider->findAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid2, 4); $provider->updateAcl($acl); $acl = $provider->findAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid3, 4); $provider->updateAcl($acl); } public function testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations() { $provider = $this->getProvider(); $oid = new ObjectIdentity(1, 'Foo'); $sid1 = new UserSecurityIdentity('johannes', 'FooClass'); $sid2 = new UserSecurityIdentity('guilro', 'FooClass'); $sid3 = new UserSecurityIdentity('bmaz', 'FooClass'); $fieldName = 'fieldName'; $acl = $provider->createAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid1, 4); $provider->updateAcl($acl); $acl = $provider->findAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid2, 4); $provider->updateAcl($acl); $index = 0; $acl->deleteObjectFieldAce($index, $fieldName); $provider->updateAcl($acl); $acl = $provider->findAcl($oid); $acl->insertObjectFieldAce($fieldName, $sid3, 4); $provider->updateAcl($acl); } public function testUpdateUserSecurityIdentity() { $provider = $this->getProvider(); $acl = $provider->createAcl(new ObjectIdentity(1, 'Foo')); $sid = new UserSecurityIdentity('johannes', 'FooClass'); $acl->setEntriesInheriting(!$acl->isEntriesInheriting()); $acl->insertObjectAce($sid, 1); $acl->insertClassAce($sid, 5, 0, false); $acl->insertObjectAce($sid, 2, 1, true); $acl->insertClassFieldAce('field', $sid, 2, 0, true); $provider->updateAcl($acl); $newSid = new UserSecurityIdentity('mathieu', 'FooClass'); $provider->updateUserSecurityIdentity($newSid, 'johannes'); $reloadProvider = $this->getProvider(); $reloadedAcl = $reloadProvider->findAcl(new ObjectIdentity(1, 'Foo')); $this->assertNotSame($acl, $reloadedAcl); $this->assertSame($acl->isEntriesInheriting(), $reloadedAcl->isEntriesInheriting()); $aces = $acl->getObjectAces(); $reloadedAces = $reloadedAcl->getObjectAces(); $this->assertEquals(count($aces), count($reloadedAces)); foreach ($reloadedAces as $ace) { $this->assertTrue($ace->getSecurityIdentity()->equals($newSid)); } } /** * Imports acls. * * Data must have the following format: * array( * *name* => array( * 'object_identifier' => *required* * 'class_type' => *required*, * 'parent_acl' => *name (optional)* * ), * ) * * @param AclProvider $provider * @param array $data * * @throws \InvalidArgumentException * @throws \Exception */ protected function importAcls(AclProvider $provider, array $data) { $aclIds = $parentAcls = array(); $con = $this->getField($provider, 'connection'); $con->beginTransaction(); try { foreach ($data as $name => $aclData) { if (!isset($aclData['object_identifier'], $aclData['class_type'])) { throw new \InvalidArgumentException('"object_identifier", and "class_type" must be present.'); } $this->callMethod($provider, 'createObjectIdentity', array(new ObjectIdentity($aclData['object_identifier'], $aclData['class_type']))); $aclId = $con->lastInsertId(); $aclIds[$name] = $aclId; $sql = $this->callMethod($provider, 'getInsertObjectIdentityRelationSql', array($aclId, $aclId)); $con->executeQuery($sql); if (isset($aclData['parent_acl'])) { if (isset($aclIds[$aclData['parent_acl']])) { $con->executeQuery('UPDATE acl_object_identities SET parent_object_identity_id = '.$aclIds[$aclData['parent_acl']].' WHERE id = '.$aclId); $con->executeQuery($this->callMethod($provider, 'getInsertObjectIdentityRelationSql', array($aclId, $aclIds[$aclData['parent_acl']]))); } else { $parentAcls[$aclId] = $aclData['parent_acl']; } } } foreach ($parentAcls as $aclId => $name) { if (!isset($aclIds[$name])) { throw new \InvalidArgumentException(sprintf('"%s" does not exist.', $name)); } $con->executeQuery(sprintf('UPDATE acl_object_identities SET parent_object_identity_id = %d WHERE id = %d', $aclIds[$name], $aclId)); $con->executeQuery($this->callMethod($provider, 'getInsertObjectIdentityRelationSql', array($aclId, $aclIds[$name]))); } $con->commit(); } catch (\Exception $e) { $con->rollBack(); throw $e; } } protected function callMethod($object, $method, array $args) { $method = new \ReflectionMethod($object, $method); $method->setAccessible(true); return $method->invokeArgs($object, $args); } protected function setUp() { $this->con = DriverManager::getConnection(array( 'driver' => 'pdo_sqlite', 'memory' => true, )); // import the schema $schema = new Schema($this->getOptions()); foreach ($schema->toSql($this->con->getDatabasePlatform()) as $sql) { $this->con->exec($sql); } } protected function tearDown() { $this->con = null; } protected function getField($object, $field) { $reflection = new \ReflectionProperty($object, $field); $reflection->setAccessible(true); return $reflection->getValue($object); } public function setField($object, $field, $value) { $reflection = new \ReflectionProperty($object, $field); $reflection->setAccessible(true); $reflection->setValue($object, $value); $reflection->setAccessible(false); } protected function getOptions() { return array( 'oid_table_name' => 'acl_object_identities', 'oid_ancestors_table_name' => 'acl_object_identity_ancestors', 'class_table_name' => 'acl_classes', 'sid_table_name' => 'acl_security_identities', 'entry_table_name' => 'acl_entries', ); } protected function getStrategy() { return new PermissionGrantingStrategy(); } protected function getProvider($cache = null) { return new MutableAclProvider($this->con, $this->getStrategy(), $this->getOptions(), $cache); } } src/Symfony/Component/Security/Acl/Tests/Domain/000077500000000000000000000000001266465517700221155ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Tests/Domain/AclTest.php000066400000000000000000000405431266465517700241730ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Domain\Acl; class AclTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $acl = new Acl(1, $oid = new ObjectIdentity('foo', 'foo'), $permissionStrategy = new PermissionGrantingStrategy(), array(), true); $this->assertSame(1, $acl->getId()); $this->assertSame($oid, $acl->getObjectIdentity()); $this->assertNull($acl->getParentAcl()); $this->assertTrue($acl->isEntriesInheriting()); } /** * @expectedException \OutOfBoundsException * @dataProvider getDeleteAceTests */ public function testDeleteAceThrowsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'delete'.$type.'Ace'}(0); } /** * @dataProvider getDeleteAceTests */ public function testDeleteAce($type) { $acl = $this->getAcl(); $acl->{'insert'.$type.'Ace'}(new RoleSecurityIdentity('foo'), 1); $acl->{'insert'.$type.'Ace'}(new RoleSecurityIdentity('foo'), 2, 1); $acl->{'insert'.$type.'Ace'}(new RoleSecurityIdentity('foo'), 3, 2); $listener = $this->getListener(array( $type.'Aces', 'aceOrder', 'aceOrder', $type.'Aces', )); $acl->addPropertyChangedListener($listener); $this->assertCount(3, $acl->{'get'.$type.'Aces'}()); $acl->{'delete'.$type.'Ace'}(0); $this->assertCount(2, $aces = $acl->{'get'.$type.'Aces'}()); $this->assertEquals(2, $aces[0]->getMask()); $this->assertEquals(3, $aces[1]->getMask()); $acl->{'delete'.$type.'Ace'}(1); $this->assertCount(1, $aces = $acl->{'get'.$type.'Aces'}()); $this->assertEquals(2, $aces[0]->getMask()); } public function getDeleteAceTests() { return array( array('class'), array('object'), ); } /** * @expectedException \OutOfBoundsException * @dataProvider getDeleteFieldAceTests */ public function testDeleteFieldAceThrowsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'delete'.$type.'Ace'}('foo', 0); } /** * @dataProvider getDeleteFieldAceTests */ public function testDeleteFieldAce($type) { $acl = $this->getAcl(); $acl->{'insert'.$type.'Ace'}('foo', new RoleSecurityIdentity('foo'), 1, 0); $acl->{'insert'.$type.'Ace'}('foo', new RoleSecurityIdentity('foo'), 2, 1); $acl->{'insert'.$type.'Ace'}('foo', new RoleSecurityIdentity('foo'), 3, 2); $listener = $this->getListener(array( $type.'Aces', 'aceOrder', 'aceOrder', $type.'Aces', )); $acl->addPropertyChangedListener($listener); $this->assertCount(3, $acl->{'get'.$type.'Aces'}('foo')); $acl->{'delete'.$type.'Ace'}(0, 'foo'); $this->assertCount(2, $aces = $acl->{'get'.$type.'Aces'}('foo')); $this->assertEquals(2, $aces[0]->getMask()); $this->assertEquals(3, $aces[1]->getMask()); $acl->{'delete'.$type.'Ace'}(1, 'foo'); $this->assertCount(1, $aces = $acl->{'get'.$type.'Aces'}('foo')); $this->assertEquals(2, $aces[0]->getMask()); } public function getDeleteFieldAceTests() { return array( array('classField'), array('objectField'), ); } /** * @dataProvider getInsertAceTests */ public function testInsertAce($property, $method) { $acl = $this->getAcl(); $listener = $this->getListener(array( $property, 'aceOrder', $property, 'aceOrder', $property, )); $acl->addPropertyChangedListener($listener); $sid = new RoleSecurityIdentity('foo'); $acl->$method($sid, 1); $acl->$method($sid, 2); $acl->$method($sid, 3, 1, false); $this->assertCount(3, $aces = $acl->{'get'.$property}()); $this->assertEquals(2, $aces[0]->getMask()); $this->assertEquals(3, $aces[1]->getMask()); $this->assertEquals(1, $aces[2]->getMask()); } /** * @expectedException \OutOfBoundsException * @dataProvider getInsertAceTests */ public function testInsertClassAceThrowsExceptionOnInvalidIndex($property, $method) { $acl = $this->getAcl(); $acl->$method(new RoleSecurityIdentity('foo'), 1, 1); } public function getInsertAceTests() { return array( array('classAces', 'insertClassAce'), array('objectAces', 'insertObjectAce'), ); } /** * @dataProvider getInsertFieldAceTests */ public function testInsertClassFieldAce($property, $method) { $acl = $this->getAcl(); $listener = $this->getListener(array( $property, $property, 'aceOrder', $property, 'aceOrder', 'aceOrder', $property, )); $acl->addPropertyChangedListener($listener); $sid = new RoleSecurityIdentity('foo'); $acl->$method('foo', $sid, 1); $acl->$method('foo2', $sid, 1); $acl->$method('foo', $sid, 3); $acl->$method('foo', $sid, 2); $this->assertCount(3, $aces = $acl->{'get'.$property}('foo')); $this->assertCount(1, $acl->{'get'.$property}('foo2')); $this->assertEquals(2, $aces[0]->getMask()); $this->assertEquals(3, $aces[1]->getMask()); $this->assertEquals(1, $aces[2]->getMask()); } /** * @expectedException \OutOfBoundsException * @dataProvider getInsertFieldAceTests */ public function testInsertClassFieldAceThrowsExceptionOnInvalidIndex($property, $method) { $acl = $this->getAcl(); $acl->$method('foo', new RoleSecurityIdentity('foo'), 1, 1); } public function getInsertFieldAceTests() { return array( array('classFieldAces', 'insertClassFieldAce'), array('objectFieldAces', 'insertObjectFieldAce'), ); } public function testIsFieldGranted() { $sids = array(new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('ROLE_IDDQD')); $masks = array(1, 2, 4); $strategy = $this->getMock('Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface'); $acl = new Acl(1, new ObjectIdentity(1, 'foo'), $strategy, array(), true); $strategy ->expects($this->once()) ->method('isFieldGranted') ->with($this->equalTo($acl), $this->equalTo('foo'), $this->equalTo($masks), $this->equalTo($sids), $this->isTrue()) ->will($this->returnValue(true)) ; $this->assertTrue($acl->isFieldGranted('foo', $masks, $sids, true)); } public function testIsGranted() { $sids = array(new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('ROLE_IDDQD')); $masks = array(1, 2, 4); $strategy = $this->getMock('Symfony\Component\Security\Acl\Model\PermissionGrantingStrategyInterface'); $acl = new Acl(1, new ObjectIdentity(1, 'foo'), $strategy, array(), true); $strategy ->expects($this->once()) ->method('isGranted') ->with($this->equalTo($acl), $this->equalTo($masks), $this->equalTo($sids), $this->isTrue()) ->will($this->returnValue(true)) ; $this->assertTrue($acl->isGranted($masks, $sids, true)); } public function testSetGetParentAcl() { $acl = $this->getAcl(); $parentAcl = $this->getAcl(); $listener = $this->getListener(array('parentAcl')); $acl->addPropertyChangedListener($listener); $this->assertNull($acl->getParentAcl()); $acl->setParentAcl($parentAcl); $this->assertSame($parentAcl, $acl->getParentAcl()); $acl->setParentAcl(null); $this->assertNull($acl->getParentAcl()); } public function testSetIsEntriesInheriting() { $acl = $this->getAcl(); $listener = $this->getListener(array('entriesInheriting')); $acl->addPropertyChangedListener($listener); $this->assertTrue($acl->isEntriesInheriting()); $acl->setEntriesInheriting(false); $this->assertFalse($acl->isEntriesInheriting()); } public function testIsSidLoadedWhenAllSidsAreLoaded() { $acl = $this->getAcl(); $this->assertTrue($acl->isSidLoaded(new UserSecurityIdentity('foo', 'Foo'))); $this->assertTrue($acl->isSidLoaded(new RoleSecurityIdentity('ROLE_FOO', 'Foo'))); } public function testIsSidLoaded() { $acl = new Acl(1, new ObjectIdentity('1', 'foo'), new PermissionGrantingStrategy(), array(new UserSecurityIdentity('foo', 'Foo'), new UserSecurityIdentity('johannes', 'Bar')), true); $this->assertTrue($acl->isSidLoaded(new UserSecurityIdentity('foo', 'Foo'))); $this->assertTrue($acl->isSidLoaded(new UserSecurityIdentity('johannes', 'Bar'))); $this->assertTrue($acl->isSidLoaded(array( new UserSecurityIdentity('foo', 'Foo'), new UserSecurityIdentity('johannes', 'Bar'), ))); $this->assertFalse($acl->isSidLoaded(new RoleSecurityIdentity('ROLE_FOO'))); $this->assertFalse($acl->isSidLoaded(new UserSecurityIdentity('schmittjoh@gmail.com', 'Moo'))); $this->assertFalse($acl->isSidLoaded(array( new UserSecurityIdentity('foo', 'Foo'), new UserSecurityIdentity('johannes', 'Bar'), new RoleSecurityIdentity('ROLE_FOO'), ))); } /** * @dataProvider getUpdateAceTests * @expectedException \OutOfBoundsException */ public function testUpdateAceThrowsOutOfBoundsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'update'.$type}(0, 1); } /** * @dataProvider getUpdateAceTests */ public function testUpdateAce($type) { $acl = $this->getAcl(); $acl->{'insert'.$type}(new RoleSecurityIdentity('foo'), 1); $listener = $this->getListener(array( 'mask', 'mask', 'strategy', )); $acl->addPropertyChangedListener($listener); $aces = $acl->{'get'.$type.'s'}(); $ace = reset($aces); $this->assertEquals(1, $ace->getMask()); $this->assertEquals('all', $ace->getStrategy()); $acl->{'update'.$type}(0, 3); $this->assertEquals(3, $ace->getMask()); $this->assertEquals('all', $ace->getStrategy()); $acl->{'update'.$type}(0, 1, 'foo'); $this->assertEquals(1, $ace->getMask()); $this->assertEquals('foo', $ace->getStrategy()); } public function getUpdateAceTests() { return array( array('classAce'), array('objectAce'), ); } /** * @dataProvider getUpdateFieldAceTests * @expectedException \OutOfBoundsException */ public function testUpdateFieldAceThrowsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'update'.$type}(0, 'foo', 1); } /** * @dataProvider getUpdateFieldAceTests */ public function testUpdateFieldAce($type) { $acl = $this->getAcl(); $acl->{'insert'.$type}('foo', new UserSecurityIdentity('foo', 'Foo'), 1); $listener = $this->getListener(array( 'mask', 'mask', 'strategy', )); $acl->addPropertyChangedListener($listener); $aces = $acl->{'get'.$type.'s'}('foo'); $ace = reset($aces); $this->assertEquals(1, $ace->getMask()); $this->assertEquals('all', $ace->getStrategy()); $acl->{'update'.$type}(0, 'foo', 3); $this->assertEquals(3, $ace->getMask()); $this->assertEquals('all', $ace->getStrategy()); $acl->{'update'.$type}(0, 'foo', 1, 'foo'); $this->assertEquals(1, $ace->getMask()); $this->assertEquals('foo', $ace->getStrategy()); } public function getUpdateFieldAceTests() { return array( array('classFieldAce'), array('objectFieldAce'), ); } /** * @dataProvider getUpdateAuditingTests * @expectedException \OutOfBoundsException */ public function testUpdateAuditingThrowsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'update'.$type.'Auditing'}(0, true, false); } /** * @dataProvider getUpdateAuditingTests */ public function testUpdateAuditing($type) { $acl = $this->getAcl(); $acl->{'insert'.$type.'Ace'}(new RoleSecurityIdentity('foo'), 1); $listener = $this->getListener(array( 'auditFailure', 'auditSuccess', 'auditFailure', )); $acl->addPropertyChangedListener($listener); $aces = $acl->{'get'.$type.'Aces'}(); $ace = reset($aces); $this->assertFalse($ace->isAuditSuccess()); $this->assertFalse($ace->isAuditFailure()); $acl->{'update'.$type.'Auditing'}(0, false, true); $this->assertFalse($ace->isAuditSuccess()); $this->assertTrue($ace->isAuditFailure()); $acl->{'update'.$type.'Auditing'}(0, true, false); $this->assertTrue($ace->isAuditSuccess()); $this->assertFalse($ace->isAuditFailure()); } public function getUpdateAuditingTests() { return array( array('class'), array('object'), ); } /** * @expectedException \InvalidArgumentException * @dataProvider getUpdateFieldAuditingTests */ public function testUpdateFieldAuditingThrowsExceptionOnInvalidField($type) { $acl = $this->getAcl(); $acl->{'update'.$type.'Auditing'}(0, 'foo', true, true); } /** * @expectedException \OutOfBoundsException * @dataProvider getUpdateFieldAuditingTests */ public function testUpdateFieldAuditingThrowsExceptionOnInvalidIndex($type) { $acl = $this->getAcl(); $acl->{'insert'.$type.'Ace'}('foo', new RoleSecurityIdentity('foo'), 1); $acl->{'update'.$type.'Auditing'}(1, 'foo', true, false); } /** * @dataProvider getUpdateFieldAuditingTests */ public function testUpdateFieldAuditing($type) { $acl = $this->getAcl(); $acl->{'insert'.$type.'Ace'}('foo', new RoleSecurityIdentity('foo'), 1); $listener = $this->getListener(array( 'auditSuccess', 'auditSuccess', 'auditFailure', )); $acl->addPropertyChangedListener($listener); $aces = $acl->{'get'.$type.'Aces'}('foo'); $ace = reset($aces); $this->assertFalse($ace->isAuditSuccess()); $this->assertFalse($ace->isAuditFailure()); $acl->{'update'.$type.'Auditing'}(0, 'foo', true, false); $this->assertTrue($ace->isAuditSuccess()); $this->assertFalse($ace->isAuditFailure()); $acl->{'update'.$type.'Auditing'}(0, 'foo', false, true); $this->assertFalse($ace->isAuditSuccess()); $this->assertTrue($ace->isAuditFailure()); } public function getUpdateFieldAuditingTests() { return array( array('classField'), array('objectField'), ); } protected function getListener($expectedChanges) { $aceProperties = array('aceOrder', 'mask', 'strategy', 'auditSuccess', 'auditFailure'); $listener = $this->getMock('Doctrine\Common\PropertyChangedListener'); foreach ($expectedChanges as $index => $property) { if (in_array($property, $aceProperties)) { $class = 'Symfony\Component\Security\Acl\Domain\Entry'; } else { $class = 'Symfony\Component\Security\Acl\Domain\Acl'; } $listener ->expects($this->at($index)) ->method('propertyChanged') ->with($this->isInstanceOf($class), $this->equalTo($property)) ; } return $listener; } protected function getAcl() { return new Acl(1, new ObjectIdentity(1, 'foo'), new PermissionGrantingStrategy(), array(), true); } } src/Symfony/Component/Security/Acl/Tests/Domain/AuditLoggerTest.php000066400000000000000000000040251266465517700256750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; class AuditLoggerTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getTestLogData */ public function testLogIfNeeded($granting, $audit) { $logger = $this->getLogger(); $ace = $this->getEntry(); if (true === $granting) { $ace ->expects($this->once()) ->method('isAuditSuccess') ->will($this->returnValue($audit)) ; $ace ->expects($this->never()) ->method('isAuditFailure') ; } else { $ace ->expects($this->never()) ->method('isAuditSuccess') ; $ace ->expects($this->once()) ->method('isAuditFailure') ->will($this->returnValue($audit)) ; } if (true === $audit) { $logger ->expects($this->once()) ->method('doLog') ->with($this->equalTo($granting), $this->equalTo($ace)) ; } else { $logger ->expects($this->never()) ->method('doLog') ; } $logger->logIfNeeded($granting, $ace); } public function getTestLogData() { return array( array(true, false), array(true, true), array(false, false), array(false, true), ); } protected function getEntry() { return $this->getMock('Symfony\Component\Security\Acl\Model\AuditableEntryInterface'); } protected function getLogger() { return $this->getMockForAbstractClass('Symfony\Component\Security\Acl\Domain\AuditLogger'); } } src/Symfony/Component/Security/Acl/Tests/Domain/DoctrineAclCacheTest.php000066400000000000000000000061101266465517700265770ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Domain\DoctrineAclCache; use Doctrine\Common\Cache\ArrayCache; class DoctrineAclCacheTest extends \PHPUnit_Framework_TestCase { protected $permissionGrantingStrategy; /** * @expectedException \InvalidArgumentException * @dataProvider getEmptyValue */ public function testConstructorDoesNotAcceptEmptyPrefix($empty) { new DoctrineAclCache(new ArrayCache(), $this->getPermissionGrantingStrategy(), $empty); } public function getEmptyValue() { return array( array(null), array(false), array(''), ); } public function test() { $cache = $this->getCache(); $aclWithParent = $this->getAcl(1); $acl = $this->getAcl(); $cache->putInCache($aclWithParent); $cache->putInCache($acl); $cachedAcl = $cache->getFromCacheByIdentity($acl->getObjectIdentity()); $this->assertEquals($acl->getId(), $cachedAcl->getId()); $this->assertNull($acl->getParentAcl()); $cachedAclWithParent = $cache->getFromCacheByIdentity($aclWithParent->getObjectIdentity()); $this->assertEquals($aclWithParent->getId(), $cachedAclWithParent->getId()); $this->assertNotNull($cachedParentAcl = $cachedAclWithParent->getParentAcl()); $this->assertEquals($aclWithParent->getParentAcl()->getId(), $cachedParentAcl->getId()); } protected function getAcl($depth = 0) { static $id = 1; $acl = new Acl($id, new ObjectIdentity($id, 'foo'), $this->getPermissionGrantingStrategy(), 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; } protected function getPermissionGrantingStrategy() { if (null === $this->permissionGrantingStrategy) { $this->permissionGrantingStrategy = new PermissionGrantingStrategy(); } return $this->permissionGrantingStrategy; } protected function getCache($cacheDriver = null, $prefix = DoctrineAclCache::PREFIX) { if (null === $cacheDriver) { $cacheDriver = new ArrayCache(); } return new DoctrineAclCache($cacheDriver, $this->getPermissionGrantingStrategy(), $prefix); } } src/Symfony/Component/Security/Acl/Tests/Domain/EntryTest.php000066400000000000000000000066431266465517700246000ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\Entry; class EntryTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $ace = $this->getAce($acl = $this->getAcl(), $sid = $this->getSid()); $this->assertEquals(123, $ace->getId()); $this->assertSame($acl, $ace->getAcl()); $this->assertSame($sid, $ace->getSecurityIdentity()); $this->assertEquals('foostrat', $ace->getStrategy()); $this->assertEquals(123456, $ace->getMask()); $this->assertTrue($ace->isGranting()); $this->assertTrue($ace->isAuditSuccess()); $this->assertFalse($ace->isAuditFailure()); } public function testSetAuditSuccess() { $ace = $this->getAce(); $this->assertTrue($ace->isAuditSuccess()); $ace->setAuditSuccess(false); $this->assertFalse($ace->isAuditSuccess()); $ace->setAuditSuccess(true); $this->assertTrue($ace->isAuditSuccess()); } public function testSetAuditFailure() { $ace = $this->getAce(); $this->assertFalse($ace->isAuditFailure()); $ace->setAuditFailure(true); $this->assertTrue($ace->isAuditFailure()); $ace->setAuditFailure(false); $this->assertFalse($ace->isAuditFailure()); } public function testSetMask() { $ace = $this->getAce(); $this->assertEquals(123456, $ace->getMask()); $ace->setMask(4321); $this->assertEquals(4321, $ace->getMask()); } public function testSetStrategy() { $ace = $this->getAce(); $this->assertEquals('foostrat', $ace->getStrategy()); $ace->setStrategy('foo'); $this->assertEquals('foo', $ace->getStrategy()); } public function testSerializeUnserialize() { $ace = $this->getAce(); $serialized = serialize($ace); $uAce = unserialize($serialized); $this->assertNull($uAce->getAcl()); $this->assertInstanceOf('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface', $uAce->getSecurityIdentity()); $this->assertEquals($ace->getId(), $uAce->getId()); $this->assertEquals($ace->getMask(), $uAce->getMask()); $this->assertEquals($ace->getStrategy(), $uAce->getStrategy()); $this->assertEquals($ace->isGranting(), $uAce->isGranting()); $this->assertEquals($ace->isAuditSuccess(), $uAce->isAuditSuccess()); $this->assertEquals($ace->isAuditFailure(), $uAce->isAuditFailure()); } protected function getAce($acl = null, $sid = null) { if (null === $acl) { $acl = $this->getAcl(); } if (null === $sid) { $sid = $this->getSid(); } return new Entry( 123, $acl, $sid, 'foostrat', 123456, true, false, true ); } protected function getAcl() { return $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'); } protected function getSid() { return $this->getMock('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface'); } } src/Symfony/Component/Security/Acl/Tests/Domain/FieldEntryTest.php000066400000000000000000000040461266465517700255370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\FieldEntry; class FieldEntryTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $ace = $this->getAce(); $this->assertEquals('foo', $ace->getField()); } public function testSerializeUnserialize() { $ace = $this->getAce(); $serialized = serialize($ace); $uAce = unserialize($serialized); $this->assertNull($uAce->getAcl()); $this->assertInstanceOf('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface', $uAce->getSecurityIdentity()); $this->assertEquals($ace->getId(), $uAce->getId()); $this->assertEquals($ace->getField(), $uAce->getField()); $this->assertEquals($ace->getMask(), $uAce->getMask()); $this->assertEquals($ace->getStrategy(), $uAce->getStrategy()); $this->assertEquals($ace->isGranting(), $uAce->isGranting()); $this->assertEquals($ace->isAuditSuccess(), $uAce->isAuditSuccess()); $this->assertEquals($ace->isAuditFailure(), $uAce->isAuditFailure()); } protected function getAce($acl = null, $sid = null) { if (null === $acl) { $acl = $this->getAcl(); } if (null === $sid) { $sid = $this->getSid(); } return new FieldEntry( 123, $acl, 'foo', $sid, 'foostrat', 123456, true, false, true ); } protected function getAcl() { return $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'); } protected function getSid() { return $this->getMock('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface'); } } src/Symfony/Component/Security/Acl/Tests/Domain/ObjectIdentityRetrievalStrategyTest.php000066400000000000000000000022001266465517700320010ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\ObjectIdentityRetrievalStrategy; class ObjectIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase { public function testGetObjectIdentityReturnsNullForInvalidDomainObject() { $strategy = new ObjectIdentityRetrievalStrategy(); $this->assertNull($strategy->getObjectIdentity('foo')); } public function testGetObjectIdentity() { $strategy = new ObjectIdentityRetrievalStrategy(); $domainObject = new DomainObject(); $objectIdentity = $strategy->getObjectIdentity($domainObject); $this->assertEquals($domainObject->getId(), $objectIdentity->getIdentifier()); $this->assertEquals(get_class($domainObject), $objectIdentity->getType()); } } class DomainObject { public function getId() { return 'foo'; } } src/Symfony/Component/Security/Acl/Tests/Domain/ObjectIdentityTest.php000066400000000000000000000112421266465517700264060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain { use Symfony\Component\Security\Acl\Domain\ObjectIdentity; class ObjectIdentityTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $id = new ObjectIdentity('fooid', 'footype'); $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('footype', $id->getType()); } // Test that constructor never changes passed type, even with proxies public function testConstructorWithProxy() { $id = new ObjectIdentity('fooid', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject'); $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType()); } public function testFromDomainObjectPrefersInterfaceOverGetId() { $domainObject = $this->getMock('Symfony\Component\Security\Acl\Model\DomainObjectInterface'); $domainObject ->expects($this->once()) ->method('getObjectIdentifier') ->will($this->returnValue('getObjectIdentifier()')) ; $domainObject ->expects($this->never()) ->method('getId') ->will($this->returnValue('getId()')) ; $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertEquals('getObjectIdentifier()', $id->getIdentifier()); } public function testFromDomainObjectWithoutInterface() { $id = ObjectIdentity::fromDomainObject(new TestDomainObject()); $this->assertEquals('getId()', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType()); } public function testFromDomainObjectWithProxy() { $id = ObjectIdentity::fromDomainObject(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject()); $this->assertEquals('getId()', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType()); } public function testFromDomainObjectWithoutInterfaceEnforcesStringIdentifier() { $domainObject = new TestDomainObject(); $domainObject->id = 1; $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertSame('1', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType()); } public function testFromDomainObjectWithoutInterfaceAllowsZeroAsIdentifier() { $domainObject = new TestDomainObject(); $domainObject->id = '0'; $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertSame('0', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType()); } /** * @dataProvider getCompareData */ public function testEquals($oid1, $oid2, $equal) { if ($equal) { $this->assertTrue($oid1->equals($oid2)); } else { $this->assertFalse($oid1->equals($oid2)); } } public function getCompareData() { return array( array(new ObjectIdentity('123', 'foo'), new ObjectIdentity('123', 'foo'), true), array(new ObjectIdentity('123', 'foo'), new ObjectIdentity(123, 'foo'), true), array(new ObjectIdentity('1', 'foo'), new ObjectIdentity('2', 'foo'), false), array(new ObjectIdentity('1', 'bla'), new ObjectIdentity('1', 'blub'), false), ); } } class TestDomainObject { public $id = 'getId()'; public function getObjectIdentifier() { return 'getObjectIdentifier()'; } public function getId() { return $this->id; } } } namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain { class TestDomainObject extends \Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject { } } src/Symfony/Component/Security/Acl/Tests/Domain/PermissionGrantingStrategyTest.php000066400000000000000000000150051266465517700310340ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Exception\NoAceFoundException; class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase { public function testIsGrantedObjectAcesHavePriority() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $acl->insertClassAce($sid, 1); $acl->insertObjectAce($sid, 1, 0, false); $this->assertFalse($strategy->isGranted($acl, array(1), array($sid))); } public function testIsGrantedFallsBackToClassAcesIfNoApplicableObjectAceWasFound() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $acl->insertClassAce($sid, 1); $this->assertTrue($strategy->isGranted($acl, array(1), array($sid))); } public function testIsGrantedFavorsLocalAcesOverParentAclAces() { $strategy = new PermissionGrantingStrategy(); $sid = new UserSecurityIdentity('johannes', 'Foo'); $acl = $this->getAcl($strategy); $acl->insertClassAce($sid, 1); $parentAcl = $this->getAcl($strategy); $acl->setParentAcl($parentAcl); $parentAcl->insertClassAce($sid, 1, 0, false); $this->assertTrue($strategy->isGranted($acl, array(1), array($sid))); } public function testIsGrantedFallsBackToParentAcesIfNoLocalAcesAreApplicable() { $strategy = new PermissionGrantingStrategy(); $sid = new UserSecurityIdentity('johannes', 'Foo'); $anotherSid = new UserSecurityIdentity('ROLE_USER', 'Foo'); $acl = $this->getAcl($strategy); $acl->insertClassAce($anotherSid, 1, 0, false); $parentAcl = $this->getAcl($strategy); $acl->setParentAcl($parentAcl); $parentAcl->insertClassAce($sid, 1); $this->assertTrue($strategy->isGranted($acl, array(1), array($sid))); } /** * @expectedException \Symfony\Component\Security\Acl\Exception\NoAceFoundException */ public function testIsGrantedReturnsExceptionIfNoAceIsFound() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $strategy->isGranted($acl, array(1), array($sid)); } public function testIsGrantedFirstApplicableEntryMakesUltimateDecisionForPermissionIdentityCombination() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $aSid = new RoleSecurityIdentity('ROLE_USER'); $acl->insertClassAce($aSid, 1); $acl->insertClassAce($sid, 1, 1, false); $acl->insertClassAce($sid, 1, 2); $this->assertFalse($strategy->isGranted($acl, array(1), array($sid, $aSid))); $acl->insertObjectAce($sid, 1, 0, false); $acl->insertObjectAce($aSid, 1, 1); $this->assertFalse($strategy->isGranted($acl, array(1), array($sid, $aSid))); } public function testIsGrantedCallsAuditLoggerOnGrant() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $logger = $this->getMock('Symfony\Component\Security\Acl\Model\AuditLoggerInterface'); $logger ->expects($this->once()) ->method('logIfNeeded') ; $strategy->setAuditLogger($logger); $acl->insertObjectAce($sid, 1); $acl->updateObjectAuditing(0, true, false); $this->assertTrue($strategy->isGranted($acl, array(1), array($sid))); } public function testIsGrantedCallsAuditLoggerOnDeny() { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $logger = $this->getMock('Symfony\Component\Security\Acl\Model\AuditLoggerInterface'); $logger ->expects($this->once()) ->method('logIfNeeded') ; $strategy->setAuditLogger($logger); $acl->insertObjectAce($sid, 1, 0, false); $acl->updateObjectAuditing(0, false, true); $this->assertFalse($strategy->isGranted($acl, array(1), array($sid))); } /** * @dataProvider getAllStrategyTests */ public function testIsGrantedStrategies($maskStrategy, $aceMask, $requiredMask, $result) { $strategy = new PermissionGrantingStrategy(); $acl = $this->getAcl($strategy); $sid = new UserSecurityIdentity('johannes', 'Foo'); $acl->insertObjectAce($sid, $aceMask, 0, true, $maskStrategy); if (false === $result) { try { $strategy->isGranted($acl, array($requiredMask), array($sid)); $this->fail('The ACE is not supposed to match.'); } catch (NoAceFoundException $e) { } } else { $this->assertTrue($strategy->isGranted($acl, array($requiredMask), array($sid))); } } public function getAllStrategyTests() { return array( array('all', 1 << 0 | 1 << 1, 1 << 0, true), array('all', 1 << 0 | 1 << 1, 1 << 2, false), array('all', 1 << 0 | 1 << 10, 1 << 0 | 1 << 10, true), array('all', 1 << 0 | 1 << 1, 1 << 0 | 1 << 1 || 1 << 2, false), array('any', 1 << 0 | 1 << 1, 1 << 0, true), array('any', 1 << 0 | 1 << 1, 1 << 0 | 1 << 2, true), array('any', 1 << 0 | 1 << 1, 1 << 2, false), array('equal', 1 << 0 | 1 << 1, 1 << 0, false), array('equal', 1 << 0 | 1 << 1, 1 << 1, false), array('equal', 1 << 0 | 1 << 1, 1 << 0 | 1 << 1, true), ); } protected function getAcl($strategy) { static $id = 1; return new Acl($id++, new ObjectIdentity(1, 'Foo'), $strategy, array(), true); } } src/Symfony/Component/Security/Acl/Tests/Domain/RoleSecurityIdentityTest.php000066400000000000000000000031771266465517700276410ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; class RoleSecurityIdentityTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $id = new RoleSecurityIdentity('ROLE_FOO'); $this->assertEquals('ROLE_FOO', $id->getRole()); } public function testConstructorWithRoleInstance() { $id = new RoleSecurityIdentity(new Role('ROLE_FOO')); $this->assertEquals('ROLE_FOO', $id->getRole()); } /** * @dataProvider getCompareData */ public function testEquals($id1, $id2, $equal) { if ($equal) { $this->assertTrue($id1->equals($id2)); } else { $this->assertFalse($id1->equals($id2)); } } public function getCompareData() { return array( array(new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('ROLE_FOO'), true), array(new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity(new Role('ROLE_FOO')), true), array(new RoleSecurityIdentity('ROLE_USER'), new RoleSecurityIdentity('ROLE_FOO'), false), array(new RoleSecurityIdentity('ROLE_FOO'), new UserSecurityIdentity('ROLE_FOO', 'Foo'), false), ); } } src/Symfony/Component/Security/Acl/Tests/Domain/SecurityIdentityRetrievalStrategyTest.php000066400000000000000000000162111266465517700324110ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\SecurityIdentityRetrievalStrategy; class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getSecurityIdentityRetrievalTests */ public function testGetSecurityIdentities($user, array $roles, $authenticationStatus, array $sids) { $strategy = $this->getStrategy($roles, $authenticationStatus); if ('anonymous' === $authenticationStatus) { $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken') ->disableOriginalConstructor() ->getMock(); } else { $class = ''; if (is_string($user)) { $class = 'MyCustomTokenImpl'; } $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface') ->setMockClassName($class) ->getMock(); } $token ->expects($this->once()) ->method('getRoles') ->will($this->returnValue(array('foo'))) ; if ('anonymous' === $authenticationStatus) { $token ->expects($this->never()) ->method('getUser') ; } else { $token ->expects($this->once()) ->method('getUser') ->will($this->returnValue($user)) ; } $extractedSids = $strategy->getSecurityIdentities($token); foreach ($extractedSids as $index => $extractedSid) { if (!isset($sids[$index])) { $this->fail(sprintf('Expected SID at index %d, but there was none.', true)); } if (false === $sids[$index]->equals($extractedSid)) { $this->fail(sprintf('Index: %d, expected SID "%s", but got "%s".', $index, $sids[$index], $extractedSid)); } } } public function getSecurityIdentityRetrievalTests() { return array( array($this->getAccount('johannes', 'FooUser'), array('ROLE_USER', 'ROLE_SUPERADMIN'), 'fullFledged', array( new UserSecurityIdentity('johannes', 'FooUser'), new RoleSecurityIdentity('ROLE_USER'), new RoleSecurityIdentity('ROLE_SUPERADMIN'), new RoleSecurityIdentity('IS_AUTHENTICATED_FULLY'), new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), )), array('johannes', array('ROLE_FOO'), 'fullFledged', array( new UserSecurityIdentity('johannes', 'MyCustomTokenImpl'), new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('IS_AUTHENTICATED_FULLY'), new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), )), array(new CustomUserImpl('johannes'), array('ROLE_FOO'), 'fullFledged', array( new UserSecurityIdentity('johannes', 'Symfony\Component\Security\Acl\Tests\Domain\CustomUserImpl'), new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('IS_AUTHENTICATED_FULLY'), new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), )), array($this->getAccount('foo', 'FooBarUser'), array('ROLE_FOO'), 'rememberMe', array( new UserSecurityIdentity('foo', 'FooBarUser'), new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), )), array('guest', array('ROLE_FOO'), 'anonymous', array( new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), )), ); } protected function getAccount($username, $class) { $account = $this->getMock('Symfony\Component\Security\Core\User\UserInterface', array(), array(), $class); $account ->expects($this->any()) ->method('getUsername') ->will($this->returnValue($username)) ; return $account; } protected function getStrategy(array $roles = array(), $authenticationStatus = 'fullFledged') { $roleHierarchy = $this->getMock('Symfony\Component\Security\Core\Role\RoleHierarchyInterface'); $roleHierarchy ->expects($this->once()) ->method('getReachableRoles') ->with($this->equalTo(array('foo'))) ->will($this->returnValue($roles)) ; $trustResolver = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver', array(), array('', '')); $trustResolver ->expects($this->at(0)) ->method('isAnonymous') ->will($this->returnValue('anonymous' === $authenticationStatus)) ; if ('fullFledged' === $authenticationStatus) { $trustResolver ->expects($this->once()) ->method('isFullFledged') ->will($this->returnValue(true)) ; $trustResolver ->expects($this->never()) ->method('isRememberMe') ; } elseif ('rememberMe' === $authenticationStatus) { $trustResolver ->expects($this->once()) ->method('isFullFledged') ->will($this->returnValue(false)) ; $trustResolver ->expects($this->once()) ->method('isRememberMe') ->will($this->returnValue(true)) ; } else { $trustResolver ->expects($this->at(1)) ->method('isAnonymous') ->will($this->returnValue(true)) ; $trustResolver ->expects($this->once()) ->method('isFullFledged') ->will($this->returnValue(false)) ; $trustResolver ->expects($this->once()) ->method('isRememberMe') ->will($this->returnValue(false)) ; } return new SecurityIdentityRetrievalStrategy($roleHierarchy, $trustResolver); } } class CustomUserImpl { protected $name; public function __construct($name) { $this->name = $name; } public function __toString() { return $this->name; } } src/Symfony/Component/Security/Acl/Tests/Domain/UserSecurityIdentityTest.php000066400000000000000000000054501266465517700276520ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Domain; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; class UserSecurityIdentityTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $id = new UserSecurityIdentity('foo', 'Foo'); $this->assertEquals('foo', $id->getUsername()); $this->assertEquals('Foo', $id->getClass()); } // Test that constructor never changes the type, even for proxies public function testConstructorWithProxy() { $id = new UserSecurityIdentity('foo', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\Foo'); $this->assertEquals('foo', $id->getUsername()); $this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\Foo', $id->getClass()); } /** * @dataProvider getCompareData */ public function testEquals($id1, $id2, $equal) { $this->assertSame($equal, $id1->equals($id2)); } public function getCompareData() { $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface') ->setMockClassName('USI_AccountImpl') ->getMock(); $account ->expects($this->any()) ->method('getUsername') ->will($this->returnValue('foo')) ; $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token ->expects($this->any()) ->method('getUser') ->will($this->returnValue($account)) ; return array( array(new UserSecurityIdentity('foo', 'Foo'), new UserSecurityIdentity('foo', 'Foo'), true), array(new UserSecurityIdentity('foo', 'Bar'), new UserSecurityIdentity('foo', 'Foo'), false), array(new UserSecurityIdentity('foo', 'Foo'), new UserSecurityIdentity('bar', 'Foo'), false), array(new UserSecurityIdentity('foo', 'Foo'), UserSecurityIdentity::fromAccount($account), false), array(new UserSecurityIdentity('bla', 'Foo'), new UserSecurityIdentity('blub', 'Foo'), false), array(new UserSecurityIdentity('foo', 'Foo'), new RoleSecurityIdentity('foo'), false), array(new UserSecurityIdentity('foo', 'Foo'), UserSecurityIdentity::fromToken($token), false), array(new UserSecurityIdentity('foo', 'USI_AccountImpl'), UserSecurityIdentity::fromToken($token), true), ); } } src/Symfony/Component/Security/Acl/Tests/Permission/000077500000000000000000000000001266465517700230365ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Tests/Permission/BasicPermissionMapTest.php000066400000000000000000000011711266465517700301370ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Permission; use Symfony\Component\Security\Acl\Permission\BasicPermissionMap; class BasicPermissionMapTest extends \PHPUnit_Framework_TestCase { public function testGetMasksReturnsNullWhenNotSupportedMask() { $map = new BasicPermissionMap(); $this->assertNull($map->getMasks('IS_AUTHENTICATED_REMEMBERED', null)); } } src/Symfony/Component/Security/Acl/Tests/Permission/MaskBuilderTest.php000066400000000000000000000057411266465517700266200ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Permission; use Symfony\Component\Security\Acl\Permission\MaskBuilder; class MaskBuilderTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \InvalidArgumentException * @dataProvider getInvalidConstructorData */ public function testConstructorWithNonInteger($invalidMask) { new MaskBuilder($invalidMask); } public function getInvalidConstructorData() { return array( array(234.463), array('asdgasdf'), array(array()), array(new \stdClass()), ); } public function testConstructorWithoutArguments() { $builder = new MaskBuilder(); $this->assertEquals(0, $builder->get()); } public function testConstructor() { $builder = new MaskBuilder(123456); $this->assertEquals(123456, $builder->get()); } public function testAddAndRemove() { $builder = new MaskBuilder(); $builder ->add('view') ->add('eDiT') ->add('ownEr') ; $mask = $builder->get(); $this->assertEquals(MaskBuilder::MASK_VIEW, $mask & MaskBuilder::MASK_VIEW); $this->assertEquals(MaskBuilder::MASK_EDIT, $mask & MaskBuilder::MASK_EDIT); $this->assertEquals(MaskBuilder::MASK_OWNER, $mask & MaskBuilder::MASK_OWNER); $this->assertEquals(0, $mask & MaskBuilder::MASK_MASTER); $this->assertEquals(0, $mask & MaskBuilder::MASK_CREATE); $this->assertEquals(0, $mask & MaskBuilder::MASK_DELETE); $this->assertEquals(0, $mask & MaskBuilder::MASK_UNDELETE); $builder->remove('edit')->remove('OWner'); $mask = $builder->get(); $this->assertEquals(0, $mask & MaskBuilder::MASK_EDIT); $this->assertEquals(0, $mask & MaskBuilder::MASK_OWNER); $this->assertEquals(MaskBuilder::MASK_VIEW, $mask & MaskBuilder::MASK_VIEW); } public function testGetPattern() { $builder = new MaskBuilder(); $this->assertEquals(MaskBuilder::ALL_OFF, $builder->getPattern()); $builder->add('view'); $this->assertEquals(str_repeat('.', 31).'V', $builder->getPattern()); $builder->add('owner'); $this->assertEquals(str_repeat('.', 24).'N......V', $builder->getPattern()); $builder->add(1 << 10); $this->assertEquals(str_repeat('.', 21).MaskBuilder::ON.'..N......V', $builder->getPattern()); } public function testReset() { $builder = new MaskBuilder(); $this->assertEquals(0, $builder->get()); $builder->add('view'); $this->assertTrue($builder->get() > 0); $builder->reset(); $this->assertEquals(0, $builder->get()); } } src/Symfony/Component/Security/Acl/Tests/Voter/000077500000000000000000000000001266465517700220055ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Tests/Voter/AclVoterTest.php000066400000000000000000000340241266465517700251000ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Tests\Voter; use Symfony\Component\Security\Acl\Exception\NoAceFoundException; use Symfony\Component\Security\Acl\Voter\FieldVote; use Symfony\Component\Security\Acl\Exception\AclNotFoundException; use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Acl\Voter\AclVoter; class AclVoterTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getSupportsAttributeTests */ public function testSupportsAttribute($attribute, $supported) { list($voter, , $permissionMap) = $this->getVoter(true, false); $permissionMap ->expects($this->once()) ->method('contains') ->with($this->identicalTo($attribute)) ->will($this->returnValue($supported)) ; $this->assertSame($supported, $voter->supportsAttribute($attribute)); } /** * @dataProvider getSupportsAttributeNonStringTests */ public function testSupportsAttributeNonString($attribute) { list($voter) = $this->getVoter(true, false); $this->assertFalse($voter->supportsAttribute($attribute)); } public function getSupportsAttributeTests() { return array( array('foo', true), array('foo', false), ); } public function getSupportsAttributeNonStringTests() { return array( array(new \stdClass()), array(1), array(true), array(array()), ); } /** * @dataProvider getSupportsClassTests */ public function testSupportsClass($class) { list($voter) = $this->getVoter(); $this->assertTrue($voter->supportsClass($class)); } public function getSupportsClassTests() { return array( array('foo'), array('bar'), array('moo'), ); } public function testVote() { list($voter, , $permissionMap) = $this->getVoter(); $permissionMap ->expects($this->atLeastOnce()) ->method('getMasks') ->will($this->returnValue(null)) ; $this->assertSame(VoterInterface::ACCESS_ABSTAIN, $voter->vote($this->getToken(), null, array('VIEW', 'EDIT', 'DELETE'))); } /** * @dataProvider getTrueFalseTests */ public function testVoteWhenNoObjectIsPassed($allowIfObjectIdentityUnavailable) { list($voter, , $permissionMap) = $this->getVoter($allowIfObjectIdentityUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') ->will($this->returnValue(array())) ; if ($allowIfObjectIdentityUnavailable) { $vote = VoterInterface::ACCESS_GRANTED; } else { $vote = VoterInterface::ACCESS_ABSTAIN; } $this->assertSame($vote, $voter->vote($this->getToken(), null, array('VIEW'))); } /** * @dataProvider getTrueFalseTests */ public function testVoteWhenOidStrategyReturnsNull($allowIfUnavailable) { list($voter, , $permissionMap, $oidStrategy) = $this->getVoter($allowIfUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') ->will($this->returnValue(array())) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue(null)) ; if ($allowIfUnavailable) { $vote = VoterInterface::ACCESS_GRANTED; } else { $vote = VoterInterface::ACCESS_ABSTAIN; } $this->assertSame($vote, $voter->vote($this->getToken(), new \stdClass(), array('VIEW'))); } public function getTrueFalseTests() { return array(array(true), array(false)); } public function testVoteNoAclFound() { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $permissionMap ->expects($this->once()) ->method('getMasks') ->will($this->returnValue(array())) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue($oid = new ObjectIdentity('1', 'Foo'))) ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->throwException(new AclNotFoundException('Not found.'))) ; $this->assertSame(VoterInterface::ACCESS_DENIED, $voter->vote($this->getToken(), new \stdClass(), array('VIEW'))); } /** * @dataProvider getTrueFalseTests */ public function testVoteGrantsAccess($grant) { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $permissionMap ->expects($this->once()) ->method('getMasks') ->with($this->equalTo('VIEW')) ->will($this->returnValue($masks = array(1, 2, 3))) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue($oid = new ObjectIdentity('1', 'Foo'))) ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->returnValue($acl = $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'))) ; $acl ->expects($this->once()) ->method('isGranted') ->with($this->identicalTo($masks), $this->equalTo($sids), $this->isFalse()) ->will($this->returnValue($grant)) ; if ($grant) { $vote = VoterInterface::ACCESS_GRANTED; } else { $vote = VoterInterface::ACCESS_DENIED; } $this->assertSame($vote, $voter->vote($this->getToken(), new \stdClass(), array('VIEW'))); } public function testVoteNoAceFound() { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $permissionMap ->expects($this->once()) ->method('getMasks') ->with($this->equalTo('VIEW')) ->will($this->returnValue($masks = array(1, 2, 3))) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue($oid = new ObjectIdentity('1', 'Foo'))) ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->returnValue($acl = $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'))) ; $acl ->expects($this->once()) ->method('isGranted') ->with($this->identicalTo($masks), $this->equalTo($sids), $this->isFalse()) ->will($this->throwException(new NoAceFoundException('No ACE'))) ; $this->assertSame(VoterInterface::ACCESS_DENIED, $voter->vote($this->getToken(), new \stdClass(), array('VIEW'))); } /** * @dataProvider getTrueFalseTests */ public function testVoteGrantsFieldAccess($grant) { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $permissionMap ->expects($this->once()) ->method('getMasks') ->with($this->equalTo('VIEW')) ->will($this->returnValue($masks = array(1, 2, 3))) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue($oid = new ObjectIdentity('1', 'Foo'))) ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->returnValue($acl = $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'))) ; $acl ->expects($this->once()) ->method('isFieldGranted') ->with($this->identicalTo('foo'), $this->identicalTo($masks), $this->equalTo($sids), $this->isFalse()) ->will($this->returnValue($grant)) ; if ($grant) { $vote = VoterInterface::ACCESS_GRANTED; } else { $vote = VoterInterface::ACCESS_DENIED; } $this->assertSame($vote, $voter->vote($this->getToken(), new FieldVote(new \stdClass(), 'foo'), array('VIEW'))); } public function testVoteNoFieldAceFound() { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $permissionMap ->expects($this->once()) ->method('getMasks') ->with($this->equalTo('VIEW')) ->will($this->returnValue($masks = array(1, 2, 3))) ; $oidStrategy ->expects($this->once()) ->method('getObjectIdentity') ->will($this->returnValue($oid = new ObjectIdentity('1', 'Foo'))) ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->returnValue($acl = $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'))) ; $acl ->expects($this->once()) ->method('isFieldGranted') ->with($this->identicalTo('foo'), $this->identicalTo($masks), $this->equalTo($sids), $this->isFalse()) ->will($this->throwException(new NoAceFoundException('No ACE'))) ; $this->assertSame(VoterInterface::ACCESS_DENIED, $voter->vote($this->getToken(), new FieldVote(new \stdClass(), 'foo'), array('VIEW'))); } public function testWhenReceivingAnObjectIdentityInterfaceWeDontRetrieveANewObjectIdentity() { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); $oid = new ObjectIdentity('someID', 'someType'); $permissionMap ->expects($this->once()) ->method('getMasks') ->with($this->equalTo('VIEW')) ->will($this->returnValue($masks = array(1, 2, 3))) ; $oidStrategy ->expects($this->never()) ->method('getObjectIdentity') ; $sidStrategy ->expects($this->once()) ->method('getSecurityIdentities') ->will($this->returnValue($sids = array(new UserSecurityIdentity('johannes', 'Foo'), new RoleSecurityIdentity('ROLE_FOO')))) ; $provider ->expects($this->once()) ->method('findAcl') ->with($this->equalTo($oid), $this->equalTo($sids)) ->will($this->returnValue($acl = $this->getMock('Symfony\Component\Security\Acl\Model\AclInterface'))) ; $acl ->expects($this->once()) ->method('isGranted') ->with($this->identicalTo($masks), $this->equalTo($sids), $this->isFalse()) ->will($this->throwException(new NoAceFoundException('No ACE'))) ; $voter->vote($this->getToken(), $oid, array('VIEW')); } protected function getToken() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } protected function getVoter($allowIfObjectIdentityUnavailable = true, $alwaysContains = true) { $provider = $this->getMock('Symfony\Component\Security\Acl\Model\AclProviderInterface'); $permissionMap = $this->getMock('Symfony\Component\Security\Acl\Permission\PermissionMapInterface'); $oidStrategy = $this->getMock('Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface'); $sidStrategy = $this->getMock('Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface'); if ($alwaysContains) { $permissionMap ->expects($this->any()) ->method('contains') ->will($this->returnValue(true)); } return array( new AclVoter($provider, $oidStrategy, $sidStrategy, $permissionMap, null, $allowIfObjectIdentityUnavailable), $provider, $permissionMap, $oidStrategy, $sidStrategy, ); } } src/Symfony/Component/Security/Acl/Voter/000077500000000000000000000000001266465517700207035ustar00rootroot00000000000000src/Symfony/Component/Security/Acl/Voter/AclVoter.php000066400000000000000000000131711266465517700231360ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Voter; use Psr\Log\LoggerInterface; use Symfony\Component\Security\Acl\Exception\NoAceFoundException; use Symfony\Component\Security\Acl\Exception\AclNotFoundException; use Symfony\Component\Security\Acl\Model\AclProviderInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface; use Symfony\Component\Security\Acl\Permission\PermissionMapInterface; use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; /** * This voter can be used as a base class for implementing your own permissions. * * @author Johannes M. Schmitt */ class AclVoter implements VoterInterface { private $aclProvider; private $permissionMap; private $objectIdentityRetrievalStrategy; private $securityIdentityRetrievalStrategy; private $allowIfObjectIdentityUnavailable; private $logger; public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy, PermissionMapInterface $permissionMap, LoggerInterface $logger = null, $allowIfObjectIdentityUnavailable = true) { $this->aclProvider = $aclProvider; $this->permissionMap = $permissionMap; $this->objectIdentityRetrievalStrategy = $oidRetrievalStrategy; $this->securityIdentityRetrievalStrategy = $sidRetrievalStrategy; $this->logger = $logger; $this->allowIfObjectIdentityUnavailable = $allowIfObjectIdentityUnavailable; } public function supportsAttribute($attribute) { return is_string($attribute) && $this->permissionMap->contains($attribute); } public function vote(TokenInterface $token, $object, array $attributes) { foreach ($attributes as $attribute) { if (!$this->supportsAttribute($attribute)) { continue; } if (null === $masks = $this->permissionMap->getMasks($attribute, $object)) { continue; } if (null === $object) { if (null !== $this->logger) { $this->logger->debug(sprintf('Object identity unavailable. Voting to %s.', $this->allowIfObjectIdentityUnavailable ? 'grant access' : 'abstain')); } return $this->allowIfObjectIdentityUnavailable ? self::ACCESS_GRANTED : self::ACCESS_ABSTAIN; } elseif ($object instanceof FieldVote) { $field = $object->getField(); $object = $object->getDomainObject(); } else { $field = null; } if ($object instanceof ObjectIdentityInterface) { $oid = $object; } elseif (null === $oid = $this->objectIdentityRetrievalStrategy->getObjectIdentity($object)) { if (null !== $this->logger) { $this->logger->debug(sprintf('Object identity unavailable. Voting to %s.', $this->allowIfObjectIdentityUnavailable ? 'grant access' : 'abstain')); } return $this->allowIfObjectIdentityUnavailable ? self::ACCESS_GRANTED : self::ACCESS_ABSTAIN; } if (!$this->supportsClass($oid->getType())) { return self::ACCESS_ABSTAIN; } $sids = $this->securityIdentityRetrievalStrategy->getSecurityIdentities($token); try { $acl = $this->aclProvider->findAcl($oid, $sids); if (null === $field && $acl->isGranted($masks, $sids, false)) { if (null !== $this->logger) { $this->logger->debug('ACL found, permission granted. Voting to grant access.'); } return self::ACCESS_GRANTED; } elseif (null !== $field && $acl->isFieldGranted($field, $masks, $sids, false)) { if (null !== $this->logger) { $this->logger->debug('ACL found, permission granted. Voting to grant access.'); } return self::ACCESS_GRANTED; } if (null !== $this->logger) { $this->logger->debug('ACL found, insufficient permissions. Voting to deny access.'); } return self::ACCESS_DENIED; } catch (AclNotFoundException $e) { if (null !== $this->logger) { $this->logger->debug('No ACL found for the object identity. Voting to deny access.'); } return self::ACCESS_DENIED; } catch (NoAceFoundException $e) { if (null !== $this->logger) { $this->logger->debug('ACL found, no ACE applicable. Voting to deny access.'); } return self::ACCESS_DENIED; } } // no attribute was supported return self::ACCESS_ABSTAIN; } /** * You can override this method when writing a voter for a specific domain * class. * * @param string $class The class name * * @return bool */ public function supportsClass($class) { return true; } } src/Symfony/Component/Security/Acl/Voter/FieldVote.php000066400000000000000000000015101266465517700232720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Acl\Voter; /** * This class is a lightweight wrapper around field vote requests which does * not violate any interface contracts. * * @author Johannes M. Schmitt */ class FieldVote { private $domainObject; private $field; public function __construct($domainObject, $field) { $this->domainObject = $domainObject; $this->field = $field; } public function getDomainObject() { return $this->domainObject; } public function getField() { return $this->field; } } src/Symfony/Component/Security/Acl/composer.json000066400000000000000000000022501266465517700223250ustar00rootroot00000000000000{ "name": "symfony/security-acl", "type": "library", "description": "Symfony Security Component - ACL (Access Control List)", "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.3.9", "symfony/security-core": "~2.4" }, "require-dev": { "doctrine/common": "~2.2", "doctrine/dbal": "~2.2", "psr/log": "~1.0" }, "suggest": { "symfony/class-loader": "For using the ACL generateSql script", "symfony/finder": "For using the ACL generateSql script", "doctrine/dbal": "For using the built-in ACL implementation" }, "autoload": { "psr-4": { "Symfony\\Component\\Security\\Acl\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Security/Acl/phpunit.xml.dist000066400000000000000000000016661266465517700227700ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Security/CHANGELOG.md000066400000000000000000000072571266465517700207310ustar00rootroot00000000000000CHANGELOG ========= 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`). src/Symfony/Component/Security/Core/000077500000000000000000000000001266465517700177755ustar00rootroot00000000000000src/Symfony/Component/Security/Core/.gitignore000066400000000000000000000000421266465517700217610ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Security/Core/Authentication/000077500000000000000000000000001266465517700227545ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php000066400000000000000000000020271266465517700315610ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php000066400000000000000000000076071266465517700314640ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php000066400000000000000000000032171266465517700312330ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php000066400000000000000000000025161266465517700330550ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/Provider/000077500000000000000000000000001266465517700245465ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php000066400000000000000000000026561266465517700336730ustar00rootroot00000000000000 * * 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 { private $key; /** * Constructor. * * @param string $key The key shared with the authentication token */ public function __construct($key) { $this->key = $key; } /** * {@inheritdoc} */ public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { return; } if ($this->key !== $token->getKey()) { throw new BadCredentialsException('The Token does not contain the expected key.'); } return $token; } /** * {@inheritdoc} */ public function supports(TokenInterface $token) { return $token instanceof AnonymousToken; } } src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php000066400000000000000000000020361266465517700335730ustar00rootroot00000000000000 * * 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 { /** * 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); } src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php000066400000000000000000000073261266465517700324050ustar00rootroot00000000000000 * * 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; } } } PreAuthenticatedAuthenticationProvider.php000066400000000000000000000051031266465517700350430ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/Provider * * 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(); } } src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php000066400000000000000000000037221266465517700337160ustar00rootroot00000000000000 * * 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 $key; private $providerKey; /** * Constructor. * * @param UserCheckerInterface $userChecker An UserCheckerInterface interface * @param string $key A key * @param string $providerKey A provider key */ public function __construct(UserCheckerInterface $userChecker, $key, $providerKey) { $this->userChecker = $userChecker; $this->key = $key; $this->providerKey = $providerKey; } /** * {@inheritdoc} */ public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { return; } if ($this->key !== $token->getKey()) { throw new BadCredentialsException('The presented key does not match.'); } $user = $token->getUser(); $this->userChecker->checkPreAuth($user); $authenticatedToken = new RememberMeToken($user, $this->providerKey, $this->key); $authenticatedToken->setAttributes($token->getAttributes()); return $authenticatedToken; } /** * {@inheritdoc} */ public function supports(TokenInterface $token) { return $token instanceof RememberMeToken && $token->getProviderKey() === $this->providerKey; } } src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php000066400000000000000000000031661266465517700331310ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php000066400000000000000000000121571266465517700326160ustar00rootroot00000000000000 * * 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 = '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); } src/Symfony/Component/Security/Core/Authentication/RememberMe/000077500000000000000000000000001266465517700247745ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php000066400000000000000000000032411266465517700317600ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php000066400000000000000000000043201266465517700306450ustar00rootroot00000000000000 * * 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; /** * This class is only used by PersistentTokenRememberMeServices internally. * * @author Johannes M. Schmitt */ 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; } } src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php000066400000000000000000000021331266465517700324660ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php000066400000000000000000000026171266465517700321270ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php000066400000000000000000000013171266465517700312740ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/SimpleFormAuthenticatorInterface.php000066400000000000000000000010721266465517700321160ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; /** * @author Jordi Boggiano */ interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface { public function createToken(Request $request, $username, $password, $providerKey); } src/Symfony/Component/Security/Core/Authentication/SimplePreAuthenticatorInterface.php000066400000000000000000000010431266465517700317370ustar00rootroot00000000000000 * * 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\HttpFoundation\Request; /** * @author Jordi Boggiano */ interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface { public function createToken(Request $request, $providerKey); } src/Symfony/Component/Security/Core/Authentication/Token/000077500000000000000000000000001266465517700240345ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php000066400000000000000000000167151266465517700273230ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php000066400000000000000000000030551266465517700275410ustar00rootroot00000000000000 * * 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 $key; /** * Constructor. * * @param string $key The key shared with the authentication provider * @param string $user The user * @param RoleInterface[] $roles An array of roles */ public function __construct($key, $user, array $roles = array()) { parent::__construct($roles); $this->key = $key; $this->setUser($user); $this->setAuthenticated(true); } /** * {@inheritdoc} */ public function getCredentials() { return ''; } /** * Returns the key. * * @return string The Key */ public function getKey() { return $this->key; } /** * {@inheritdoc} */ public function serialize() { return serialize(array($this->key, parent::serialize())); } /** * {@inheritdoc} */ public function unserialize($serialized) { list($this->key, $parentStr) = unserialize($serialized); parent::unserialize($parentStr); } } src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php000066400000000000000000000042601266465517700310010ustar00rootroot00000000000000 * * 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 * @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); } } src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php000066400000000000000000000046021266465517700275700ustar00rootroot00000000000000 * * 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 $key; private $providerKey; /** * Constructor. * * @param UserInterface $user * @param string $providerKey * @param string $key * * @throws \InvalidArgumentException */ public function __construct(UserInterface $user, $providerKey, $key) { parent::__construct($user->getRoles()); if (empty($key)) { throw new \InvalidArgumentException('$key must not be empty.'); } if (empty($providerKey)) { throw new \InvalidArgumentException('$providerKey must not be empty.'); } $this->providerKey = $providerKey; $this->key = $key; $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 key. * * @return string The provider key */ public function getProviderKey() { return $this->providerKey; } /** * Returns the key. * * @return string The Key */ public function getKey() { return $this->key; } /** * {@inheritdoc} */ public function getCredentials() { return ''; } /** * {@inheritdoc} */ public function serialize() { return serialize(array( $this->key, $this->providerKey, parent::serialize(), )); } /** * {@inheritdoc} */ public function unserialize($serialized) { list($this->key, $this->providerKey, $parentStr) = unserialize($serialized); parent::unserialize($parentStr); } } src/Symfony/Component/Security/Core/Authentication/Token/Storage/000077500000000000000000000000001266465517700254405ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php000066400000000000000000000016651266465517700305660ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorageInterface.php000066400000000000000000000017211266465517700324000ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php000066400000000000000000000060301266465517700274450ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php000066400000000000000000000052041266465517700310510ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/AuthenticationEvents.php000066400000000000000000000020031266465517700246450ustar00rootroot00000000000000 * * 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. * * The event listener method receives a * Symfony\Component\Security\Core\Event\AuthenticationEvent instance. * * @var string */ const AUTHENTICATION_SUCCESS = 'security.authentication.success'; /** * The AUTHENTICATION_FAILURE event occurs after a user cannot be * authenticated by any of the providers. * * The event listener method receives a * Symfony\Component\Security\Core\Event\AuthenticationFailureEvent * instance. * * @var string */ const AUTHENTICATION_FAILURE = 'security.authentication.failure'; } src/Symfony/Component/Security/Core/Authorization/000077500000000000000000000000001266465517700226355ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php000066400000000000000000000145231266465517700275250ustar00rootroot00000000000000 * * 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, $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) { if (!$voters) { throw new \InvalidArgumentException('You must at least add one voter.'); } $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; } /** * {@inheritdoc} */ public function decide(TokenInterface $token, array $attributes, $object = null) { return $this->{$this->strategy}($token, $attributes, $object); } /** * {@inheritdoc} */ public function supportsAttribute($attribute) { foreach ($this->voters as $voter) { if ($voter->supportsAttribute($attribute)) { return true; } } return false; } /** * {@inheritdoc} */ public function supportsClass($class) { foreach ($this->voters as $voter) { if ($voter->supportsClass($class)) { return true; } } return false; } /** * 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; $abstain = 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; default: ++$abstain; break; } } if ($grant > $deny) { return true; } if ($deny > $grant) { return false; } if ($grant == $deny && $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; } } src/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php000066400000000000000000000030241266465517700313400ustar00rootroot00000000000000 * * 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); /** * Checks if the access decision manager supports the given attribute. * * @param string $attribute An attribute * * @return bool true if this decision manager supports the attribute, false otherwise */ public function supportsAttribute($attribute); /** * Checks if the access decision manager supports the given class. * * @param string $class A class name * * @return true if this decision manager can process the class */ public function supportsClass($class); } src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php000066400000000000000000000052551266465517700275020ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Authorization/AuthorizationCheckerInterface.php000066400000000000000000000013321266465517700313130ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php000066400000000000000000000017151266465517700271550ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php000066400000000000000000000041201266465517700306610ustar00rootroot00000000000000 * * 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']); }), ); } } src/Symfony/Component/Security/Core/Authorization/Voter/000077500000000000000000000000001266465517700237345ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php000066400000000000000000000073101266465517700272310ustar00rootroot00000000000000 * * 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\User\UserInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** * Abstract Voter implementation that reduces boilerplate code required to create a custom Voter. * * @author Roman Marintšenko */ abstract class AbstractVoter implements VoterInterface { /** * {@inheritdoc} */ public function supportsAttribute($attribute) { return in_array($attribute, $this->getSupportedAttributes()); } /** * {@inheritdoc} */ public function supportsClass($class) { foreach ($this->getSupportedClasses() as $supportedClass) { if ($supportedClass === $class || is_subclass_of($class, $supportedClass)) { return true; } } return false; } /** * Iteratively check all given attributes by calling isGranted. * * This method terminates as soon as it is able to return ACCESS_GRANTED * If at least one attribute is supported, but access not granted, then ACCESS_DENIED is returned * Otherwise it will return ACCESS_ABSTAIN * * @param TokenInterface $token A TokenInterface instance * @param object $object The object 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, $object, array $attributes) { if (!$object || !$this->supportsClass(get_class($object))) { return self::ACCESS_ABSTAIN; } // abstain vote by default in case none of the attributes are supported $vote = self::ACCESS_ABSTAIN; foreach ($attributes as $attribute) { if (!$this->supportsAttribute($attribute)) { continue; } // as soon as at least one attribute is supported, default is to deny access $vote = self::ACCESS_DENIED; if ($this->isGranted($attribute, $object, $token->getUser())) { // grant access as soon as at least one voter returns a positive response return self::ACCESS_GRANTED; } } return $vote; } /** * Return an array of supported classes. This will be called by supportsClass. * * @return array an array of supported classes, i.e. array('Acme\DemoBundle\Model\Product') */ abstract protected function getSupportedClasses(); /** * Return an array of supported attributes. This will be called by supportsAttribute. * * @return array an array of supported attributes, i.e. array('CREATE', 'READ') */ abstract protected function getSupportedAttributes(); /** * Perform a single access check operation on a given attribute, object and (optionally) user * It is safe to assume that $attribute and $object's class pass supportsAttribute/supportsClass * $user can be one of the following: * a UserInterface object (fully authenticated user) * a string (anonymously authenticated user). * * @param string $attribute * @param object $object * @param UserInterface|string $user * * @return bool */ abstract protected function isGranted($attribute, $object, $user = null); } src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php000066400000000000000000000060371266465517700302550ustar00rootroot00000000000000 * * 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 supportsAttribute($attribute) { return null !== $attribute && (self::IS_AUTHENTICATED_FULLY === $attribute || self::IS_AUTHENTICATED_REMEMBERED === $attribute || self::IS_AUTHENTICATED_ANONYMOUSLY === $attribute); } /** * {@inheritdoc} */ public function supportsClass($class) { return true; } /** * {@inheritdoc} */ public function vote(TokenInterface $token, $object, array $attributes) { $result = VoterInterface::ACCESS_ABSTAIN; foreach ($attributes as $attribute) { if (!$this->supportsAttribute($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; } } src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php000066400000000000000000000071171266465517700276320ustar00rootroot00000000000000 * * 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 supportsAttribute($attribute) { return $attribute instanceof Expression; } /** * {@inheritdoc} */ public function supportsClass($class) { return true; } /** * {@inheritdoc} */ public function vote(TokenInterface $token, $object, array $attributes) { $result = VoterInterface::ACCESS_ABSTAIN; $variables = null; foreach ($attributes as $attribute) { if (!$this->supportsAttribute($attribute)) { continue; } if (null === $variables) { $variables = $this->getVariables($token, $object); } $result = VoterInterface::ACCESS_DENIED; if ($this->expressionLanguage->evaluate($attribute, $variables)) { return VoterInterface::ACCESS_GRANTED; } } return $result; } private function getVariables(TokenInterface $token, $object) { if (null !== $this->roleHierarchy) { $roles = $this->roleHierarchy->getReachableRoles($token->getRoles()); } else { $roles = $token->getRoles(); } $variables = array( 'token' => $token, 'user' => $token->getUser(), 'object' => $object, '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 ($object instanceof Request) { $variables['request'] = $object; } return $variables; } } src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php000066400000000000000000000020361266465517700302260ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php000066400000000000000000000033511266465517700263700ustar00rootroot00000000000000 * * 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; /** * 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 supportsAttribute($attribute) { return 0 === strpos($attribute, $this->prefix); } /** * {@inheritdoc} */ public function supportsClass($class) { return true; } /** * {@inheritdoc} */ public function vote(TokenInterface $token, $object, array $attributes) { $result = VoterInterface::ACCESS_ABSTAIN; $roles = $this->extractRoles($token); foreach ($attributes as $attribute) { if (!$this->supportsAttribute($attribute)) { 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(); } } src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php000066400000000000000000000033121266465517700273640ustar00rootroot00000000000000 * * 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; /** * Checks if the voter supports the given attribute. * * @param mixed $attribute An attribute (usually the attribute name string) * * @return bool true if this Voter supports the attribute, false otherwise */ public function supportsAttribute($attribute); /** * Checks if the voter supports the given class. * * @param string $class A class name * * @return bool true if this Voter can process the class */ public function supportsClass($class); /** * 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 object|null $object The object 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, $object, array $attributes); } src/Symfony/Component/Security/Core/Encoder/000077500000000000000000000000001266465517700213545ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php000066400000000000000000000051441266465517700263170ustar00rootroot00000000000000 * * 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) { if (!function_exists('password_hash')) { throw new \RuntimeException('To use the BCrypt encoder, you need to upgrade to PHP 5.5 or install the "ircmaxell/password-compat" via Composer.'); } $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 * * @link 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) { $options['salt'] = $salt; } return password_hash($raw, PASSWORD_BCRYPT, $options); } /** * {@inheritdoc} */ public function isPasswordValid($encoded, $raw, $salt) { return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded); } } src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php000066400000000000000000000054401266465517700257650ustar00rootroot00000000000000 * * 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\Util\StringUtils; /** * 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 StringUtils::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; } } src/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php000066400000000000000000000012001266465517700262360ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php000066400000000000000000000047201266465517700247770ustar00rootroot00000000000000 * * 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['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']); } } src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php000066400000000000000000000015611266465517700266200ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php000066400000000000000000000042071266465517700276370ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php000066400000000000000000000020231266465517700270050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php000066400000000000000000000065731266465517700262330ustar00rootroot00000000000000 * * 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)); } if (function_exists('hash_pbkdf2')) { $digest = hash_pbkdf2($this->algorithm, $raw, $salt, $this->iterations, $this->length, true); } else { $digest = $this->hashPbkdf2($this->algorithm, $raw, $salt, $this->iterations, $this->length); } 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)); } private function hashPbkdf2($algorithm, $password, $salt, $iterations, $length = 0) { // Number of blocks needed to create the derived key $blocks = ceil($length / strlen(hash($algorithm, null, true))); $digest = ''; for ($i = 1; $i <= $blocks; ++$i) { $ib = $block = hash_hmac($algorithm, $salt.pack('N', $i), $password, true); // Iterations for ($j = 1; $j < $iterations; ++$j) { $ib ^= ($block = hash_hmac($algorithm, $block, $password, true)); } $digest .= $ib; } return substr($digest, 0, $this->length); } } src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php000066400000000000000000000030141266465517700270560ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php000066400000000000000000000024771266465517700260400ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php000066400000000000000000000020761266465517700276540ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Event/000077500000000000000000000000001266465517700210565ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Event/AuthenticationEvent.php000066400000000000000000000014571266465517700255570ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php000066400000000000000000000016621266465517700270650ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Exception/000077500000000000000000000000001266465517700217335ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php000066400000000000000000000012061266465517700266340ustar00rootroot00000000000000 * * 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 { public function __construct($message = 'Access Denied.', \Exception $previous = null) { parent::__construct($message, 403, $previous); } } src/Symfony/Component/Security/Core/Exception/AccountExpiredException.php000066400000000000000000000012201266465517700272330ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/AccountStatusException.php000066400000000000000000000025011266465517700271210ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php000066400000000000000000000013631266465517700331400ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/AuthenticationException.php000066400000000000000000000034221266465517700273030ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php000066400000000000000000000013751266465517700306310ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/BadCredentialsException.php000066400000000000000000000012251266465517700271670ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/CookieTheftException.php000066400000000000000000000013651266465517700265340ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php000066400000000000000000000012521266465517700301010ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/DisabledException.php000066400000000000000000000012041266465517700260270ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/ExceptionInterface.php000066400000000000000000000006721266465517700262300ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php000066400000000000000000000014641266465517700316560ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php000066400000000000000000000010021266465517700274050ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php000066400000000000000000000012131266465517700275250ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/LockedException.php000066400000000000000000000011721266465517700255250ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/LogoutException.php000066400000000000000000000011631266465517700255750ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/Exception/NonceExpiredException.php000066400000000000000000000012731266465517700267110ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php000066400000000000000000000013711266465517700275740ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/RuntimeException.php000066400000000000000000000007521266465517700257520ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php000066400000000000000000000016101266465517700301100ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php000066400000000000000000000012211266465517700270540ustar00rootroot00000000000000 * * 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.'; } } src/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php000066400000000000000000000010741266465517700275140ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php000066400000000000000000000030171266465517700275600ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Core/LICENSE000066400000000000000000000020511266465517700210000ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Security/Core/README.md000066400000000000000000000010651266465517700212560ustar00rootroot00000000000000Security 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/2.7/book/security.html Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/Core/ $ composer.phar install --dev $ phpunit src/Symfony/Component/Security/Core/Resources/000077500000000000000000000000001266465517700217475ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Resources/translations/000077500000000000000000000000001266465517700244705ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf000066400000000000000000000072721266465517700274630ustar00rootroot00000000000000 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. الحساب مغلق. src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf000066400000000000000000000065141266465517700274710ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf000066400000000000000000000075231266465517700274500ustar00rootroot00000000000000 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. Акаунта е заключен. src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf000066400000000000000000000066431266465517700274450ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf000066400000000000000000000066131266465517700274640ustar00rootroot00000000000000 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ý. src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf000066400000000000000000000065121266465517700274410ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf000066400000000000000000000067101266465517700274450ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf000066400000000000000000000077421266465517700274630ustar00rootroot00000000000000 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. Ο λογαριασμός είναι κλειδωμένος. src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf000066400000000000000000000064721266465517700274640ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf000066400000000000000000000067031266465517700274660ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf000066400000000000000000000074311266465517700274440ustar00rootroot00000000000000 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. حساب کاربری قفل شده است. src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf000066400000000000000000000067371266465517700274750ustar00rootroot00000000000000 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é. src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf000066400000000000000000000066371266465517700274670ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf000066400000000000000000000064721266465517700274560ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf000066400000000000000000000065271266465517700274740ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf000066400000000000000000000066561266465517700275020ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf000066400000000000000000000065041266465517700274520ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf000066400000000000000000000066161266465517700274760ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf000066400000000000000000000070701266465517700274470ustar00rootroot00000000000000 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. アカウントはロックされています。 src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf000066400000000000000000000067241266465517700274570ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf000066400000000000000000000065741266465517700275040ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf000066400000000000000000000067071266465517700274740ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf000066400000000000000000000066061266465517700274750ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf000066400000000000000000000066061266465517700274740ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf000066400000000000000000000066101266465517700300620ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf000066400000000000000000000065741266465517700301130ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf000066400000000000000000000066151266465517700275010ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf000066400000000000000000000076751266465517700275160ustar00rootroot00000000000000 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. Учетная запись заблокирована. src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf000066400000000000000000000066021266465517700274720ustar00rootroot00000000000000 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ý. src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf000066400000000000000000000065441266465517700275000ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf000066400000000000000000000075121266465517700304730ustar00rootroot00000000000000 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. Налог је закључан. src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf000066400000000000000000000065471266465517700304670ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf000066400000000000000000000065361266465517700275130ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf000066400000000000000000000100311266465517700274570ustar00rootroot00000000000000 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. บัญชีถูกล็อกแล้ว src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf000066400000000000000000000065601266465517700275050ustar00rootroot00000000000000 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ş. src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf000066400000000000000000000076031266465517700274640ustar00rootroot00000000000000 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. Обліковий запис заблоковано. src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf000066400000000000000000000070251266465517700274730ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf000066400000000000000000000063741266465517700300640ustar00rootroot00000000000000 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. 帐号已被锁定。 src/Symfony/Component/Security/Core/Role/000077500000000000000000000000001266465517700206765ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Role/Role.php000066400000000000000000000014051266465517700223100ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Role/RoleHierarchy.php000066400000000000000000000035031266465517700241500ustar00rootroot00000000000000 * * 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; $this->map[$main] = array_unique(array_merge($this->map[$main], $this->hierarchy[$role])); $additionalRoles = array_merge($additionalRoles, array_diff($this->hierarchy[$role], $visited)); } } } } src/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php000066400000000000000000000015671266465517700260010ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/Role/RoleInterface.php000066400000000000000000000016171266465517700241360ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Security/Core/Role/SwitchUserRole.php000066400000000000000000000020601266465517700243270ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Security.php000066400000000000000000000011031266465517700223100ustar00rootroot00000000000000 * * 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'; } src/Symfony/Component/Security/Core/SecurityContext.php000066400000000000000000000077221266465517700236720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core; @trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead.', E_USER_DEPRECATED); use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; 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\TokenInterface; use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; /** * SecurityContext is the main entry point of the Security component. * * It gives access to the token representing the current user authentication. * * @author Fabien Potencier * @author Johannes M. Schmitt * * @deprecated since version 2.6, to be removed in 3.0. */ class SecurityContext implements SecurityContextInterface { /** * @var TokenStorageInterface */ private $tokenStorage; /** * @var AuthorizationCheckerInterface */ private $authorizationChecker; /** * For backwards compatibility, the signature of sf <2.6 still works. * * @param TokenStorageInterface|AuthenticationManagerInterface $tokenStorage * @param AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker * @param bool $alwaysAuthenticate only applicable with old signature */ public function __construct($tokenStorage, $authorizationChecker, $alwaysAuthenticate = false) { $oldSignature = $tokenStorage instanceof AuthenticationManagerInterface && $authorizationChecker instanceof AccessDecisionManagerInterface; $newSignature = $tokenStorage instanceof TokenStorageInterface && $authorizationChecker instanceof AuthorizationCheckerInterface; // confirm possible signatures if (!$oldSignature && !$newSignature) { throw new \BadMethodCallException('Unable to construct SecurityContext, please provide the correct arguments'); } if ($oldSignature) { // renamed for clarity $authenticationManager = $tokenStorage; $accessDecisionManager = $authorizationChecker; $tokenStorage = new TokenStorage(); $authorizationChecker = new AuthorizationChecker($tokenStorage, $authenticationManager, $accessDecisionManager, $alwaysAuthenticate); } $this->tokenStorage = $tokenStorage; $this->authorizationChecker = $authorizationChecker; } /** * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. * * {@inheritdoc} */ public function getToken() { return $this->tokenStorage->getToken(); } /** * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. * * {@inheritdoc} */ public function setToken(TokenInterface $token = null) { return $this->tokenStorage->setToken($token); } /** * @deprecated since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. * * {@inheritdoc} */ public function isGranted($attributes, $object = null) { return $this->authorizationChecker->isGranted($attributes, $object); } } src/Symfony/Component/Security/Core/SecurityContextInterface.php000066400000000000000000000015701266465517700255060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; /** * The SecurityContextInterface. * * @author Johannes M. Schmitt * * @deprecated since version 2.6, to be removed in 3.0. */ interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface { const ACCESS_DENIED_ERROR = Security::ACCESS_DENIED_ERROR; const AUTHENTICATION_ERROR = Security::AUTHENTICATION_ERROR; const LAST_USERNAME = Security::LAST_USERNAME; } src/Symfony/Component/Security/Core/Tests/000077500000000000000000000000001266465517700210775ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/000077500000000000000000000000001266465517700240565ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php000066400000000000000000000133401266465517700334150ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')), )); $token = $manager->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertSame($expected, $token); } public function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() { $second = $this->getMock('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface'); $second ->expects($this->never()) ->method('supports') ; $manager = new AuthenticationProviderManager(array( $this->getAuthenticationProvider(true, $expected = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')), $second, )); $token = $manager->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertSame($expected, $token); } public function testEraseCredentialFlag() { $manager = new AuthenticationProviderManager(array( $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), )); $token = $manager->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertEquals('', $token->getCredentials()); $manager = new AuthenticationProviderManager(array( $this->getAuthenticationProvider(true, $token = new UsernamePasswordToken('foo', 'bar', 'key')), ), false); $token = $manager->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertEquals('bar', $token->getCredentials()); } protected function getAuthenticationProvider($supports, $token = null, $exception = null) { $provider = $this->getMock('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface'); $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->getMock($exception, null, array(), ''))) ; } return $provider; } } src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php000066400000000000000000000046141266465517700331770ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; class AuthenticationTrustResolverTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } protected function getAnonymousToken() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', null, array('', '')); } protected function getRememberMeToken() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('setPersistent'), array(), '', false); } protected function getResolver() { return new AuthenticationTrustResolver( 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken', 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' ); } } src/Symfony/Component/Security/Core/Tests/Authentication/Provider/000077500000000000000000000000001266465517700256505ustar00rootroot00000000000000AnonymousAuthenticationProviderTest.php000066400000000000000000000040101266465517700355400ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/Provider * * 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 Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider; class AnonymousAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $provider = $this->getProvider('foo'); $this->assertTrue($provider->supports($this->getSupportedToken('foo'))); $this->assertFalse($provider->supports($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider('foo'); $this->assertNull($provider->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ public function testAuthenticateWhenKeyIsNotValid() { $provider = $this->getProvider('foo'); $this->assertNull($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($key) { $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', array('getKey'), array(), '', false); $token->expects($this->any()) ->method('getKey') ->will($this->returnValue($key)) ; return $token; } protected function getProvider($key) { return new AnonymousAuthenticationProvider($key); } } src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php000066400000000000000000000270511266465517700343440ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; class DaoAuthenticationProviderTest extends \PHPUnit_Framework_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->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') ->will($this->throwException(new UsernameNotFoundException())) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') ->will($this->throwException(new \RuntimeException())) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); $method = new \ReflectionMethod($provider, 'retrieveUser'); $method->setAccessible(true); $method->invoke($provider, 'fabien', $this->getSupportedToken()); } public function testRetrieveUserReturnsUserFromTokenOnReauthentication() { $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->never()) ->method('loadUserByUsername') ; $user = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $token = $this->getSupportedToken(); $token->expects($this->once()) ->method('getUser') ->will($this->returnValue($user)) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); $reflection = new \ReflectionMethod($provider, 'retrieveUser'); $reflection->setAccessible(true); $result = $reflection->invoke($provider, null, $token); $this->assertSame($user, $result); } public function testRetrieveUser() { $user = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') ->will($this->returnValue($user)) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); $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->getMock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'), $token ); } public function testCheckAuthenticationWhenCredentialsAre0() { $encoder = $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'), $token ); } /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ public function testCheckAuthenticationWhenCredentialsAreNotValid() { $encoder = $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'), $token); } /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ public function testCheckAuthenticationDoesNotReauthenticateWhenPasswordHasChanged() { $user = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface'); $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->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'), $token); } protected function getSupportedToken() { $mock = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken', array('getCredentials', 'getUser', 'getProviderKey'), array(), '', false); $mock ->expects($this->any()) ->method('getProviderKey') ->will($this->returnValue('key')) ; return $mock; } protected function getProvider($user = null, $userChecker = null, $passwordEncoder = null) { $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); if (null !== $user) { $userProvider->expects($this->once()) ->method('loadUserByUsername') ->will($this->returnValue($user)) ; } if (null === $userChecker) { $userChecker = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'); } if (null === $passwordEncoder) { $passwordEncoder = new PlaintextPasswordEncoder(); } $encoderFactory = $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface'); $encoderFactory ->expects($this->any()) ->method('getEncoder') ->will($this->returnValue($passwordEncoder)) ; return new DaoAuthenticationProvider($userProvider, $userChecker, 'key', $encoderFactory); } } PreAuthenticatedAuthenticationProviderTest.php000066400000000000000000000115111266465517700370050ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/Provider * * 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 Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider; use Symfony\Component\Security\Core\Exception\LockedException; class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $provider = $this->getProvider(); $this->assertTrue($provider->supports($this->getSupportedToken())); $this->assertFalse($provider->supports($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ public function testAuthenticateWhenNoUserIsSet() { $provider = $this->getProvider(); $provider->authenticate($this->getSupportedToken('')); } public function testAuthenticate() { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken', array('getUser', 'getCredentials', 'getProviderKey'), array(), '', false); 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->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); if (null !== $user) { $userProvider->expects($this->once()) ->method('loadUserByUsername') ->will($this->returnValue($user)) ; } if (null === $userChecker) { $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); } return new PreAuthenticatedAuthenticationProvider($userProvider, $userChecker, 'key'); } } RememberMeAuthenticationProviderTest.php000066400000000000000000000073251266465517700356040ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/Provider * * 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 Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; use Symfony\Component\Security\Core\Exception\DisabledException; use Symfony\Component\Security\Core\Role\Role; class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { public function testSupports() { $provider = $this->getProvider(); $this->assertTrue($provider->supports($this->getSupportedToken())); $this->assertFalse($provider->supports($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider(); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $this->assertNull($provider->authenticate($token)); } /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ public function testAuthenticateWhenKeysDoNotMatch() { $provider = $this->getProvider(null, 'key1'); $token = $this->getSupportedToken(null, 'key2'); $provider->authenticate($token); } /** * @expectedException \Symfony\Component\Security\Core\Exception\DisabledException */ public function testAuthenticateWhenPreChecksFails() { $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPreAuth') ->will($this->throwException(new DisabledException())); $provider = $this->getProvider($userChecker); $provider->authenticate($this->getSupportedToken()); } public function testAuthenticate() { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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, $key = 'test') { if (null === $user) { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $user ->expects($this->any()) ->method('getRoles') ->will($this->returnValue(array())); } $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('getProviderKey'), array($user, 'foo', $key)); $token ->expects($this->once()) ->method('getProviderKey') ->will($this->returnValue('foo')); return $token; } protected function getProvider($userChecker = null, $key = 'test') { if (null === $userChecker) { $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); } return new RememberMeAuthenticationProvider($userChecker, $key, 'foo'); } } src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php000066400000000000000000000225341266465517700345600ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testSupports() { $provider = $this->getProvider(); $this->assertTrue($provider->supports($this->getSupportedToken())); $this->assertFalse($provider->supports($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } public function testAuthenticateWhenTokenIsNotSupported() { $provider = $this->getProvider(); $this->assertNull($provider->authenticate($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); } /** * @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->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'))) ; $provider->authenticate($this->getSupportedToken()); } /** * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException */ public function testAuthenticateWhenPostChecksFails() { $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'))) ; $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->getMock('Symfony\Component\Security\Core\User\UserInterface'))) ; $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->getMock('Symfony\Component\Security\Core\User\UserInterface'))) ; $provider->expects($this->once()) ->method('checkAuthentication') ->will($this->throwException(new BadCredentialsException('Foo'))) ; $provider->authenticate($this->getSupportedToken()); } public function testAuthenticate() { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken', array('getCredentials', 'getProviderKey', 'getRoles'), array(), '', false); $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->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); } return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider', array($userChecker, 'key', $hide)); } } src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/000077500000000000000000000000001266465517700260765ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php000066400000000000000000000037771266465517700337400ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider; class InMemoryTokenProviderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.php000066400000000000000000000017111266465517700326100ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; class PersistentTokenTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/000077500000000000000000000000001266465517700251365ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php000066400000000000000000000203371266465517700312600ustar00rootroot00000000000000 * * 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 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() { } } class AbstractTokenTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $advancedUser = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); 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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $advancedUser = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); 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)); } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php000066400000000000000000000023631266465517700315040ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; use Symfony\Component\Security\Core\Role\Role; class AnonymousTokenTest extends \PHPUnit_Framework_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->getKey()); } 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()); } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php000066400000000000000000000027621266465517700327500ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; use Symfony\Component\Security\Core\Role\Role; class PreAuthenticatedTokenTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php000066400000000000000000000033271266465517700315350ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; use Symfony\Component\Security\Core\Role\Role; class RememberMeTokenTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $user = $this->getUser(); $token = new RememberMeToken($user, 'fookey', 'foo'); $this->assertEquals('fookey', $token->getProviderKey()); $this->assertEquals('foo', $token->getKey()); $this->assertEquals(array(new Role('ROLE_FOO')), $token->getRoles()); $this->assertSame($user, $token->getUser()); $this->assertTrue($token->isAuthenticated()); } /** * @expectedException \InvalidArgumentException */ public function testConstructorKeyCannotBeNull() { new RememberMeToken( $this->getUser(), null, null ); } /** * @expectedException \InvalidArgumentException */ public function testConstructorKeyCannotBeEmptyString() { new RememberMeToken( $this->getUser(), '', '' ); } protected function getUser($roles = array('ROLE_FOO')) { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $user ->expects($this->once()) ->method('getRoles') ->will($this->returnValue($roles)) ; return $user; } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/000077500000000000000000000000001266465517700265425ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php000066400000000000000000000014571266465517700325270ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; class TokenStorageTest extends \PHPUnit_Framework_TestCase { public function testGetSetToken() { $tokenStorage = new TokenStorage(); $this->assertNull($tokenStorage->getToken()); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenStorage->setToken($token); $this->assertSame($token, $tokenStorage->getToken()); } } src/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php000066400000000000000000000035131266465517700330140ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Role\Role; class UsernamePasswordTokenTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Security/Core/Tests/Authorization/000077500000000000000000000000001266465517700237375ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php000066400000000000000000000177101266465517700314700ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authorization\AccessDecisionManager; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase { public function testSupportsClass() { $manager = new AccessDecisionManager(array( $this->getVoterSupportsClass(true), $this->getVoterSupportsClass(false), )); $this->assertTrue($manager->supportsClass('FooClass')); $manager = new AccessDecisionManager(array( $this->getVoterSupportsClass(false), $this->getVoterSupportsClass(false), )); $this->assertFalse($manager->supportsClass('FooClass')); } public function testSupportsAttribute() { $manager = new AccessDecisionManager(array( $this->getVoterSupportsAttribute(true), $this->getVoterSupportsAttribute(false), )); $this->assertTrue($manager->supportsAttribute('foo')); $manager = new AccessDecisionManager(array( $this->getVoterSupportsAttribute(false), $this->getVoterSupportsAttribute(false), )); $this->assertFalse($manager->supportsAttribute('foo')); } /** * @expectedException \InvalidArgumentException */ public function testSetVotersEmpty() { $manager = new AccessDecisionManager(array()); } /** * @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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); 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->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface'); $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->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface'); $voter->expects($this->any()) ->method('vote') ->will($this->returnValue($vote)); return $voter; } protected function getVoterSupportsClass($ret) { $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface'); $voter->expects($this->any()) ->method('supportsClass') ->will($this->returnValue($ret)); return $voter; } protected function getVoterSupportsAttribute($ret) { $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface'); $voter->expects($this->any()) ->method('supportsAttribute') ->will($this->returnValue($ret)); return $voter; } } src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php000066400000000000000000000067371266465517700314520ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; class AuthorizationCheckerTest extends \PHPUnit_Framework_TestCase { private $authenticationManager; private $accessDecisionManager; private $authorizationChecker; private $tokenStorage; protected function setUp() { $this->authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $this->accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); $this->tokenStorage = new TokenStorage(); $this->authorizationChecker = new AuthorizationChecker( $this->tokenStorage, $this->authenticationManager, $this->accessDecisionManager ); } public function testVoteAuthenticatesTokenIfNecessary() { $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $this->tokenStorage->setToken($token); $newToken = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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)); } } src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php000066400000000000000000000067101266465517700311170ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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), ); } } src/Symfony/Component/Security/Core/Tests/Authorization/Voter/000077500000000000000000000000001266465517700250365ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AbstractVoterTest.php000066400000000000000000000052401266465517700311730ustar00rootroot00000000000000 * * 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\AbstractVoter; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; class AbstractVoterTest extends \PHPUnit_Framework_TestCase { protected $token; protected function setUp() { $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } 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 AbstractVoterTest_Voter(); $this->assertEquals($expectedVote, $voter->vote($this->token, $object, $attributes), $message); } } class AbstractVoterTest_Voter extends AbstractVoter { protected function getSupportedClasses() { return array('stdClass'); } protected function getSupportedAttributes() { return array('EDIT', 'CREATE'); } protected function isGranted($attribute, $object, $user = null) { return 'EDIT' === $attribute; } } src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php000066400000000000000000000064541266465517700322220ustar00rootroot00000000000000 * * 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\Authentication\AuthenticationTrustResolver; use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; class AuthenticatedVoterTest extends \PHPUnit_Framework_TestCase { public function testSupportsClass() { $voter = new AuthenticatedVoter($this->getResolver()); $this->assertTrue($voter->supportsClass('stdClass')); } /** * @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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } elseif ('remembered' === $authenticated) { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('setPersistent'), array(), '', false); } else { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', null, array('', '')); } } } src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php000066400000000000000000000066311266465517700315740ustar00rootroot00000000000000 * * 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\ExpressionVoter; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Role\Role; class ExpressionVoterTest extends \PHPUnit_Framework_TestCase { public function testSupportsAttribute() { $expression = $this->createExpression(); $expressionLanguage = $this->getMock('Symfony\Component\Security\Core\Authorization\ExpressionLanguage'); $voter = new ExpressionVoter($expressionLanguage, $this->createTrustResolver(), $this->createRoleHierarchy()); $this->assertTrue($voter->supportsAttribute($expression)); } /** * @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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); if ($tokenExpectsGetRoles) { $token->expects($this->once()) ->method('getRoles') ->will($this->returnValue($roles)); } return $token; } protected function createExpressionLanguage($expressionLanguageExpectsEvaluate = true) { $mock = $this->getMock('Symfony\Component\Security\Core\Authorization\ExpressionLanguage'); if ($expressionLanguageExpectsEvaluate) { $mock->expects($this->once()) ->method('evaluate') ->will($this->returnValue(true)); } return $mock; } protected function createTrustResolver() { return $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface'); } protected function createRoleHierarchy() { return $this->getMock('Symfony\Component\Security\Core\Role\RoleHierarchyInterface'); } protected function createExpression() { return $this->getMockBuilder('Symfony\Component\ExpressionLanguage\Expression') ->disableOriginalConstructor() ->getMock(); } } src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php000066400000000000000000000021151266465517700321660ustar00rootroot00000000000000 * * 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), )); } } src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php000066400000000000000000000036331266465517700303350ustar00rootroot00000000000000 * * 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\RoleVoter; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Role\Role; class RoleVoterTest extends \PHPUnit_Framework_TestCase { public function testSupportsClass() { $voter = new RoleVoter(); $this->assertTrue($voter->supportsClass('Foo')); } /** * @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), ); } protected function getToken(array $roles) { foreach ($roles as $i => $role) { $roles[$i] = new Role($role); } $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token->expects($this->once()) ->method('getRoles') ->will($this->returnValue($roles)); return $token; } } src/Symfony/Component/Security/Core/Tests/Encoder/000077500000000000000000000000001266465517700224565ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php000066400000000000000000000044341266465517700302620ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder; /** * @author Elnur Abdurrakhimov */ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php000066400000000000000000000057441266465517700277360ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\BasePasswordEncoder; class PasswordEncoder extends BasePasswordEncoder { public function encodePassword($raw, $salt) { } public function isPasswordValid($encoded, $raw, $salt) { } } class BasePasswordEncoderTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php000066400000000000000000000145671266465517700267530ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\User\UserInterface')); $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->getMock('Symfony\Component\Security\Core\User\UserInterface')); $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; } } src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php000066400000000000000000000037731266465517700316100ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; class MessageDigestPasswordEncoderTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php000066400000000000000000000041561266465517700301700ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder; class Pbkdf2PasswordEncoderTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php000066400000000000000000000032571266465517700310310ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; class PlaintextPasswordEncoderTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Security/Core/Tests/Encoder/UserPasswordEncoderTest.php000066400000000000000000000053551266465517700300000ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Encoder\UserPasswordEncoder; class UserPasswordEncoderTest extends \PHPUnit_Framework_TestCase { public function testEncodePassword() { $userMock = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $userMock->expects($this->any()) ->method('getSalt') ->will($this->returnValue('userSalt')); $mockEncoder = $this->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); $mockEncoder->expects($this->any()) ->method('encodePassword') ->with($this->equalTo('plainPassword'), $this->equalTo('userSalt')) ->will($this->returnValue('encodedPassword')); $mockEncoderFactory = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $userMock->expects($this->any()) ->method('getSalt') ->will($this->returnValue('userSalt')); $userMock->expects($this->any()) ->method('getPassword') ->will($this->returnValue('encodedPassword')); $mockEncoder = $this->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); $mockEncoder->expects($this->any()) ->method('isPasswordValid') ->with($this->equalTo('encodedPassword'), $this->equalTo('plainPassword'), $this->equalTo('userSalt')) ->will($this->returnValue(true)); $mockEncoderFactory = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); $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); } } src/Symfony/Component/Security/Core/Tests/Exception/000077500000000000000000000000001266465517700230355ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Exception/UsernameNotFoundExceptionTest.php000066400000000000000000000014641266465517700315260ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Exception\UsernameNotFoundException; class UsernameNotFoundExceptionTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Security/Core/Tests/LegacySecurityContextInterfaceTest.php000066400000000000000000000016371266465517700306010ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\SecurityContextInterface; use Symfony\Component\Security\Core\Security; /** * @group legacy */ class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase { /** * Test if the BC Layer is working as intended. */ public function testConstantSync() { $this->assertSame(Security::ACCESS_DENIED_ERROR, SecurityContextInterface::ACCESS_DENIED_ERROR); $this->assertSame(Security::AUTHENTICATION_ERROR, SecurityContextInterface::AUTHENTICATION_ERROR); $this->assertSame(Security::LAST_USERNAME, SecurityContextInterface::LAST_USERNAME); } } src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php000066400000000000000000000106231266465517700267530ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; use Symfony\Component\Security\Core\SecurityContext; /** * @group legacy */ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase { private $tokenStorage; private $authorizationChecker; private $securityContext; protected function setUp() { $this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $this->authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'); $this->securityContext = new SecurityContext($this->tokenStorage, $this->authorizationChecker); } public function testGetTokenDelegation() { $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $this->tokenStorage ->expects($this->once()) ->method('getToken') ->will($this->returnValue($token)); $this->assertTrue($token === $this->securityContext->getToken()); } public function testSetTokenDelegation() { $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $this->tokenStorage ->expects($this->once()) ->method('setToken') ->with($token); $this->securityContext->setToken($token); } /** * @dataProvider isGrantedDelegationProvider */ public function testIsGrantedDelegation($attributes, $object, $return) { $this->authorizationChecker ->expects($this->once()) ->method('isGranted') ->with($attributes, $object) ->will($this->returnValue($return)); $this->assertEquals($return, $this->securityContext->isGranted($attributes, $object)); } public function isGrantedDelegationProvider() { return array( array(array(), new \stdClass(), true), array(array('henk'), new \stdClass(), false), array(null, new \stdClass(), false), array('henk', null, true), array(array(1), 'henk', true), ); } /** * Test dedicated to check if the backwards compatibility is still working. */ public function testOldConstructorSignature() { $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); new SecurityContext($authenticationManager, $accessDecisionManager); } /** * @dataProvider oldConstructorSignatureFailuresProvider * @expectedException \BadMethodCallException */ public function testOldConstructorSignatureFailures($first, $second) { new SecurityContext($first, $second); } public function oldConstructorSignatureFailuresProvider() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); return array( array(new \stdClass(), new \stdClass()), array($tokenStorage, $accessDecisionManager), array($accessDecisionManager, $tokenStorage), array($authorizationChecker, $accessDecisionManager), array($accessDecisionManager, $authorizationChecker), array($tokenStorage, $accessDecisionManager), array($authenticationManager, $authorizationChecker), array('henk', 'hans'), array(null, false), array(true, null), ); } } src/Symfony/Component/Security/Core/Tests/Resources/000077500000000000000000000000001266465517700230515ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php000066400000000000000000000014401266465517700277020ustar00rootroot00000000000000 * * 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; class TranslationFilesTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideTranslationFiles */ public function testTranslationFileIsValid($filePath) { \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') ); } } src/Symfony/Component/Security/Core/Tests/Role/000077500000000000000000000000001266465517700220005ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php000066400000000000000000000026341266465517700261160ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Role\RoleHierarchy; use Symfony\Component\Security\Core\Role\Role; class RoleHierarchyTest extends \PHPUnit_Framework_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')))); } } src/Symfony/Component/Security/Core/Tests/Role/RoleTest.php000066400000000000000000000010221266465517700242450ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Role\Role; class RoleTest extends \PHPUnit_Framework_TestCase { public function testGetRole() { $role = new Role('FOO'); $this->assertEquals('FOO', $role->getRole()); } } src/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php000066400000000000000000000015731266465517700263010ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Role\SwitchUserRole; class SwitchUserRoleTest extends \PHPUnit_Framework_TestCase { public function testGetSource() { $role = new SwitchUserRole('FOO', $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertSame($token, $role->getSource()); } public function testGetRole() { $role = new SwitchUserRole('FOO', $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); $this->assertEquals('FOO', $role->getRole()); } } src/Symfony/Component/Security/Core/Tests/User/000077500000000000000000000000001266465517700220155ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php000066400000000000000000000134331266465517700267660ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\User\ChainUserProvider; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; class ChainUserProviderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\User\UserInterface'); } protected function getProvider() { return $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); } } src/Symfony/Component/Security/Core/Tests/User/InMemoryUserProviderTest.php000066400000000000000000000045771266465517700275140ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\User\InMemoryUserProvider; use Symfony\Component\Security\Core\User\User; class InMemoryUserProviderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Security/Core/Tests/User/UserCheckerTest.php000066400000000000000000000075331266465517700256010ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\User\UserChecker; class UserCheckerTest extends \PHPUnit_Framework_TestCase { public function testCheckPostAuthNotAdvancedUserInterface() { $checker = new UserChecker(); $this->assertNull($checker->checkPostAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); } public function testCheckPostAuthPass() { $checker = new UserChecker(); $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $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->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(false)); $checker->checkPostAuth($account); } public function testCheckPreAuthNotAdvancedUserInterface() { $checker = new UserChecker(); $this->assertNull($checker->checkPreAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); } public function testCheckPreAuthPass() { $checker = new UserChecker(); $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $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->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $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->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $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->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $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); } } src/Symfony/Component/Security/Core/Tests/User/UserTest.php000066400000000000000000000054431266465517700243120ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\User\User; class UserTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Security/Core/Tests/Util/000077500000000000000000000000001266465517700220145ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Util/ClassUtilsTest.php000066400000000000000000000033501266465517700254540ustar00rootroot00000000000000 * * 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\Util { use Symfony\Component\Security\Core\Util\ClassUtils; class ClassUtilsTest extends \PHPUnit_Framework_TestCase { public static function dataGetClass() { return array( array('stdClass', 'stdClass'), array('Symfony\Component\Security\Core\Util\ClassUtils', 'Symfony\Component\Security\Core\Util\ClassUtils'), array('MyProject\Proxies\__CG__\stdClass', 'stdClass'), array('MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\stdClass', 'stdClass'), array('MyProject\Proxies\__CG__\Symfony\Component\Security\Core\Tests\Util\ChildObject', 'Symfony\Component\Security\Core\Tests\Util\ChildObject'), array(new TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'), array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util\TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'), ); } /** * @dataProvider dataGetClass */ public function testGetRealClass($object, $expectedClassName) { $this->assertEquals($expectedClassName, ClassUtils::getRealClass($object)); } } class TestObject { } } namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util { class TestObject extends \Symfony\Component\Security\Core\Tests\Util\TestObject { } } src/Symfony/Component/Security/Core/Tests/Util/StringUtilsTest.php000066400000000000000000000026211266465517700256550ustar00rootroot00000000000000 * * 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\Util; use Symfony\Component\Security\Core\Util\StringUtils; /** * Data from PHP.net's hash_equals tests. */ class StringUtilsTest extends \PHPUnit_Framework_TestCase { public function dataProviderTrue() { return array( array('same', 'same'), array('', ''), array(123, 123), array(null, ''), array(null, null), ); } public function dataProviderFalse() { return array( array('not1same', 'not2same'), array('short', 'longer'), array('longer', 'short'), array('', 'notempty'), array('notempty', ''), array(123, 'NaN'), array('NaN', 123), array(null, 123), ); } /** * @dataProvider dataProviderTrue */ public function testEqualsTrue($known, $user) { $this->assertTrue(StringUtils::equals($known, $user)); } /** * @dataProvider dataProviderFalse */ public function testEqualsFalse($known, $user) { $this->assertFalse(StringUtils::equals($known, $user)); } } src/Symfony/Component/Security/Core/Tests/Validator/000077500000000000000000000000001266465517700230245ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Validator/Constraints/000077500000000000000000000000001266465517700253335ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php000066400000000000000000000011621266465517700343400ustar00rootroot00000000000000 * * 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\Validator\Validation; /** * @since 2.5.4 * * @author Bernhard Schussek * @group legacy */ class LegacyUserPasswordValidatorTest extends UserPasswordValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5_BC; } } src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php000066400000000000000000000112451266465517700332160ustar00rootroot00000000000000 * * 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->getMock('Foo\Bar\User'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); } protected function createEncoderFactory($encoder = null) { $mock = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); $mock ->expects($this->any()) ->method('getEncoder') ->will($this->returnValue($encoder)) ; return $mock; } protected function createTokenStorage($user = null) { $token = $this->createAuthenticationToken($user); $mock = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $mock ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; return $mock; } protected function createAuthenticationToken($user = null) { $mock = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $mock ->expects($this->any()) ->method('getUser') ->will($this->returnValue($user)) ; return $mock; } } src/Symfony/Component/Security/Core/User/000077500000000000000000000000001266465517700207135ustar00rootroot00000000000000src/Symfony/Component/Security/Core/User/AdvancedUserInterface.php000066400000000000000000000055151266465517700256170ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Security/Core/User/ChainUserProvider.php000066400000000000000000000050051266465517700250200ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/User/EquatableInterface.php000066400000000000000000000020541266465517700251510ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php000066400000000000000000000071611266465517700255420ustar00rootroot00000000000000 * * 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)]; } } src/Symfony/Component/Security/Core/User/User.php000066400000000000000000000046331266465517700223500ustar00rootroot00000000000000 * * 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() { } } src/Symfony/Component/Security/Core/User/UserChecker.php000066400000000000000000000034561266465517700236370ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/Security/Core/User/UserCheckerInterface.php000066400000000000000000000016051266465517700254520ustar00rootroot00000000000000 * * 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; /** * UserCheckerInterface checks user account when authentication occurs. * * 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 */ public function checkPreAuth(UserInterface $user); /** * Checks the user account after authentication. * * @param UserInterface $user a UserInterface instance */ public function checkPostAuth(UserInterface $user); } src/Symfony/Component/Security/Core/User/UserInterface.php000066400000000000000000000046641266465517700241750ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Security/Core/User/UserProviderInterface.php000066400000000000000000000045251266465517700257040ustar00rootroot00000000000000 * * 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 * * @see UsernameNotFoundException * * @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); } src/Symfony/Component/Security/Core/Util/000077500000000000000000000000001266465517700207125ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Util/ClassUtils.php000066400000000000000000000025651266465517700235210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Util; use Doctrine\Common\Util\ClassUtils as DoctrineClassUtils; /** * Class related functionality for objects that * might or might not be proxy objects at the moment. * * @see DoctrineClassUtils * * @author Benjamin Eberlei * @author Johannes Schmitt */ class ClassUtils { /** * Marker for Proxy class names. * * @var string */ const MARKER = '__CG__'; /** * Length of the proxy marker. * * @var int */ const MARKER_LENGTH = 6; /** * This class should not be instantiated. */ private function __construct() { } /** * Gets the real class name of a class name that could be a proxy. * * @param string|object $object * * @return string */ public static function getRealClass($object) { $class = is_object($object) ? get_class($object) : $object; if (false === $pos = strrpos($class, '\\'.self::MARKER.'\\')) { return $class; } return substr($class, $pos + self::MARKER_LENGTH + 2); } } src/Symfony/Component/Security/Core/Util/SecureRandom.php000066400000000000000000000012031266465517700240060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Util; /** * A secure random number generator implementation. * * @author Fabien Potencier * @author Johannes M. Schmitt */ final class SecureRandom implements SecureRandomInterface { /** * {@inheritdoc} */ public function nextBytes($nbBytes) { return random_bytes($nbBytes); } } src/Symfony/Component/Security/Core/Util/SecureRandomInterface.php000066400000000000000000000012071266465517700256330ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Util; /** * Interface that needs to be implemented by all secure random number generators. * * @author Fabien Potencier */ interface SecureRandomInterface { /** * Generates the specified number of secure random bytes. * * @param int $nbBytes * * @return string */ public function nextBytes($nbBytes); } src/Symfony/Component/Security/Core/Util/StringUtils.php000066400000000000000000000045531266465517700237210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Util; /** * String utility functions. * * @author Fabien Potencier */ class StringUtils { /** * This class should not be instantiated. */ private function __construct() { } /** * Compares two strings. * * This method implements a constant-time algorithm to compare strings. * Regardless of the used implementation, it will leak length information. * * @param string $knownString The string of known length to compare against * @param string $userInput The string that the user can control * * @return bool true if the two strings are the same, false otherwise */ public static function equals($knownString, $userInput) { // Avoid making unnecessary duplications of secret data if (!is_string($knownString)) { $knownString = (string) $knownString; } if (!is_string($userInput)) { $userInput = (string) $userInput; } if (function_exists('hash_equals')) { return hash_equals($knownString, $userInput); } $knownLen = self::safeStrlen($knownString); $userLen = self::safeStrlen($userInput); if ($userLen !== $knownLen) { return false; } $result = 0; for ($i = 0; $i < $knownLen; ++$i) { $result |= (ord($knownString[$i]) ^ ord($userInput[$i])); } // They are only identical strings if $result is exactly 0... return 0 === $result; } /** * Returns the number of bytes in a string. * * @param string $string The string whose length we wish to obtain * * @return int */ public static function safeStrlen($string) { // Premature optimization // Since this cannot be changed at runtime, we can cache it static $funcExists = null; if (null === $funcExists) { $funcExists = function_exists('mb_strlen'); } if ($funcExists) { return mb_strlen($string, '8bit'); } return strlen($string); } } src/Symfony/Component/Security/Core/Validator/000077500000000000000000000000001266465517700217225ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Validator/Constraints/000077500000000000000000000000001266465517700242315ustar00rootroot00000000000000src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php000066400000000000000000000013101266465517700273760ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php000066400000000000000000000034341266465517700312550ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/Security/Core/composer.json000066400000000000000000000026451266465517700225260ustar00rootroot00000000000000{ "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.3.9", "paragonie/random_compat": "~1.0" }, "require-dev": { "symfony/event-dispatcher": "~2.1", "symfony/expression-language": "~2.6", "symfony/http-foundation": "~2.4", "symfony/validator": "~2.5,>=2.5.9", "psr/log": "~1.0", "ircmaxell/password-compat": "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", "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" }, "autoload": { "psr-4": { "Symfony\\Component\\Security\\Core\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Security/Core/phpunit.xml.dist000066400000000000000000000016671266465517700231620ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Security/Csrf/000077500000000000000000000000001266465517700200025ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/.gitignore000066400000000000000000000000421266465517700217660ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Security/Csrf/CsrfToken.php000066400000000000000000000024001266465517700224050ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Csrf/CsrfTokenManager.php000066400000000000000000000051141266465517700237050ustar00rootroot00000000000000 * * 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\Core\Util\StringUtils; 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 StringUtils::equals($this->storage->getToken($token->getId()), $token->getValue()); } } src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php000066400000000000000000000036641266465517700255360ustar00rootroot00000000000000 * * 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. * * @since 2.4 * * @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); } src/Symfony/Component/Security/Csrf/Exception/000077500000000000000000000000001266465517700217405ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/Exception/TokenNotFoundException.php000066400000000000000000000007321266465517700270670ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Security/Csrf/LICENSE000066400000000000000000000020511266465517700210050ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Security/Csrf/README.md000066400000000000000000000006721266465517700212660ustar00rootroot00000000000000Security 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/2.7/book/security.html Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/Csrf/ $ composer.phar install --dev $ phpunit src/Symfony/Component/Security/Csrf/Tests/000077500000000000000000000000001266465517700211045ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php000066400000000000000000000115531266465517700256530ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Csrf\CsrfToken; use Symfony\Component\Security\Csrf\CsrfTokenManager; /** * @author Bernhard Schussek */ class CsrfTokenManagerTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface'); $this->storage = $this->getMock('Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface'); $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')); } } src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/000077500000000000000000000000001266465517700240335ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php000066400000000000000000000034621266465517700316170ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; /** * @author Bernhard Schussek */ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase { const ENTROPY = 1000; /** * A non alpha-numeric byte string. * * @var string */ private static $bytes; /** * @var \PHPUnit_Framework_MockObject_MockObject */ private $random; /** * @var UriSafeTokenGenerator */ private $generator; public static function setUpBeforeClass() { self::$bytes = base64_decode('aMf+Tct/RLn2WQ=='); } protected function setUp() { $this->random = $this->getMock('Symfony\Component\Security\Core\Util\SecureRandomInterface'); $this->generator = new UriSafeTokenGenerator($this->random, self::ENTROPY); } protected function tearDown() { $this->random = null; $this->generator = null; } public function testGenerateToken() { $this->random->expects($this->once()) ->method('nextBytes') ->with(self::ENTROPY / 8) ->will($this->returnValue(self::$bytes)); $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'); } } src/Symfony/Component/Security/Csrf/Tests/TokenStorage/000077500000000000000000000000001266465517700235115ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php000066400000000000000000000063231266465517700322060ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage; /** * @author Bernhard Schussek * * @runTestsInSeparateProcesses * @preserveGlobalState disabled */ class NativeSessionTokenStorageTest extends \PHPUnit_Framework_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); } /** * @requires PHP 5.4 */ 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')); } } src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php000066400000000000000000000172271266465517700310440ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage; /** * @author Bernhard Schussek */ class SessionTokenStorageTest extends \PHPUnit_Framework_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')); } } src/Symfony/Component/Security/Csrf/TokenGenerator/000077500000000000000000000000001266465517700227315ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php000066400000000000000000000011031266465517700302050ustar00rootroot00000000000000 * * 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. * * @since 2.4 * * @author Bernhard Schussek */ interface TokenGeneratorInterface { /** * Generates a CSRF token. * * @return string The generated CSRF token */ public function generateToken(); } src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php000066400000000000000000000034161266465517700276540ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\Util\SecureRandomInterface; use Symfony\Component\Security\Core\Util\SecureRandom; /** * Generates CSRF tokens. * * @since 2.4 * * @author Bernhard Schussek */ class UriSafeTokenGenerator implements TokenGeneratorInterface { /** * The generator for random values. * * @var SecureRandomInterface */ private $random; /** * The amount of entropy collected for each token (in bits). * * @var int */ private $entropy; /** * Generates URI-safe CSRF tokens. * * @param SecureRandomInterface|null $random The random value generator used for * generating entropy * @param int $entropy The amount of entropy collected for * each token (in bits) */ public function __construct(SecureRandomInterface $random = null, $entropy = 256) { $this->random = $random ?: new SecureRandom(); $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 = $this->random->nextBytes($this->entropy / 8); return rtrim(strtr(base64_encode($bytes), '+/', '-_'), '='); } } src/Symfony/Component/Security/Csrf/TokenStorage/000077500000000000000000000000001266465517700224075ustar00rootroot00000000000000src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php000066400000000000000000000053121266465517700302410ustar00rootroot00000000000000 * * 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. * * @since 2.4 * * @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_VERSION_ID >= 50400) { if (PHP_SESSION_NONE === session_status()) { session_start(); } } elseif (!session_id()) { session_start(); } $this->sessionStarted = true; } } src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php000066400000000000000000000051401266465517700270710ustar00rootroot00000000000000 * * 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 Symfony2 Session object. * * @since 2.4 * * @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); } } src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php000066400000000000000000000026151266465517700273520ustar00rootroot00000000000000 * * 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. * * @since 2.4 * * @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); } src/Symfony/Component/Security/Csrf/composer.json000066400000000000000000000017501266465517700225270ustar00rootroot00000000000000{ "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.3.9", "symfony/security-core": "~2.4" }, "require-dev": { "symfony/http-foundation": "~2.1" }, "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": "2.7-dev" } } } src/Symfony/Component/Security/Csrf/phpunit.xml.dist000066400000000000000000000016041266465517700231560ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Security/Http/000077500000000000000000000000001266465517700200245ustar00rootroot00000000000000src/Symfony/Component/Security/Http/.gitignore000066400000000000000000000000421266465517700220100ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Security/Http/AccessMap.php000066400000000000000000000027671266465517700224100ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/AccessMapInterface.php000066400000000000000000000015401266465517700242150ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Authentication/000077500000000000000000000000001266465517700230035ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Authentication/AuthenticationFailureHandlerInterface.php000066400000000000000000000024131266465517700331220ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Authentication/AuthenticationSuccessHandlerInterface.php000066400000000000000000000023261266465517700331460ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php000066400000000000000000000043531266465517700275210ustar00rootroot00000000000000 * * 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() { $session = $this->getRequest()->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; } } src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationFailureHandler.php000066400000000000000000000025011266465517700324720ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Authentication/CustomAuthenticationSuccessHandler.php000066400000000000000000000030271266465517700325170ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php000066400000000000000000000071541266465517700326150ustar00rootroot00000000000000 * * 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; /** * 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 = $request->get($this->options['failure_path_parameter'], null, true)) { $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']); } } src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php000066400000000000000000000066241266465517700326370ustar00rootroot00000000000000 * * 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\HttpUtils; /** * Class with the default authentication success handling logic. * * @author Fabien Potencier * @author Johannes M. Schmitt * @author Alexander */ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface { 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 = $request->get($this->options['target_path_parameter'], null, true)) { return $targetUrl; } if (null !== $this->providerKey && $targetUrl = $request->getSession()->get('_security.'.$this->providerKey.'.target_path')) { $request->getSession()->remove('_security.'.$this->providerKey.'.target_path'); 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']; } } src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php000066400000000000000000000102431266465517700311430ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Authorization/000077500000000000000000000000001266465517700226645ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php000066400000000000000000000017221266465517700310300ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/EntryPoint/000077500000000000000000000000001266465517700221375ustar00rootroot00000000000000src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php000066400000000000000000000031011266465517700314770ustar00rootroot00000000000000 * * 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; /** * AuthenticationEntryPointInterface is the interface used to start the * authentication scheme. * * @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); } src/Symfony/Component/Security/Http/EntryPoint/BasicAuthenticationEntryPoint.php000066400000000000000000000021601266465517700306240ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php000066400000000000000000000044571266465517700310350ustar00rootroot00000000000000 * * 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 $key; private $realmName; private $nonceValiditySeconds; private $logger; public function __construct($realmName, $key, $nonceValiditySeconds = 300, LoggerInterface $logger = null) { $this->realmName = $realmName; $this->key = $key; $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->key); $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 getKey() { return $this->key; } /** * @return string */ public function getRealmName() { return $this->realmName; } } src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php000066400000000000000000000040141266465517700305060ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/EntryPoint/RetryAuthenticationEntryPoint.php000066400000000000000000000032321266465517700307110ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Event/000077500000000000000000000000001266465517700211055ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php000066400000000000000000000026001266465517700260640ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Http/Event/SwitchUserEvent.php000066400000000000000000000017651266465517700247310ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Http/Firewall.php000066400000000000000000000055261266465517700223120ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/Security/Http/Firewall/000077500000000000000000000000001266465517700215715ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php000066400000000000000000000232261266465517700304600ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php000066400000000000000000000107051266465517700307300ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Firewall/AccessListener.php000066400000000000000000000046021266465517700252130ustar00rootroot00000000000000 * * 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)) { throw new AccessDeniedException(); } } } src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php000066400000000000000000000044031266465517700307010ustar00rootroot00000000000000 * * 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 $key; private $authenticationManager; private $logger; public function __construct(TokenStorageInterface $tokenStorage, $key, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null) { $this->tokenStorage = $tokenStorage; $this->key = $key; $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->key, '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)); } } } } src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php000066400000000000000000000065741266465517700277450ustar00rootroot00000000000000 * * 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 (false === $username = $request->headers->get('PHP_AUTH_USER', false)) { 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)); } } } src/Symfony/Component/Security/Http/Firewall/ChannelListener.php000066400000000000000000000037501266465517700253650ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/Security/Http/Firewall/ContextListener.php000066400000000000000000000142051266465517700254360ustar00rootroot00000000000000 * * 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\Token\AnonymousToken; 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; public function __construct(TokenStorageInterface $tokenStorage, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = 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; } /** * 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()) || ($token instanceof AnonymousToken)) { 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; } 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))); } return; } } throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user))); } } src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php000066400000000000000000000205061266465517700301320ustar00rootroot00000000000000 * * 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\Core\Util\StringUtils; 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->getKey(), $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 (!StringUtils::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('This method does not support a qop: "%s".', $this->elements['qop']); } $digest .= ':'.$a2Md5; return md5($digest); } public function isNonceExpired() { return $this->nonceExpiryTime < microtime(true); } } src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php000066400000000000000000000211701266465517700257470ustar00rootroot00000000000000 * * 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\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 { 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)); } } return $this->authenticationEntryPoint->start($request, $authException); } /** * @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() && !$request->isXmlHttpRequest()) { $request->getSession()->set('_security.'.$this->providerKey.'.target_path', $request->getUri()); } } } src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php000066400000000000000000000012561266465517700257140ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Firewall/LogoutListener.php000066400000000000000000000120451266465517700252630ustar00rootroot00000000000000 * * 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\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; 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\InvalidArgumentException; 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; /** * 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(), $csrfTokenManager = null) { if ($csrfTokenManager instanceof CsrfProviderInterface) { $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager); } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) { throw new InvalidArgumentException('The CSRF token manager should be an instance of CsrfProviderInterface or CsrfTokenManagerInterface.'); } $this->tokenStorage = $tokenStorage; $this->httpUtils = $httpUtils; $this->options = array_merge(array( 'csrf_parameter' => '_csrf_token', 'intention' => '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 = $request->get($this->options['csrf_parameter'], null, true); if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['intention'], $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']); } } src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php000066400000000000000000000105701266465517700260330ustar00rootroot00000000000000 * * 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; } } } } src/Symfony/Component/Security/Http/Firewall/RemoteUserAuthenticationListener.php000066400000000000000000000032151266465517700310030ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php000066400000000000000000000142151266465517700307700ustar00rootroot00000000000000 * * 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\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\InvalidArgumentException; 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\Core\Authentication\SimpleFormAuthenticatorInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Http\HttpUtils; 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 * @throws InvalidArgumentException In case an invalid CSRF token manager is passed */ 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, $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null) { if (!$simpleAuthenticator) { throw new \InvalidArgumentException('Missing simple authenticator'); } if ($csrfTokenManager instanceof CsrfProviderInterface) { $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager); } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) { throw new InvalidArgumentException('The CSRF token manager should be an instance of CsrfProviderInterface or CsrfTokenManagerInterface.'); } $this->simpleAuthenticator = $simpleAuthenticator; $this->csrfTokenManager = $csrfTokenManager; $options = array_merge(array( 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'intention' => '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 = $request->get($this->options['csrf_parameter'], null, true); if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['intention'], $csrfToken))) { throw new InvalidCsrfTokenException('Invalid CSRF token.'); } } if ($this->options['post_only']) { $username = trim($request->request->get($this->options['username_parameter'], null, true)); $password = $request->request->get($this->options['password_parameter'], null, true); } else { $username = trim($request->get($this->options['username_parameter'], null, true)); $password = $request->get($this->options['password_parameter'], null, true); } $request->getSession()->set(Security::LAST_USERNAME, $username); $token = $this->simpleAuthenticator->createToken($request, $username, $password, $this->providerKey); return $this->authenticationManager->authenticate($token); } } src/Symfony/Component/Security/Http/Firewall/SimplePreAuthenticationListener.php000066400000000000000000000126311266465517700306130ustar00rootroot00000000000000 * * 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\Core\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))); } } } } src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php000066400000000000000000000154161266465517700261170ustar00rootroot00000000000000 * * 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\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))) { throw new AccessDeniedException(); } $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) { $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; } } src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php000066400000000000000000000107251266465517700330430ustar00rootroot00000000000000 * * 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\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; 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\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\InvalidArgumentException; 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, $csrfTokenManager = null) { if ($csrfTokenManager instanceof CsrfProviderInterface) { $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager); } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) { throw new InvalidArgumentException('The CSRF token manager should be an instance of CsrfProviderInterface or CsrfTokenManagerInterface.'); } parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge(array( 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'intention' => '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 = $request->get($this->options['csrf_parameter'], null, true); if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['intention'], $csrfToken))) { throw new InvalidCsrfTokenException('Invalid CSRF token.'); } } if ($this->options['post_only']) { $username = trim($request->request->get($this->options['username_parameter'], null, true)); $password = $request->request->get($this->options['password_parameter'], null, true); } else { $username = trim($request->get($this->options['username_parameter'], null, true)); $password = $request->get($this->options['password_parameter'], null, true); } $request->getSession()->set(Security::LAST_USERNAME, $username); return $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $password, $this->providerKey)); } } src/Symfony/Component/Security/Http/Firewall/X509AuthenticationListener.php000066400000000000000000000040571266465517700273630ustar00rootroot00000000000000 * * 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, '')); } } src/Symfony/Component/Security/Http/FirewallMap.php000066400000000000000000000026501266465517700227430ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/FirewallMapInterface.php000066400000000000000000000017561266465517700245720ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/HttpUtils.php000066400000000000000000000134611266465517700225020ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Security/Http/LICENSE000066400000000000000000000020511266465517700210270ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Security/Http/Logout/000077500000000000000000000000001266465517700212755ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Logout/CookieClearingLogoutHandler.php000066400000000000000000000025441266465517700273610ustar00rootroot00000000000000 * * 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']); } } } src/Symfony/Component/Security/Http/Logout/DefaultLogoutSuccessHandler.php000066400000000000000000000021541266465517700274150ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Security/Http/Logout/LogoutHandlerInterface.php000066400000000000000000000017751266465517700264100ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Logout/LogoutSuccessHandlerInterface.php000066400000000000000000000017451266465517700277360ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php000066400000000000000000000125471266465517700256220ustar00rootroot00000000000000 * * 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\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter; use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; 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, $csrfTokenManager = null) { if ($csrfTokenManager instanceof CsrfProviderInterface) { $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager); } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) { throw new \InvalidArgumentException('The CSRF token manager should be an instance of CsrfProviderInterface or CsrfTokenManagerInterface.'); } $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 bool|string $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; } } src/Symfony/Component/Security/Http/Logout/SessionLogoutHandler.php000066400000000000000000000017051266465517700261240ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Security/Http/README.md000066400000000000000000000011151266465517700213010ustar00rootroot00000000000000Security 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/2.7/book/security.html Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/Http/ $ composer.phar install --dev $ phpunit src/Symfony/Component/Security/Http/RememberMe/000077500000000000000000000000001266465517700220445ustar00rootroot00000000000000src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php000066400000000000000000000243461266465517700277760ustar00rootroot00000000000000 * * 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; /** * 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 $key; private $userProviders; /** * Constructor. * * @param array $userProviders * @param string $key * @param string $providerKey * @param array $options * @param LoggerInterface $logger * * @throws \InvalidArgumentException */ public function __construct(array $userProviders, $key, $providerKey, array $options = array(), LoggerInterface $logger = null) { if (empty($key)) { throw new \InvalidArgumentException('$key 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->key = $key; $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 getKey() { return $this->key; } /** * 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->key); } 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 = $request->get($this->options['remember_me_parameter'], null, true); 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'; } } src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php000066400000000000000000000120661266465517700323270ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\Util\SecureRandomInterface; use Psr\Log\LoggerInterface; use Symfony\Component\Security\Core\Util\StringUtils; /** * 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; private $secureRandom; /** * Constructor. * * @param array $userProviders * @param string $key * @param string $providerKey * @param array $options * @param LoggerInterface $logger * @param SecureRandomInterface $secureRandom */ public function __construct(array $userProviders, $key, $providerKey, array $options, LoggerInterface $logger = null, SecureRandomInterface $secureRandom) { parent::__construct($userProviders, $key, $providerKey, $options, $logger); $this->secureRandom = $secureRandom; } /** * 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 (!StringUtils::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($this->secureRandom->nextBytes(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($this->secureRandom->nextBytes(64)); $tokenValue = base64_encode($this->secureRandom->nextBytes(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'] ) ); } } src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php000066400000000000000000000056701266465517700301320ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/RememberMe/ResponseListener.php000066400000000000000000000024401266465517700260610ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php000066400000000000000000000103371266465517700302450ustar00rootroot00000000000000 * * 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; use Symfony\Component\Security\Core\Util\StringUtils; /** * 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 !== StringUtils::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->getKey()); } } src/Symfony/Component/Security/Http/SecurityEvents.php000066400000000000000000000020421266465517700235270ustar00rootroot00000000000000 * * 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. * * The event listener method receives a * Symfony\Component\Security\Http\Event\InteractiveLoginEvent instance. * * @Event * * @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. * * The event listener method receives a * Symfony\Component\Security\Http\Event\SwitchUserEvent instance. * * @Event * * @var string */ const SWITCH_USER = 'security.switch_user'; } src/Symfony/Component/Security/Http/Session/000077500000000000000000000000001266465517700214475ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php000066400000000000000000000034261266465517700302330ustar00rootroot00000000000000 * * 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: // Destroying the old session is broken in php 5.4.0 - 5.4.10 // See php bug #63379 $destroy = PHP_VERSION_ID < 50400 || PHP_VERSION_ID >= 50411; $request->getSession()->migrate($destroy); return; case self::INVALIDATE: $request->getSession()->invalidate(); return; default: throw new \RuntimeException(sprintf('Invalid session authentication strategy "%s"', $this->strategy)); } } } src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategyInterface.php000066400000000000000000000021051266465517700320450ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Security/Http/Tests/000077500000000000000000000000001266465517700211265ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/AccessMapTest.php000066400000000000000000000032241266465517700243370ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\AccessMap; class AccessMapTest extends \PHPUnit_Framework_TestCase { public function testReturnsFirstMatchedPattern() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\HttpFoundation\RequestMatcherInterface'); $requestMatcher->expects($this->once()) ->method('matches')->with($request) ->will($this->returnValue($matches)); return $requestMatcher; } } src/Symfony/Component/Security/Http/Tests/Authentication/000077500000000000000000000000001266465517700241055ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php000066400000000000000000000161261266465517700345560ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; use Symfony\Component\Security\Core\Security; use Symfony\Component\HttpKernel\HttpKernelInterface; class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCase { private $httpKernel = null; private $httpUtils = null; private $logger = null; private $request = null; private $session = null; private $exception = null; protected function setUp() { $this->httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $this->logger = $this->getMock('Psr\Log\LoggerInterface'); $this->session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $this->request->expects($this->any())->method('getSession')->will($this->returnValue($this->session)); $this->exception = $this->getMock('Symfony\Component\Security\Core\Exception\AuthenticationException', array('getMessage')); } 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 = $this->getMock('Symfony\Component\HttpFoundation\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 = $this->getMock('Symfony\Component\HttpFoundation\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', null, true) ->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 testFailurePathParameterCanBeOverwritten() { $options = array('failure_path_parameter' => '_my_failure_path'); $this->request->expects($this->once()) ->method('get')->with('_my_failure_path', null, true) ->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->getMock('Symfony\Component\HttpFoundation\Request'); $request->attributes = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag'); return $request; } } src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php000066400000000000000000000133731266465517700346000ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler; class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCase { private $httpUtils = null; private $request = null; private $token = null; protected function setUp() { $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $this->request->headers = $this->getMock('Symfony\Component\HttpFoundation\HeaderBag'); $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } 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 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->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $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 = $this->getMock('Symfony\Component\HttpFoundation\Response'); $this->httpUtils->expects($this->once()) ->method('createRedirectResponse') ->with($this->request, $path) ->will($this->returnValue($response)); return $response; } } src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php000066400000000000000000000207331266465517700331120ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { private $successHandler; private $failureHandler; private $request; private $token; private $authenticationException; private $response; protected function setUp() { $this->successHandler = $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface'); $this->failureHandler = $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface'); $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); // No methods are invoked on the exception; we just assert on its class $this->authenticationException = new AuthenticationException(); $this->response = $this->getMock('Symfony\Component\HttpFoundation\Response'); } public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfSimpleIsNotASuccessHandler() { $authenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface'); $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 { } src/Symfony/Component/Security/Http/Tests/EntryPoint/000077500000000000000000000000001266465517700232415ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/EntryPoint/BasicAuthenticationEntryPointTest.php000066400000000000000000000027031266465517700325710ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint; use Symfony\Component\Security\Core\Exception\AuthenticationException; class BasicAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $entryPoint = new BasicAuthenticationEntryPoint('TheRealmName'); $response = $entryPoint->start($request); $this->assertEquals('Basic realm="TheRealmName"', $response->headers->get('WWW-Authenticate')); $this->assertEquals(401, $response->getStatusCode()); } } src/Symfony/Component/Security/Http/Tests/EntryPoint/DigestAuthenticationEntryPointTest.php000066400000000000000000000044231266465517700327700ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\NonceExpiredException; class DigestAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $authenticationException = new AuthenticationException('TheAuthenticationExceptionMessage'); $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheKey'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheKey'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $nonceExpiredException = new NonceExpiredException('TheNonceExpiredExceptionMessage'); $entryPoint = new DigestAuthenticationEntryPoint('TheRealmName', 'TheKey'); $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')); } } src/Symfony/Component/Security/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php000066400000000000000000000051761266465517700324620ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint; use Symfony\Component\HttpKernel\HttpKernelInterface; class FormAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { public function testStart() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $response = $this->getMock('Symfony\Component\HttpFoundation\Response'); $httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $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->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $subRequest = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $response = new \Symfony\Component\HttpFoundation\Response('', 200); $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $httpUtils ->expects($this->once()) ->method('createRequest') ->with($this->equalTo($request), $this->equalTo('/the/login/path')) ->will($this->returnValue($subRequest)) ; $httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $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')); } } src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php000066400000000000000000000036361266465517700326630ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint; use Symfony\Component\HttpFoundation\Request; class RetryAuthenticationEntryPointTest extends \PHPUnit_Framework_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', ), ); } } src/Symfony/Component/Security/Http/Tests/Firewall/000077500000000000000000000000001266465517700226735ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/Firewall/AbstractPreAuthenticatedListenerTest.php000066400000000000000000000227741266465517700327030ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testHandleWithValidValues() { $userCredentials = array('TheUser', 'TheCredentials'); $request = new Request(array(), array(), array(), array(), array(), array()); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $tokenStorage ->expects($this->once()) ->method('setToken') ->with($this->equalTo($token)) ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $tokenStorage ->expects($this->never()) ->method('setToken') ; $exception = new AuthenticationException('Authentication failed.'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $tokenStorage ->expects($this->never()) ->method('setToken') ; $exception = new AuthenticationException('Authentication failed.'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $event ->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) ; $listener->handle($event); } } src/Symfony/Component/Security/Http/Tests/Firewall/AccessListenerTest.php000066400000000000000000000172661266465517700271670ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Firewall\AccessListener; class AccessListenerTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException */ public function testHandleWhenTheAccessDecisionManagerDecidesToRefuseAccess() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array('foo' => 'bar'), null))) ; $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token ->expects($this->any()) ->method('isAuthenticated') ->will($this->returnValue(true)) ; $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $event ->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) ; $listener->handle($event); } public function testHandleWhenTheTokenIsNotAuthenticated() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array('foo' => 'bar'), null))) ; $notAuthenticatedToken = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $notAuthenticatedToken ->expects($this->any()) ->method('isAuthenticated') ->will($this->returnValue(false)) ; $authenticatedToken = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $authenticatedToken ->expects($this->any()) ->method('isAuthenticated') ->will($this->returnValue(true)) ; $authManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $authManager ->expects($this->once()) ->method('authenticate') ->with($this->equalTo($notAuthenticatedToken)) ->will($this->returnValue($authenticatedToken)) ; $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($notAuthenticatedToken)) ; $tokenStorage ->expects($this->once()) ->method('setToken') ->with($this->equalTo($authenticatedToken)) ; $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $event ->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) ; $listener->handle($event); } public function testHandleWhenThereIsNoAccessMapEntryMatchingTheRequest() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(null, null))) ; $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token ->expects($this->never()) ->method('isAuthenticated') ; $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $listener = new AccessListener( $tokenStorage, $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'), $accessMap, $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $listener = new AccessListener( $tokenStorage, $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'), $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'), $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $listener->handle($event); } } src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php000066400000000000000000000067351266465517700326550ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener; class AnonymousAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { public function testHandleWithTokenStorageHavingAToken() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))) ; $tokenStorage ->expects($this->never()) ->method('setToken') ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $authenticationManager ->expects($this->never()) ->method('authenticate') ; $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', null, $authenticationManager); $listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false)); } public function testHandleWithTokenStorageHavingNoToken() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $anonymousToken = new AnonymousToken('TheKey', 'anon.', array()); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $authenticationManager ->expects($this->once()) ->method('authenticate') ->with($this->callback(function ($token) { return 'TheKey' === $token->getKey(); })) ->will($this->returnValue($anonymousToken)) ; $tokenStorage ->expects($this->once()) ->method('setToken') ->with($anonymousToken) ; $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', null, $authenticationManager); $listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false)); } public function testHandledEventIsLogged() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $logger = $this->getMock('Psr\Log\LoggerInterface'); $logger->expects($this->once()) ->method('info') ->with('Populated the TokenStorage with an anonymous Token.') ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', $logger, $authenticationManager); $listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false)); } } src/Symfony/Component/Security/Http/Tests/Firewall/BasicAuthenticationListenerTest.php000066400000000000000000000223651266465517700317030ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testHandleWithValidUsernameAndPasswordServerParameters() { $request = new Request(array(), array(), array(), array(), array(), array( 'PHP_AUTH_USER' => 'TheUsername', 'PHP_AUTH_PW' => 'ThePassword', )); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $tokenStorage ->expects($this->once()) ->method('setToken') ->with($this->equalTo($token)) ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue(null)) ; $tokenStorage ->expects($this->never()) ->method('setToken') ; $response = new Response(); $authenticationEntryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface'))), 'TheProviderKey', $authenticationEntryPoint ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->never()) ->method('getToken') ; $listener = new BasicAuthenticationListener( $tokenStorage, $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'), 'TheProviderKey', $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $authenticationManager ->expects($this->never()) ->method('authenticate') ; $listener = new BasicAuthenticationListener( $tokenStorage, $authenticationManager, 'TheProviderKey', $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface') ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'), $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'), '', $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface') ); } 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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage ->expects($this->any()) ->method('getToken') ->will($this->returnValue($token)) ; $tokenStorage ->expects($this->never()) ->method('setToken') ; $response = new Response(); $authenticationEntryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface'))), 'TheProviderKey', $authenticationEntryPoint ); $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $event ->expects($this->any()) ->method('getRequest') ->will($this->returnValue($request)) ; $event ->expects($this->once()) ->method('setResponse') ->with($this->equalTo($response)) ; $listener->handle($event); } } src/Symfony/Component/Security/Http/Tests/Firewall/ChannelListenerTest.php000066400000000000000000000137241266465517700273310ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Firewall\ChannelListener; use Symfony\Component\HttpFoundation\Response; class ChannelListenerTest extends \PHPUnit_Framework_TestCase { public function testHandleWithNotSecuredRequestAndHttpChannel() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $request ->expects($this->any()) ->method('isSecure') ->will($this->returnValue(false)) ; $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array(), 'http'))) ; $entryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $entryPoint ->expects($this->never()) ->method('start') ; $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $request ->expects($this->any()) ->method('isSecure') ->will($this->returnValue(true)) ; $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array(), 'https'))) ; $entryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $entryPoint ->expects($this->never()) ->method('start') ; $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $request ->expects($this->any()) ->method('isSecure') ->will($this->returnValue(false)) ; $response = new Response(); $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array(), 'https'))) ; $entryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $entryPoint ->expects($this->once()) ->method('start') ->with($this->equalTo($request)) ->will($this->returnValue($response)) ; $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $request ->expects($this->any()) ->method('isSecure') ->will($this->returnValue(true)) ; $response = new Response(); $accessMap = $this->getMock('Symfony\Component\Security\Http\AccessMapInterface'); $accessMap ->expects($this->any()) ->method('getPatterns') ->with($this->equalTo($request)) ->will($this->returnValue(array(array(), 'http'))) ; $entryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $entryPoint ->expects($this->once()) ->method('start') ->with($this->equalTo($request)) ->will($this->returnValue($response)) ; $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $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); } } src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php000066400000000000000000000235431266465517700274050ustar00rootroot00000000000000 * * 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 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\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Http\Firewall\ContextListener; use Symfony\Component\EventDispatcher\EventDispatcher; class ContextListenerTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage $contextKey must not be empty */ public function testItRequiresContextKey() { new ContextListener( $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'), array(), '' ); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage User provider "stdClass" must implement "Symfony\Component\Security\Core\User\UserProviderInterface */ public function testUserProvidersNeedToImplementAnInterface() { new ContextListener( $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'), 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 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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') ->disableOriginalConstructor() ->getMock(); $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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->getMock('Symfony\Component\HttpFoundation\Request'))); $dispatcher->expects($this->once()) ->method('addListener') ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); $listener->handle($event); } public function testOnKernelResponseListenerRemovesItself() { $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FilterResponseEvent') ->disableOriginalConstructor() ->getMock(); $listener = new ContextListener($tokenStorage, array(), 'key123', null, $dispatcher); $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage->expects($this->once())->method('setToken')->with(null); $listener = new ContextListener($tokenStorage, array(), 'key123'); $listener->handle($event); } 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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST, new Response() ); $listener = new ContextListener($tokenStorage, array(), 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); return $session; } } src/Symfony/Component/Security/Http/Tests/Firewall/DigestDataTest.php000066400000000000000000000156721266465517700262700ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Firewall\DigestData; class DigestDataTest extends \PHPUnit_Framework_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)); } } src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php000066400000000000000000000211371266465517700277140ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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())), ); } /** * @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->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); $kernel->expects($this->once())->method('handle')->will($this->returnValue(new Response('error'))); $event = $this->createEvent($exception, $kernel); $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $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->getMock('Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $tokenStorage->expects($this->once())->method('getToken')->will($this->returnValue($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))); $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->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); $entryPoint->expects($this->once())->method('start')->will($this->returnValue(new Response('OK'))); return $entryPoint; } private function createTrustResolver($fullFledged) { $trustResolver = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface'); $trustResolver->expects($this->once())->method('isFullFledged')->will($this->returnValue($fullFledged)); return $trustResolver; } private function createEvent(\Exception $exception, $kernel = null) { if (null === $kernel) { $kernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); } 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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'), $trustResolver ?: $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface'), $httpUtils ?: $this->getMock('Symfony\Component\Security\Http\HttpUtils'), 'key', $authenticationEntryPoint, $errorPage, $accessDeniedHandler ); } } src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php000066400000000000000000000162561266465517700272350ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Http\Firewall\LogoutListener; class LogoutListenerTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface'); } private function getTokenStorage() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); } 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->getMock('Symfony\Component\Security\Http\Logout\LogoutHandlerInterface'); } 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', 'intention' => 'logout', 'logout_path' => '/logout', 'target_url' => '/', ), $tokenManager ); return array($listener, $tokenStorage, $httpUtils, $options); } private function getSuccessHandler() { return $this->getMock('Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface'); } private function getToken() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } } src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php000066400000000000000000000303541266465517700277770ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testOnCoreSecurityDoesNotTryToPopulateNonEmptyTokenStorage() { list($listener, $tokenStorage) = $this->getListener(); $tokenStorage ->expects($this->once()) ->method('getToken') ->will($this->returnValue($this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))) ; $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))) ; $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'))) ; $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('\Symfony\Component\HttpFoundation\Session\SessionInterface'); $session ->expects($this->once()) ->method('isStarted') ->will($this->returnValue(true)) ; $request = $this->getMock('\Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('\Symfony\Component\HttpFoundation\Session\SessionInterface'); $session ->expects($this->once()) ->method('isStarted') ->will($this->returnValue(true)) ; $session ->expects($this->once()) ->method('migrate') ; $request = $this->getMock('\Symfony\Component\HttpFoundation\Request'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); } protected function getFilterResponseEvent() { return $this->getMock('Symfony\Component\HttpKernel\Event\FilterResponseEvent', array(), array(), '', false); } 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->getMock('Psr\Log\LoggerInterface'); } protected function getManager() { return $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); } protected function getService() { return $this->getMock('Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface'); } protected function getTokenStorage() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); } protected function getDispatcher() { return $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); } private function getSessionStrategy() { return $this->getMock('\Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface'); } } src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php000066400000000000000000000062321266465517700327470ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Http\Firewall\RemoteUserAuthenticationListener; class RemoteUserAuthenticationListenerTest extends \PHPUnit_Framework_TestCase { public function testGetPreAuthenticatedData() { $serverVars = array( 'REMOTE_USER' => 'TheUser', ); $request = new Request(array(), array(), array(), array(), array(), $serverVars); $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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); } } src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php000066400000000000000000000110201266465517700325440ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface'); $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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->request = new Request(array(), array(), array(), array(), array(), array()); $this->event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); $this->event ->expects($this->any()) ->method('getRequest') ->will($this->returnValue($this->request)) ; $this->logger = $this->getMock('Psr\Log\LoggerInterface'); $this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } protected function tearDown() { $this->authenticationManager = null; $this->dispatcher = null; $this->event = null; $this->logger = null; $this->request = null; $this->tokenStorage = null; $this->token = null; } } src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php000066400000000000000000000274541266465517700300660ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Event\SwitchUserEvent; use Symfony\Component\Security\Http\Firewall\SwitchUserListener; use Symfony\Component\Security\Http\SecurityEvents; class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase { private $tokenStorage; private $userProvider; private $userChecker; private $accessDecisionManager; private $request; private $event; protected function setUp() { $this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $this->userProvider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); $this->userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $this->accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $this->request->query = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag'); $this->request->server = $this->getMock('Symfony\Component\HttpFoundation\ServerBag'); $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->getMock('Symfony\Component\Security\Core\Role\RoleInterface'))); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $refreshedUser = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $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); } /** * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException */ public function testSwitchUserIsDisallowed() { $token = $this->getToken(array($this->getMock('Symfony\Component\Security\Core\Role\RoleInterface'))); $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->getMock('Symfony\Component\Security\Core\Role\RoleInterface'))); $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\Role\RoleInterface'))); $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token->expects($this->any()) ->method('getRoles') ->will($this->returnValue($roles)); return $token; } } src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php000066400000000000000000000113631266465517700313230ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener; class X509AuthenticationListenerTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); $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); } } src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php000066400000000000000000000101421266465517700247000ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\FirewallMap; use Symfony\Component\HttpFoundation\Request; class FirewallMapTest extends \PHPUnit_Framework_TestCase { public function testGetListeners() { $map = new FirewallMap(); $request = new Request(); $notMatchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $notMatchingMatcher ->expects($this->once()) ->method('matches') ->with($this->equalTo($request)) ->will($this->returnValue(false)) ; $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); $matchingMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $matchingMatcher ->expects($this->once()) ->method('matches') ->with($this->equalTo($request)) ->will($this->returnValue(true)) ; $theListener = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); $theException = $this->getMock('Symfony\Component\Security\Http\Firewall\ExceptionListener', array(), array(), '', false); $map->add($matchingMatcher, array($theListener), $theException); $tooLateMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $tooLateMatcher ->expects($this->never()) ->method('matches') ; $map->add($tooLateMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); 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->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $notMatchingMatcher ->expects($this->once()) ->method('matches') ->with($this->equalTo($request)) ->will($this->returnValue(false)) ; $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); $theListener = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); $theException = $this->getMock('Symfony\Component\Security\Http\Firewall\ExceptionListener', array(), array(), '', false); $map->add(null, array($theListener), $theException); $tooLateMatcher = $this->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $tooLateMatcher ->expects($this->never()) ->method('matches') ; $map->add($tooLateMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); 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->getMock('Symfony\Component\HttpFoundation\RequestMatcher'); $notMatchingMatcher ->expects($this->once()) ->method('matches') ->with($this->equalTo($request)) ->will($this->returnValue(false)) ; $map->add($notMatchingMatcher, array($this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'))); list($listeners, $exception) = $map->getListeners($request); $this->assertEquals(array(), $listeners); $this->assertNull($exception); } } src/Symfony/Component/Security/Http/Tests/FirewallTest.php000066400000000000000000000074461266465517700242570ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Firewall; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; class FirewallTest extends \PHPUnit_Framework_TestCase { public function testOnKernelRequestRegistersExceptionListener() { $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $listener = $this->getMock('Symfony\Component\Security\Http\Firewall\ExceptionListener', array(), array(), '', false); $listener ->expects($this->once()) ->method('register') ->with($this->equalTo($dispatcher)) ; $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); $map = $this->getMock('Symfony\Component\Security\Http\FirewallMapInterface'); $map ->expects($this->once()) ->method('getListeners') ->with($this->equalTo($request)) ->will($this->returnValue(array(array(), $listener))) ; $event = new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST); $firewall = new Firewall($map, $dispatcher); $firewall->onKernelRequest($event); } public function testOnKernelRequestStopsWhenThereIsAResponse() { $response = $this->getMock('Symfony\Component\HttpFoundation\Response'); $first = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); $first ->expects($this->once()) ->method('handle') ; $second = $this->getMock('Symfony\Component\Security\Http\Firewall\ListenerInterface'); $second ->expects($this->never()) ->method('handle') ; $map = $this->getMock('Symfony\Component\Security\Http\FirewallMapInterface'); $map ->expects($this->once()) ->method('getListeners') ->will($this->returnValue(array(array($first, $second), null))) ; $event = $this->getMock( 'Symfony\Component\HttpKernel\Event\GetResponseEvent', array('hasResponse'), array( $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false), HttpKernelInterface::MASTER_REQUEST, ) ); $event ->expects($this->once()) ->method('hasResponse') ->will($this->returnValue(true)) ; $firewall = new Firewall($map, $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface')); $firewall->onKernelRequest($event); } public function testOnKernelRequestWithSubRequest() { $map = $this->getMock('Symfony\Component\Security\Http\FirewallMapInterface'); $map ->expects($this->never()) ->method('getListeners') ; $event = new GetResponseEvent( $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $this->getMock('Symfony\Component\HttpFoundation\Request'), HttpKernelInterface::SUB_REQUEST ); $firewall = new Firewall($map, $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface')); $firewall->onKernelRequest($event); $this->assertFalse($event->hasResponse()); } } src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php000066400000000000000000000226401266465517700244430ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); $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->getMock('Symfony\Component\Routing\RequestContext'))) ; $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->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); $urlGenerator ->expects($this->once()) ->method('generate') ->will($this->returnValue('/foo/bar')) ; $urlGenerator ->expects($this->any()) ->method('getContext') ->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext'))) ; $subRequest = $utils->createRequest($this->getRequest(), 'foobar'); $this->assertEquals('/foo/bar', $subRequest->getPathInfo()); } public function testCreateRequestWithAbsoluteUrl() { $utils = new HttpUtils($this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')); $subRequest = $utils->createRequest($this->getRequest(), 'http://symfony.com/'); $this->assertEquals('/', $subRequest->getPathInfo()); } public function testCreateRequestPassesSessionToTheNewRequest() { $request = $this->getRequest(); $request->setSession($session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface')); $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->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); $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->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $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->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); $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->getMock('Symfony\Component\Routing\Matcher\RequestMatcherInterface'); $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->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); $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->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); $urlGenerator ->expects($this->any()) ->method('generate') ->will($this->returnValue($generatedUrl)) ; return $urlGenerator; } private function getRequest($path = '/') { return Request::create($path, 'get'); } } src/Symfony/Component/Security/Http/Tests/Logout/000077500000000000000000000000001266465517700223775ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/Logout/CookieClearingLogoutHandlerTest.php000066400000000000000000000034141266465517700313200ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler; class CookieClearingLogoutHandlerTest extends \PHPUnit_Framework_TestCase { public function testLogout() { $request = new Request(); $response = new Response(); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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()); } } src/Symfony/Component/Security/Http/Tests/Logout/DefaultLogoutSuccessHandlerTest.php000066400000000000000000000021141266465517700313530ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler; class DefaultLogoutSuccessHandlerTest extends \PHPUnit_Framework_TestCase { public function testLogout() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $response = $this->getMock('Symfony\Component\HttpFoundation\Response'); $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); $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); } } src/Symfony/Component/Security/Http/Tests/Logout/SessionLogoutHandlerTest.php000066400000000000000000000022431266465517700300640ustar00rootroot00000000000000 * * 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 Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Http\Logout\SessionLogoutHandler; class SessionLogoutHandlerTest extends \PHPUnit_Framework_TestCase { public function testLogout() { $handler = new SessionLogoutHandler(); $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $response = new Response(); $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', false); $request ->expects($this->once()) ->method('getSession') ->will($this->returnValue($session)) ; $session ->expects($this->once()) ->method('invalidate') ; $handler->logout($request, $response, $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); } } src/Symfony/Component/Security/Http/Tests/RememberMe/000077500000000000000000000000001266465517700231465ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php000066400000000000000000000254751266465517700317440ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testGetRememberMeParameter() { $service = $this->getService(null, array('remember_me_parameter' => 'foo')); $this->assertEquals('foo', $service->getRememberMeParameter()); } public function testGetKey() { $service = $this->getService(); $this->assertEquals('fookey', $service->getKey()); } 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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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('fookey', $returnedToken->getKey()); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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), 'fookey', 'fookey', $options, $logger, )); } protected function getProvider() { $provider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); $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); } } src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php000066400000000000000000000345471266465517700343010ustar00rootroot00000000000000 * * 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 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; use Symfony\Component\Security\Core\Util\SecureRandom; class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase { public static function setUpBeforeClass() { try { random_bytes(1); } catch (\Exception $e) { throw new \PHPUnit_Framework_SkippedTestError($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->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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('fookey', $returnedToken->getKey()); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenProvider = $this->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenProvider = $this->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $tokenProvider = $this->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $account ->expects($this->once()) ->method('getUsername') ->will($this->returnValue('foo')) ; $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $token ->expects($this->any()) ->method('getUser') ->will($this->returnValue($account)) ; $tokenProvider = $this->getMock('Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface'); $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), 'fookey', 'fookey', $options, $logger, new SecureRandom(sys_get_temp_dir().'/_sf2.seed')); } protected function getProvider() { $provider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); $provider ->expects($this->any()) ->method('supportsClass') ->will($this->returnValue(true)) ; return $provider; } } src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php000066400000000000000000000066111266465517700300270ustar00rootroot00000000000000 * * 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 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\Cookie; use Symfony\Component\HttpKernel\KernelEvents; class ResponseListenerTest extends \PHPUnit_Framework_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 = $this->getMock('Symfony\Component\HttpFoundation\Response'); $response->headers = $this->getMock('Symfony\Component\HttpFoundation\ResponseHeaderBag'); 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; } } src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php000066400000000000000000000253501266465517700322100ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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('fookey', $returnedToken->getKey()); } 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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $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->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); $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), 'fookey', 'fookey', $options, $logger); return $service; } protected function getProvider() { $provider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); $provider ->expects($this->any()) ->method('supportsClass') ->will($this->returnValue(true)) ; return $provider; } } src/Symfony/Component/Security/Http/Tests/Session/000077500000000000000000000000001266465517700225515ustar00rootroot00000000000000src/Symfony/Component/Security/Http/Tests/Session/SessionAuthenticationStrategyTest.php000066400000000000000000000062721266465517700321770ustar00rootroot00000000000000 * * 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 Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_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() { if (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50411) { $this->markTestSkipped('We cannot destroy the old session on PHP 5.4.0 - 5.4.10.'); } $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $session->expects($this->once())->method('migrate')->with($this->equalTo(true)); $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE); $strategy->onAuthentication($this->getRequest($session), $this->getToken()); } public function testSessionIsMigratedWithPhp54Workaround() { if (PHP_VERSION_ID < 50400 || PHP_VERSION_ID >= 50411) { $this->markTestSkipped('This PHP version is not affected.'); } $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $session->expects($this->once())->method('migrate')->with($this->equalTo(false)); $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE); $strategy->onAuthentication($this->getRequest($session), $this->getToken()); } public function testSessionIsInvalidated() { $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); $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->getMock('Symfony\Component\HttpFoundation\Request'); if (null !== $session) { $request->expects($this->any())->method('getSession')->will($this->returnValue($session)); } return $request; } private function getToken() { return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); } } src/Symfony/Component/Security/Http/composer.json000066400000000000000000000024541266465517700225530ustar00rootroot00000000000000{ "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.3.9", "symfony/security-core": "~2.6", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4", "symfony/http-kernel": "~2.4" }, "require-dev": { "symfony/routing": "~2.2", "symfony/security-csrf": "~2.4", "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": "2.7-dev" } } } src/Symfony/Component/Security/Http/phpunit.xml.dist000066400000000000000000000016041266465517700232000ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Security/LICENSE000066400000000000000000000020511266465517700201100ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Security/README.md000066400000000000000000000010271266465517700203640ustar00rootroot00000000000000Security Component ================== 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/2.7/book/security.html Tests ----- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/ $ composer install $ phpunit src/Symfony/Component/Security/Resources/000077500000000000000000000000001266465517700210575ustar00rootroot00000000000000src/Symfony/Component/Security/Resources/translations/000077500000000000000000000000001266465517700236005ustar00rootroot00000000000000src/Symfony/Component/Security/Resources/translations/security.ar.xlf000066400000000000000000000072721266465517700265730ustar00rootroot00000000000000 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. الحساب مغلق. src/Symfony/Component/Security/Resources/translations/security.az.xlf000066400000000000000000000065141266465517700266010ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.bg.xlf000066400000000000000000000075231266465517700265600ustar00rootroot00000000000000 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. Акаунта е заключен. src/Symfony/Component/Security/Resources/translations/security.ca.xlf000066400000000000000000000066431266465517700265550ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.cs.xlf000066400000000000000000000066131266465517700265740ustar00rootroot00000000000000 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ý. src/Symfony/Component/Security/Resources/translations/security.da.xlf000066400000000000000000000065121266465517700265510ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.de.xlf000066400000000000000000000067101266465517700265550ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.el.xlf000066400000000000000000000077421266465517700265730ustar00rootroot00000000000000 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. Ο λογαριασμός είναι κλειδωμένος. src/Symfony/Component/Security/Resources/translations/security.en.xlf000066400000000000000000000064721266465517700265740ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.es.xlf000066400000000000000000000067031266465517700265760ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.fa.xlf000066400000000000000000000074311266465517700265540ustar00rootroot00000000000000 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. حساب کاربری قفل شده است. src/Symfony/Component/Security/Resources/translations/security.fr.xlf000066400000000000000000000067371266465517700266050ustar00rootroot00000000000000 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é. src/Symfony/Component/Security/Resources/translations/security.gl.xlf000066400000000000000000000066371266465517700265770ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.he.xlf000066400000000000000000000064721266465517700265660ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.hr.xlf000066400000000000000000000065271266465517700266040ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.hu.xlf000066400000000000000000000066561266465517700266120ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.id.xlf000066400000000000000000000065041266465517700265620ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.it.xlf000066400000000000000000000066161266465517700266060ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.ja.xlf000066400000000000000000000070701266465517700265570ustar00rootroot00000000000000 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. アカウントはロックされています。 src/Symfony/Component/Security/Resources/translations/security.lb.xlf000066400000000000000000000067241266465517700265670ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.lt.xlf000066400000000000000000000065741266465517700266140ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.nl.xlf000066400000000000000000000067071266465517700266040ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.no.xlf000066400000000000000000000066061266465517700266050ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.pl.xlf000066400000000000000000000066061266465517700266040ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.pt_BR.xlf000066400000000000000000000066101266465517700271720ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.pt_PT.xlf000066400000000000000000000065741266465517700272230ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.ro.xlf000066400000000000000000000066151266465517700266110ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.ru.xlf000066400000000000000000000076751266465517700266260ustar00rootroot00000000000000 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. Учетная запись заблокирована. src/Symfony/Component/Security/Resources/translations/security.sk.xlf000066400000000000000000000066021266465517700266020ustar00rootroot00000000000000 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ý. src/Symfony/Component/Security/Resources/translations/security.sl.xlf000066400000000000000000000065441266465517700266100ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.sr_Cyrl.xlf000066400000000000000000000075121266465517700276030ustar00rootroot00000000000000 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. Налог је закључан. src/Symfony/Component/Security/Resources/translations/security.sr_Latn.xlf000066400000000000000000000065471266465517700275770ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.sv.xlf000066400000000000000000000065361266465517700266230ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.th.xlf000066400000000000000000000100311266465517700265670ustar00rootroot00000000000000 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. บัญชีถูกล็อกแล้ว src/Symfony/Component/Security/Resources/translations/security.tr.xlf000066400000000000000000000065601266465517700266150ustar00rootroot00000000000000 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ş. src/Symfony/Component/Security/Resources/translations/security.ua.xlf000066400000000000000000000076031266465517700265740ustar00rootroot00000000000000 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. Обліковий запис заблоковано. src/Symfony/Component/Security/Resources/translations/security.vi.xlf000066400000000000000000000070251266465517700266030ustar00rootroot00000000000000 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. src/Symfony/Component/Security/Resources/translations/security.zh_CN.xlf000066400000000000000000000063741266465517700271740ustar00rootroot00000000000000 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. 帐号已被锁定。 src/Symfony/Component/Security/Tests/000077500000000000000000000000001266465517700202075ustar00rootroot00000000000000src/Symfony/Component/Security/Tests/Resources/000077500000000000000000000000001266465517700221615ustar00rootroot00000000000000src/Symfony/Component/Security/Tests/Resources/TranslationFilesTest.php000066400000000000000000000014331266465517700270140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Tests\Resources; class TranslationFilesTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideTranslationFiles */ public function testTranslationFileIsValid($filePath) { \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') ); } } src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php000066400000000000000000000035531266465517700261250ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Tests; use Symfony\Component\Finder\Finder; class TranslationSyncStatusTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getTranslationDirectoriesData */ public function testTranslationFileIsNotMissingInCore($dir1, $dir2) { $finder = new Finder(); $files = $finder->in($dir1)->files(); foreach ($files as $file) { $this->assertFileExists($dir2.'/'.$file->getFilename(), 'Missing file '.$file->getFilename().' in directory '.$dir2); } } public function getTranslationDirectoriesData() { $legacyTranslationsDir = $this->getLegacyTranslationsDirectory(); $coreTranslationsDir = $this->getCoreTranslationsDirectory(); return array( 'file-not-missing-in-core' => array($legacyTranslationsDir, $coreTranslationsDir), 'file-not-added-in-core' => array($coreTranslationsDir, $legacyTranslationsDir), ); } public function testFileContentsAreEqual() { $finder = new Finder(); $files = $finder->in($this->getLegacyTranslationsDirectory())->files(); foreach ($files as $file) { $coreFile = $this->getCoreTranslationsDirectory().'/'.$file->getFilename(); $this->assertFileEquals($file->getRealPath(), $coreFile, $file.' and '.$coreFile.' have equal content.'); } } private function getLegacyTranslationsDirectory() { return __DIR__.'/../Resources/translations'; } private function getCoreTranslationsDirectory() { return __DIR__.'/../Core/Resources/translations'; } } src/Symfony/Component/Security/composer.json000066400000000000000000000041071266465517700216310ustar00rootroot00000000000000{ "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.3.9", "paragonie/random_compat": "~1.0", "symfony/event-dispatcher": "~2.2", "symfony/http-foundation": "~2.1", "symfony/http-kernel": "~2.4" }, "replace": { "symfony/security-acl": "self.version", "symfony/security-core": "self.version", "symfony/security-csrf": "self.version", "symfony/security-http": "self.version" }, "require-dev": { "symfony/finder": "~2.3", "symfony/intl": "~2.3", "symfony/routing": "~2.2", "symfony/validator": "~2.5,>=2.5.9", "doctrine/common": "~2.2", "doctrine/dbal": "~2.2", "psr/log": "~1.0", "ircmaxell/password-compat": "~1.0", "symfony/expression-language": "~2.6" }, "suggest": { "symfony/class-loader": "For using the ACL generateSql script", "symfony/finder": "For using the ACL generateSql script", "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", "doctrine/dbal": "For using the built-in ACL implementation", "symfony/expression-language": "For using the expression voter", "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" }, "autoload": { "psr-4": { "Symfony\\Component\\Security\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Security/phpunit.xml.dist000066400000000000000000000020021266465517700222520ustar00rootroot00000000000000 ./Tests/ ./*/Tests/ ./ ./Resources ./Tests ./vendor ./*/Resources ./*/Tests ./*/vendor src/Symfony/Component/Serializer/000077500000000000000000000000001266465517700174075ustar00rootroot00000000000000src/Symfony/Component/Serializer/.gitignore000066400000000000000000000000421266465517700213730ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Serializer/Annotation/000077500000000000000000000000001266465517700215215ustar00rootroot00000000000000src/Symfony/Component/Serializer/Annotation/Groups.php000066400000000000000000000027731266465517700235220ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/CHANGELOG.md000066400000000000000000000063171266465517700212270ustar00rootroot00000000000000CHANGELOG ========= 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 ) ) ) src/Symfony/Component/Serializer/Encoder/000077500000000000000000000000001266465517700207665ustar00rootroot00000000000000src/Symfony/Component/Serializer/Encoder/ChainDecoder.php000066400000000000000000000037701266465517700240160ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Serializer/Encoder/ChainEncoder.php000066400000000000000000000047431266465517700240310ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Serializer/Encoder/DecoderInterface.php000066400000000000000000000024561266465517700246740ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Encoder/EncoderInterface.php000066400000000000000000000020531266465517700246770ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Encoder/JsonDecode.php000066400000000000000000000104331266465517700235150ustar00rootroot00000000000000 * * 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; } /** * Returns the last decoding error (if any). * * @return int * * @deprecated since version 2.5, to be removed in 3.0. * The {@self decode()} method throws an exception if error found. * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); return $this->lastError; } /** * 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']; if (PHP_VERSION_ID >= 50400) { $decodedData = json_decode($data, $associative, $recursionDepth, $options); } else { $decodedData = json_decode($data, $associative, $recursionDepth); } if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) { throw new UnexpectedValueException(JsonEncoder::getLastErrorMessage()); } 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); } } src/Symfony/Component/Serializer/Encoder/JsonEncode.php000066400000000000000000000042301266465517700235250ustar00rootroot00000000000000 * * 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; } /** * Returns the last encoding error (if any). * * @return int * * @deprecated since version 2.5, to be removed in 3.0. * The {@self encode()} throws an exception if error found. * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); return $this->lastError; } /** * 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(JsonEncoder::getLastErrorMessage()); } 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); } } src/Symfony/Component/Serializer/Encoder/JsonEncoder.php000066400000000000000000000067441266465517700237230ustar00rootroot00000000000000 * * 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); } /** * Returns the last encoding error (if any). * * @return int * * @deprecated since version 2.5, to be removed in 3.0. JsonEncode throws exception if an error is found. */ public function getLastEncodingError() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); return $this->encodingImpl->getLastError(); } /** * Returns the last decoding error (if any). * * @return int * * @deprecated since version 2.5, to be removed in 3.0. JsonDecode throws exception if an error is found. */ public function getLastDecodingError() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); return $this->decodingImpl->getLastError(); } /** * {@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; } /** * Resolves json_last_error message. * * @return string */ public static function getLastErrorMessage() { if (function_exists('json_last_error_msg')) { return json_last_error_msg(); } switch (json_last_error()) { 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'; } } } src/Symfony/Component/Serializer/Encoder/NormalizationAwareInterface.php000066400000000000000000000011501266465517700271230ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Encoder/SerializerAwareEncoder.php000066400000000000000000000013751266465517700260760ustar00rootroot00000000000000 * * 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\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; /** * SerializerAware Encoder implementation. * * @author Jordi Boggiano */ abstract class SerializerAwareEncoder implements SerializerAwareInterface { protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } } src/Symfony/Component/Serializer/Encoder/XmlEncoder.php000066400000000000000000000356451266465517700235540ustar00rootroot00000000000000 * * 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'; /** * Construct new XmlEncoder and allow to change the root node element name. * * @param string $rootNodeName */ public function __construct($rootNodeName = 'response') { $this->rootNodeName = $rootNodeName; } /** * {@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, LIBXML_NONET | LIBXML_NOBLANKS); 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) { foreach ($data as $key => $data) { //Ah this is the magic @ attribute types. if (0 === strpos($key, '@') && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) { $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 */ 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->buildXml($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; } } src/Symfony/Component/Serializer/Exception/000077500000000000000000000000001266465517700213455ustar00rootroot00000000000000src/Symfony/Component/Serializer/Exception/CircularReferenceException.php000066400000000000000000000006671266465517700273310ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/Exception.php000066400000000000000000000006571266465517700240240ustar00rootroot00000000000000 * * 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. * * @deprecated since version 2.7, to be removed in 3.0. Use ExceptionInterface instead. */ interface Exception { } src/Symfony/Component/Serializer/Exception/ExceptionInterface.php000066400000000000000000000006621266465517700256410ustar00rootroot00000000000000 * * 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 extends Exception { } src/Symfony/Component/Serializer/Exception/InvalidArgumentException.php000066400000000000000000000007421266465517700270310ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/LogicException.php000066400000000000000000000007021266465517700247710ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/MappingException.php000066400000000000000000000006431266465517700253330ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/RuntimeException.php000066400000000000000000000007121266465517700253600ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/UnexpectedValueException.php000066400000000000000000000007401266465517700270370ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Exception/UnsupportedException.php000066400000000000000000000006731266465517700262730ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/LICENSE000066400000000000000000000020511266465517700204120ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Serializer/Mapping/000077500000000000000000000000001266465517700210025ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php000066400000000000000000000036571266465517700251320ustar00rootroot00000000000000 * * 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(); /** * 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 merge(AttributeMetadataInterface $attributeMetadata) { foreach ($attributeMetadata->getGroups() as $group) { $this->addGroup($group); } } /** * Returns the names of the properties that should be serialized. * * @return string[] */ public function __sleep() { return array('name', 'groups'); } } src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php000066400000000000000000000021521266465517700267400ustar00rootroot00000000000000 * * 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(); /** * Merges an {@see AttributeMetadataInterface} with in the current one. * * @param AttributeMetadataInterface $attributeMetadata */ public function merge(AttributeMetadataInterface $attributeMetadata); } src/Symfony/Component/Serializer/Mapping/ClassMetadata.php000066400000000000000000000051761266465517700242320ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php000066400000000000000000000030561266465517700260460ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Serializer/Mapping/Factory/000077500000000000000000000000001266465517700224115ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php000066400000000000000000000061351266465517700271650ustar00rootroot00000000000000 * * 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 { /** * @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; } /** * {@inheritdoc} */ public function getMetadataFor($value) { $class = $this->getClass($value); if (!$class) { throw new InvalidArgumentException(sprintf('Cannot create metadata for non-objects. Got: "%s"', gettype($value))); } if (isset($this->loadedClasses[$class])) { return $this->loadedClasses[$class]; } if ($this->cache && ($this->loadedClasses[$class] = $this->cache->fetch($class))) { return $this->loadedClasses[$class]; } if (!class_exists($class) && !interface_exists($class)) { throw new InvalidArgumentException(sprintf('The class or interface "%s" does not exist.', $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) { $class = $this->getClass($value); return class_exists($class) || interface_exists($class); } /** * Gets a class name for a given class or instance. * * @param mixed $value * * @return string|bool */ private function getClass($value) { if (!is_object($value) && !is_string($value)) { return false; } return ltrim(is_object($value) ? get_class($value) : $value, '\\'); } } src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactoryInterface.php000066400000000000000000000031121266465517700307760ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Mapping/Loader/000077500000000000000000000000001266465517700222105ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php000066400000000000000000000066731266465517700261760ustar00rootroot00000000000000 * * 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\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 $groups) { if ($groups instanceof Groups) { foreach ($groups->getGroups() as $group) { $attributesMetadata[$property->name]->addGroup($group); } } $loaded = true; } } } foreach ($reflectionClass->getMethods() as $method) { if ($method->getDeclaringClass()->name === $className) { foreach ($this->reader->getMethodAnnotations($method) as $groups) { if ($groups instanceof Groups) { if (preg_match('/^(get|is|has|set)(.+)$/i', $method->name, $matches)) { $attributeName = lcfirst($matches[2]); if (isset($attributesMetadata[$attributeName])) { $attributeMetadata = $attributesMetadata[$attributeName]; } else { $attributesMetadata[$attributeName] = $attributeMetadata = new AttributeMetadata($attributeName); $classMetadata->addAttributeMetadata($attributeMetadata); } foreach ($groups->getGroups() as $group) { $attributeMetadata->addGroup($group); } } else { 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)); } } $loaded = true; } } } return $loaded; } } src/Symfony/Component/Serializer/Mapping/Loader/FileLoader.php000066400000000000000000000021321266465517700247250ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php000066400000000000000000000035211266465517700250730ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Mapping/Loader/LoaderInterface.php000066400000000000000000000013031266465517700257450ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Mapping/Loader/XmlFileLoader.php000066400000000000000000000050151266465517700254110ustar00rootroot00000000000000 * * 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 = array(); $xml = $this->parseFile($this->file); foreach ($xml->class as $class) { $this->classes[(string) $class['name']] = $class; } } $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); } } return true; } return false; } /** * 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); } } src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php000066400000000000000000000062311266465517700255540ustar00rootroot00000000000000 * * 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) { 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 false; } // not an array if (!is_array($classes)) { throw new MappingException(sprintf('The file "%s" must contain a YAML array.', $this->file)); } $this->classes = $classes; } if (isset($this->classes[$classMetadata->getName()])) { $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('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('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()); } $attributeMetadata->addGroup($group); } } } } return true; } return false; } } src/Symfony/Component/Serializer/Mapping/Loader/schema/000077500000000000000000000000001266465517700234505ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/000077500000000000000000000000001266465517700242075ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/serializer-mapping/000077500000000000000000000000001266465517700300115ustar00rootroot00000000000000serializer-mapping-1.0.xsd000066400000000000000000000040131266465517700345460ustar00rootroot00000000000000src/Symfony/Component/Serializer/Mapping/Loader/schema/dic/serializer-mapping src/Symfony/Component/Serializer/NameConverter/000077500000000000000000000000001266465517700221575ustar00rootroot00000000000000src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php000066400000000000000000000042431266465517700312620ustar00rootroot00000000000000 * * 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)) { $snakeCasedName = ''; $len = strlen($propertyName); for ($i = 0; $i < $len; ++$i) { if (ctype_upper($propertyName[$i])) { $snakeCasedName .= '_'.strtolower($propertyName[$i]); } else { $snakeCasedName .= strtolower($propertyName[$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 $this->lowerCamelCase ? lcfirst($camelCasedName) : $camelCasedName; } return $propertyName; } } src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php000066400000000000000000000014731266465517700272660ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Normalizer/000077500000000000000000000000001266465517700215315ustar00rootroot00000000000000src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php000066400000000000000000000301701266465517700260510ustar00rootroot00000000000000 * * 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\CamelCaseToSnakeCaseNameConverter; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; /** * Normalizer implementation. * * @author Kévin Dunglas */ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface { 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 * * @throws InvalidArgumentException */ public function setCircularReferenceHandler($circularReferenceHandler) { if (!is_callable($circularReferenceHandler)) { throw new InvalidArgumentException('The given circular reference handler is not callable.'); } $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; } /** * Set attributes to be camelized on denormalize. * * @deprecated Deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead. * * @param array $camelizedAttributes * * @return self * * @throws LogicException */ public function setCamelizedAttributes(array $camelizedAttributes) { @trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); if ($this->nameConverter && !$this->nameConverter instanceof CamelCaseToSnakeCaseNameConverter) { throw new LogicException(sprintf('%s cannot be called if a custom Name Converter is defined.', __METHOD__)); } $attributes = array(); foreach ($camelizedAttributes as $camelizedAttribute) { $attributes[] = lcfirst(preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $camelizedAttribute)); } $this->nameConverter = new CamelCaseToSnakeCaseNameConverter($attributes); 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)); } /** * Format an attribute name, for example to convert a snake_case name to camelCase. * * @deprecated Deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead. * * @param string $attributeName * * @return string */ protected function formatAttribute($attributeName) { @trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); return $this->nameConverter ? $this->nameConverter->normalize($attributeName) : $attributeName; } /** * 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) { if (count(array_intersect($attributeMetadata->getGroups(), $context[static::GROUPS]))) { $allowedAttributes[] = $attributesAsString ? $attributeMetadata->getName() : $attributeMetadata; } } return $allowedAttributes; } /** * 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; } /** * 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 * * @return object * * @throws RuntimeException */ protected function instantiateObject(array &$data, $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes) { 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 = $reflectionClass->getConstructor(); 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))) { $params[] = $data[$key]; // don't run set for a parameter passed to the constructor 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 ) ); } } return $reflectionClass->newInstanceArgs($params); } return new $class(); } } src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php000066400000000000000000000034421266465517700255620ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; /** * @author Jordi Boggiano */ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface { /** * {@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) { return is_subclass_of($type, 'Symfony\Component\Serializer\Normalizer\DenormalizableInterface'); } } src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php000066400000000000000000000030131266465517700270100ustar00rootroot00000000000000 * * 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 */ public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); } src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php000066400000000000000000000024251266465517700265210ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php000066400000000000000000000144471266465517700266530ustar00rootroot00000000000000 * * 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\LogicException; use Symfony\Component\Serializer\Exception\RuntimeException; /** * 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 AbstractNormalizer { /** * {@inheritdoc} * * @throws LogicException * @throws CircularReferenceException */ public function normalize($object, $format = null, array $context = array()) { if ($this->isCircularReference($object, $context)) { return $this->handleCircularReference($object); } $reflectionObject = new \ReflectionObject($object); $reflectionMethods = $reflectionObject->getMethods(\ReflectionMethod::IS_PUBLIC); $allowedAttributes = $this->getAllowedAttributes($object, $context, true); $attributes = array(); foreach ($reflectionMethods as $method) { if ($this->isGetMethod($method)) { $attributeName = lcfirst(substr($method->name, 0 === strpos($method->name, 'is') ? 2 : 3)); if (in_array($attributeName, $this->ignoredAttributes)) { continue; } if (false !== $allowedAttributes && !in_array($attributeName, $allowedAttributes)) { continue; } $attributeValue = $method->invoke($object); if (isset($this->callbacks[$attributeName])) { $attributeValue = call_user_func($this->callbacks[$attributeName], $attributeValue); } if (null !== $attributeValue && !is_scalar($attributeValue)) { if (!$this->serializer instanceof NormalizerInterface) { throw new LogicException(sprintf('Cannot normalize attribute "%s" because injected serializer is not a normalizer', $attributeName)); } $attributeValue = $this->serializer->normalize($attributeValue, $format, $context); } if ($this->nameConverter) { $attributeName = $this->nameConverter->normalize($attributeName); } $attributes[$attributeName] = $attributeValue; } } return $attributes; } /** * {@inheritdoc} * * @throws RuntimeException */ public function denormalize($data, $class, $format = null, array $context = array()) { $allowedAttributes = $this->getAllowedAttributes($class, $context, true); $normalizedData = $this->prepareForDenormalization($data); $reflectionClass = new \ReflectionClass($class); $object = $this->instantiateObject($normalizedData, $class, $context, $reflectionClass, $allowedAttributes); $classMethods = get_class_methods($object); foreach ($normalizedData as $attribute => $value) { if ($this->nameConverter) { $attribute = $this->nameConverter->denormalize($attribute); } $allowed = $allowedAttributes === false || in_array($attribute, $allowedAttributes); $ignored = in_array($attribute, $this->ignoredAttributes); if ($allowed && !$ignored) { $setter = 'set'.ucfirst($attribute); if (in_array($setter, $classMethods) && !$reflectionClass->getMethod($setter)->isStatic()) { $object->$setter($value); } } } return $object; } /** * {@inheritdoc} */ public function supportsNormalization($data, $format = null) { return is_object($data) && !$data instanceof \Traversable && $this->supports(get_class($data)); } /** * {@inheritdoc} */ public function supportsDenormalization($data, $type, $format = null) { return $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() ) ; } } src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php000066400000000000000000000026671266465517700265150ustar00rootroot00000000000000 * * 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|string|bool|int|float|null */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); } src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php000066400000000000000000000022171266465517700262070ustar00rootroot00000000000000 * * 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|string|bool|int|float|null */ 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); } src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php000066400000000000000000000131451266465517700255170ustar00rootroot00000000000000 * * 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\Serializer\Exception\CircularReferenceException; use Symfony\Component\Serializer\Exception\LogicException; 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 AbstractNormalizer { /** * @var PropertyAccessorInterface */ protected $propertyAccessor; public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyAccessorInterface $propertyAccessor = null) { parent::__construct($classMetadataFactory, $nameConverter); $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); } /** * {@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 ($this->isCircularReference($object, $context)) { return $this->handleCircularReference($object); } $data = array(); $attributes = $this->getAllowedAttributes($object, $context, true); // If not using groups, detect manually if (false === $attributes) { $attributes = array(); // methods $reflClass = new \ReflectionClass($object); foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) { if ( !$reflMethod->isStatic() && !$reflMethod->isConstructor() && !$reflMethod->isDestructor() && 0 === $reflMethod->getNumberOfRequiredParameters() ) { $name = $reflMethod->getName(); if (strpos($name, 'get') === 0 || strpos($name, 'has') === 0) { // getters and hassers $attributes[lcfirst(substr($name, 3))] = true; } elseif (strpos($name, 'is') === 0) { // issers $attributes[lcfirst(substr($name, 2))] = true; } } } // properties foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) { if (!$reflProperty->isStatic()) { $attributes[$reflProperty->getName()] = true; } } $attributes = array_keys($attributes); } foreach ($attributes as $attribute) { if (in_array($attribute, $this->ignoredAttributes)) { continue; } $attributeValue = $this->propertyAccessor->getValue($object, $attribute); if (isset($this->callbacks[$attribute])) { $attributeValue = call_user_func($this->callbacks[$attribute], $attributeValue); } if (null !== $attributeValue && !is_scalar($attributeValue)) { if (!$this->serializer instanceof NormalizerInterface) { throw new LogicException(sprintf('Cannot normalize attribute "%s" because injected serializer is not a normalizer', $attribute)); } $attributeValue = $this->serializer->normalize($attributeValue, $format, $context); } if ($this->nameConverter) { $attribute = $this->nameConverter->normalize($attribute); } $data[$attribute] = $attributeValue; } return $data; } /** * {@inheritdoc} */ public function supportsDenormalization($data, $type, $format = null) { return class_exists($type); } /** * {@inheritdoc} */ public function denormalize($data, $class, $format = null, array $context = array()) { $allowedAttributes = $this->getAllowedAttributes($class, $context, true); $normalizedData = $this->prepareForDenormalization($data); $reflectionClass = new \ReflectionClass($class); $object = $this->instantiateObject($normalizedData, $class, $context, $reflectionClass, $allowedAttributes); foreach ($normalizedData as $attribute => $value) { if ($this->nameConverter) { $attribute = $this->nameConverter->denormalize($attribute); } $allowed = $allowedAttributes === false || in_array($attribute, $allowedAttributes); $ignored = in_array($attribute, $this->ignoredAttributes); if ($allowed && !$ignored) { try { $this->propertyAccessor->setValue($object, $attribute, $value); } catch (NoSuchPropertyException $exception) { // Properties not found are ignored } } } return $object; } } src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php000066400000000000000000000126471266465517700261430ustar00rootroot00000000000000 * * 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\LogicException; use Symfony\Component\Serializer\Exception\RuntimeException; /** * 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 AbstractNormalizer { /** * {@inheritdoc} * * @throws CircularReferenceException */ public function normalize($object, $format = null, array $context = array()) { if ($this->isCircularReference($object, $context)) { return $this->handleCircularReference($object); } $reflectionObject = new \ReflectionObject($object); $attributes = array(); $allowedAttributes = $this->getAllowedAttributes($object, $context, true); foreach ($reflectionObject->getProperties() as $property) { if (in_array($property->name, $this->ignoredAttributes) || $property->isStatic()) { continue; } if (false !== $allowedAttributes && !in_array($property->name, $allowedAttributes)) { continue; } // Override visibility if (!$property->isPublic()) { $property->setAccessible(true); } $attributeValue = $property->getValue($object); if (isset($this->callbacks[$property->name])) { $attributeValue = call_user_func($this->callbacks[$property->name], $attributeValue); } if (null !== $attributeValue && !is_scalar($attributeValue)) { if (!$this->serializer instanceof NormalizerInterface) { throw new LogicException(sprintf('Cannot normalize attribute "%s" because injected serializer is not a normalizer', $property->name)); } $attributeValue = $this->serializer->normalize($attributeValue, $format, $context); } $propertyName = $property->name; if ($this->nameConverter) { $propertyName = $this->nameConverter->normalize($propertyName); } $attributes[$propertyName] = $attributeValue; } return $attributes; } /** * {@inheritdoc} * * @throws RuntimeException */ public function denormalize($data, $class, $format = null, array $context = array()) { $allowedAttributes = $this->getAllowedAttributes($class, $context, true); $data = $this->prepareForDenormalization($data); $reflectionClass = new \ReflectionClass($class); $object = $this->instantiateObject($data, $class, $context, $reflectionClass, $allowedAttributes); foreach ($data as $propertyName => $value) { if ($this->nameConverter) { $propertyName = $this->nameConverter->denormalize($propertyName); } $allowed = $allowedAttributes === false || in_array($propertyName, $allowedAttributes); $ignored = in_array($propertyName, $this->ignoredAttributes); if ($allowed && !$ignored && $reflectionClass->hasProperty($propertyName)) { $property = $reflectionClass->getProperty($propertyName); if ($property->isStatic()) { continue; } // Override visibility if (!$property->isPublic()) { $property->setAccessible(true); } $property->setValue($object, $value); } } return $object; } /** * {@inheritdoc} */ public function supportsNormalization($data, $format = null) { return is_object($data) && !$data instanceof \Traversable && $this->supports(get_class($data)); } /** * {@inheritdoc} */ public function supportsDenormalization($data, $type, $format = null) { return $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; } } src/Symfony/Component/Serializer/Normalizer/SerializerAwareNormalizer.php000066400000000000000000000014661266465517700274050ustar00rootroot00000000000000 * * 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\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; /** * SerializerAware Normalizer implementation. * * @author Jordi Boggiano */ abstract class SerializerAwareNormalizer implements SerializerAwareInterface { /** * @var SerializerInterface */ protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } } src/Symfony/Component/Serializer/README.md000066400000000000000000000006701266465517700206710ustar00rootroot00000000000000Serializer 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 --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Serializer/ $ composer install $ phpunit src/Symfony/Component/Serializer/Serializer.php000066400000000000000000000210571266465517700222360ustar00rootroot00000000000000 * * 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\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 */ protected $normalizerCache = array(); /** * @var array */ protected $denormalizerCache = array(); public function __construct(array $normalizers = array(), array $encoders = array()) { foreach ($normalizers as $normalizer) { if ($normalizer instanceof SerializerAwareInterface) { $normalizer->setSerializer($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); } foreach ($this->normalizers as $normalizer) { if ( $normalizer instanceof DenormalizerInterface && $normalizer->supportsDenormalization($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); } } src/Symfony/Component/Serializer/SerializerAwareInterface.php000066400000000000000000000011211266465517700250250ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Serializer/SerializerInterface.php000066400000000000000000000020171266465517700240520ustar00rootroot00000000000000 * * 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()); } src/Symfony/Component/Serializer/Tests/000077500000000000000000000000001266465517700205115ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Annotation/000077500000000000000000000000001266465517700226235ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Annotation/GroupsTest.php000066400000000000000000000025141266465517700254550ustar00rootroot00000000000000 * * 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 Symfony\Component\Serializer\Annotation\Groups; /** * @author Kévin Dunglas */ class GroupsTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Serializer/Tests/Encoder/000077500000000000000000000000001266465517700220705ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php000066400000000000000000000044651266465517700256630ustar00rootroot00000000000000 * * 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 Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Serializer; use Symfony\Component\Serializer\Normalizer\CustomNormalizer; class JsonEncoderTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php000066400000000000000000000372171266465517700255130ustar00rootroot00000000000000 * * 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 Symfony\Component\Serializer\Tests\Fixtures\Dummy; 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; class XmlEncoderTest extends \PHPUnit_Framework_TestCase { private $encoder; 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 = << 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 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 = << 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() { $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; } } src/Symfony/Component/Serializer/Tests/Fixtures/000077500000000000000000000000001266465517700223225ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Fixtures/AbstractNormalizerDummy.php000066400000000000000000000025141266465517700276570ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/CircularReferenceDummy.php000066400000000000000000000006731266465517700274400ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php000066400000000000000000000011621266465517700267770ustar00rootroot00000000000000 * * 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()) { } } src/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php000066400000000000000000000023531266465517700241310ustar00rootroot00000000000000 * * 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']; } } src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummy.php000066400000000000000000000025741266465517700251530ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyInterface.php000066400000000000000000000010151266465517700267610ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Serializer/Tests/Fixtures/GroupDummyParent.php000066400000000000000000000016121266465517700263150ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php000066400000000000000000000022031266465517700306560ustar00rootroot00000000000000 * * 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', ); } } src/Symfony/Component/Serializer/Tests/Fixtures/PropertyCircularReferenceDummy.php000066400000000000000000000007371266465517700312060ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/PropertySiblingHolder.php000066400000000000000000000014051266465517700273250ustar00rootroot00000000000000 * * 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'; } src/Symfony/Component/Serializer/Tests/Fixtures/ProxyDummy.php000066400000000000000000000006141266465517700251710ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php000066400000000000000000000021371266465517700252570ustar00rootroot00000000000000 * * 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; } } } src/Symfony/Component/Serializer/Tests/Fixtures/SiblingHolder.php000066400000000000000000000020031266465517700255530ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Serializer/Tests/Fixtures/ToBeProxyfiedDummy.php000066400000000000000000000010311266465517700265650ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/TraversableDummy.php000066400000000000000000000007731266465517700263300ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Serializer/Tests/Fixtures/VariadicConstructorArgsDummy.php000066400000000000000000000007651266465517700306640ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Fixtures/empty-mapping.yml000066400000000000000000000000001266465517700256220ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Fixtures/invalid-mapping.yml000066400000000000000000000000031266465517700261150ustar00rootroot00000000000000foosrc/Symfony/Component/Serializer/Tests/Fixtures/serialization.xml000066400000000000000000000012041266465517700257160ustar00rootroot00000000000000 group1 group2 group2 src/Symfony/Component/Serializer/Tests/Fixtures/serialization.yml000066400000000000000000000002241266465517700257200ustar00rootroot00000000000000Symfony\Component\Serializer\Tests\Fixtures\GroupDummy: attributes: foo: groups: ['group1', 'group2'] bar: groups: ['group2'] src/Symfony/Component/Serializer/Tests/Mapping/000077500000000000000000000000001266465517700221045ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Mapping/AttributeMetadataTest.php000066400000000000000000000037301266465517700270640ustar00rootroot00000000000000 * * 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; /** * @author Kévin Dunglas */ class AttributeMetadataTest extends \PHPUnit_Framework_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 testMerge() { $attributeMetadata1 = new AttributeMetadata('a1'); $attributeMetadata1->addGroup('a'); $attributeMetadata1->addGroup('b'); $attributeMetadata2 = new AttributeMetadata('a2'); $attributeMetadata2->addGroup('a'); $attributeMetadata2->addGroup('c'); $attributeMetadata1->merge($attributeMetadata2); $this->assertEquals(array('a', 'b', 'c'), $attributeMetadata1->getGroups()); } public function testSerialize() { $attributeMetadata = new AttributeMetadata('attribute'); $attributeMetadata->addGroup('a'); $attributeMetadata->addGroup('b'); $serialized = serialize($attributeMetadata); $this->assertEquals($attributeMetadata, unserialize($serialized)); } } src/Symfony/Component/Serializer/Tests/Mapping/ClassMetadataTest.php000066400000000000000000000053531266465517700261710ustar00rootroot00000000000000 * * 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\ClassMetadata; /** * @author Kévin Dunglas */ class ClassMetadataTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $a1->method('getName')->willReturn('a1'); $a2 = $this->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $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->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $ac1->method('getName')->willReturn('a1'); $ac1->method('getGroups')->willReturn(array('a', 'b')); $ac2 = $this->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $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->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $a1->method('getName')->willReturn('b1'); $a2 = $this->getMock('Symfony\Component\Serializer\Mapping\AttributeMetadataInterface'); $a2->method('getName')->willReturn('b2'); $classMetadata->addAttributeMetadata($a1); $classMetadata->addAttributeMetadata($a2); $serialized = serialize($classMetadata); $this->assertEquals($classMetadata, unserialize($serialized)); } } src/Symfony/Component/Serializer/Tests/Mapping/Factory/000077500000000000000000000000001266465517700235135ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryTest.php000066400000000000000000000056261266465517700311330ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { public function testInterface() { $classMetadata = new ClassMetadataFactory(new LoaderChain(array())); $this->assertInstanceOf('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory', $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')); } public function testCacheExists() { $cache = $this->getMock('Doctrine\Common\Cache\Cache'); $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')); } public function testCacheNotExists() { $cache = $this->getMock('Doctrine\Common\Cache\Cache'); $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); } } src/Symfony/Component/Serializer/Tests/Mapping/Loader/000077500000000000000000000000001266465517700233125ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php000066400000000000000000000041301266465517700301220ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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 testLoadClassMetadata() { $classMetadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); $this->loader->loadClassMetadata($classMetadata); $this->assertEquals(TestClassMetadataFactory::createClassMetadata(), $classMetadata); } 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); } } src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php000066400000000000000000000027431266465517700273600ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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); } } src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php000066400000000000000000000040221266465517700275120ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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); } } src/Symfony/Component/Serializer/Tests/Mapping/TestClassMetadataFactory.php000066400000000000000000000046331266465517700275210ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/NameConverter/000077500000000000000000000000001266465517700232615ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php000066400000000000000000000030601266465517700332200ustar00rootroot00000000000000 * * 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 Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; /** * @author Kévin Dunglas */ class CamelCaseToSnakeCaseNameConverterTest extends \PHPUnit_Framework_TestCase { public function testInterface() { $attributeMetadata = new CamelCaseToSnakeCaseNameConverter(); $this->assertInstanceOf('Symfony\Component\Serializer\NameConverter\NameConverterInterface', $attributeMetadata); } /** * @dataProvider attributeProvider */ public function testNormalize($underscored, $lowerCamelCased) { $nameConverter = new CamelCaseToSnakeCaseNameConverter(); $this->assertEquals($nameConverter->normalize($lowerCamelCased), $underscored); } /** * @dataProvider attributeProvider */ public function testDenormalize($underscored, $lowerCamelCased) { $nameConverter = new CamelCaseToSnakeCaseNameConverter(); $this->assertEquals($nameConverter->denormalize($underscored), $lowerCamelCased); } public function attributeProvider() { return array( array('coop_tilleuls', 'coopTilleuls'), array('_kevin_dunglas', '_kevinDunglas'), array('this_is_a_test', 'thisIsATest'), ); } } src/Symfony/Component/Serializer/Tests/Normalizer/000077500000000000000000000000001266465517700226335ustar00rootroot00000000000000src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php000066400000000000000000000074571266465517700300270ustar00rootroot00000000000000 */ class AbstractNormalizerTest extends \PHPUnit_Framework_TestCase { /** * @var AbstractNormalizerDummy */ private $normalizer; /** * @var ClassMetadataFactoryInterface|\PHPUnit_Framework_MockObject_MockObject */ private $classMetadata; protected function setUp() { $loader = $this->getMock('Symfony\Component\Serializer\Mapping\Loader\LoaderChain', array(), array(array())); $this->classMetadata = $this->getMock('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory', array(), array($loader)); $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()); } } src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php000066400000000000000000000045731266465517700275320ustar00rootroot00000000000000 * * 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\Tests\Fixtures\ScalarDummy; use Symfony\Component\Serializer\Normalizer\CustomNormalizer; use Symfony\Component\Serializer\Serializer; class CustomNormalizerTest extends \PHPUnit_Framework_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); } 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')); } } src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php000066400000000000000000000572771266465517700306250ustar00rootroot00000000000000 * * 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 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\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 \PHPUnit_Framework_TestCase { /** * @var GetSetMethodNormalizer */ private $normalizer; /** * @var SerializerInterface */ private $serializer; protected function setUp() { $this->serializer = $this->getMock(__NAMESPACE__.'\SerializerNormalizer'); $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()); } /** * @group legacy */ public function testLegacyDenormalizeOnCamelCaseFormat() { $this->normalizer->setCamelizedAttributes(array('camel_case')); $obj = $this->normalizer->denormalize( array('camel_case' => 'camelCase'), __NAMESPACE__.'\GetSetDummy' ); $this->assertEquals('camelCase', $obj->getCamelCase()); } public function testNameConverterSupport() { $this->normalizer = new GetSetMethodNormalizer(null, new CamelCaseToSnakeCaseNameConverter()); $obj = $this->normalizer->denormalize( array('camel_case' => 'camelCase'), __NAMESPACE__.'\GetSetDummy' ); $this->assertEquals('camelCase', $obj->getCamelCase()); } public function testDenormalizeNull() { $this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy')); } /** * @group legacy */ public function testLegacyCamelizedAttributesNormalize() { $obj = new GetCamelizedDummy('dunglas.fr'); $obj->setFooBar('les-tilleuls.coop'); $obj->setBar_foo('lostinthesupermarket.fr'); $this->normalizer->setCamelizedAttributes(array('kevin_dunglas')); $this->assertEquals($this->normalizer->normalize($obj), array( 'kevin_dunglas' => 'dunglas.fr', 'fooBar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', )); $this->normalizer->setCamelizedAttributes(array('foo_bar')); $this->assertEquals($this->normalizer->normalize($obj), array( 'kevinDunglas' => 'dunglas.fr', 'foo_bar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', )); } /** * @group legacy */ public function testLegacyCamelizedAttributesDenormalize() { $obj = new GetCamelizedDummy('dunglas.fr'); $obj->setFooBar('les-tilleuls.coop'); $obj->setBar_foo('lostinthesupermarket.fr'); $this->normalizer->setCamelizedAttributes(array('kevin_dunglas')); $this->assertEquals($this->normalizer->denormalize(array( 'kevin_dunglas' => 'dunglas.fr', 'fooBar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', ), __NAMESPACE__.'\GetCamelizedDummy'), $obj); $this->normalizer->setCamelizedAttributes(array('foo_bar')); $this->assertEquals($this->normalizer->denormalize(array( 'kevinDunglas' => 'dunglas.fr', 'foo_bar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', ), __NAMESPACE__.'\GetCamelizedDummy'), $obj); } 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()); } /** * @see https://bugs.php.net/62715 * * @requires PHP 5.3.17 */ 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 injected serializer is not a normalizer */ public function testUnableToNormalizeObjectAttribute() { $serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface'); $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()); } } 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; } } 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; } } src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php000066400000000000000000000442221266465517700274610ustar00rootroot00000000000000 * * 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 Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; 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\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 \PHPUnit_Framework_TestCase { /** * @var ObjectNormalizerTest */ private $normalizer; /** * @var SerializerInterface */ private $serializer; protected function setUp() { $this->serializer = $this->getMock(__NAMESPACE__.'\ObjectSerializerNormalizer'); $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); } /** * @group legacy */ public function testLegacyDenormalizeOnCamelCaseFormat() { $this->normalizer->setCamelizedAttributes(array('camel_case')); $obj = $this->normalizer->denormalize( array('camel_case' => 'camelCase'), __NAMESPACE__.'\ObjectDummy' ); $this->assertEquals('camelCase', $obj->getCamelCase()); } public function testNameConverterSupport() { $this->normalizer = new ObjectNormalizer(null, new CamelCaseToSnakeCaseNameConverter()); $obj = $this->normalizer->denormalize( array('camel_case' => 'camelCase'), __NAMESPACE__.'\ObjectDummy' ); $this->assertEquals('camelCase', $obj->getCamelCase()); } 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()); } /** * @see https://bugs.php.net/62715 * * @requires PHP 5.3.17 */ 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 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 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 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 injected serializer is not a normalizer */ public function testUnableToNormalizeObjectAttribute() { $serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface'); $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())); } } 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'; } } src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php000066400000000000000000000376131266465517700301050ustar00rootroot00000000000000 * * 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 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\PropertyCircularReferenceDummy; use Symfony\Component\Serializer\Tests\Fixtures\PropertySiblingHolder; class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase { /** * @var PropertyNormalizer */ private $normalizer; /** * @var SerializerInterface */ private $serializer; protected function setUp() { $this->serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface'); $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()); } /** * @group legacy */ public function testLegacyDenormalizeOnCamelCaseFormat() { $this->normalizer->setCamelizedAttributes(array('camel_case')); $obj = $this->normalizer->denormalize( array('camel_case' => 'value'), __NAMESPACE__.'\PropertyDummy' ); $this->assertEquals('value', $obj->getCamelCase()); } /** * @group legacy */ public function testLegacyCamelizedAttributesNormalize() { $obj = new PropertyCamelizedDummy('dunglas.fr'); $obj->fooBar = 'les-tilleuls.coop'; $obj->bar_foo = 'lostinthesupermarket.fr'; $this->normalizer->setCamelizedAttributes(array('kevin_dunglas')); $this->assertEquals($this->normalizer->normalize($obj), array( 'kevin_dunglas' => 'dunglas.fr', 'fooBar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', )); $this->normalizer->setCamelizedAttributes(array('foo_bar')); $this->assertEquals($this->normalizer->normalize($obj), array( 'kevinDunglas' => 'dunglas.fr', 'foo_bar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', )); } /** * @group legacy */ public function testLegacyCamelizedAttributesDenormalize() { $obj = new PropertyCamelizedDummy('dunglas.fr'); $obj->fooBar = 'les-tilleuls.coop'; $obj->bar_foo = 'lostinthesupermarket.fr'; $this->normalizer->setCamelizedAttributes(array('kevin_dunglas')); $this->assertEquals($this->normalizer->denormalize(array( 'kevin_dunglas' => 'dunglas.fr', 'fooBar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', ), __NAMESPACE__.'\PropertyCamelizedDummy'), $obj); $this->normalizer->setCamelizedAttributes(array('foo_bar')); $this->assertEquals($this->normalizer->denormalize(array( 'kevinDunglas' => 'dunglas.fr', 'foo_bar' => 'les-tilleuls.coop', 'bar_foo' => 'lostinthesupermarket.fr', ), __NAMESPACE__.'\PropertyCamelizedDummy'), $obj); } public function testNameConverterSupport() { $this->normalizer = new PropertyNormalizer(null, new CamelCaseToSnakeCaseNameConverter()); $obj = $this->normalizer->denormalize( array('camel_case' => 'camelCase'), __NAMESPACE__.'\PropertyDummy' ); $this->assertEquals('camelCase', $obj->getCamelCase()); } 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 injected serializer is not a normalizer */ public function testUnableToNormalizeObjectAttribute() { $serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface'); $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())); } } 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'; } src/Symfony/Component/Serializer/Tests/Normalizer/TestDenormalizer.php000066400000000000000000000015061266465517700266410ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php000066400000000000000000000014551266465517700263330ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Serializer/Tests/SerializerTest.php000066400000000000000000000275031266465517700242020ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Serializer\Normalizer\CustomNormalizer'))); $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->getMock('Symfony\Component\Serializer\Normalizer\CustomNormalizer'))); $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->getMock('Symfony\Component\Serializer\Normalizer\NormalizerInterface'); $normalizer1->method('supportsNormalization') ->willReturnCallback(function ($data, $format) { return isset($data->test); }); $normalizer1->method('normalize')->willReturn('test1'); $normalizer2 = $this->getMock('Symfony\Component\Serializer\Normalizer\NormalizerInterface'); $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->getMock('Symfony\Component\Serializer\Normalizer\DenormalizerInterface'); $denormalizer1->method('supportsDenormalization') ->willReturnCallback(function ($data, $type, $format) { return isset($data['test1']); }); $denormalizer1->method('denormalize')->willReturn('test1'); $denormalizer2 = $this->getMock('Symfony\Component\Serializer\Normalizer\DenormalizerInterface'); $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); } } 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); } } src/Symfony/Component/Serializer/composer.json000066400000000000000000000026031266465517700221320ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/yaml": "~2.0,>=2.0.5", "symfony/config": "~2.2", "symfony/property-access": "~2.3", "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0" }, "suggest": { "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/yaml": "For using the default YAML mapping loader.", "symfony/config": "For using the XML mapping loader.", "symfony/property-access": "For using the ObjectNormalizer." }, "autoload": { "psr-4": { "Symfony\\Component\\Serializer\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Serializer/phpunit.xml.dist000066400000000000000000000014131266465517700225610ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Stopwatch/000077500000000000000000000000001266465517700172525ustar00rootroot00000000000000src/Symfony/Component/Stopwatch/.gitignore000066400000000000000000000000421266465517700212360ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Stopwatch/LICENSE000066400000000000000000000020511266465517700202550ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Stopwatch/README.md000066400000000000000000000003641266465517700205340ustar00rootroot00000000000000Stopwatch Component =================== Stopwatch provides a way to profile code. Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Stopwatch/ $ composer install $ phpunit src/Symfony/Component/Stopwatch/Section.php000066400000000000000000000102421266465517700213660ustar00rootroot00000000000000 * * 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 Section|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 Section A child section */ 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 Section The current section */ 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; } } src/Symfony/Component/Stopwatch/Stopwatch.php000066400000000000000000000075041266465517700217450ustar00rootroot00000000000000 * * 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 A StopwatchEvent instance */ 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 A StopwatchEvent instance */ public function stop($name) { return end($this->activeSections)->stopEvent($name); } /** * Stops then restarts an event. * * @param string $name The event name * * @return StopwatchEvent A StopwatchEvent instance */ 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 A StopwatchEvent instance */ 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[] An array of StopwatchEvent instances */ public function getSectionEvents($id) { return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : array(); } } src/Symfony/Component/Stopwatch/StopwatchEvent.php000066400000000000000000000124621266465517700227460ustar00rootroot00000000000000 * * 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 StopwatchEvent The event */ public function start() { $this->started[] = $this->getNow(); return $this; } /** * Stops the last started event period. * * @throws \LogicException When start wasn't called before stopping * * @return StopwatchEvent The event * * @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 StopwatchEvent The event */ 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()); } } src/Symfony/Component/Stopwatch/StopwatchPeriod.php000066400000000000000000000031541266465517700231050ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Stopwatch/Tests/000077500000000000000000000000001266465517700203545ustar00rootroot00000000000000src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php000066400000000000000000000115701266465517700247070ustar00rootroot00000000000000 * * 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 Symfony\Component\Stopwatch\StopwatchEvent; /** * StopwatchEventTest. * * @author Fabien Potencier * * @group time-sensitive */ class StopwatchEventTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php000066400000000000000000000102461266465517700237040ustar00rootroot00000000000000 * * 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 Symfony\Component\Stopwatch\Stopwatch; /** * StopwatchTest. * * @author Fabien Potencier * * @group time-sensitive */ class StopwatchTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Stopwatch/composer.json000066400000000000000000000013741266465517700220010ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Stopwatch/phpunit.xml.dist000066400000000000000000000014121266465517700224230ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Templating/000077500000000000000000000000001266465517700174025ustar00rootroot00000000000000src/Symfony/Component/Templating/.gitignore000066400000000000000000000000421266465517700213660ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Templating/Asset/000077500000000000000000000000001266465517700204615ustar00rootroot00000000000000src/Symfony/Component/Templating/Asset/Package.php000066400000000000000000000040661266465517700225330ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Asset; @trigger_error('The Symfony\Component\Templating\Asset\Package is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The basic package will add a version to asset URLs. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class Package implements PackageInterface { private $version; private $format; /** * Constructor. * * @param string $version The package version * @param string $format The format used to apply the version */ public function __construct($version = null, $format = '') { $this->version = $version; $this->format = $format ?: '%s?%s'; } /** * {@inheritdoc} */ public function getVersion() { return $this->version; } /** * {@inheritdoc} */ public function getUrl($path, $version = null) { if (false !== strpos($path, '://') || 0 === strpos($path, '//')) { return $path; } return $this->applyVersion($path, $version); } /** * Applies version to the supplied path. * * @param string $path A path * @param string|bool|null $version A specific version * * @return string The versionized path */ protected function applyVersion($path, $version = null) { $version = null !== $version ? $version : $this->version; if (null === $version || false === $version) { return $path; } $versionized = sprintf($this->format, ltrim($path, '/'), $version); if ($path && '/' == $path[0]) { $versionized = '/'.$versionized; } return $versionized; } } src/Symfony/Component/Templating/Asset/PackageInterface.php000066400000000000000000000016331266465517700243510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Asset; /** * Asset package interface. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ interface PackageInterface { /** * Returns the asset package version. * * @return string The version string */ public function getVersion(); /** * Returns an absolute or root-relative public path. * * @param string $path A path * @param string|bool|null $version A specific version for the path * * @return string The public path */ public function getUrl($path, $version = null); } src/Symfony/Component/Templating/Asset/PathPackage.php000066400000000000000000000036331266465517700233470ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Asset; @trigger_error('The Symfony\Component\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The path packages adds a version and a base path to asset URLs. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class PathPackage extends Package { private $basePath; /** * Constructor. * * @param string $basePath The base path to be prepended to relative paths * @param string $version The package version * @param string $format The format used to apply the version */ public function __construct($basePath = null, $version = null, $format = null) { parent::__construct($version, $format); if (!$basePath) { $this->basePath = '/'; } else { if ('/' != $basePath[0]) { $basePath = '/'.$basePath; } $this->basePath = rtrim($basePath, '/').'/'; } } /** * {@inheritdoc} */ public function getUrl($path, $version = null) { if (false !== strpos($path, '://') || 0 === strpos($path, '//')) { return $path; } $url = $this->applyVersion($path, $version); // apply the base path if ('/' !== substr($url, 0, 1)) { $url = $this->basePath.$url; } return $url; } /** * Returns the base path. * * @return string The base path */ public function getBasePath() { return $this->basePath; } } src/Symfony/Component/Templating/Asset/UrlPackage.php000066400000000000000000000042401266465517700232100ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Asset; @trigger_error('The Symfony\Component\Templating\Asset\UrlPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The URL packages adds a version and a base URL to asset URLs. * * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class UrlPackage extends Package { private $baseUrls; /** * Constructor. * * @param string|array $baseUrls Base asset URLs * @param string $version The package version * @param string $format The format used to apply the version */ public function __construct($baseUrls = array(), $version = null, $format = null) { parent::__construct($version, $format); if (!is_array($baseUrls)) { $baseUrls = (array) $baseUrls; } $this->baseUrls = array(); foreach ($baseUrls as $baseUrl) { $this->baseUrls[] = rtrim($baseUrl, '/'); } } /** * {@inheritdoc} */ public function getUrl($path, $version = null) { if (false !== strpos($path, '://') || 0 === strpos($path, '//')) { return $path; } $url = $this->applyVersion($path, $version); 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) { switch ($count = count($this->baseUrls)) { case 0: return ''; case 1: return $this->baseUrls[0]; default: return $this->baseUrls[fmod(hexdec(substr(hash('sha256', $path), 0, 10)), $count)]; } } } src/Symfony/Component/Templating/CHANGELOG.md000066400000000000000000000003261266465517700212140ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Templating/DebuggerInterface.php000066400000000000000000000012661266465517700234650ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating; /** * DebuggerInterface is the interface you need to implement * to debug template loader instances. * * @author Fabien Potencier * * @deprecated since version 2.4, to be removed in 3.0. Use Psr\Log\LoggerInterface instead. */ interface DebuggerInterface { /** * Logs a message. * * @param string $message A message to log */ public function log($message); } src/Symfony/Component/Templating/DelegatingEngine.php000066400000000000000000000052031266465517700233040ustar00rootroot00000000000000 * * 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)); } } src/Symfony/Component/Templating/EngineInterface.php000066400000000000000000000041511266465517700231420ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Templating/Helper/000077500000000000000000000000001266465517700206215ustar00rootroot00000000000000src/Symfony/Component/Templating/Helper/AssetsHelper.php000066400000000000000000000032561266465517700237420ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Helper; @trigger_error('The Symfony\Component\Templating\Helper\AssetsHelper is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); use Symfony\Component\Templating\Asset\PathPackage; use Symfony\Component\Templating\Asset\UrlPackage; /** * AssetsHelper helps manage asset URLs. * * Usage: * * * * * * @author Fabien Potencier * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class AssetsHelper extends CoreAssetsHelper { /** * Constructor. * * @param string $basePath The base path * @param string|array $baseUrls Base asset URLs * @param string $version The asset version * @param string $format The version format * @param array $namedPackages Additional packages */ public function __construct($basePath = null, $baseUrls = array(), $version = null, $format = null, $namedPackages = array()) { if ($baseUrls) { $defaultPackage = new UrlPackage($baseUrls, $version, $format); } else { $defaultPackage = new PathPackage($basePath, $version, $format); } parent::__construct($defaultPackage, $namedPackages); } } src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php000066400000000000000000000072161266465517700245530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating\Helper; @trigger_error('The Symfony\Component\Templating\Helper\CoreAssetsHelper is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); use Symfony\Component\Templating\Asset\PackageInterface; /** * CoreAssetsHelper helps manage asset URLs. * * Usage: * * * * * * @author Fabien Potencier * @author Kris Wallsmith * * @deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. */ class CoreAssetsHelper extends Helper implements PackageInterface { protected $defaultPackage; protected $namedPackages = array(); /** * Constructor. * * @param PackageInterface $defaultPackage The default package * @param array $namedPackages Additional packages indexed by name */ public function __construct(PackageInterface $defaultPackage, array $namedPackages = array()) { $this->defaultPackage = $defaultPackage; foreach ($namedPackages 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 an asset package to the helper. * * @param string $name The package name * @param PackageInterface $package The package */ public function addPackage($name, PackageInterface $package) { $this->namedPackages[$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 */ public function getPackage($name = null) { if (null === $name) { return $this->defaultPackage; } if (!isset($this->namedPackages[$name])) { throw new \InvalidArgumentException(sprintf('There is no "%s" asset package.', $name)); } return $this->namedPackages[$name]; } /** * Gets the version to add to public URL. * * @param string $packageName A package name * * @return string The current version */ public function getVersion($packageName = null) { return $this->getPackage($packageName)->getVersion(); } /** * 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 * @param string|bool|null $version A specific version * * @return string A public path which takes into account the base path and URL path */ public function getUrl($path, $packageName = null, $version = null) { return $this->getPackage($packageName)->getUrl($path, $version); } /** * Returns the canonical name of this helper. * * @return string The canonical name */ public function getName() { return 'assets'; } } src/Symfony/Component/Templating/Helper/Helper.php000066400000000000000000000017141266465517700225540ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Templating/Helper/HelperInterface.php000066400000000000000000000015331266465517700243740ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Templating/Helper/SlotsHelper.php000066400000000000000000000057131266465517700236040ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Templating/LICENSE000066400000000000000000000020511266465517700204050ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Templating/Loader/000077500000000000000000000000001266465517700206105ustar00rootroot00000000000000src/Symfony/Component/Templating/Loader/CacheLoader.php000066400000000000000000000063511266465517700234600ustar00rootroot00000000000000 * * 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'))); } elseif (null !== $this->debugger) { // just for BC, to be removed in 3.0 $this->debugger->log(sprintf('Fetching template "%s" from cache.', $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'))); } elseif (null !== $this->debugger) { // just for BC, to be removed in 3.0 $this->debugger->log(sprintf('Storing template "%s" in cache.', $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); } } src/Symfony/Component/Templating/Loader/ChainLoader.php000066400000000000000000000040211266465517700234670ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Templating/Loader/FilesystemLoader.php000066400000000000000000000075561266465517700246110ustar00rootroot00000000000000 * * 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)); } elseif (null !== $this->debugger) { // just for BC, to be removed in 3.0 $this->debugger->log(sprintf('Loaded template file "%s".', $file)); } return new FileStorage($file); } if (null !== $this->logger || null !== $this->debugger) { $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)); } elseif (null !== $this->debugger) { // just for BC, to be removed in 3.0 $this->debugger->log(sprintf('Failed loading template file "%s".', $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; } } src/Symfony/Component/Templating/Loader/Loader.php000066400000000000000000000027211266465517700225310ustar00rootroot00000000000000 * * 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; use Symfony\Component\Templating\DebuggerInterface; /** * Loader is the base class for all template loader classes. * * @author Fabien Potencier */ abstract class Loader implements LoaderInterface { /** * @var LoggerInterface|null */ protected $logger; /** * @deprecated since version 2.4, to be removed in 3.0. Use $this->logger instead. */ protected $debugger; /** * Sets the debug logger to use for this loader. * * @param LoggerInterface $logger A logger instance */ public function setLogger(LoggerInterface $logger) { $this->logger = $logger; } /** * Sets the debugger to use for this loader. * * @param DebuggerInterface $debugger A debugger instance * * @deprecated since version 2.4, to be removed in 3.0. Use $this->setLogger() instead. */ public function setDebugger(DebuggerInterface $debugger) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use the setLogger() method instead.', E_USER_DEPRECATED); $this->debugger = $debugger; } } src/Symfony/Component/Templating/Loader/LoaderInterface.php000066400000000000000000000022361266465517700243530ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Templating/PhpEngine.php000066400000000000000000000363361266465517700220030ustar00rootroot00000000000000 * * 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)'); } $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) { $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, $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() { $that = $this; if (PHP_VERSION_ID >= 50400) { $flags = ENT_QUOTES | ENT_SUBSTITUTE; } else { $flags = ENT_QUOTES; } $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 ($that, $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, $that->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) use ($that) { if ('UTF-8' != $that->getCharset()) { $value = $that->convertEncoding($value, 'UTF-8', $that->getCharset()); } $callback = function ($matches) use ($that) { $char = $matches[0]; // \xHH if (!isset($char[1])) { return '\\x'.substr('00'.bin2hex($char), -2); } // \uHHHH $char = $that->convertEncoding($char, 'UTF-16BE', 'UTF-8'); 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' != $that->getCharset()) { $value = $that->convertEncoding($value, $that->getCharset(), 'UTF-8'); } return $value; }, ); self::$escaperCache = array(); } /** * Convert a string from one encoding to another. * * @param string $string The string to convert * @param string $to The input encoding * @param string $from The output encoding * * @return string The string with the new encoding * * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring) */ public function convertEncoding($string, $to, $from) { if (function_exists('mb_convert_encoding')) { return mb_convert_encoding($string, $to, $from); } elseif (function_exists('iconv')) { return iconv($from, $to, $string); } throw new \RuntimeException('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).'); } /** * 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; } } src/Symfony/Component/Templating/README.md000066400000000000000000000010251266465517700206570ustar00rootroot00000000000000Templating Component ==================== Templating 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 --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Templating/ $ composer install $ phpunit src/Symfony/Component/Templating/Storage/000077500000000000000000000000001266465517700210065ustar00rootroot00000000000000src/Symfony/Component/Templating/Storage/FileStorage.php000066400000000000000000000012161266465517700237230ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Templating/Storage/Storage.php000066400000000000000000000017371266465517700231330ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Templating/Storage/StringStorage.php000066400000000000000000000011711266465517700243120ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Templating/StreamingEngineInterface.php000066400000000000000000000020011266465517700250040ustar00rootroot00000000000000 * * 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()); } src/Symfony/Component/Templating/TemplateNameParser.php000066400000000000000000000016761266465517700236560ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Templating/TemplateNameParserInterface.php000066400000000000000000000014151266465517700254660ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Templating/TemplateReference.php000066400000000000000000000034211266465517700235050ustar00rootroot00000000000000 * * 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']; } } src/Symfony/Component/Templating/TemplateReferenceInterface.php000066400000000000000000000034741266465517700253360ustar00rootroot00000000000000 * * 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 TemplateReferenceInterface The TemplateReferenceInterface instance * * @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(); } src/Symfony/Component/Templating/Tests/000077500000000000000000000000001266465517700205045ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php000066400000000000000000000122651266465517700252540ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\DelegatingEngine; use Symfony\Component\Templating\StreamingEngineInterface; use Symfony\Component\Templating\EngineInterface; class DelegatingEngineTest extends \PHPUnit_Framework_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() { $engine = $this->getEngineMock('template.php', true); $engine->expects($this->never())->method('stream'); $delegatingEngine = new DelegatingEngine(array($engine)); $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', array('foo' => 'bar')); } private function getEngineMock($template, $supports) { $engine = $this->getMock('Symfony\Component\Templating\EngineInterface'); $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 { } src/Symfony/Component/Templating/Tests/Fixtures/000077500000000000000000000000001266465517700223155ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/Fixtures/SimpleHelper.php000066400000000000000000000011701266465517700254160ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Templating/Tests/Fixtures/templates/000077500000000000000000000000001266465517700243135ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/Fixtures/templates/foo.php000066400000000000000000000000231266465517700256020ustar00rootroot00000000000000 src/Symfony/Component/Templating/Tests/Helper/000077500000000000000000000000001266465517700217235ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/Helper/HelperTest.php000066400000000000000000000014151266465517700245140ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Helper\Helper; class HelperTest extends \PHPUnit_Framework_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'; } } src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php000066400000000000000000000074461266465517700270360ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Helper\AssetsHelper; /** * @group legacy */ class LegacyAssetsHelperTest extends \PHPUnit_Framework_TestCase { public function testGetVersion() { $helper = new AssetsHelper(null, array(), 'foo'); $this->assertEquals('foo', $helper->getVersion(), '->getVersion() returns the version'); } public function testGetUrl() { $helper = new AssetsHelper(); $this->assertEquals('http://example.com/foo.js', $helper->getUrl('http://example.com/foo.js'), '->getUrl() does nothing if an absolute URL is given'); $helper = new AssetsHelper(); $this->assertEquals('/foo.js', $helper->getUrl('foo.js'), '->getUrl() appends a / on relative paths'); $this->assertEquals('/foo.js', $helper->getUrl('/foo.js'), '->getUrl() does nothing on absolute paths'); $helper = new AssetsHelper('/foo'); $this->assertEquals('/foo/foo.js', $helper->getUrl('foo.js'), '->getUrl() appends the basePath on relative paths'); $this->assertEquals('/foo.js', $helper->getUrl('/foo.js'), '->getUrl() does not append the basePath on absolute paths'); $helper = new AssetsHelper(null, 'http://assets.example.com/'); $this->assertEquals('http://assets.example.com/foo.js', $helper->getUrl('foo.js'), '->getUrl() prepends the base URL'); $this->assertEquals('http://assets.example.com/foo.js', $helper->getUrl('/foo.js'), '->getUrl() prepends the base URL'); $helper = new AssetsHelper(null, 'http://www.example.com/foo'); $this->assertEquals('http://www.example.com/foo/foo.js', $helper->getUrl('foo.js'), '->getUrl() prepends the base URL with a path'); $this->assertEquals('http://www.example.com/foo/foo.js', $helper->getUrl('/foo.js'), '->getUrl() prepends the base URL with a path'); $helper = new AssetsHelper('/foo', 'http://www.example.com/'); $this->assertEquals('http://www.example.com/foo.js', $helper->getUrl('foo.js'), '->getUrl() prepends the base URL and the base path if defined'); $this->assertEquals('http://www.example.com/foo.js', $helper->getUrl('/foo.js'), '->getUrl() prepends the base URL but not the base path on absolute paths'); $helper = new AssetsHelper('/bar', 'http://www.example.com/foo'); $this->assertEquals('http://www.example.com/foo/foo.js', $helper->getUrl('foo.js'), '->getUrl() prepends the base URL and the base path if defined'); $this->assertEquals('http://www.example.com/foo/foo.js', $helper->getUrl('/foo.js'), '->getUrl() prepends the base URL but not the base path on absolute paths'); $helper = new AssetsHelper('/bar', 'http://www.example.com/foo', 'abcd'); $this->assertEquals('http://www.example.com/foo/foo.js?abcd', $helper->getUrl('foo.js'), '->getUrl() appends the version if defined'); $helper = new AssetsHelper(); $this->assertEquals('/', $helper->getUrl(''), '->getUrl() with empty arg returns the prefix alone'); } public function testGetUrlWithVersion() { $helper = new AssetsHelper(null, array(), '12'); $this->assertEquals('/foo.js?12', $helper->getUrl('foo.js')); $this->assertEquals('/foo.js?bar', $helper->getUrl('foo.js', null, 'bar')); $this->assertEquals('/foo.js', $helper->getUrl('foo.js', null, false)); } public function testGetUrlLeavesProtocolRelativePathsUntouched() { $helper = new AssetsHelper(null, 'http://foo.com'); $this->assertEquals('//bar.com/asset', $helper->getUrl('//bar.com/asset')); } } src/Symfony/Component/Templating/Tests/Helper/LegacyCoreAssetsHelperTest.php000066400000000000000000000024431266465517700276370ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Helper\CoreAssetsHelper; /** * @group legacy */ class LegacyCoreAssetsHelperTest extends \PHPUnit_Framework_TestCase { protected $package; protected function setUp() { $this->package = $this->getMock('Symfony\Component\Templating\Asset\PackageInterface'); } protected function tearDown() { $this->package = null; } public function testAddGetPackage() { $helper = new CoreAssetsHelper($this->package); $helper->addPackage('foo', $this->package); $this->assertSame($this->package, $helper->getPackage('foo')); } public function testGetNonexistingPackage() { $helper = new CoreAssetsHelper($this->package); $this->setExpectedException('\InvalidArgumentException'); $helper->getPackage('foo'); } public function testGetHelperName() { $helper = new CoreAssetsHelper($this->package); $this->assertEquals('assets', $helper->getName()); } } src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php000066400000000000000000000064201266465517700255420ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Helper\SlotsHelper; class SlotsHelperTest extends \PHPUnit_Framework_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'); } } } src/Symfony/Component/Templating/Tests/Loader/000077500000000000000000000000001266465517700217125ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php000066400000000000000000000055121266465517700254200ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->getMock('Psr\Log\LoggerInterface'); $logger ->expects($this->once()) ->method('debug') ->with('Storing template in cache.', array('name' => 'index')); $loader->setLogger($logger); $loader->load(new TemplateReference('index')); $logger = $this->getMock('Psr\Log\LoggerInterface'); $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; } } src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php000066400000000000000000000043071266465517700254400ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Loader\ChainLoader; use Symfony\Component\Templating\Loader\FilesystemLoader; use Symfony\Component\Templating\TemplateReference; class ChainLoaderTest extends \PHPUnit_Framework_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; } } src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php000066400000000000000000000101211266465517700265310ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Loader\FilesystemLoader; use Symfony\Component\Templating\TemplateReference; class FilesystemLoaderTest extends \PHPUnit_Framework_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->getMock('Psr\Log\LoggerInterface'); $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); } } src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php000066400000000000000000000027621266465517700245000ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Loader\Loader; use Symfony\Component\Templating\TemplateReferenceInterface; class LoaderTest extends \PHPUnit_Framework_TestCase { public function testGetSetLogger() { $loader = new ProjectTemplateLoader4(); $logger = $this->getMock('Psr\Log\LoggerInterface'); $loader->setLogger($logger); $this->assertSame($logger, $loader->getLogger(), '->setLogger() sets the logger instance'); } /** * @group legacy */ public function testLegacyGetSetDebugger() { $loader = new ProjectTemplateLoader4(); $debugger = $this->getMock('Symfony\Component\Templating\DebuggerInterface'); $loader->setDebugger($debugger); $this->assertSame($debugger, $loader->getDebugger(), '->setDebugger() sets the debugger 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; } } src/Symfony/Component/Templating/Tests/PhpEngineTest.php000066400000000000000000000222021266465517700237300ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->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 $view[\'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; } } src/Symfony/Component/Templating/Tests/Storage/000077500000000000000000000000001266465517700221105ustar00rootroot00000000000000src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php000066400000000000000000000015161266465517700256700ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Storage\FileStorage; class FileStorageTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Templating/Tests/Storage/StorageTest.php000066400000000000000000000012461266465517700250700ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Storage\Storage; class StorageTest extends \PHPUnit_Framework_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() { } } src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php000066400000000000000000000014411266465517700262540ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\Storage\StringStorage; class StringStorageTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php000066400000000000000000000024661266465517700256160ustar00rootroot00000000000000 * * 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 Symfony\Component\Templating\TemplateNameParser; use Symfony\Component\Templating\TemplateReference; class TemplateNameParserTest extends \PHPUnit_Framework_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')), ); } } src/Symfony/Component/Templating/composer.json000066400000000000000000000016051266465517700221260ustar00rootroot00000000000000{ "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.3.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": "2.7-dev" } } } src/Symfony/Component/Templating/phpunit.xml.dist000066400000000000000000000014131266465517700225540ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Translation/000077500000000000000000000000001266465517700175745ustar00rootroot00000000000000src/Symfony/Component/Translation/.gitignore000066400000000000000000000000421266465517700215600ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Translation/CHANGELOG.md000066400000000000000000000030741266465517700214110ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Translation/Catalogue/000077500000000000000000000000001266465517700215005ustar00rootroot00000000000000src/Symfony/Component/Translation/Catalogue/AbstractOperation.php000066400000000000000000000066151266465517700256450ustar00rootroot00000000000000 * * 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; /** * Base catalogues binary operation class. * * @author Jean-François Simon */ abstract class AbstractOperation implements OperationInterface { /** * @var MessageCatalogueInterface */ protected $source; /** * @var MessageCatalogueInterface */ protected $target; /** * @var MessageCatalogue */ protected $result; /** * @var null|array */ private $domains; /** * @var array */ protected $messages; /** * @param MessageCatalogueInterface $source * @param MessageCatalogueInterface $target * * @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->domains = null; $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; } /** * @param string $domain */ abstract protected function processDomain($domain); } src/Symfony/Component/Translation/Catalogue/DiffOperation.php000066400000000000000000000033461266465517700247500ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Catalogue; /** * Diff operation between two catalogues. * * @author Jean-François Simon */ class DiffOperation 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) { 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); } } } } } src/Symfony/Component/Translation/Catalogue/MergeOperation.php000066400000000000000000000030671266465517700251370ustar00rootroot00000000000000 * * 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. * * @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); } } } } } src/Symfony/Component/Translation/Catalogue/OperationInterface.php000066400000000000000000000024141266465517700257730ustar00rootroot00000000000000 * * 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). * * @author Jean-François Simon */ interface OperationInterface { /** * Returns domains affected by operation. * * @return array */ public function getDomains(); /** * Returns all valid messages after operation. * * @param string $domain * * @return array */ public function getMessages($domain); /** * Returns new messages after operation. * * @param string $domain * * @return array */ public function getNewMessages($domain); /** * Returns obsolete messages after operation. * * @param string $domain * * @return array */ public function getObsoleteMessages($domain); /** * Returns resulting catalogue. * * @return MessageCatalogueInterface */ public function getResult(); } src/Symfony/Component/Translation/DataCollector/000077500000000000000000000000001266465517700223145ustar00rootroot00000000000000src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php000066400000000000000000000075341266465517700277750ustar00rootroot00000000000000 * * 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; $messages[$key]['translation'] = $this->sanitizeString($message['translation']); $result[$messageId] = $message; } else { ++$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 (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($string)) { 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; } } src/Symfony/Component/Translation/DataCollectorTranslator.php000066400000000000000000000074571266465517700251140ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation; /** * @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); 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); 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); } /** * 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 $trans */ private function collectMessage($locale, $domain, $id, $translation) { 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, 'state' => $state, ); } } src/Symfony/Component/Translation/Dumper/000077500000000000000000000000001266465517700210305ustar00rootroot00000000000000src/Symfony/Component/Translation/Dumper/CsvFileDumper.php000066400000000000000000000027151266465517700242560ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { $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'; } } src/Symfony/Component/Translation/Dumper/DumperInterface.php000066400000000000000000000014521266465517700246200ustar00rootroot00000000000000 * * 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()); } src/Symfony/Component/Translation/Dumper/FileDumper.php000066400000000000000000000064771266465517700236130ustar00rootroot00000000000000 * * 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; /** * 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) { 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->format($messages, $domain)); } } /** * Transforms a domain of a message catalogue to its string representation. * * @param MessageCatalogue $messages * @param string $domain * * @return string representation */ abstract protected function format(MessageCatalogue $messages, $domain); /** * 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(), )); } } src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php000066400000000000000000000055421266465517700247160ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { $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'; } } src/Symfony/Component/Translation/Dumper/IniFileDumper.php000066400000000000000000000017301266465517700242360ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { $output = ''; foreach ($messages->all($domain) as $source => $target) { $escapeTarget = str_replace('"', '\"', $target); $output .= $source.'="'.$escapeTarget."\"\n"; } return $output; } /** * {@inheritdoc} */ protected function getExtension() { return 'ini'; } } src/Symfony/Component/Translation/Dumper/JsonFileDumper.php000066400000000000000000000015221266465517700244270ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { return json_encode($messages->all($domain), defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0); } /** * {@inheritdoc} */ protected function getExtension() { return 'json'; } } src/Symfony/Component/Translation/Dumper/MoFileDumper.php000066400000000000000000000044341266465517700240760ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { $output = $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); } } src/Symfony/Component/Translation/Dumper/PhpFileDumper.php000066400000000000000000000014601266465517700242460ustar00rootroot00000000000000 * * 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} */ protected function format(MessageCatalogue $messages, $domain) { return "all($domain), true).";\n"; } /** * {@inheritdoc} */ protected function getExtension() { return 'php'; } } src/Symfony/Component/Translation/Dumper/PoFileDumper.php000066400000000000000000000030061266465517700240730ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain = 'messages') { $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"); } } src/Symfony/Component/Translation/Dumper/QtFileDumper.php000066400000000000000000000025071266465517700241060ustar00rootroot00000000000000 * * 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 format(MessageCatalogue $messages, $domain) { $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'; } } src/Symfony/Component/Translation/Dumper/XliffFileDumper.php000066400000000000000000000067141266465517700245760ustar00rootroot00000000000000 * * 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; /** * XliffFileDumper generates xliff files from a message catalogue. * * @author Michel Salib */ class XliffFileDumper extends FileDumper { /** * @var string */ private $defaultLocale; /** * {@inheritdoc} */ public function dump(MessageCatalogue $messages, $options = array()) { if (array_key_exists('default_locale', $options)) { $this->defaultLocale = $options['default_locale']; } else { $this->defaultLocale = \Locale::getDefault(); } parent::dump($messages, $options); } /** * {@inheritdoc} */ protected function format(MessageCatalogue $messages, $domain) { $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('_', '-', $this->defaultLocale)); $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); $xliffFile->setAttribute('datatype', 'plaintext'); $xliffFile->setAttribute('original', 'file.ext'); $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); $t = $translation->appendChild($dom->createElement('target')); $t->appendChild($text); $metadata = $messages->getMetadata($source, $domain); if (null !== $metadata && array_key_exists('notes', $metadata) && is_array($metadata['notes'])) { 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(); } /** * {@inheritdoc} */ protected function getExtension() { return 'xlf'; } } src/Symfony/Component/Translation/Dumper/YamlFileDumper.php000066400000000000000000000017631266465517700244270ustar00rootroot00000000000000 * * 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\Yaml\Yaml; /** * YamlFileDumper generates yaml files from a message catalogue. * * @author Michel Salib */ class YamlFileDumper extends FileDumper { /** * {@inheritdoc} */ protected function format(MessageCatalogue $messages, $domain) { if (!class_exists('Symfony\Component\Yaml\Yaml')) { throw new \LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); } return Yaml::dump($messages->all($domain)); } /** * {@inheritdoc} */ protected function getExtension() { return 'yml'; } } src/Symfony/Component/Translation/Exception/000077500000000000000000000000001266465517700215325ustar00rootroot00000000000000src/Symfony/Component/Translation/Exception/ExceptionInterface.php000066400000000000000000000007021266465517700260210ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Translation/Exception/InvalidResourceException.php000066400000000000000000000007551266465517700272270ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Translation/Exception/NotFoundResourceException.php000066400000000000000000000007541266465517700273740ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Translation/Extractor/000077500000000000000000000000001266465517700215475ustar00rootroot00000000000000src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.php000066400000000000000000000040131266465517700265150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Extractor; /** * 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 * * @throws \InvalidArgumentException * * @return bool */ 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); } src/Symfony/Component/Translation/Extractor/ChainExtractor.php000066400000000000000000000026001266465517700251740ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/Translation/Extractor/ExtractorInterface.php000066400000000000000000000020471266465517700260570ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Translation/IdentityTranslator.php000066400000000000000000000027221266465517700241530ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Translation/Interval.php000066400000000000000000000053521266465517700220760ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation; /** * 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; } } src/Symfony/Component/Translation/LICENSE000066400000000000000000000020511266465517700205770ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Translation/Loader/000077500000000000000000000000001266465517700210025ustar00rootroot00000000000000src/Symfony/Component/Translation/Loader/ArrayLoader.php000066400000000000000000000036031266465517700237220ustar00rootroot00000000000000 * * 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; } } } } src/Symfony/Component/Translation/Loader/CsvFileLoader.php000066400000000000000000000046361266465517700242060ustar00rootroot00000000000000 * * 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; /** * CsvFileLoader loads translations from CSV files. * * @author Saša Stamenković */ class CsvFileLoader extends ArrayLoader { private $delimiter = ';'; private $enclosure = '"'; private $escape = '\\'; /** * {@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 = 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]; } } $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } /** * 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; } } src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php000066400000000000000000000036141266465517700246170ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Translation/Loader/IcuResFileLoader.php000066400000000000000000000055751266465517700246500ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Translation/Loader/IniFileLoader.php000066400000000000000000000024571266465517700241710ustar00rootroot00000000000000 * * 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; /** * IniFileLoader loads translations from an ini file. * * @author stealth35 */ class IniFileLoader 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 = parse_ini_file($resource, true); $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } } src/Symfony/Component/Translation/Loader/JsonFileLoader.php000066400000000000000000000046501266465517700243600ustar00rootroot00000000000000 * * 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; /** * JsonFileLoader loads translations from an json file. * * @author singles */ class JsonFileLoader 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 = 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))); } } if (null === $messages) { $messages = array(); } $catalogue = parent::load($messages, $locale, $domain); $catalogue->addResource(new FileResource($resource)); return $catalogue; } /** * 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'; } } } src/Symfony/Component/Translation/Loader/LoaderInterface.php000066400000000000000000000021261266465517700245430ustar00rootroot00000000000000 * * 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'); } src/Symfony/Component/Translation/Loader/MoFileLoader.php000066400000000000000000000135511266465517700240220ustar00rootroot00000000000000 * * 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; /** * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) */ class MoFileLoader extends ArrayLoader { /** * 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; 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->parse($resource); // empty file if (null === $messages) { $messages = array(); } // not an array if (!is_array($messages)) { throw new InvalidResourceException(sprintf('The file "%s" must contain a valid mo file.', $resource)); } $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } /** * Parses machine object (MO) format, independent of the machine's endian it * was created on. Both 32bit and 64bit systems are supported. * * @param resource $resource * * @return array * * @throws InvalidResourceException If stream content has an invalid format. */ private function parse($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) { $singularId = $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 endianess. * * @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); } } src/Symfony/Component/Translation/Loader/PhpFileLoader.php000066400000000000000000000025361266465517700241770ustar00rootroot00000000000000 * * 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; /** * PhpFileLoader loads translations from PHP files returning an array of translations. * * @author Fabien Potencier */ class PhpFileLoader 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 = require $resource; $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } } src/Symfony/Component/Translation/Loader/PoFileLoader.php000066400000000000000000000141461266465517700240260ustar00rootroot00000000000000 * * 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; /** * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) * @copyright Copyright (c) 2012, Clemens Tolboom */ class PoFileLoader extends ArrayLoader { 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->parse($resource); // empty file if (null === $messages) { $messages = array(); } // not an array if (!is_array($messages)) { throw new InvalidResourceException(sprintf('The file "%s" must contain a valid po file.', $resource)); } $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } /** * 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. * * @param resource $resource * * @return array */ private function parse($resource) { $stream = fopen($resource, 'r'); $defaults = array( 'ids' => array(), 'translated' => null, ); $messages = array(); $item = $defaults; while ($line = fgets($stream)) { $line = trim($line); if ($line === '') { // Whitespace indicated current item is done $this->addMessage($messages, $item); $item = $defaults; } 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 $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']); } } } src/Symfony/Component/Translation/Loader/QtFileLoader.php000066400000000000000000000050731266465517700240330ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Translation/Loader/XliffFileLoader.php000066400000000000000000000144051266465517700245160ustar00rootroot00000000000000 * * 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; /** * 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)); } list($xml, $encoding) = $this->parseFile($resource); $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:1.2'); $catalogue = new MessageCatalogue($locale); 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); if (isset($translation->note)) { $notes = array(); foreach ($translation->note 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; } $catalogue->setMetadata((string) $source, array('notes' => $notes), $domain); } } if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } /** * 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)) { if (function_exists('mb_convert_encoding')) { return mb_convert_encoding($content, $encoding, 'UTF-8'); } if (function_exists('iconv')) { return iconv('UTF-8', $encoding, $content); } throw new \RuntimeException('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).'); } return $content; } /** * Validates and parses the given file into a SimpleXMLElement. * * @param string $file * * @throws \RuntimeException * * @return \SimpleXMLElement * * @throws InvalidResourceException */ private function parseFile($file) { try { $dom = XmlUtils::loadFile($file); } catch (\InvalidArgumentException $e) { throw new InvalidResourceException(sprintf('Unable to load "%s": %s', $file, $e->getMessage()), $e->getCode(), $e); } $internalErrors = libxml_use_internal_errors(true); $location = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd'; $parts = explode('/', $location); if (0 === stripos($location, 'phar://')) { $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); if ($tmpfile) { copy($location, $tmpfile); $parts = explode('/', str_replace('\\', '/', $tmpfile)); } } $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); $source = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-1.2-strict.xsd'); $source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source); if (!@$dom->schemaValidateSource($source)) { throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); } $dom->normalizeDocument(); libxml_clear_errors(); libxml_use_internal_errors($internalErrors); return array(simplexml_import_dom($dom), strtoupper($dom->encoding)); } /** * 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; } } src/Symfony/Component/Translation/Loader/YamlFileLoader.php000066400000000000000000000043351266465517700243510ustar00rootroot00000000000000 * * 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; 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 ArrayLoader { private $yamlParser; /** * {@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)); } if (!class_exists('Symfony\Component\Yaml\Parser')) { throw new \LogicException('Loading translations from the YAML format requires the Symfony Yaml component.'); } if (null === $this->yamlParser) { $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); } // empty file if (null === $messages) { $messages = array(); } // not an array if (!is_array($messages)) { throw new InvalidResourceException(sprintf('The file "%s" must contain a YAML array.', $resource)); } $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } } src/Symfony/Component/Translation/Loader/schema/000077500000000000000000000000001266465517700222425ustar00rootroot00000000000000src/Symfony/Component/Translation/Loader/schema/dic/000077500000000000000000000000001266465517700230015ustar00rootroot00000000000000src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/000077500000000000000000000000001266465517700250375ustar00rootroot00000000000000src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd000066400000000000000000003120041266465517700314210ustar00rootroot00000000000000 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. src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd000066400000000000000000000212201266465517700263540ustar00rootroot00000000000000

    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:

    src/Symfony/Component/Translation/LoggingTranslator.php000066400000000000000000000063101266465517700237450ustar00rootroot00000000000000 * * 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; /** * @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); } /** * 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())); } } } src/Symfony/Component/Translation/MessageCatalogue.php000066400000000000000000000146231266465517700235240ustar00rootroot00000000000000 * * 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; /** * 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())); } } 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); } } } } src/Symfony/Component/Translation/MessageCatalogueInterface.php000066400000000000000000000076001266465517700253420ustar00rootroot00000000000000 * * 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 MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance */ 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 MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance */ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); /** * Gets the fallback catalogue. * * @return MessageCatalogueInterface|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); } src/Symfony/Component/Translation/MessageSelector.php000066400000000000000000000061061266465517700233750ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation; /** * 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) { $parts = explode('|', $message); $explicitRules = array(); $standardRules = array(); foreach ($parts as $part) { $part = trim($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) && 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]; } } src/Symfony/Component/Translation/MetadataAwareInterface.php000066400000000000000000000030171266465517700246270ustar00rootroot00000000000000 * * 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'); } src/Symfony/Component/Translation/PluralizationRules.php000066400000000000000000000141351266465517700241610ustar00rootroot00000000000000 * * 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 * * @throws \LogicException */ public static function set($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, '_'))); } if (!is_callable($rule)) { throw new \LogicException('The given rule can not be called'); } self::$rules[$locale] = $rule; } } src/Symfony/Component/Translation/README.md000066400000000000000000000017321266465517700210560ustar00rootroot00000000000000Translation Component ===================== Translation provides tools for loading translation files and generating translated strings from these including support for pluralization. ```php use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Loader\ArrayLoader; $translator = new Translator('fr_FR', new MessageSelector()); $translator->setFallbackLocales(array('fr')); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array( 'Hello World!' => 'Bonjour', ), 'fr'); echo $translator->trans('Hello World!')."\n"; ``` Resources --------- Silex integration: https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/TranslationServiceProvider.php Documentation: https://symfony.com/doc/2.7/book/translation.html You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Translation/ $ composer install $ phpunit src/Symfony/Component/Translation/Tests/000077500000000000000000000000001266465517700206765ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/Catalogue/000077500000000000000000000000001266465517700226025ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php000066400000000000000000000040511266465517700275770ustar00rootroot00000000000000 * * 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\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogueInterface; abstract class AbstractOperationTest extends \PHPUnit_Framework_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->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); } src/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php000066400000000000000000000055151266465517700267120ustar00rootroot00000000000000 * * 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\DiffOperation; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogueInterface; class DiffOperationTest 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 DiffOperation($source, $target); } } src/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php000066400000000000000000000056711266465517700271040ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Translation/Tests/DataCollector/000077500000000000000000000000001266465517700234165ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php000066400000000000000000000102531266465517700317270ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\DataCollectorTranslator; use Symfony\Component\Translation\DataCollector\TranslationDataCollector; class TranslationDataCollectorTest extends \PHPUnit_Framework_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() { $collectedMessages = array( array( 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, ), array( 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, ), array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, ), array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, ), ); $expectedMessages = array( array( 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, 'count' => 1, ), array( 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, 'count' => 1, ), array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, 'count' => 2, ), ); $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; } } src/Symfony/Component/Translation/Tests/DataCollectorTranslatorTest.php000066400000000000000000000046651266465517700270540ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\Translator; use Symfony\Component\Translation\DataCollectorTranslator; use Symfony\Component\Translation\Loader\ArrayLoader; class DataCollectorTranslatorTest extends \PHPUnit_Framework_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'); $expectedMessages = array(); $expectedMessages[] = array( 'id' => 'foo', 'translation' => 'foo (en)', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_DEFINED, ); $expectedMessages[] = array( 'id' => 'bar', 'translation' => 'bar (fr)', 'locale' => 'fr', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, ); $expectedMessages[] = array( 'id' => 'choice', 'translation' => 'choice', 'locale' => 'en', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_MISSING, ); $expectedMessages[] = array( 'id' => 'bar_ru', 'translation' => 'bar (ru)', 'locale' => 'ru', 'domain' => 'messages', 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, ); $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'); $collector = new DataCollectorTranslator($translator); return $collector; } } src/Symfony/Component/Translation/Tests/Dumper/000077500000000000000000000000001266465517700221325ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php000066400000000000000000000017041266465517700262150ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\CsvFileDumper; class CsvFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar', 'bar' => 'foo foo', 'foo;foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new CsvFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/valid.csv'), file_get_contents($tempDir.'/messages.en.csv')); unlink($tempDir.'/messages.en.csv'); } } src/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php000066400000000000000000000034641266465517700255460ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\FileDumper; class FileDumperTest extends \PHPUnit_Framework_TestCase { 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->assertTrue(file_exists($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->assertTrue(file_exists($file)); @unlink($file); @rmdir($translationsDir); } } class ConcreteFileDumper extends FileDumper { protected function format(MessageCatalogue $messages, $domain) { return ''; } protected function getExtension() { return 'concrete'; } } src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php000066400000000000000000000021021266465517700266450ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\IcuResFileDumper; class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase { /** * @requires extension mbstring */ public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir().'/IcuResFileDumperTest'; $dumper = new IcuResFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resourcebundle/res/en.res'), file_get_contents($tempDir.'/messages/en.res')); @unlink($tempDir.'/messages/en.res'); @rmdir($tempDir.'/messages'); @rmdir($tempDir); } } src/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php000066400000000000000000000016401266465517700262000ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\IniFileDumper; class IniFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new IniFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.ini'), file_get_contents($tempDir.'/messages.en.ini')); unlink($tempDir.'/messages.en.ini'); } } src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php000066400000000000000000000020651266465517700263740ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\JsonFileDumper; class JsonFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { if (PHP_VERSION_ID < 50400) { $this->markTestIncomplete('PHP below 5.4 doesn\'t support JSON pretty printing'); } $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new JsonFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.json'), file_get_contents($tempDir.'/messages.en.json')); unlink($tempDir.'/messages.en.json'); } } src/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php000066400000000000000000000016311266465517700260340ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\MoFileDumper; class MoFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new MoFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.mo'), file_get_contents($tempDir.'/messages.en.mo')); unlink($tempDir.'/messages.en.mo'); } } src/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php000066400000000000000000000016401266465517700262100ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\PhpFileDumper; class PhpFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new PhpFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.php'), file_get_contents($tempDir.'/messages.en.php')); unlink($tempDir.'/messages.en.php'); } } src/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php000066400000000000000000000016311266465517700260370ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\PoFileDumper; class PoFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new PoFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.po'), file_get_contents($tempDir.'/messages.en.po')); unlink($tempDir.'/messages.en.po'); } } src/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php000066400000000000000000000016511266465517700260470ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\QtFileDumper; class QtFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar'), 'resources'); $tempDir = sys_get_temp_dir(); $dumper = new QtFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.ts'), file_get_contents($tempDir.'/resources.en.ts')); unlink($tempDir.'/resources.en.ts'); } } src/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php000066400000000000000000000025201266465517700265270ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\XliffFileDumper; class XliffFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $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')))); $tempDir = sys_get_temp_dir(); $dumper = new XliffFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir, 'default_locale' => 'fr_FR')); $this->assertEquals( file_get_contents(__DIR__.'/../fixtures/resources-clean.xlf'), file_get_contents($tempDir.'/messages.en_US.xlf') ); unlink($tempDir.'/messages.en_US.xlf'); } } src/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php000066400000000000000000000016431266465517700263660ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\YamlFileDumper; class YamlFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir(); $dumper = new YamlFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resources.yml'), file_get_contents($tempDir.'/messages.en.yml')); unlink($tempDir.'/messages.en.yml'); } } src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php000066400000000000000000000063331266465517700261170ustar00rootroot00000000000000 * * 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 Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Translation\IdentityTranslator; class IdentityTranslatorTest extends \PHPUnit_Framework_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); $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)), ); } } src/Symfony/Component/Translation/Tests/IntervalTest.php000066400000000000000000000022431266465517700240340ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\Interval; class IntervalTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getTests */ public function testTest($expected, $number, $interval) { $this->assertEquals($expected, Interval::test($number, $interval)); } /** * @expectedException \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]'), ); } } src/Symfony/Component/Translation/Tests/Loader/000077500000000000000000000000001266465517700221045ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php000066400000000000000000000036721266465517700261470ustar00rootroot00000000000000 * * 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\CsvFileLoader; use Symfony\Component\Config\Resource\FileResource; class CsvFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php000066400000000000000000000045421266465517700265620ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php000066400000000000000000000030741266465517700266020ustar00rootroot00000000000000 * * 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'); } } src/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php000066400000000000000000000032021266465517700261200ustar00rootroot00000000000000 * * 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\IniFileLoader; use Symfony\Component\Config\Resource\FileResource; class IniFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php000066400000000000000000000040421266465517700263150ustar00rootroot00000000000000 * * 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\JsonFileLoader; use Symfony\Component\Config\Resource\FileResource; class JsonFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php000066400000000000000000000010171266465517700261560ustar00rootroot00000000000000 * * 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; abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase { protected function setUp() { if (!extension_loaded('intl')) { $this->markTestSkipped('Extension intl is required.'); } } } src/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php000066400000000000000000000046211266465517700257620ustar00rootroot00000000000000 * * 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\MoFileLoader; use Symfony\Component\Config\Resource\FileResource; class MoFileLoaderTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php000066400000000000000000000030241266465517700261320ustar00rootroot00000000000000 * * 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\PhpFileLoader; use Symfony\Component\Config\Resource\FileResource; class PhpFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php000066400000000000000000000067201266465517700257670ustar00rootroot00000000000000 * * 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\PoFileLoader; use Symfony\Component\Config\Resource\FileResource; class PoFileLoaderTest extends \PHPUnit_Framework_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"']); } } src/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php000066400000000000000000000042441266465517700257740ustar00rootroot00000000000000 * * 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\QtFileLoader; use Symfony\Component\Config\Resource\FileResource; class QtFileLoaderTest extends \PHPUnit_Framework_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'; $this->setExpectedException('Symfony\Component\Translation\Exception\InvalidResourceException', sprintf('Unable to load "%s".', $resource)); $loader->load($resource, 'en', 'domain1'); } } src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php000066400000000000000000000124721266465517700264620ustar00rootroot00000000000000 * * 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\XliffFileLoader; use Symfony\Component\Config\Resource\FileResource; class XliffFileLoaderTest extends \PHPUnit_Framework_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 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')); } /** * @requires extension mbstring */ 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')))), $catalogue->getMetadata('foo', 'domain1')); } /** * @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'; $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'))), $catalogue->getMetadata('foo', 'domain1')); // message without target $this->assertEquals(array('notes' => array(array('content' => 'bar', 'from' => 'foo'))), $catalogue->getMetadata('extra', 'domain1')); // message with empty target $this->assertEquals(array('notes' => array(array('content' => 'baz'), array('priority' => 2, 'from' => 'bar', 'content' => 'qux'))), $catalogue->getMetadata('key', 'domain1')); } } src/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php000066400000000000000000000044331266465517700263120ustar00rootroot00000000000000 * * 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\YamlFileLoader; use Symfony\Component\Config\Resource\FileResource; class YamlFileLoaderTest extends \PHPUnit_Framework_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'); } } src/Symfony/Component/Translation/Tests/LoggingTranslatorTest.php000066400000000000000000000032551266465517700257140ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\Translator; use Symfony\Component\Translation\LoggingTranslator; use Symfony\Component\Translation\Loader\ArrayLoader; class LoggingTranslatorTest extends \PHPUnit_Framework_TestCase { public function testTransWithNoTranslationIsLogged() { $logger = $this->getMock('Psr\Log\LoggerInterface'); $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->getMock('Psr\Log\LoggerInterface'); $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)); } } src/Symfony/Component/Translation/Tests/MessageCatalogueTest.php000066400000000000000000000202331266465517700254600ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; class MessageCatalogueTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $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->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $r1->expects($this->any())->method('__toString')->will($this->returnValue('r1')); $catalogue = new MessageCatalogue('en_US', array('domain1' => array('foo' => 'foo'), 'domain2' => array('bar' => 'bar'))); $catalogue->addResource($r); $catalogue1 = new MessageCatalogue('en', array('domain1' => array('foo' => 'bar', 'foo1' => 'foo1'))); $catalogue1->addResource($r1); $catalogue->addFallbackCatalogue($catalogue1); $this->assertEquals('foo', $catalogue->get('foo', 'domain1')); $this->assertEquals('foo1', $catalogue->get('foo1', 'domain1')); $this->assertEquals(array($r, $r1), $catalogue->getResources()); } /** * @expectedException \LogicException */ public function testAddFallbackCatalogueWithParentCircularReference() { $main = new MessageCatalogue('en_US'); $fallback = new MessageCatalogue('fr_FR'); $fallback->addFallbackCatalogue($main); $main->addFallbackCatalogue($fallback); } /** * @expectedException \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 \LogicException */ public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne() { $catalogue = new MessageCatalogue('en'); $catalogue->addCatalogue(new MessageCatalogue('fr', array())); } public function testGetAddResource() { $catalogue = new MessageCatalogue('en'); $r = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $r->expects($this->any())->method('__toString')->will($this->returnValue('r')); $catalogue->addResource($r); $catalogue->addResource($r); $r1 = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $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.'); } } src/Symfony/Component/Translation/Tests/MessageSelectorTest.php000066400000000000000000000166611266465517700253460ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageSelector; class MessageSelectorTest extends \PHPUnit_Framework_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 \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), ); } } src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php000066400000000000000000000100501266465517700261130ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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($nplural, $langCodes); $this->validateMatrix($nplural, $matrix, false); } /** * @dataProvider successLangcodes */ public function testLangcodes($nplural, $langCodes) { $matrix = $this->generateTestData($nplural, $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($plural, $langCodes) { $matrix = array(); foreach ($langCodes as $langCode) { for ($count = 0; $count < 200; ++$count) { $plural = PluralizationRules::get($count, $langCode); $matrix[$langCode][$count] = $plural; } } return $matrix; } } src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php000066400000000000000000000255301266465517700253310ustar00rootroot00000000000000 * * 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 Symfony\Component\Config\Resource\ResourceInterface; 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 \PHPUnit_Framework_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->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Config\Resource\ResourceInterface'); $loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Translation\Loader\LoaderInterface'); $loader ->expects($this->never()) ->method('load'); return $loader; } } class StaleResource implements ResourceInterface { public function isFresh($timestamp) { return false; } public function getResource() { } public function __toString() { return ''; } } src/Symfony/Component/Translation/Tests/TranslatorTest.php000066400000000000000000000573351266465517700244150ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\Translator; use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\MessageCatalogue; class TranslatorTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getInvalidLocalesTests * @expectedException \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 \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 \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 \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 \RuntimeException */ public function testWhenAResourceHasNoRegisteredLoader() { $translator = new Translator('en'); $translator->addResource('array', array('foo' => 'foofoo'), 'en'); $translator->trans('foo'); } 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 \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 \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('%count%' => 0), '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('%count%' => 1), '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('%count%' => 10), '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('%count%' => 0), '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('%count%' => 1), '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('%count%' => 10), '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('%count%' => 0), '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('%count%' => 1), '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('%count%' => 10), '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('%count%' => 0), '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('%count%' => 1), '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('%count%' => 10), '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('%count%' => 0), '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))); } /** * @dataProvider dataProviderGetMessages */ public function testGetMessages($resources, $locale, $expected) { $locales = array_keys($resources); $_locale = null !== $locale ? $locale : reset($locales); $locales = array_slice($locales, 0, array_search($_locale, $locales)); $translator = new Translator($_locale, new MessageSelector()); $translator->setFallbackLocales(array_reverse($locales)); $translator->addLoader('array', new ArrayLoader()); foreach ($resources as $_locale => $domainMessages) { foreach ($domainMessages as $domain => $messages) { $translator->addResource('array', $messages, $_locale, $domain); } } $result = $translator->getMessages($locale); $this->assertEquals($expected, $result); } public function dataProviderGetMessages() { $resources = array( 'en' => array( 'jsmessages' => array( 'foo' => 'foo (EN)', 'bar' => 'bar (EN)', ), 'messages' => array( 'foo' => 'foo messages (EN)', ), 'validators' => array( 'int' => 'integer (EN)', ), ), 'pt-PT' => array( 'messages' => array( 'foo' => 'foo messages (PT)', ), 'validators' => array( 'str' => 'integer (PT)', ), ), 'pt_BR' => array( 'validators' => array( 'int' => 'integer (BR)', ), ), ); return array( array($resources, null, array( 'jsmessages' => array( 'foo' => 'foo (EN)', 'bar' => 'bar (EN)', ), 'messages' => array( 'foo' => 'foo messages (EN)', ), 'validators' => array( 'int' => 'integer (EN)', ), ), ), array($resources, 'en', array( 'jsmessages' => array( 'foo' => 'foo (EN)', 'bar' => 'bar (EN)', ), 'messages' => array( 'foo' => 'foo messages (EN)', ), 'validators' => array( 'int' => 'integer (EN)', ), ), ), array($resources, 'pt-PT', array( 'jsmessages' => array( 'foo' => 'foo (EN)', 'bar' => 'bar (EN)', ), 'messages' => array( 'foo' => 'foo messages (PT)', ), 'validators' => array( 'int' => 'integer (EN)', 'str' => 'integer (PT)', ), ), ), array($resources, 'pt_BR', array( 'jsmessages' => array( 'foo' => 'foo (EN)', 'bar' => 'bar (EN)', ), 'messages' => array( 'foo' => 'foo messages (PT)', ), 'validators' => array( 'int' => 'integer (BR)', 'str' => 'integer (PT)', ), ), ), ); } } class StringClass { protected $str; public function __construct($str) { $this->str = $str; } public function __toString() { return $this->str; } } src/Symfony/Component/Translation/Tests/Writer/000077500000000000000000000000001266465517700221525ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php000066400000000000000000000026531266465517700272240ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Writer\TranslationWriter; class TranslationWriterTest extends \PHPUnit_Framework_TestCase { public function testWriteTranslations() { $dumper = $this->getMock('Symfony\Component\Translation\Dumper\DumperInterface'); $dumper ->expects($this->once()) ->method('dump'); $writer = new TranslationWriter(); $writer->addDumper('test', $dumper); $writer->writeTranslations(new MessageCatalogue(array()), 'test'); } public function testDisableBackup() { $dumper = $this->getMock('Symfony\Component\Translation\Dumper\DumperInterface'); $dumper ->expects($this->never()) ->method('setBackup'); $phpDumper = $this->getMock('Symfony\Component\Translation\Dumper\PhpFileDumper'); $phpDumper ->expects($this->once()) ->method('setBackup'); $writer = new TranslationWriter(); $writer->addDumper('test', $dumper); $writer->addDumper('php', $phpDumper); $writer->disableBackup(); } } src/Symfony/Component/Translation/Tests/fixtures/000077500000000000000000000000001266465517700225475ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty-translation.mo000066400000000000000000000000611266465517700265730ustar00rootroot00000000000000$,-1foosrc/Symfony/Component/Translation/Tests/fixtures/empty-translation.po000066400000000000000000000000271266465517700266000ustar00rootroot00000000000000msgid "foo" msgstr "" src/Symfony/Component/Translation/Tests/fixtures/empty.csv000066400000000000000000000000001266465517700244100ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.ini000066400000000000000000000000001266465517700243740ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.json000066400000000000000000000000001266465517700245660ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.mo000066400000000000000000000000001266465517700242300ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.po000066400000000000000000000000001266465517700242330ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.xlf000066400000000000000000000000001266465517700244060ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/empty.yml000066400000000000000000000000001266465517700244160ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/encoding.xlf000066400000000000000000000007461266465517700250570ustar00rootroot00000000000000 foo br bz bar f src/Symfony/Component/Translation/Tests/fixtures/escaped-id-plurals.po000066400000000000000000000003461266465517700265700ustar00rootroot00000000000000msgid "" 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\"" src/Symfony/Component/Translation/Tests/fixtures/escaped-id.po000066400000000000000000000002461266465517700251070ustar00rootroot00000000000000msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en\n" msgid "escaped \"foo\"" msgstr "escaped \"bar\"" src/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf000066400000000000000000000013551266465517700275220ustar00rootroot00000000000000 foo bar extra key test with note src/Symfony/Component/Translation/Tests/fixtures/malformed.json000066400000000000000000000000231266465517700254030ustar00rootroot00000000000000{ "foo" "bar" }src/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf000066400000000000000000000005241266465517700251520ustar00rootroot00000000000000 foo bar src/Symfony/Component/Translation/Tests/fixtures/non-valid.yml000066400000000000000000000000041266465517700251530ustar00rootroot00000000000000foo src/Symfony/Component/Translation/Tests/fixtures/plurals.mo000066400000000000000000000001121266465517700245600ustar00rootroot00000000000000$,8Afoofoosbarbarssrc/Symfony/Component/Translation/Tests/fixtures/plurals.po000066400000000000000000000001021266465517700245620ustar00rootroot00000000000000msgid "foo" msgid_plural "foos" msgstr[0] "bar" msgstr[1] "bars" src/Symfony/Component/Translation/Tests/fixtures/resname.xlf000066400000000000000000000010641266465517700247150ustar00rootroot00000000000000 bar bar source baz baz foo src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/000077500000000000000000000000001266465517700255705ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/000077500000000000000000000000001266465517700275775ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat000066400000000000000000000000031266465517700322740ustar00rootroot00000000000000XXXsrc/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/000077500000000000000000000000001266465517700263405ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res000066400000000000000000000001701266465517700274530ustar00rootroot00000000000000 'ResB  symfonySymfony 2 is great src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt000066400000000000000000000000451266465517700275020ustar00rootroot00000000000000en{ symfony{"Symfony is great"} }src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res000066400000000000000000000001741266465517700274640ustar00rootroot00000000000000 'ResB  symfonySymfony 2 est gnial src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt000066400000000000000000000000501266465517700275030ustar00rootroot00000000000000fr{ symfony{"Symfony est génial"} }src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt000066400000000000000000000000161266465517700313650ustar00rootroot00000000000000en.res fr.res src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat000066400000000000000000000005401266465517700310430ustar00rootroot00000000000000 'CmnD@%resources/en.resresources/fr.res 'ResB  symfonySymfony 2 is great 'ResB  symfonySymfony 2 est gnial src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/000077500000000000000000000000001266465517700263615ustar00rootroot00000000000000src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res000066400000000000000000000001241266465517700274730ustar00rootroot00000000000000 'ResB  foobarsrc/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf000066400000000000000000000015101266465517700263510ustar00rootroot00000000000000 foo bar baz key baz qux key.with.cdata & ]]> src/Symfony/Component/Translation/Tests/fixtures/resources.csv000066400000000000000000000001401266465517700252710ustar00rootroot00000000000000"foo"; "bar" #"bar"; "foo" "incorrect"; "number"; "columns"; "will"; "be"; "ignored" "incorrect"src/Symfony/Component/Translation/Tests/fixtures/resources.ini000066400000000000000000000000121266465517700252530ustar00rootroot00000000000000foo="bar" src/Symfony/Component/Translation/Tests/fixtures/resources.json000066400000000000000000000000241266465517700254500ustar00rootroot00000000000000{ "foo": "bar" }src/Symfony/Component/Translation/Tests/fixtures/resources.mo000066400000000000000000000000641266465517700251160ustar00rootroot00000000000000$,-1foobarsrc/Symfony/Component/Translation/Tests/fixtures/resources.php000066400000000000000000000000531266465517700252700ustar00rootroot00000000000000 'bar', ); src/Symfony/Component/Translation/Tests/fixtures/resources.po000066400000000000000000000002151266465517700251170ustar00rootroot00000000000000msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en\n" msgid "foo" msgstr "bar"src/Symfony/Component/Translation/Tests/fixtures/resources.ts000066400000000000000000000003031266465517700251250ustar00rootroot00000000000000 resources foo bar src/Symfony/Component/Translation/Tests/fixtures/resources.xlf000066400000000000000000000011721266465517700252750ustar00rootroot00000000000000 foo bar extra key test with note src/Symfony/Component/Translation/Tests/fixtures/resources.yml000066400000000000000000000000111266465517700252740ustar00rootroot00000000000000foo: bar src/Symfony/Component/Translation/Tests/fixtures/valid.csv000066400000000000000000000000441266465517700243610ustar00rootroot00000000000000foo;bar bar;"foo foo" "foo;foo";bar src/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf000066400000000000000000000005521266465517700256270ustar00rootroot00000000000000 foo bar src/Symfony/Component/Translation/Tests/fixtures/withnote.xlf000066400000000000000000000012121266465517700251170ustar00rootroot00000000000000 foo bar foo extra bar key baz qux src/Symfony/Component/Translation/Translator.php000066400000000000000000000324011266465517700224360ustar00rootroot00000000000000 * * 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\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 */ protected $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 locale(s). * * @param string|array $locales The fallback locale(s) * * @throws \InvalidArgumentException If a locale contains invalid characters * * @deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead. */ public function setFallbackLocale($locales) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the setFallbackLocales() method instead.', E_USER_DEPRECATED); $this->setFallbackLocales(is_array($locales) ? $locales : array($locales)); } /** * 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) { 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; } /** * Collects all messages for the given locale. * * @param string|null $locale Locale of translations, by default is current locale * * @return array[array] indexed by catalog */ public function getMessages($locale = null) { $catalogue = $this->getCatalogue($locale); $messages = $catalogue->all(); while ($catalogue = $catalogue->getFallbackCatalogue()) { $messages = array_replace_recursive($catalogue->all(), $messages); } return $messages; } /** * @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); $self = $this; // required for PHP 5.3 where "$this" cannot be use()d in anonymous functions. Change in Symfony 3.0. $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), function (ConfigCacheInterface $cache) use ($self, $locale) { $self->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(); } /** * This method is public because it needs to be callable from a closure in PHP 5.3. It should be made protected (or even private, if possible) in 3.0. * * @internal */ public 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(<<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->doLoadCatalogue($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; } } src/Symfony/Component/Translation/TranslatorBagInterface.php000066400000000000000000000013341266465517700246720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation; /** * TranslatorBagInterface. * * @author Abdellatif Ait boudad */ interface TranslatorBagInterface { /** * Gets the catalogue by locale. * * @param string|null $locale The locale or null to use the default * * @throws \InvalidArgumentException If the locale contains invalid characters * * @return MessageCatalogueInterface */ public function getCatalogue($locale = null); } src/Symfony/Component/Translation/TranslatorInterface.php000066400000000000000000000042241266465517700242610ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation; /** * 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 * * @throws \InvalidArgumentException If the locale contains invalid characters * * @return string The translated string */ 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 * * @throws \InvalidArgumentException If the locale contains invalid characters * * @return string The translated string */ 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(); } src/Symfony/Component/Translation/Writer/000077500000000000000000000000001266465517700210505ustar00rootroot00000000000000src/Symfony/Component/Translation/Writer/TranslationWriter.php000066400000000000000000000046321266465517700252610ustar00rootroot00000000000000 * * 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; /** * 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); } } src/Symfony/Component/Translation/composer.json000066400000000000000000000021431266465517700223160ustar00rootroot00000000000000{ "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.3.9" }, "require-dev": { "symfony/config": "~2.7", "symfony/intl": "~2.4", "symfony/yaml": "~2.2", "psr/log": "~1.0" }, "conflict": { "symfony/config": "<2.7" }, "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": "2.7-dev" } } } src/Symfony/Component/Translation/phpunit.xml.dist000066400000000000000000000014141266465517700227470ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor src/Symfony/Component/Validator/000077500000000000000000000000001266465517700172235ustar00rootroot00000000000000src/Symfony/Component/Validator/.gitignore000066400000000000000000000000421266465517700212070ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Validator/CHANGELOG.md000066400000000000000000000216711266465517700210430ustar00rootroot00000000000000CHANGELOG ========= 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 src/Symfony/Component/Validator/ClassBasedInterface.php000066400000000000000000000012721266465517700235630ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * An object backed by a PHP class. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\ClassMetadataInterface} instead. */ interface ClassBasedInterface { /** * Returns the name of the backing PHP class. * * @return string The name of the backing class. */ public function getClassName(); } src/Symfony/Component/Validator/Constraint.php000066400000000000000000000227031266465517700220640ustar00rootroot00000000000000 * * 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, an option or a getter method. * The Constraint class encapsulates all the configuration required for * validating this class, option 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 int $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) && 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. * * @since 2.6 */ 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. * * @since 2.6 */ public function __sleep() { // Initialize "groups" option if it is not set $this->groups; return array_keys(get_object_vars($this)); } } src/Symfony/Component/Validator/ConstraintValidator.php000066400000000000000000000157071266465517700237400ustar00rootroot00000000000000 * * 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 as ExecutionContextInterface2Dot5; use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; use Symfony\Component\Validator\Violation\LegacyConstraintViolationBuilder; /** * 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; } /** * Wrapper for {@link ExecutionContextInterface::buildViolation} that * supports the 2.4 context API. * * @param string $message The violation message * @param array $parameters The message parameters * * @return ConstraintViolationBuilderInterface The violation builder * * @deprecated since version 2.5, to be removed in 3.0. */ protected function buildViolation($message, array $parameters = array()) { @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if ($this->context instanceof ExecutionContextInterface2Dot5) { return $this->context->buildViolation($message, $parameters); } return new LegacyConstraintViolationBuilder($this->context, $message, $parameters); } /** * Wrapper for {@link ExecutionContextInterface::buildViolation} that * supports the 2.4 context API. * * @param ExecutionContextInterface $context The context to use * @param string $message The violation message * @param array $parameters The message parameters * * @return ConstraintViolationBuilderInterface The violation builder * * @deprecated since version 2.5, to be removed in 3.0. */ protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array()) { @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if ($context instanceof ExecutionContextInterface2Dot5) { return $context->buildViolation($message, $parameters); } return new LegacyConstraintViolationBuilder($context, $message, $parameters); } /** * 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 parameter $prettyDateTime * is set to true, {@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 \DateTime || $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); } } src/Symfony/Component/Validator/ConstraintValidatorFactory.php000066400000000000000000000025501266465517700252600ustar00rootroot00000000000000 * * 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(); private $propertyAccessor; public function __construct($propertyAccessor = null) { $this->propertyAccessor = $propertyAccessor; } /** * {@inheritdoc} */ public function getInstance(Constraint $constraint) { $className = $constraint->validatedBy(); if (!isset($this->validators[$className])) { $this->validators[$className] = 'validator.expression' === $className ? new ExpressionValidator($this->propertyAccessor) : new $className(); } return $this->validators[$className]; } } src/Symfony/Component/Validator/ConstraintValidatorFactoryInterface.php000066400000000000000000000014071266465517700271010ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/ConstraintValidatorInterface.php000066400000000000000000000015451266465517700255540ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * @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); } src/Symfony/Component/Validator/ConstraintViolation.php000066400000000000000000000135001266465517700237440ustar00rootroot00000000000000 * * 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} * * @deprecated since version 2.7, to be removed in 3.0. * Use getParameters() instead */ public function getMessageParameters() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED); return $this->parameters; } /** * Alias of {@link getMessageParameters()}. */ public function getParameters() { return $this->parameters; } /** * {@inheritdoc} * * @deprecated since version 2.7, to be removed in 3.0. * Use getPlural() instead */ public function getMessagePluralization() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED); return $this->plural; } /** * Alias of {@link getMessagePluralization()}. */ 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; } } src/Symfony/Component/Validator/ConstraintViolationInterface.php000066400000000000000000000104451266465517700255720ustar00rootroot00000000000000 * * 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 getMessageParameters}. 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() * @deprecated since version 2.7, to be replaced by getParameters() in 3.0. */ public function getMessageParameters(); /** * 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. * * @deprecated since version 2.7, to be replaced by getPlural() in 3.0. */ public function getMessagePluralization(); /** * 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 mixed The error code. */ public function getCode(); } src/Symfony/Component/Validator/ConstraintViolationList.php000066400000000000000000000062551266465517700246110ustar00rootroot00000000000000 * * 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} */ 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); } } src/Symfony/Component/Validator/ConstraintViolationListInterface.php000066400000000000000000000035121266465517700264230ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/Constraints/000077500000000000000000000000001266465517700215325ustar00rootroot00000000000000src/Symfony/Component/Validator/Constraints/AbstractComparison.php000066400000000000000000000021341266465517700260410ustar00rootroot00000000000000 * * 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 */ 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'; } } src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php000066400000000000000000000064521266465517700277160ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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 \DateTime || $value instanceof \DateTimeInterface) { // Otherwise use DateTime $comparedValue = new \DateTime($comparedValue); } } if (!$this->compareValues($value, $comparedValue)) { if ($this->context instanceof ExecutionContextInterface) { $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)) ->addViolation(); } else { $this->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)) ->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); } src/Symfony/Component/Validator/Constraints/All.php000066400000000000000000000013471266465517700227600ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Validator/Constraints/AllValidator.php000066400000000000000000000031431266465517700246220ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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; if ($context instanceof ExecutionContextInterface) { $validator = $context->getValidator()->inContext($context); foreach ($value as $key => $element) { $validator->atPath('['.$key.']')->validate($element, $constraint->constraints); } } else { // 2.4 API foreach ($value as $key => $element) { $context->validateValue($element, $constraint->constraints, '['.$key.']'); } } } } src/Symfony/Component/Validator/Constraints/Blank.php000066400000000000000000000010451266465517700232720ustar00rootroot00000000000000 * * 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 { public $message = 'This value should be blank.'; } src/Symfony/Component/Validator/Constraints/BlankValidator.php000066400000000000000000000026011266465517700251370ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Callback.php000066400000000000000000000037261266465517700237470ustar00rootroot00000000000000 * * 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 * * @since 2.4 */ public $callback; /** * @var array * * @deprecated since version 2.4, to be removed in 3.0. */ public $methods; /** * {@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['methods'])) { @trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED); } if (is_array($options) && !isset($options['callback']) && !isset($options['methods']) && !isset($options['groups'])) { if (is_callable($options) || !$options) { $options = array('callback' => $options); } else { // @deprecated, to be removed in 3.0 $options = array('methods' => $options); } } parent::__construct($options); } /** * {@inheritdoc} */ public function getDefaultOption() { return 'callback'; } /** * {@inheritdoc} */ public function getTargets() { return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); } } src/Symfony/Component/Validator/Constraints/CallbackValidator.php000066400000000000000000000054061266465517700256120ustar00rootroot00000000000000 * * 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'); } if (null !== $constraint->callback && null !== $constraint->methods) { throw new ConstraintDefinitionException( 'The Callback constraint supports either the option "callback" '. 'or "methods", but not both at the same time.' ); } // has to be an array so that we can differentiate between callables // and method names if (null !== $constraint->methods && !is_array($constraint->methods)) { throw new UnexpectedTypeException($constraint->methods, 'array'); } $methods = $constraint->methods ?: array($constraint->callback); foreach ($methods as $method) { if ($method instanceof \Closure) { $method($object, $this->context); } 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); } 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); } else { $reflMethod->invoke($object, $this->context); } } } } } src/Symfony/Component/Validator/Constraints/CardScheme.php000066400000000000000000000020771266465517700242470ustar00rootroot00000000000000 * * 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 = 1; const INVALID_FORMAT_ERROR = 2; 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'); } } src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php000066400000000000000000000124721266465517700261150ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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. 'MASTERCARD' => array( '/^5[1-5][0-9]{14}$/', ), // 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(CardScheme::NOT_NUMERIC_ERROR) ->addViolation(); } else { $this->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; } } } if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(CardScheme::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(CardScheme::INVALID_FORMAT_ERROR) ->addViolation(); } } } src/Symfony/Component/Validator/Constraints/Choice.php000066400000000000000000000026351266465517700234430ustar00rootroot00000000000000 * * 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 = 1; const TOO_FEW_ERROR = 2; const TOO_MANY_ERROR = 3; 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'; } } src/Symfony/Component/Validator/Constraints/ChoiceValidator.php000066400000000000000000000124431266465517700253070ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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->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 ($constraint->multiple) { foreach ($value as $_value) { if (!in_array($_value, $choices, $constraint->strict)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->multipleMessage) ->setParameter('{{ value }}', $this->formatValue($_value)) ->setCode(Choice::NO_SUCH_CHOICE_ERROR) ->setInvalidValue($_value) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->minMessage) ->setParameter('{{ limit }}', $constraint->min) ->setPlural((int) $constraint->min) ->setCode(Choice::TOO_FEW_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->maxMessage) ->setParameter('{{ limit }}', $constraint->max) ->setPlural((int) $constraint->max) ->setCode(Choice::TOO_MANY_ERROR) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Choice::NO_SUCH_CHOICE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Choice::NO_SUCH_CHOICE_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Collection.php000066400000000000000000000047101266465517700243400ustar00rootroot00000000000000 * * 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 = 1; const NO_SUCH_FIELD_ERROR = 2; 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'; } } src/Symfony/Component/Validator/Constraints/Collection/000077500000000000000000000000001266465517700236255ustar00rootroot00000000000000src/Symfony/Component/Validator/Constraints/Collection/Optional.php000066400000000000000000000015731266465517700261310ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints\Collection; @trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Optional as BaseOptional; /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Validator\Constraints\Optional} instead. */ class Optional extends BaseOptional { } src/Symfony/Component/Validator/Constraints/Collection/Required.php000066400000000000000000000015731266465517700261240ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints\Collection; @trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Required as BaseRequired; /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek * * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Symfony\Component\Validator\Constraints\Required} instead. */ class Required extends BaseRequired { } src/Symfony/Component/Validator/Constraints/CollectionValidator.php000066400000000000000000000113701266465517700262060ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($context instanceof ExecutionContextInterface) { $context->getValidator() ->inContext($context) ->atPath('['.$field.']') ->validate($value[$field], $fieldConstraint->constraints); } else { // 2.4 API $context->validateValue($value[$field], $fieldConstraint->constraints, '['.$field.']'); } } } elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) { if ($context instanceof ExecutionContextInterface) { $context->buildViolation($constraint->missingFieldsMessage) ->atPath('['.$field.']') ->setParameter('{{ field }}', $this->formatValue($field)) ->setInvalidValue(null) ->setCode(Collection::MISSING_FIELD_ERROR) ->addViolation(); } else { $this->buildViolationInContext($context, $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])) { if ($context instanceof ExecutionContextInterface) { $context->buildViolation($constraint->extraFieldsMessage) ->atPath('['.$field.']') ->setParameter('{{ field }}', $this->formatValue($field)) ->setInvalidValue($fieldValue) ->setCode(Collection::NO_SUCH_FIELD_ERROR) ->addViolation(); } else { $this->buildViolationInContext($context, $constraint->extraFieldsMessage) ->atPath('['.$field.']') ->setParameter('{{ field }}', $this->formatValue($field)) ->setInvalidValue($fieldValue) ->setCode(Collection::NO_SUCH_FIELD_ERROR) ->addViolation(); } } } } } } src/Symfony/Component/Validator/Constraints/Composite.php000066400000000000000000000122231266465517700242050ustar00rootroot00000000000000 * * 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. * * @since 2.6 * * @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() { } } src/Symfony/Component/Validator/Constraints/Count.php000066400000000000000000000033361266465517700233400ustar00rootroot00000000000000 * * 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 = 1; const TOO_MANY_ERROR = 2; 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')); } } } src/Symfony/Component/Validator/Constraints/CountValidator.php000066400000000000000000000062001266465517700251770ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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(); } } } } src/Symfony/Component/Validator/Constraints/Country.php000066400000000000000000000010561266465517700237100ustar00rootroot00000000000000 * * 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 { public $message = 'This value is not a valid country.'; } src/Symfony/Component/Validator/Constraints/CountryValidator.php000066400000000000000000000034731266465517700255630ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Currency.php000066400000000000000000000010601266465517700240320ustar00rootroot00000000000000 * * 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 */ class Currency extends Constraint { public $message = 'This value is not a valid currency.'; } src/Symfony/Component/Validator/Constraints/CurrencyValidator.php000066400000000000000000000034771266465517700257160ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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 */ 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])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Date.php000066400000000000000000000014311266465517700231170ustar00rootroot00000000000000 * * 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 = 1; const INVALID_DATE_ERROR = 2; 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.'; } src/Symfony/Component/Validator/Constraints/DateTime.php000066400000000000000000000015751266465517700237470ustar00rootroot00000000000000 * * 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 = 1; const INVALID_DATE_ERROR = 2; const INVALID_TIME_ERROR = 3; 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 $message = 'This value is not a valid datetime.'; } src/Symfony/Component/Validator/Constraints/DateTimeValidator.php000066400000000000000000000063041266465517700256100ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** * @author Bernhard Schussek */ class DateTimeValidator extends DateValidator { 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 \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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_FORMAT_ERROR) ->addViolation(); } return; } if (!DateValidator::checkDate($matches[1], $matches[2], $matches[3])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_DATE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_DATE_ERROR) ->addViolation(); } } if (!TimeValidator::checkTime($matches[4], $matches[5], $matches[6])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_TIME_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(DateTime::INVALID_TIME_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/DateValidator.php000066400000000000000000000056031266465517700247720ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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 \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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Date::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Date::INVALID_FORMAT_ERROR) ->addViolation(); } return; } if (!self::checkDate($matches[1], $matches[2], $matches[3])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Date::INVALID_DATE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Date::INVALID_DATE_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Email.php000066400000000000000000000017541266465517700233010ustar00rootroot00000000000000 * * 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 = 1; const MX_CHECK_FAILED_ERROR = 2; const HOST_CHECK_FAILED_ERROR = 3; 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; } src/Symfony/Component/Validator/Constraints/EmailValidator.php000066400000000000000000000121531266465517700251420ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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'); } $strictValidator = new \Egulias\EmailValidator\EmailValidator(); if (!$strictValidator->isValid($value, false, true)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::INVALID_FORMAT_ERROR) ->addViolation(); } return; } } elseif (!preg_match('/^.+\@\S+\.\S+$/', $value)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::INVALID_FORMAT_ERROR) ->addViolation(); } return; } $host = substr($value, strpos($value, '@') + 1); // Check for host DNS resource records if ($constraint->checkMX) { if (!$this->checkMX($host)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::MX_CHECK_FAILED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::MX_CHECK_FAILED_ERROR) ->addViolation(); } } return; } if ($constraint->checkHost && !$this->checkHost($host)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Email::HOST_CHECK_FAILED_ERROR) ->addViolation(); } else { $this->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')); } } src/Symfony/Component/Validator/Constraints/EqualTo.php000066400000000000000000000010321266465517700236110ustar00rootroot00000000000000 * * 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 */ class EqualTo extends AbstractComparison { public $message = 'This value should be equal to {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/EqualToValidator.php000066400000000000000000000011161266465517700254620ustar00rootroot00000000000000 * * 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 */ class EqualToValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 == $value2; } } src/Symfony/Component/Validator/Constraints/Existence.php000066400000000000000000000011301266465517700241650ustar00rootroot00000000000000 * * 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'; } } src/Symfony/Component/Validator/Constraints/Expression.php000066400000000000000000000022051266465517700244010ustar00rootroot00000000000000 * * 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 { 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'; } } src/Symfony/Component/Validator/Constraints/ExpressionValidator.php000066400000000000000000000105151266465517700262520ustar00rootroot00000000000000 * * 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\PropertyAccess\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyAccess\PropertyPath; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\RuntimeException; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** * @author Fabien Potencier * @author Bernhard Schussek */ class ExpressionValidator extends ConstraintValidator { /** * @var PropertyAccessorInterface */ private $propertyAccessor; /** * @var ExpressionLanguage */ private $expressionLanguage; /** * @param PropertyAccessorInterface|null $propertyAccessor Optional as of Symfony 2.5 * * @throws UnexpectedTypeException If the property accessor is invalid */ public function __construct($propertyAccessor = null) { if (null !== $propertyAccessor && !$propertyAccessor instanceof PropertyAccessorInterface) { throw new UnexpectedTypeException($propertyAccessor, 'null or \Symfony\Component\PropertyAccess\PropertyAccessorInterface'); } $this->propertyAccessor = $propertyAccessor; } /** * {@inheritdoc} */ public function validate($value, Constraint $constraint) { if (!$constraint instanceof Expression) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } $variables = array(); // Symfony 2.5+ if ($this->context instanceof ExecutionContextInterface) { $variables['value'] = $value; $variables['this'] = $this->context->getObject(); } elseif (null === $this->context->getPropertyName()) { $variables['value'] = $value; $variables['this'] = $value; } else { $root = $this->context->getRoot(); $variables['value'] = $value; if (is_object($root)) { // Extract the object that the property belongs to from the object // graph $path = new PropertyPath($this->context->getPropertyPath()); $parentPath = $path->getParent(); $variables['this'] = $parentPath ? $this->getPropertyAccessor()->getValue($root, $parentPath) : $root; } else { $variables['this'] = null; } } if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->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; } private function getPropertyAccessor() { if (null === $this->propertyAccessor) { if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) { throw new RuntimeException('Unable to use expressions as the Symfony PropertyAccess component is not installed.'); } $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); } return $this->propertyAccessor; } } src/Symfony/Component/Validator/Constraints/False.php000066400000000000000000000013121266465517700232720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\False class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsFalse instead. */ class False extends IsFalse { } src/Symfony/Component/Validator/Constraints/FalseValidator.php000066400000000000000000000012641266465517700251460ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsFalseValidator instead. */ class FalseValidator extends IsFalseValidator { } src/Symfony/Component/Validator/Constraints/File.php000066400000000000000000000077701266465517700231350ustar00rootroot00000000000000 * * 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 = 1; const NOT_READABLE_ERROR = 2; const EMPTY_ERROR = 3; const TOO_LARGE_ERROR = 4; const INVALID_MIME_TYPE_ERROR = 5; 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) { if (ctype_digit((string) $maxSize)) { $this->maxSize = (int) $maxSize; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++k$/i', $maxSize)) { $this->maxSize = $maxSize * 1000; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++M$/i', $maxSize)) { $this->maxSize = $maxSize * 1000000; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++Ki$/i', $maxSize)) { $this->maxSize = $maxSize << 10; $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; } elseif (preg_match('/^\d++Mi$/i', $maxSize)) { $this->maxSize = $maxSize << 20; $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; } else { throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize)); } } } src/Symfony/Component/Validator/Constraints/FileValidator.php000066400000000000000000000326501266465517700247760ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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); if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadIniSizeErrorMessage) ->setParameter('{{ limit }}', $limitAsString) ->setParameter('{{ suffix }}', $suffix) ->setCode(UPLOAD_ERR_INI_SIZE) ->addViolation(); } else { $this->buildViolation($constraint->uploadIniSizeErrorMessage) ->setParameter('{{ limit }}', $limitAsString) ->setParameter('{{ suffix }}', $suffix) ->setCode(UPLOAD_ERR_INI_SIZE) ->addViolation(); } return; case UPLOAD_ERR_FORM_SIZE: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadFormSizeErrorMessage) ->setCode(UPLOAD_ERR_FORM_SIZE) ->addViolation(); } else { $this->buildViolation($constraint->uploadFormSizeErrorMessage) ->setCode(UPLOAD_ERR_FORM_SIZE) ->addViolation(); } return; case UPLOAD_ERR_PARTIAL: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadPartialErrorMessage) ->setCode(UPLOAD_ERR_PARTIAL) ->addViolation(); } else { $this->buildViolation($constraint->uploadPartialErrorMessage) ->setCode(UPLOAD_ERR_PARTIAL) ->addViolation(); } return; case UPLOAD_ERR_NO_FILE: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadNoFileErrorMessage) ->setCode(UPLOAD_ERR_NO_FILE) ->addViolation(); } else { $this->buildViolation($constraint->uploadNoFileErrorMessage) ->setCode(UPLOAD_ERR_NO_FILE) ->addViolation(); } return; case UPLOAD_ERR_NO_TMP_DIR: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadNoTmpDirErrorMessage) ->setCode(UPLOAD_ERR_NO_TMP_DIR) ->addViolation(); } else { $this->buildViolation($constraint->uploadNoTmpDirErrorMessage) ->setCode(UPLOAD_ERR_NO_TMP_DIR) ->addViolation(); } return; case UPLOAD_ERR_CANT_WRITE: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadCantWriteErrorMessage) ->setCode(UPLOAD_ERR_CANT_WRITE) ->addViolation(); } else { $this->buildViolation($constraint->uploadCantWriteErrorMessage) ->setCode(UPLOAD_ERR_CANT_WRITE) ->addViolation(); } return; case UPLOAD_ERR_EXTENSION: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadExtensionErrorMessage) ->setCode(UPLOAD_ERR_EXTENSION) ->addViolation(); } else { $this->buildViolation($constraint->uploadExtensionErrorMessage) ->setCode(UPLOAD_ERR_EXTENSION) ->addViolation(); } return; default: if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->uploadErrorMessage) ->setCode($value->getError()) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->notFoundMessage) ->setParameter('{{ file }}', $this->formatValue($path)) ->setCode(File::NOT_FOUND_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->notFoundMessage) ->setParameter('{{ file }}', $this->formatValue($path)) ->setCode(File::NOT_FOUND_ERROR) ->addViolation(); } return; } if (!is_readable($path)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->notReadableMessage) ->setParameter('{{ file }}', $this->formatValue($path)) ->setCode(File::NOT_READABLE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->notReadableMessage) ->setParameter('{{ file }}', $this->formatValue($path)) ->setCode(File::NOT_READABLE_ERROR) ->addViolation(); } return; } $sizeInBytes = filesize($path); if (0 === $sizeInBytes) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->disallowEmptyMessage) ->setParameter('{{ file }}', $this->formatValue($path)) ->setCode(File::EMPTY_ERROR) ->addViolation(); } else { $this->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); if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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; } } } if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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]); } } src/Symfony/Component/Validator/Constraints/GreaterThan.php000066400000000000000000000010421266465517700244440ustar00rootroot00000000000000 * * 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 */ class GreaterThan extends AbstractComparison { public $message = 'This value should be greater than {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php000066400000000000000000000010651266465517700257420ustar00rootroot00000000000000 * * 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 */ class GreaterThanOrEqual extends AbstractComparison { public $message = 'This value should be greater than or equal to {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php000066400000000000000000000011711266465517700276060ustar00rootroot00000000000000 * * 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 */ class GreaterThanOrEqualValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 >= $value2; } } src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php000066400000000000000000000011441266465517700263150ustar00rootroot00000000000000 * * 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 */ class GreaterThanValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 > $value2; } } src/Symfony/Component/Validator/Constraints/GroupSequence.php000066400000000000000000000143531266465517700250360ustar00rootroot00000000000000 * * 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\OutOfBoundsException; /** * 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('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 * * Implementing \ArrayAccess, \IteratorAggregate and \Countable is @deprecated since 2.5 and will be removed in 3.0. */ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable { /** * The groups in the sequence. * * @var string[]|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; } /** * Returns an iterator for this group. * * Implemented for backwards compatibility with Symfony < 2.5. * * @return \Traversable The iterator * * @see \IteratorAggregate::getIterator() * @deprecated since version 2.5, to be removed in 3.0. */ public function getIterator() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return new \ArrayIterator($this->groups); } /** * Returns whether the given offset exists in the sequence. * * Implemented for backwards compatibility with Symfony < 2.5. * * @param int $offset The offset * * @return bool Whether the offset exists * * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetExists($offset) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return isset($this->groups[$offset]); } /** * Returns the group at the given offset. * * Implemented for backwards compatibility with Symfony < 2.5. * * @param int $offset The offset * * @return string The group a the given offset * * @throws OutOfBoundsException If the object does not exist * * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetGet($offset) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (!isset($this->groups[$offset])) { throw new OutOfBoundsException(sprintf( 'The offset "%s" does not exist.', $offset )); } return $this->groups[$offset]; } /** * Sets the group at the given offset. * * Implemented for backwards compatibility with Symfony < 2.5. * * @param int $offset The offset * @param string $value The group name * * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetSet($offset, $value) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (null !== $offset) { $this->groups[$offset] = $value; return; } $this->groups[] = $value; } /** * Removes the group at the given offset. * * Implemented for backwards compatibility with Symfony < 2.5. * * @param int $offset The offset * * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetUnset($offset) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); unset($this->groups[$offset]); } /** * Returns the number of groups in the sequence. * * Implemented for backwards compatibility with Symfony < 2.5. * * @return int The number of groups * * @deprecated since version 2.5, to be removed in 3.0. */ public function count() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return count($this->groups); } } src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php000066400000000000000000000006631266465517700265500ustar00rootroot00000000000000 * * 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"}) */ class GroupSequenceProvider { } src/Symfony/Component/Validator/Constraints/Iban.php000066400000000000000000000027731266465517700231250ustar00rootroot00000000000000 * * 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 { /** @deprecated, to be removed in 3.0. */ const TOO_SHORT_ERROR = 1; const INVALID_COUNTRY_CODE_ERROR = 2; const INVALID_CHARACTERS_ERROR = 3; /** @deprecated, to be removed in 3.0. */ const INVALID_CASE_ERROR = 4; const CHECKSUM_FAILED_ERROR = 5; const INVALID_FORMAT_ERROR = 6; const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 7; protected static $errorNames = array( self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::INVALID_CASE_ERROR => 'INVALID_CASE_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).'; } src/Symfony/Component/Validator/Constraints/IbanValidator.php000066400000000000000000000311641266465517700247670ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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 * * @link 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 * * @link 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::INVALID_COUNTRY_CODE_ERROR) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) ->addViolation(); } else { $this->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) ) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Iban::CHECKSUM_FAILED_ERROR) ->addViolation(); } else { $this->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; } } src/Symfony/Component/Validator/Constraints/IdenticalTo.php000066400000000000000000000010741266465517700244440ustar00rootroot00000000000000 * * 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 */ class IdenticalTo extends AbstractComparison { public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/IdenticalToValidator.php000066400000000000000000000011301266465517700263030ustar00rootroot00000000000000 * * 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 */ class IdenticalToValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 === $value2; } } src/Symfony/Component/Validator/Constraints/Image.php000066400000000000000000000067071266465517700232770ustar00rootroot00000000000000 * * 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 { // Don't reuse values used in File const SIZE_NOT_DETECTED_ERROR = 10; const TOO_WIDE_ERROR = 11; const TOO_NARROW_ERROR = 12; const TOO_HIGH_ERROR = 13; const TOO_LOW_ERROR = 14; const RATIO_TOO_BIG_ERROR = 15; const RATIO_TOO_SMALL_ERROR = 16; const SQUARE_NOT_ALLOWED_ERROR = 17; const LANDSCAPE_NOT_ALLOWED_ERROR = 18; const PORTRAIT_NOT_ALLOWED_ERROR = 19; // 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', ); public $mimeTypes = 'image/*'; public $minWidth; public $maxWidth; public $maxHeight; public $minHeight; public $maxRatio; public $minRatio; public $allowSquare = true; public $allowLandscape = true; public $allowPortrait = true; // 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.'; } src/Symfony/Component/Validator/Constraints/ImageValidator.php000066400000000000000000000261261266465517700251420ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; 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) { return; } $size = @getimagesize($value); if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->sizeNotDetectedMessage) ->setCode(Image::SIZE_NOT_DETECTED_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->minWidthMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ min_width }}', $constraint->minWidth) ->setCode(Image::TOO_NARROW_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->maxWidthMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ max_width }}', $constraint->maxWidth) ->setCode(Image::TOO_WIDE_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->minHeightMessage) ->setParameter('{{ height }}', $height) ->setParameter('{{ min_height }}', $constraint->minHeight) ->setCode(Image::TOO_LOW_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->maxHeightMessage) ->setParameter('{{ height }}', $height) ->setParameter('{{ max_height }}', $constraint->maxHeight) ->setCode(Image::TOO_HIGH_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->minRatioMessage) ->setParameter('{{ ratio }}', $ratio) ->setParameter('{{ min_ratio }}', $constraint->minRatio) ->setCode(Image::RATIO_TOO_SMALL_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->maxRatioMessage) ->setParameter('{{ ratio }}', $ratio) ->setParameter('{{ max_ratio }}', $constraint->maxRatio) ->setCode(Image::RATIO_TOO_BIG_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->maxRatioMessage) ->setParameter('{{ ratio }}', $ratio) ->setParameter('{{ max_ratio }}', $constraint->maxRatio) ->setCode(Image::RATIO_TOO_BIG_ERROR) ->addViolation(); } } } if (!$constraint->allowSquare && $width == $height) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->allowSquareMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->allowSquareMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) ->addViolation(); } } if (!$constraint->allowLandscape && $width > $height) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->allowLandscapeMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->allowLandscapeMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) ->addViolation(); } } if (!$constraint->allowPortrait && $width < $height) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->allowPortraitMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->allowPortraitMessage) ->setParameter('{{ width }}', $width) ->setParameter('{{ height }}', $height) ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Ip.php000066400000000000000000000040301266465517700226100ustar00rootroot00000000000000 * * 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'; 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, ); 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))); } } } src/Symfony/Component/Validator/Constraints/IpValidator.php000066400000000000000000000063001266465517700244600ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/IsFalse.php000066400000000000000000000010471266465517700235730ustar00rootroot00000000000000 * * 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 { public $message = 'This value should be false.'; } src/Symfony/Component/Validator/Constraints/IsFalseValidator.php000066400000000000000000000026351266465517700254450ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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; } if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } src/Symfony/Component/Validator/Constraints/IsNull.php000066400000000000000000000010451266465517700234510ustar00rootroot00000000000000 * * 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 { public $message = 'This value should be null.'; } src/Symfony/Component/Validator/Constraints/IsNullValidator.php000066400000000000000000000025631266465517700253250ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/IsTrue.php000066400000000000000000000010451266465517700234560ustar00rootroot00000000000000 * * 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 { public $message = 'This value should be true.'; } src/Symfony/Component/Validator/Constraints/IsTrueValidator.php000066400000000000000000000027231266465517700253300ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Isbn.php000066400000000000000000000034471266465517700231460ustar00rootroot00000000000000 * * 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 = 1; const TOO_LONG_ERROR = 2; const INVALID_CHARACTERS_ERROR = 3; const CHECKSUM_FAILED_ERROR = 4; const TYPE_NOT_RECOGNIZED_ERROR = 5; 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; /** * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. * * @var bool */ public $isbn10 = false; /** * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. * * @var bool */ public $isbn13 = false; /** * {@inheritdoc} */ public function getDefaultOption() { return 'type'; } } src/Symfony/Component/Validator/Constraints/IsbnValidator.php000066400000000000000000000162641266465517700250150ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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); if (null === $constraint->type) { if ($constraint->isbn10 && !$constraint->isbn13) { @trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn10'; } elseif ($constraint->isbn13 && !$constraint->isbn10) { @trigger_error('The "isbn13" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn13'; } } // Explicitly validate against ISBN-10 if ('isbn10' === $constraint->type) { if (true !== ($code = $this->validateIsbn10($canonical))) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode($code) ->addViolation(); } else { $this->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))) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode($code) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($this->getMessage($constraint)) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode($code) ->addViolation(); } else { $this->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; } } src/Symfony/Component/Validator/Constraints/Issn.php000066400000000000000000000024151266465517700231610ustar00rootroot00000000000000 * * 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 = 1; const TOO_LONG_ERROR = 2; const MISSING_HYPHEN_ERROR = 3; const INVALID_CHARACTERS_ERROR = 4; const INVALID_CASE_ERROR = 5; const CHECKSUM_FAILED_ERROR = 6; 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; } src/Symfony/Component/Validator/Constraints/IssnValidator.php000066400000000000000000000150701266465517700250300ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::MISSING_HYPHEN_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::MISSING_HYPHEN_ERROR) ->addViolation(); } return; } $length = strlen($canonical); if ($length < 8) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::TOO_SHORT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::TOO_SHORT_ERROR) ->addViolation(); } return; } if ($length > 8) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::TOO_LONG_ERROR) ->addViolation(); } else { $this->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))) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->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}) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::INVALID_CHARACTERS_ERROR) ->addViolation(); } return; } // 1234567X // ^ case-sensitive? if ($constraint->caseSensitive && 'x' === $canonical{7}) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::INVALID_CASE_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::CHECKSUM_FAILED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Issn::CHECKSUM_FAILED_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Language.php000066400000000000000000000010601266465517700237630ustar00rootroot00000000000000 * * 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 { public $message = 'This value is not a valid language.'; } src/Symfony/Component/Validator/Constraints/LanguageValidator.php000066400000000000000000000035021266465517700256340ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Length.php000066400000000000000000000036001266465517700234630ustar00rootroot00000000000000 * * 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 = 1; const TOO_LONG_ERROR = 2; protected static $errorNames = array( self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_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')); } } } src/Symfony/Component/Validator/Constraints/LengthValidator.php000066400000000000000000000122761266465517700253420ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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; $invalidCharset = false; if ('UTF8' === $charset = strtoupper($constraint->charset)) { $charset = 'UTF-8'; } if ('UTF-8' === $charset) { if (!preg_match('//u', $stringValue)) { $invalidCharset = true; } elseif (function_exists('utf8_decode')) { $length = strlen(utf8_decode($stringValue)); } else { preg_replace('/./u', '', $stringValue, -1, $length); } } elseif (function_exists('mb_strlen')) { if (@mb_check_encoding($stringValue, $constraint->charset)) { $length = mb_strlen($stringValue, $constraint->charset); } else { $invalidCharset = true; } } elseif (function_exists('iconv_strlen')) { $length = @iconv_strlen($stringValue, $constraint->charset); $invalidCharset = false === $length; } else { $length = strlen($stringValue); } if ($invalidCharset) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->charsetMessage) ->setParameter('{{ value }}', $this->formatValue($stringValue)) ->setParameter('{{ charset }}', $constraint->charset) ->setInvalidValue($value) ->addViolation(); } else { $this->buildViolation($constraint->charsetMessage) ->setParameter('{{ value }}', $this->formatValue($stringValue)) ->setParameter('{{ charset }}', $constraint->charset) ->setInvalidValue($value) ->addViolation(); } return; } if (null !== $constraint->max && $length > $constraint->max) { if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $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(); } else { $this->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(); } } } } src/Symfony/Component/Validator/Constraints/LessThan.php000066400000000000000000000010341266465517700237620ustar00rootroot00000000000000 * * 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 */ class LessThan extends AbstractComparison { public $message = 'This value should be less than {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php000066400000000000000000000010571266465517700252600ustar00rootroot00000000000000 * * 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 */ class LessThanOrEqual extends AbstractComparison { public $message = 'This value should be less than or equal to {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php000066400000000000000000000011631266465517700271240ustar00rootroot00000000000000 * * 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 */ class LessThanOrEqualValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 <= $value2; } } src/Symfony/Component/Validator/Constraints/LessThanValidator.php000066400000000000000000000011361266465517700256330ustar00rootroot00000000000000 * * 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 */ class LessThanValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 < $value2; } } src/Symfony/Component/Validator/Constraints/Locale.php000066400000000000000000000010541266465517700234420ustar00rootroot00000000000000 * * 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 { public $message = 'This value is not a valid locale.'; } src/Symfony/Component/Validator/Constraints/LocaleValidator.php000066400000000000000000000034621266465517700253150ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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(); if (!isset($locales[$value])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Luhn.php000066400000000000000000000017231266465517700231540ustar00rootroot00000000000000 * * 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 = 1; const CHECKSUM_FAILED_ERROR = 2; protected static $errorNames = array( self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', ); public $message = 'Invalid card number.'; } src/Symfony/Component/Validator/Constraints/LuhnValidator.php000066400000000000000000000077231266465517700250300ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Luhn::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Luhn::CHECKSUM_FAILED_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Luhn::CHECKSUM_FAILED_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/NotBlank.php000066400000000000000000000010541266465517700237530ustar00rootroot00000000000000 * * 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 { public $message = 'This value should not be blank.'; } src/Symfony/Component/Validator/Constraints/NotBlankValidator.php000066400000000000000000000026361266465517700256300ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/NotEqualTo.php000066400000000000000000000010411266465517700242720ustar00rootroot00000000000000 * * 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 */ class NotEqualTo extends AbstractComparison { public $message = 'This value should not be equal to {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/NotEqualToValidator.php000066400000000000000000000011271266465517700261450ustar00rootroot00000000000000 * * 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 */ class NotEqualToValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 != $value2; } } src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php000066400000000000000000000011031266465517700251160ustar00rootroot00000000000000 * * 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 */ class NotIdenticalTo extends AbstractComparison { public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; } src/Symfony/Component/Validator/Constraints/NotIdenticalToValidator.php000066400000000000000000000011361266465517700267720ustar00rootroot00000000000000 * * 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 */ class NotIdenticalToValidator extends AbstractComparisonValidator { /** * {@inheritdoc} */ protected function compareValues($value1, $value2) { return $value1 !== $value2; } } src/Symfony/Component/Validator/Constraints/NotNull.php000066400000000000000000000010521266465517700236340ustar00rootroot00000000000000 * * 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 { public $message = 'This value should not be null.'; } src/Symfony/Component/Validator/Constraints/NotNullValidator.php000066400000000000000000000016401266465517700255050ustar00rootroot00000000000000 * * 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->addViolation($constraint->message); } } } src/Symfony/Component/Validator/Constraints/Null.php000066400000000000000000000013051266465517700231540ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsNull instead. */ class Null extends IsNull { } src/Symfony/Component/Validator/Constraints/NullValidator.php000066400000000000000000000012571266465517700250300ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsNullValidator instead. */ class NullValidator extends IsNullValidator { } src/Symfony/Component/Validator/Constraints/Optional.php000066400000000000000000000006571266465517700240400ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Constraints/Range.php000066400000000000000000000026571266465517700233110ustar00rootroot00000000000000 * * 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_VALUE_ERROR = 1; const BEYOND_RANGE_ERROR = 2; const BELOW_RANGE_ERROR = 3; protected static $errorNames = array( self::INVALID_VALUE_ERROR => 'INVALID_VALUE_ERROR', self::BEYOND_RANGE_ERROR => 'BEYOND_RANGE_ERROR', self::BELOW_RANGE_ERROR => 'BELOW_RANGE_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')); } } } src/Symfony/Component/Validator/Constraints/RangeValidator.php000066400000000000000000000077731266465517700251630ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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 \DateTime && !$value instanceof \DateTimeInterface) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->invalidMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setCode(Range::INVALID_VALUE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->invalidMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setCode(Range::INVALID_VALUE_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 \DateTime || $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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->maxMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) ->setCode(Range::BEYOND_RANGE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->maxMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) ->setCode(Range::BEYOND_RANGE_ERROR) ->addViolation(); } return; } if (null !== $constraint->min && $value < $min) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->minMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) ->setCode(Range::BELOW_RANGE_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->minMessage) ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) ->setCode(Range::BELOW_RANGE_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Regex.php000066400000000000000000000051411266465517700233160ustar00rootroot00000000000000 * * 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 { 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. * * @link 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; } } src/Symfony/Component/Validator/Constraints/RegexValidator.php000066400000000000000000000034611266465517700251670ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Required.php000066400000000000000000000006571266465517700240330ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Constraints/Time.php000066400000000000000000000014311266465517700231400ustar00rootroot00000000000000 * * 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 = 1; const INVALID_TIME_ERROR = 2; 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.'; } src/Symfony/Component/Validator/Constraints/TimeValidator.php000066400000000000000000000057101266465517700250120ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Time::INVALID_FORMAT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Time::INVALID_FORMAT_ERROR) ->addViolation(); } return; } if (!self::checkTime($matches[1], $matches[2], $matches[3])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Time::INVALID_TIME_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Time::INVALID_TIME_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Traverse.php000066400000000000000000000022261266465517700240400ustar00rootroot00000000000000 * * 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 * * @since 2.5 * * @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; } } src/Symfony/Component/Validator/Constraints/True.php000066400000000000000000000013051266465517700231610ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\True class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsTrue instead. */ class True extends IsTrue { } src/Symfony/Component/Validator/Constraints/TrueValidator.php000066400000000000000000000012571266465517700250350ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; @trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek * * @deprecated since version 2.7, to be removed in 3.0. Use IsTrueValidator instead. */ class TrueValidator extends IsTrueValidator { } src/Symfony/Component/Validator/Constraints/Type.php000066400000000000000000000014541266465517700231700ustar00rootroot00000000000000 * * 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 { public $message = 'This value should be of type {{ type }}.'; public $type; /** * {@inheritdoc} */ public function getDefaultOption() { return 'type'; } /** * {@inheritdoc} */ public function getRequiredOptions() { return array('type'); } } src/Symfony/Component/Validator/Constraints/TypeValidator.php000066400000000000000000000036551266465517700250430ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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; } if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setParameter('{{ type }}', $constraint->type) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setParameter('{{ type }}', $constraint->type) ->addViolation(); } } } src/Symfony/Component/Validator/Constraints/Url.php000066400000000000000000000012601266465517700230040ustar00rootroot00000000000000 * * 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 { 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; } src/Symfony/Component/Validator/Constraints/UrlValidator.php000066400000000000000000000117101266465517700246530ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; 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]|xn\-\-[\pL\pN-]+)+\.?) # a domain name | # or \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # a 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})))?::)))) \] # a 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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } return; } if ($constraint->checkDNS) { $host = parse_url($value, PHP_URL_HOST); if (!checkdnsrr($host, 'ANY')) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->dnsMessage) ->setParameter('{{ value }}', $this->formatValue($host)) ->addViolation(); } else { $this->buildViolation($constraint->dnsMessage) ->setParameter('{{ value }}', $this->formatValue($host)) ->addViolation(); } } } } } src/Symfony/Component/Validator/Constraints/Uuid.php000066400000000000000000000037701266465517700231600ustar00rootroot00000000000000 * * 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 = 1; const TOO_LONG_ERROR = 2; const INVALID_CHARACTERS_ERROR = 3; const INVALID_HYPHEN_PLACEMENT_ERROR = 4; const INVALID_VERSION_ERROR = 5; const INVALID_VARIANT_ERROR = 6; 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, ); } src/Symfony/Component/Validator/Constraints/UuidValidator.php000066400000000000000000000314131266465517700250210ustar00rootroot00000000000000 * * 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\Context\ExecutionContextInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Constraints\Deprecated\UuidValidator as Deprecated; 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; /** * @deprecated since version 2.6, to be removed in 3.0 */ const STRICT_PATTERN = '/^[a-f0-9]{8}-[a-f0-9]{4}-[%s][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i'; /** * @deprecated since version 2.6, to be removed in 3.0 */ const LOOSE_PATTERN = '/^[a-f0-9]{4}(?:-?[a-f0-9]{4}){7}$/i'; /** * @deprecated since version 2.6, to be removed in 3.0 */ const STRICT_UUID_LENGTH = 36; /** * {@inheritdoc} */ public function validate($value, Constraint $constraint) { 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->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})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::TOO_SHORT_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) ->addViolation(); } else { $this->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})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_CHARACTERS_ERROR) ->addViolation(); } return; } } // Check length again if (isset($trimmed{$i})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::TOO_LONG_ERROR) ->addViolation(); } else { $this->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})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::TOO_SHORT_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter( '{{ value }}', $this->formatValue($value) ) ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) ->addViolation(); } else { $this->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})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_CHARACTERS_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_CHARACTERS_ERROR) ->addViolation(); } return; } // Missing hyphen if ($i === $h) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) ->addViolation(); } return; } } // Check length again if (isset($value{$i})) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::TOO_LONG_ERROR) ->addViolation(); } else { $this->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)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_VERSION_ERROR) ->addViolation(); } else { $this->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) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_VARIANT_ERROR) ->addViolation(); } else { $this->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Uuid::INVALID_VARIANT_ERROR) ->addViolation(); } } } } src/Symfony/Component/Validator/Constraints/Valid.php000066400000000000000000000026341266465517700233070ustar00rootroot00000000000000 * * 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; /** * @deprecated since version 2.5, to be removed in Symfony 3.0. */ public $deep = 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__ )); } if (is_array($options) && array_key_exists('deep', $options)) { @trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); } parent::__construct($options); } } src/Symfony/Component/Validator/Context/000077500000000000000000000000001266465517700206475ustar00rootroot00000000000000src/Symfony/Component/Validator/Context/ExecutionContext.php000066400000000000000000000277631266465517700247070ustar00rootroot00000000000000 * * 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\ClassBasedInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\Mapping\MetadataInterface; use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; use Symfony\Component\Validator\Util\PropertyPath; use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; /** * The context used and created by {@link ExecutionContextFactory}. * * @since 2.5 * * @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(), $invalidValue = null, $plural = null, $code = null) { // The parameters $invalidValue and following are ignored by the new // API, as they are not present in the new interface anymore. // You should use buildViolation() instead. if (func_num_args() > 2) { @trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); $this ->buildViolation($message, $parameters) ->setInvalidValue($invalidValue) ->setPlural($plural) ->setCode($code) ->addViolation() ; return; } $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; } /** * {@inheritdoc} */ public function getClassName() { return $this->metadata instanceof ClassBasedInterface ? $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 addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); if (func_num_args() > 2) { $this ->buildViolation($message, $parameters) ->atPath($subPath) ->setInvalidValue($invalidValue) ->setPlural($plural) ->setCode($code) ->addViolation() ; return; } $this ->buildViolation($message, $parameters) ->atPath($subPath) ->addViolation() ; } /** * {@inheritdoc} */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); if (is_array($value)) { // The $traverse flag is ignored for arrays $constraint = new Valid(array('traverse' => true, 'deep' => $deep)); return $this ->getValidator() ->inContext($this) ->atPath($subPath) ->validate($value, $constraint, $groups) ; } if ($traverse && $value instanceof \Traversable) { $constraint = new Valid(array('traverse' => true, 'deep' => $deep)); return $this ->getValidator() ->inContext($this) ->atPath($subPath) ->validate($value, $constraint, $groups) ; } return $this ->getValidator() ->inContext($this) ->atPath($subPath) ->validate($value, null, $groups) ; } /** * {@inheritdoc} */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); return $this ->getValidator() ->inContext($this) ->atPath($subPath) ->validate($value, $constraints, $groups) ; } /** * {@inheritdoc} */ public function getMetadataFactory() { @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); $validator = $this->getValidator(); if ($validator instanceof LegacyValidatorInterface) { return $validator->getMetadataFactory(); } // The ValidatorInterface extends from the deprecated MetadataFactoryInterface, so return it when we don't have the factory instance itself return $validator; } /** * {@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]); } } src/Symfony/Component/Validator/Context/ExecutionContextFactory.php000066400000000000000000000033041266465517700262200ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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 ); } } src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php000066400000000000000000000020501266465517700300360ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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); } src/Symfony/Component/Validator/Context/ExecutionContextInterface.php000066400000000000000000000170471266465517700265220ustar00rootroot00000000000000 * * 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\ExecutionContextInterface as LegacyExecutionContextInterface; use Symfony\Component\Validator\Mapping\MetadataInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; /** * 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. * * @since 2.5 * * @author Bernhard Schussek */ interface ExecutionContextInterface extends LegacyExecutionContextInterface { /** * 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); } src/Symfony/Component/Validator/Context/LegacyExecutionContext.php000066400000000000000000000030311266465517700260120ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Context; @trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; /** * An execution context that is compatible with the legacy API (< 2.5). * * @since 2.5 * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyExecutionContext extends ExecutionContext { /** * @var MetadataFactoryInterface */ private $metadataFactory; /** * Creates a new context. * * @see ExecutionContext::__construct() * * @internal Called by {@link LegacyExecutionContextFactory}. Should not be used * in user code. */ public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) { parent::__construct( $validator, $root, $translator, $translationDomain ); $this->metadataFactory = $metadataFactory; } } src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php000066400000000000000000000043301266465517700273450ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Context; @trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; /** * Creates new {@link LegacyExecutionContext} instances. * * Implemented for backward compatibility with Symfony < 2.5. * * @since 2.5 * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface { /** * @var MetadataFactoryInterface */ private $metadataFactory; /** * @var TranslatorInterface */ private $translator; /** * @var string|null */ private $translationDomain; /** * Creates a new context factory. * * @param MetadataFactoryInterface $metadataFactory The metadata factory * @param TranslatorInterface $translator The translator * @param string|null $translationDomain The translation domain * to use for translating * violation messages */ public function __construct(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) { $this->metadataFactory = $metadataFactory; $this->translator = $translator; $this->translationDomain = $translationDomain; } /** * {@inheritdoc} */ public function createContext(ValidatorInterface $validator, $root) { return new LegacyExecutionContext( $validator, $root, $this->metadataFactory, $this->translator, $this->translationDomain ); } } src/Symfony/Component/Validator/DefaultTranslator.php000066400000000000000000000127371266465517700234040ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; @trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\BadMethodCallException; use Symfony\Component\Validator\Exception\InvalidArgumentException; /** * Simple translator implementation that simply replaces the parameters in * the message IDs. * * Example usage: * * $translator = new DefaultTranslator(); * * echo $translator->trans( * 'This is a {{ var }}.', * array('{{ var }}' => 'donkey') * ); * * // -> This is a donkey. * * echo $translator->transChoice( * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', * 3, * array('{{ count }}' => 'three') * ); * * // -> These are three donkeys. * * This translator does not support message catalogs, translation domains or * locales. Instead, it implements a subset of the capabilities of * {@link \Symfony\Component\Translation\Translator} and can be used in places * where translation is not required by default but should be optional. * * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead. * * @author Bernhard Schussek */ class DefaultTranslator implements TranslatorInterface { /** * Interpolates the given message. * * Parameters are replaced in the message in the same manner that * {@link strtr()} uses. * * Example usage: * * $translator = new DefaultTranslator(); * * echo $translator->trans( * 'This is a {{ var }}.', * array('{{ var }}' => 'donkey') * ); * * // -> This is a donkey. * * @param string $id The message id * @param array $parameters An array of parameters for the message * @param string $domain Ignored * @param string $locale Ignored * * @return string The interpolated string */ public function trans($id, array $parameters = array(), $domain = null, $locale = null) { return strtr($id, $parameters); } /** * Interpolates the given choice message by choosing a variant according to a number. * * The variants are passed in the message ID using the format * "|". "" is chosen if the passed $number is * exactly 1. "" is chosen otherwise. * * This format is consistent with the format supported by * {@link \Symfony\Component\Translation\Translator}, but it does not * have the same expressiveness. While Translator supports intervals in * message translations, which are needed for languages other than English, * this translator does not. You should use Translator or a custom * implementation of {@link \Symfony\Component\Translation\TranslatorInterface} if you need this or similar * functionality. * * Example usage: * * echo $translator->transChoice( * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', * 0, * array('{{ count }}' => 0) * ); * * // -> These are 0 donkeys. * * echo $translator->transChoice( * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', * 1, * array('{{ count }}' => 1) * ); * * // -> This is 1 donkey. * * echo $translator->transChoice( * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', * 3, * array('{{ count }}' => 3) * ); * * // -> These are 3 donkeys. * * @param string $id The message id * @param int $number The number to use to find the index of the message * @param array $parameters An array of parameters for the message * @param string $domain Ignored * @param string $locale Ignored * * @return string The translated string * * @throws InvalidArgumentException If the message id does not have the format * "singular|plural". */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { $ids = explode('|', $id); if (1 == $number) { return strtr($ids[0], $parameters); } if (!isset($ids[1])) { throw new InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (e.g. "There is one apple|There are %%count%% apples").', $id)); } return strtr($ids[1], $parameters); } /** * Not supported. * * @param string $locale The locale * * @throws BadMethodCallException */ public function setLocale($locale) { throw new BadMethodCallException('Unsupported method.'); } /** * Returns the locale of the translator. * * @return string Always returns 'en' */ public function getLocale() { return 'en'; } } src/Symfony/Component/Validator/Exception/000077500000000000000000000000001266465517700211615ustar00rootroot00000000000000src/Symfony/Component/Validator/Exception/BadMethodCallException.php000066400000000000000000000007711266465517700262010ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/ConstraintDefinitionException.php000066400000000000000000000005431266465517700277100ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/ExceptionInterface.php000066400000000000000000000006671266465517700254620ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/GroupDefinitionException.php000066400000000000000000000005361266465517700266620ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/InvalidArgumentException.php000066400000000000000000000007771266465517700266550ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/InvalidOptionsException.php000066400000000000000000000011221266465517700265070ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Exception/MappingException.php000066400000000000000000000005261266465517700251470ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/MissingOptionsException.php000066400000000000000000000011221266465517700265320ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Exception/NoSuchMetadataException.php000066400000000000000000000006301266465517700264100ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/OutOfBoundsException.php000066400000000000000000000007631266465517700257660ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/RuntimeException.php000066400000000000000000000007471266465517700252040ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Exception/UnexpectedTypeException.php000066400000000000000000000010741266465517700265210ustar00rootroot00000000000000 * * 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))); } } src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php000066400000000000000000000006651266465517700275510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Exception; /** * @since 2.5 * * @author Bernhard Schussek */ class UnsupportedMetadataException extends InvalidArgumentException { } src/Symfony/Component/Validator/Exception/ValidatorException.php000066400000000000000000000005261266465517700255010ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/ExecutionContext.php000066400000000000000000000210571266465517700232510ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; @trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; /** * Default implementation of {@link ExecutionContextInterface}. * * This class is immutable by design. * * @author Fabien Potencier * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContext} instead. */ class ExecutionContext implements ExecutionContextInterface { /** * @var GlobalExecutionContextInterface */ private $globalContext; /** * @var TranslatorInterface */ private $translator; /** * @var null|string */ private $translationDomain; /** * @var MetadataInterface */ private $metadata; /** * @var mixed */ private $value; /** * @var string */ private $group; /** * @var string */ private $propertyPath; /** * Creates a new execution context. * * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state. * @param TranslatorInterface $translator The translator for translating violation messages. * @param null|string $translationDomain The domain of the validation messages. * @param MetadataInterface $metadata The metadata of the validated node. * @param mixed $value The value of the validated node. * @param string $group The current validation group. * @param string $propertyPath The property path to the current node. */ public function __construct(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = null, MetadataInterface $metadata = null, $value = null, $group = null, $propertyPath = '') { if (null === $group) { $group = Constraint::DEFAULT_GROUP; } $this->globalContext = $globalContext; $this->translator = $translator; $this->translationDomain = $translationDomain; $this->metadata = $metadata; $this->value = $value; $this->propertyPath = $propertyPath; $this->group = $group; } /** * {@inheritdoc} */ public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null) { if (null === $plural) { $translatedMessage = $this->translator->trans($message, $params, $this->translationDomain); } else { try { $translatedMessage = $this->translator->transChoice($message, $plural, $params, $this->translationDomain); } catch (\InvalidArgumentException $e) { $translatedMessage = $this->translator->trans($message, $params, $this->translationDomain); } } $this->globalContext->getViolations()->add(new ConstraintViolation( $translatedMessage, $message, $params, $this->globalContext->getRoot(), $this->propertyPath, // check using func_num_args() to allow passing null values func_num_args() >= 3 ? $invalidValue : $this->value, $plural, $code )); } /** * {@inheritdoc} */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { $this->globalContext->getViolations()->add(new ConstraintViolation( null === $plural ? $this->translator->trans($message, $parameters, $this->translationDomain) : $this->translator->transChoice($message, $plural, $parameters, $this->translationDomain), $message, $parameters, $this->globalContext->getRoot(), $this->getPropertyPath($subPath), // check using func_num_args() to allow passing null values func_num_args() >= 4 ? $invalidValue : $this->value, $plural, $code )); } /** * {@inheritdoc} */ public function getViolations() { return $this->globalContext->getViolations(); } /** * {@inheritdoc} */ public function getRoot() { return $this->globalContext->getRoot(); } /** * {@inheritdoc} */ public function getPropertyPath($subPath = '') { if ('' != $subPath && '' !== $this->propertyPath && '[' !== $subPath[0]) { return $this->propertyPath.'.'.$subPath; } return $this->propertyPath.$subPath; } /** * {@inheritdoc} */ public function getClassName() { if ($this->metadata instanceof ClassBasedInterface) { return $this->metadata->getClassName(); } } /** * {@inheritdoc} */ public function getPropertyName() { if ($this->metadata instanceof PropertyMetadataInterface) { return $this->metadata->getPropertyName(); } } /** * {@inheritdoc} */ public function getValue() { return $this->value; } /** * {@inheritdoc} */ public function getGroup() { return $this->group; } /** * {@inheritdoc} */ public function getMetadata() { return $this->metadata; } /** * {@inheritdoc} */ public function getMetadataFor($value) { return $this->globalContext->getMetadataFactory()->getMetadataFor($value); } /** * {@inheritdoc} */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) { $propertyPath = $this->getPropertyPath($subPath); foreach ($this->resolveGroups($groups) as $group) { $this->globalContext->getVisitor()->validate($value, $group, $propertyPath, $traverse, $deep); } } /** * {@inheritdoc} */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { $constraints = is_array($constraints) ? $constraints : array($constraints); if (null === $groups && '' === $subPath) { $context = clone $this; $context->value = $value; $context->executeConstraintValidators($value, $constraints); return; } $propertyPath = $this->getPropertyPath($subPath); foreach ($this->resolveGroups($groups) as $group) { $context = clone $this; $context->value = $value; $context->group = $group; $context->propertyPath = $propertyPath; $context->executeConstraintValidators($value, $constraints); } } /** * {@inheritdoc} */ public function getMetadataFactory() { return $this->globalContext->getMetadataFactory(); } /** * Executes the validators of the given constraints for the given value. * * @param mixed $value The value to validate. * @param Constraint[] $constraints The constraints to match against. */ private function executeConstraintValidators($value, array $constraints) { foreach ($constraints as $constraint) { $validator = $this->globalContext->getValidatorFactory()->getInstance($constraint); $validator->initialize($this); $validator->validate($value, $constraint); } } /** * Returns an array of group names. * * @param null|string|string[] $groups The groups to resolve. If a single string is * passed, it is converted to an array. If null * is passed, an array containing the current * group of the context is returned. * * @return array An array of validation groups. */ private function resolveGroups($groups) { return $groups ? (array) $groups : (array) $this->group; } } src/Symfony/Component/Validator/ExecutionContextInterface.php000066400000000000000000000320351266465517700250700ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Stores the validator's state during validation. * * For example, let's validate the following object graph: * *
     * (Person)---($firstName: string)
     *      \
     *   ($address: Address)---($street: string)
     * 
    * * We validate the Person instance, which becomes the "root" of the * validation run (see {@link getRoot}). The state of the context after the * first step will be like this: * *
     * (Person)---($firstName: string)
     *    ^ \
     *   ($address: Address)---($street: string)
     * 
    * * The validator is stopped at the Person node, both the root and the * value (see {@link getValue}) of the context point to the Person * instance. The property path is empty at this point (see {@link getPropertyPath}). * The metadata of the context is the metadata of the Person node * (see {@link getMetadata}). * * After advancing to the property $firstName of the Person * instance, the state of the context looks like this: * *
     * (Person)---($firstName: string)
     *      \              ^
     *   ($address: Address)---($street: string)
     * 
    * * The validator is stopped at the property $firstName. The root still * points to the Person instance, because this is where the validation * started. The property path is now "firstName" and the current value is the * value of that property. * * After advancing to the $address property and then to the * $street property of the Address instance, the context state * looks like this: * *
     * (Person)---($firstName: string)
     *      \
     *   ($address: Address)---($street: string)
     *                               ^
     * 
    * * The validator is stopped at the property $street. The root still * points to the Person instance, but the property path is now * "address.street" and the validated value is the value of that property. * * Apart from the root, the property path and the currently validated value, * the execution context also knows the metadata of the current node (see * {@link getMetadata}) which for example returns a {@link Mapping\PropertyMetadata} * or a {@link Mapping\ClassMetadata} object. he context also contains the * validation group that is currently being validated (see {@link getGroup}) and * the violations that happened up until now (see {@link getViolations}). * * Apart from reading the execution context, you can also use * {@link addViolation} or {@link addViolationAt} to add new violations and * {@link validate} or {@link validateValue} to validate values that the * validator otherwise would not reach. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface} instead. */ interface ExecutionContextInterface { /** * Adds a violation at the current node of the validation graph. * * Note: the parameters $invalidValue, $plural and $code are deprecated since version 2.5 and will be removed in 3.0. * * @param string $message The error message * @param array $params The parameters substituted in the error message * @param mixed $invalidValue The invalid, validated value * @param int|null $plural The number to use to pluralize of the message * @param int|null $code The violation code */ public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null); /** * Adds a violation at the validation graph node with the given property * path relative to the current property path. * * @param string $subPath The relative property path for the violation * @param string $message The error message * @param array $parameters The parameters substituted in the error message * @param mixed $invalidValue The invalid, validated value * @param int|null $plural The number to use to pluralize of the message * @param int|null $code The violation code * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::buildViolation()} * instead. */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null); /** * Validates the given value within the scope of the current validation. * * The value may be any value recognized by the used metadata factory * (see {@link MetadataFactoryInterface::getMetadata}), or an array or a * traversable object of such values. * * Usually you validate a value that is not the current node of the * execution context. For this case, you can pass the {@link $subPath} * argument which is appended to the current property path when a violation * is created. For example, take the following object graph: * *
         * (Person)---($address: Address)---($phoneNumber: PhoneNumber)
         *                     ^
         * 
    * * When the execution context stops at the Person instance, the * property path is "address". When you validate the PhoneNumber * instance now, pass "phoneNumber" as sub path to correct the property path * to "address.phoneNumber": * *
         * $context->validate($address->phoneNumber, 'phoneNumber');
         * 
    * * Any violations generated during the validation will be added to the * violation list that you can access with {@link getViolations}. * * @param mixed $value The value to validate. * @param string $subPath The path to append to the context's property path. * @param null|string|string[] $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * @param bool $traverse Whether to traverse the value if it is an array * or an instance of \Traversable. * @param bool $deep Whether to traverse the value recursively if * it is a collection of collections. * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead. */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false); /** * Validates a value against a constraint. * * Use the parameter $subPath to adapt the property path for the * validated value. For example, take the following object graph: * *
         * (Person)---($address: Address)---($street: string)
         *                     ^
         * 
    * * When the validator validates the Address instance, the * property path stored in the execution context is "address". When you * manually validate the property $street now, pass the sub path * "street" to adapt the full property path to "address.street": * *
         * $context->validate($address->street, new NotNull(), 'street');
         * 
    * * @param mixed $value The value to validate. * @param Constraint|Constraint[] $constraints The constraint(s) to validate against. * @param string $subPath The path to append to the context's property path. * @param null|string|string[] $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead. */ public function validateValue($value, $constraints, $subPath = '', $groups = null); /** * 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\ClassMetadata} 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 used metadata factory. * * @return MetadataFactoryInterface The metadata factory. * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead and call * {@link Validator\ValidatorInterface::getMetadataFor()} or * {@link Validator\ValidatorInterface::hasMetadataFor()} there. */ public function getMetadataFactory(); /** * 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 ClassBasedInterface} 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 = ''); } src/Symfony/Component/Validator/GlobalExecutionContextInterface.php000066400000000000000000000040241266465517700262060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Stores the node-independent state of a validation run. * * When the validator validates a graph of objects, it uses two classes to * store the state during the validation: * *
      *
    • For each node in the validation graph (objects, properties, getters) the * validator creates an instance of {@link ExecutionContextInterface} that * stores the information about that node.
    • *
    • One single GlobalExecutionContextInterface stores the state * that is independent of the current node.
    • *
    * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface} instead. */ interface GlobalExecutionContextInterface { /** * Returns the violations generated by the validator so far. * * @return ConstraintViolationListInterface A list of constraint violations. */ public function getViolations(); /** * Returns the value at which validation was started in the object graph. * * @return mixed The root value. * * @see ExecutionContextInterface::getRoot() */ public function getRoot(); /** * Returns the visitor instance used to validate the object graph nodes. * * @return ValidationVisitorInterface The validation visitor. */ public function getVisitor(); /** * Returns the factory for constraint validators. * * @return ConstraintValidatorFactoryInterface The constraint validator factory. */ public function getValidatorFactory(); /** * Returns the factory for validation metadata objects. * * @return MetadataFactoryInterface The metadata factory. */ public function getMetadataFactory(); } src/Symfony/Component/Validator/GroupSequenceProviderInterface.php000066400000000000000000000011251266465517700260540ustar00rootroot00000000000000 * * 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(); } src/Symfony/Component/Validator/LICENSE000066400000000000000000000020511266465517700202260ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Validator/Mapping/000077500000000000000000000000001266465517700206165ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php000066400000000000000000000016751266465517700262150ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Mapping; @trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as MappingBlackHoleMetadataFactory; /** * Alias of {@link Factory\BlackHoleMetadataFactory}. * * @author Fabien Potencier * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Factory\BlackHoleMetadataFactory} instead. */ class BlackholeMetadataFactory extends MappingBlackHoleMetadataFactory { } src/Symfony/Component/Validator/Mapping/Cache/000077500000000000000000000000001266465517700216215ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php000066400000000000000000000027531266465517700237700ustar00rootroot00000000000000 * * 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; @trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\ClassMetadata; /** * @deprecated since version 2.5, to be removed in 3.0. * Use DoctrineCache with \Doctrine\Common\Cache\ApcCache instead. */ class ApcCache implements CacheInterface { private $prefix; public function __construct($prefix) { if (!extension_loaded('apc')) { throw new \RuntimeException('Unable to use ApcCache to cache validator mappings as APC is not enabled.'); } $this->prefix = $prefix; } public function has($class) { if (!function_exists('apc_exists')) { $exists = false; apc_fetch($this->prefix.$class, $exists); return $exists; } return apc_exists($this->prefix.$class); } public function read($class) { return apc_fetch($this->prefix.$class); } public function write(ClassMetadata $metadata) { apc_store($this->prefix.$metadata->getClassName(), $metadata); } } src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php000066400000000000000000000020511266465517700251540ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php000066400000000000000000000025401266465517700250260ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Mapping/CascadingStrategy.php000066400000000000000000000026361266465517700247350ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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() { } } src/Symfony/Component/Validator/Mapping/ClassMetadata.php000066400000000000000000000411601266465517700240370ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\ValidationVisitorInterface; /** * Default implementation of {@link ClassMetadataInterface}. * * This class supports serialization and cloning. * * @author Bernhard Schussek * @author Fabien Potencier */ class ClassMetadata extends ElementMetadata 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} * * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (null === $propagatedGroup && Constraint::DEFAULT_GROUP === $group && ($this->hasGroupSequence() || $this->isGroupSequenceProvider())) { if ($this->hasGroupSequence()) { $groups = $this->getGroupSequence()->groups; } else { $groups = $value->getGroupSequence(); } foreach ($groups as $group) { $this->accept($visitor, $value, $group, $propertyPath, Constraint::DEFAULT_GROUP); if (count($visitor->getViolations()) > 0) { break; } } return; } $visitor->visit($this, $value, $group, $propertyPath); if (null !== $value) { $pathPrefix = empty($propertyPath) ? '' : $propertyPath.'.'; foreach ($this->getConstrainedProperties() as $property) { foreach ($this->getPropertyMetadata($property) as $member) { $member->accept($visitor, $member->getPropertyValue($value), $group, $pathPrefix.$property, $propagatedGroup); } } } } /** * {@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 ClassMetadata This object */ 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 ClassMetadata */ 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 * * @return ClassMetadata This object */ 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; } /** * @param string $property * @param Constraint[] $constraints * * @return ClassMetadata */ public function addGetterConstraints($property, array $constraints) { foreach ($constraints as $constraint) { $this->addGetterConstraint($property, $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) { $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; } } } } } /** * Adds a member metadata. * * @param MemberMetadata $metadata * * @deprecated since version 2.6, to be removed in 3.0. */ protected function addMemberMetadata(MemberMetadata $metadata) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addPropertyMetadata() method instead.', E_USER_DEPRECATED); $this->addPropertyMetadata($metadata); } /** * Returns true if metadatas of members is present for the given property. * * @param string $property The name of the property * * @return bool * * @deprecated since version 2.6, to be removed in 3.0. Use {@link hasPropertyMetadata} instead. */ public function hasMemberMetadatas($property) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasPropertyMetadata() method instead.', E_USER_DEPRECATED); return $this->hasPropertyMetadata($property); } /** * Returns all metadatas of members describing the given property. * * @param string $property The name of the property * * @return MemberMetadata[] An array of MemberMetadata * * @deprecated since version 2.6, to be removed in 3.0. Use {@link getPropertyMetadata} instead. */ public function getMemberMetadatas($property) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getPropertyMetadata() method instead.', E_USER_DEPRECATED); return $this->getPropertyMetadata($property); } /** * {@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 ClassMetadata * * @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; } } src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php000066400000000000000000000016071266465517700253710ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Mapping; @trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; /** * Alias of {@link LazyLoadingMetadataFactory}. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link LazyLoadingMetadataFactory} instead. */ class ClassMetadataFactory extends LazyLoadingMetadataFactory { } src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php000066400000000000000000000053201266465517700256560ustar00rootroot00000000000000 * * 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\ClassBasedInterface; use Symfony\Component\Validator\PropertyMetadataContainerInterface as LegacyPropertyMetadataContainerInterface; /** * 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. * * @since 2.5 * * @author Bernhard Schussek * * @see MetadataInterface * @see \Symfony\Component\Validator\Constraints\GroupSequence * @see \Symfony\Component\Validator\GroupSequenceProviderInterface * @see TraversalStrategy */ interface ClassMetadataInterface extends MetadataInterface, LegacyPropertyMetadataContainerInterface, ClassBasedInterface { /** * 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(); } src/Symfony/Component/Validator/Mapping/ElementMetadata.php000066400000000000000000000016271266465517700243670ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Mapping; /** * Contains the metadata of a structural element. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Extend {@link GenericMetadata} instead. */ abstract class ElementMetadata extends GenericMetadata { public function __construct() { if (!$this instanceof MemberMetadata && !$this instanceof ClassMetadata) { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); } } } src/Symfony/Component/Validator/Mapping/Factory/000077500000000000000000000000001266465517700222255ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Factory/BlackHoleMetadataFactory.php000066400000000000000000000016311266465517700275540ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php000066400000000000000000000122351266465517700301470ustar00rootroot00000000000000 * * 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\ClassMetadataInterface; use Symfony\Component\Validator\Mapping\Loader\LoaderChain; 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 !== ($this->loadedClasses[$class] = $this->cache->read($class))) { return $this->loadedClasses[$class]; } if (!class_exists($class) && !interface_exists($class)) { throw new NoSuchMetadataException(sprintf('The class or interface "%s" does not exist.', $class)); } $metadata = new ClassMetadata($class); // Include constraints from the parent class if ($parent = $metadata->getReflectionClass()->getParentClass()) { $metadata->mergeConstraints($this->getMetadataFor($parent->name)); } // Include constraints from all implemented interfaces foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) { if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { continue; } $metadata->mergeConstraints($this->getMetadataFor($interface->name)); } if (null !== $this->loader) { $this->loader->loadClassMetadata($metadata); } if (null !== $this->cache) { $this->cache->write($metadata); } return $this->loadedClasses[$class] = $metadata; } /** * {@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; } } src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php000066400000000000000000000012011266465517700276210ustar00rootroot00000000000000 * * 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\MetadataFactoryInterface as LegacyMetadataFactoryInterface; /** * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. * * @since 2.5 * * @author Bernhard Schussek */ interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface { } src/Symfony/Component/Validator/Mapping/GenericMetadata.php000066400000000000000000000153011266465517700243440ustar00rootroot00000000000000 * * 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\BadMethodCallException; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; use Symfony\Component\Validator\ValidationVisitorInterface; /** * A generic container of {@link Constraint} objects. * * This class supports serialization and cloning. * * @since 2.5 * * @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 * properties $traverse and $deep of that constraint, the traversal strategy * will be set to one of the following: * * - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled and $deep * is enabled * - {@link TraversalStrategy::IMPLICIT} | {@link TraversalStrategy::STOP_RECURSION} * if $traverse is enabled, but $deep is disabled * - {@link TraversalStrategy::NONE} if $traverse is disabled * * @param Constraint $constraint The constraint to add * * @return GenericMetadata This object * * @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) { // Traverse unless the value is not traversable $this->traversalStrategy = TraversalStrategy::IMPLICIT; if (!$constraint->deep) { $this->traversalStrategy |= TraversalStrategy::STOP_RECURSION; } } 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 GenericMetadata This object */ 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; } /** * Exists for compatibility with the deprecated * {@link Symfony\Component\Validator\MetadataInterface}. * * Should not be used. * * Implemented for backward compatibility with Symfony < 2.5. * * @throws BadMethodCallException * * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) { throw new BadMethodCallException('Not supported.'); } } src/Symfony/Component/Validator/Mapping/GetterMetadata.php000066400000000000000000000042241266465517700242240ustar00rootroot00000000000000 * * 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 * * @throws ValidatorException */ public function __construct($class, $property) { $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)); } 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()); } } src/Symfony/Component/Validator/Mapping/Loader/000077500000000000000000000000001266465517700220245ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php000066400000000000000000000060021266465517700254250ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php000066400000000000000000000064141266465517700260030ustar00rootroot00000000000000 * * 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(); $constraint->methods = null; $metadata->addConstraint($constraint); } elseif ($constraint instanceof Constraint) { if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) { $metadata->addGetterConstraint(lcfirst($matches[2]), $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; } } src/Symfony/Component/Validator/Mapping/Loader/FileLoader.php000066400000000000000000000025351266465517700245500ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php000066400000000000000000000026551266465517700247360ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php000066400000000000000000000031361266465517700247110ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Mapping/Loader/LoaderInterface.php000066400000000000000000000014161266465517700255660ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/Mapping/Loader/StaticMethodLoader.php000066400000000000000000000034601266465517700262570ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php000066400000000000000000000150061266465517700252260ustar00rootroot00000000000000 * * 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 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; } } if (isset($this->classes[$metadata->getClassName()])) { $classDescription = $this->classes[$metadata->getClassName()]; $this->loadClassMetadataFromXml($metadata, $classDescription); return true; } return false; } /** * 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 = 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); } /** * Loads the validation metadata from the given XML class description. * * @param ClassMetadata $metadata The metadata to load * @param array $classDescription The XML class description */ private function loadClassMetadataFromXml(ClassMetadata $metadata, $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); } } } } src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php000066400000000000000000000012361266465517700254110ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php000066400000000000000000000131031266465517700253640ustar00rootroot00000000000000 * * 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) { if (null === $this->yamlParser) { $this->yamlParser = new YamlParser(); } // This method may throw an exception. Do not modify the class' // state before it completes if (false === ($classes = $this->parseFile($this->file))) { return false; } $this->classes = $classes; if (isset($this->classes['namespaces'])) { foreach ($this->classes['namespaces'] as $alias => $namespace) { $this->addNamespaceAlias($alias, $namespace); } unset($this->classes['namespaces']); } } if (isset($this->classes[$metadata->getClassName()])) { $classDescription = $this->classes[$metadata->getClassName()]; $this->loadClassMetadataFromYaml($metadata, $classDescription); return true; } return false; } /** * 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|null The class descriptions or null, if the file was empty * * @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; } // not an array if (!is_array($classes)) { throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $this->file)); } return $classes; } /** * Loads the validation metadata from the given YAML class description. * * @param ClassMetadata $metadata The metadata to load * @param array $classDescription The YAML class description */ 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); } } } } } } src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php000066400000000000000000000012411266465517700255470ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Mapping/Loader/schema/000077500000000000000000000000001266465517700232645ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Loader/schema/dic/000077500000000000000000000000001266465517700240235ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Loader/schema/dic/constraint-mapping/000077500000000000000000000000001266465517700276405ustar00rootroot00000000000000constraint-mapping-1.0.xsd000066400000000000000000000140551266465517700344170ustar00rootroot00000000000000src/Symfony/Component/Validator/Mapping/Loader/schema/dic/constraint-mapping src/Symfony/Component/Validator/Mapping/MemberMetadata.php000066400000000000000000000170501266465517700242020ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\ValidationVisitorInterface; /** * 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 ElementMetadata 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} * * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); $visitor->visit($this, $value, $group, $propertyPath); if ($this->isCascaded()) { $visitor->validate($value, $propagatedGroup ?: $group, $propertyPath, $this->isCollectionCascaded(), $this->isCollectionCascadedDeeply()); } } /** * {@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 whether objects stored in this member should be validated. * * @return bool * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getCascadingStrategy()} instead. */ public function isCascaded() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED); return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE); } /** * Returns whether arrays or traversable objects stored in this member * should be traversed and validated in each entry. * * @return bool * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getTraversalStrategy()} instead. */ public function isCollectionCascaded() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE)); } /** * Returns whether arrays or traversable objects stored in this member * should be traversed recursively for inner arrays/traversable objects. * * @return bool * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getTraversalStrategy()} instead. */ public function isCollectionCascadedDeeply() { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); return !($this->traversalStrategy & TraversalStrategy::STOP_RECURSION); } /** * 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); } src/Symfony/Component/Validator/Mapping/MetadataInterface.php000066400000000000000000000027641266465517700247010ustar00rootroot00000000000000 * * 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\MetadataInterface as LegacyMetadataInterface; /** * 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. * * @since 2.5 * * @author Bernhard Schussek * * @see CascadingStrategy * @see TraversalStrategy */ interface MetadataInterface extends LegacyMetadataInterface { /** * 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(); } src/Symfony/Component/Validator/Mapping/PropertyMetadata.php000066400000000000000000000035361266465517700246230ustar00rootroot00000000000000 * * 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) { $class = new \ReflectionClass($objectOrClassName); while (!$class->hasProperty($this->getName())) { $class = $class->getParentClass(); } $member = new \ReflectionProperty($class->getName(), $this->getName()); $member->setAccessible(true); return $member; } } src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php000066400000000000000000000021211266465517700264310ustar00rootroot00000000000000 * * 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\ClassBasedInterface; use Symfony\Component\Validator\PropertyMetadataInterface as LegacyPropertyMetadataInterface; /** * 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. * * @since 2.5 * * @author Bernhard Schussek * * @see MetadataInterface * @see CascadingStrategy * @see TraversalStrategy */ interface PropertyMetadataInterface extends MetadataInterface, LegacyPropertyMetadataInterface, ClassBasedInterface { } src/Symfony/Component/Validator/Mapping/TraversalStrategy.php000066400000000000000000000035031266465517700250160ustar00rootroot00000000000000 * * 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. * * @since 2.1 * * @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; /** * Specifies that nested instances of {@link \Traversable} should never be * iterated. Can be combined with {@link IMPLICIT} or {@link TRAVERSE}. * * @deprecated since version 2.5, to be removed in 3.0. This constant was added for backwards compatibility only. * * @internal */ const STOP_RECURSION = 8; /** * Not instantiable. */ private function __construct() { } } src/Symfony/Component/Validator/MetadataFactoryInterface.php000066400000000000000000000022031266465517700246220ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Returns {@link MetadataInterface} instances for values. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\Factory\MetadataFactoryInterface} instead. */ interface MetadataFactoryInterface { /** * Returns the metadata for the given value. * * @param mixed $value Some value * * @return MetadataInterface The metadata for the value * * @throws Exception\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); } src/Symfony/Component/Validator/MetadataInterface.php000066400000000000000000000060011266465517700232720ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * A container for validation metadata. * * The container contains constraints that may belong to different validation * groups. Constraints for a specific group can be fetched by calling * {@link findConstraints}. * * Implement this interface to add validation metadata to your own metadata * layer. Each metadata may have named properties. Each property can be * represented by one or more {@link PropertyMetadataInterface} instances that * are returned by {@link getPropertyMetadata}. Since * PropertyMetadataInterface inherits from MetadataInterface, * each property may be divided into further properties. * * The {@link accept} method of each metadata implements the Visitor pattern. * The method should forward the call to the visitor's * {@link ValidationVisitorInterface::visit} method and additionally call * accept() on all structurally related metadata instances. * * For example, to store constraints for PHP classes and their properties, * create a class ClassMetadata (implementing MetadataInterface) * and a class PropertyMetadata (implementing PropertyMetadataInterface). * ClassMetadata::getPropertyMetadata($property) returns all * PropertyMetadata instances for a property of that class. Its * accept()-method simply forwards to ValidationVisitorInterface::visit() * and calls accept() on all contained PropertyMetadata * instances, which themselves call ValidationVisitorInterface::visit() * again. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\MetadataInterface} instead. */ interface MetadataInterface { /** * Implementation of the Visitor design pattern. * * Calls {@link ValidationVisitorInterface::visit} and then forwards the * accept()-call to all property metadata instances. * * @param ValidationVisitorInterface $visitor The visitor implementing the validation logic * @param mixed $value The value to validate * @param string|string[] $group The validation group to validate in * @param string $propertyPath The current property path in the validation graph * * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath); /** * 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); } src/Symfony/Component/Validator/ObjectInitializerInterface.php000066400000000000000000000014231266465517700251670ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php000066400000000000000000000024641266465517700267130ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * A container for {@link PropertyMetadataInterface} instances. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\ClassMetadataInterface} instead. */ interface PropertyMetadataContainerInterface { /** * 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); } src/Symfony/Component/Validator/PropertyMetadataInterface.php000066400000000000000000000025501266465517700250440ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * A container for validation metadata of a property. * * What exactly you define as "property" is up to you. The validator expects * implementations of {@link MetadataInterface} that contain constraints and * optionally a list of named properties that also have constraints (and may * have further sub properties). Such properties are mapped by implementations * of this interface. * * @author Bernhard Schussek * * @see MetadataInterface * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\PropertyMetadataInterface} instead. */ 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); } src/Symfony/Component/Validator/README.md000066400000000000000000000067001266465517700205050ustar00rootroot00000000000000Validator Component =================== This component is based on the JSR-303 Bean Validation specification and enables specifying validation rules for classes using XML, YAML, PHP or annotations, which can then be checked against instances of these classes. Usage ----- The component provides "validation constraints", which are simple objects containing the rules for the validation. Let's validate a simple string as an example: ```php use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Constraints\Length; $validator = Validation::createValidator(); $violations = $validator->validate('Bernhard', new Length(array('min' => 10))); ``` This validation will fail because the given string is shorter than ten characters. The precise errors, here called "constraint violations", are returned by the validator. You can analyze these or return them to the user. If the violation list is empty, validation succeeded. Validation of arrays is possible using the `Collection` constraint: ```php use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Constraints as Assert; $validator = Validation::createValidator(); $constraint = new Assert\Collection(array( 'name' => new Assert\Collection(array( 'first_name' => new Assert\Length(array('min' => 101)), 'last_name' => new Assert\Length(array('min' => 1)), )), 'email' => new Assert\Email(), 'simple' => new Assert\Length(array('min' => 102)), 'gender' => new Assert\Choice(array(3, 4)), 'file' => new Assert\File(), 'password' => new Assert\Length(array('min' => 60)), )); $violations = $validator->validate($input, $constraint); ``` Again, the validator returns the list of violations. Validation of objects is possible using "constraint mapping". With such a mapping you can put constraints onto properties and objects of classes. Whenever an object of this class is validated, its properties and method results are matched against the constraints. ```php use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Constraints as Assert; class User { /** * @Assert\Length(min = 3) * @Assert\NotBlank */ private $name; /** * @Assert\Email * @Assert\NotBlank */ private $email; public function __construct($name, $email) { $this->name = $name; $this->email = $email; } /** * @Assert\IsTrue(message = "The user should have a Google Mail account") */ public function isGmailUser() { return false !== strpos($this->email, '@gmail.com'); } } $validator = Validation::createValidatorBuilder() ->enableAnnotationMapping() ->getValidator(); $user = new User('John Doe', 'john@example.com'); $violations = $validator->validate($user); ``` This example uses the annotation support of Doctrine Common to map constraints to properties and methods. You can also map constraints using XML, YAML or plain PHP, if you dislike annotations or don't want to include Doctrine. Check the documentation for more information about these drivers. Resources --------- Silex integration: https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/ValidatorServiceProvider.php Documentation: https://symfony.com/doc/2.7/book/validation.html JSR-303 Specification: http://jcp.org/en/jsr/detail?id=303 You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Validator/ $ composer install $ phpunit src/Symfony/Component/Validator/Resources/000077500000000000000000000000001266465517700211755ustar00rootroot00000000000000src/Symfony/Component/Validator/Resources/translations/000077500000000000000000000000001266465517700237165ustar00rootroot00000000000000src/Symfony/Component/Validator/Resources/translations/validators.af.xlf000066400000000000000000000317201266465517700271710ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf000066400000000000000000000544571266465517700272210ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.az.xlf000066400000000000000000000305521266465517700272170ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf000066400000000000000000000524001266465517700271710ustar00rootroot00000000000000 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). src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf000066400000000000000000000440071266465517700271700ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf000066400000000000000000000446741266465517700272240ustar00rootroot00000000000000 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ý. src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf000066400000000000000000000306321266465517700272170ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.da.xlf000066400000000000000000000326701266465517700271740ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.de.xlf000066400000000000000000000451721266465517700272010ustar00rootroot00000000000000 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. 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.el.xlf000066400000000000000000000466401266465517700272120ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.en.xlf000066400000000000000000000437371266465517700272200ustar00rootroot00000000000000 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. 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. src/Symfony/Component/Validator/Resources/translations/validators.es.xlf000066400000000000000000000450331266465517700272140ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.et.xlf000066400000000000000000000365641266465517700272260ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf000066400000000000000000000406551266465517700272230ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf000066400000000000000000000434101266465517700271700ustar00rootroot00000000000000 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 }} یکی باشد. src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf000066400000000000000000000312051266465517700271770ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf000066400000000000000000000453131266465517700272150ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf000066400000000000000000000450051266465517700272060ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.he.xlf000066400000000000000000000444541266465517700272070ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf000066400000000000000000000400471266465517700272160ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf000066400000000000000000000447451266465517700272320ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf000066400000000000000000000504701266465517700272260ustar00rootroot00000000000000 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) չէ։ src/Symfony/Component/Validator/Resources/translations/validators.id.xlf000066400000000000000000000370261266465517700272040ustar00rootroot00000000000000 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. Bidang ini tidak diharapkan. This field is missing. Bidang 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 email yang sah. The file could not be found. Berkas tidak ditemukan. The file is not readable. Berkas tidak bisa 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 diijinkan 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 diijinkan 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 gambar. 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 gambar tidak bisa dideteksi. The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. Lebar gambar 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 gambar 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 gambar 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 gambar 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.it.xlf000066400000000000000000000456341266465517700272300ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf000066400000000000000000000451331266465517700272000ustar00rootroot00000000000000 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 }})と異なります。 src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf000066400000000000000000000450611266465517700272030ustar00rootroot00000000000000 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). src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf000066400000000000000000000445111266465517700272240ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf000066400000000000000000000210341266465517700272120ustar00rootroot00000000000000 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. Энэ утга үнэн зөв хэл биш байна . src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf000066400000000000000000000440321266465517700272140ustar00rootroot00000000000000 This value should be false. Deze waarde mag niet waar 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 was 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 is niet gevonden. 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 ongeldig. 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 geüpload worden. 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 representeert geen geldige taal. This value is not a valid locale. Deze waarde representeert geen geldige lokalisering. This value is not a valid country. Deze waarde representeert 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 niet geheel 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. 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf000066400000000000000000000306431266465517700272210ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.no.xlf000066400000000000000000000435641266465517700272300ustar00rootroot00000000000000 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 må være av typen {{ type }}. This value should be blank. Verdien må 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 må ikke være blank. This value should not be null. Verdien må ikke være tom (null). This value should be null. Verdien må være tom (null). This value is not valid. Verdien er ikke gyldig. 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 må 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 må 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 må være brukerens sitt nåværende passord. This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. Verdien må 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 ugyldig kortnummer. This is not a valid International Bank Account Number (IBAN). Dette er ikke en gyldig IBAN. 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 må være lik {{ compared_value }}. This value should be greater than {{ compared_value }}. Verdien må være større enn {{ compared_value }}. This value should be greater than or equal to {{ compared_value }}. Verdien må være større enn eller lik {{ compared_value }}. This value should be identical to {{ compared_value_type }} {{ compared_value }}. Verdien må være identisk med {{ compared_value_type }} {{ compared_value }}. This value should be less than {{ compared_value }}. Verdien må være mindre enn {{ compared_value }}. This value should be less than or equal to {{ compared_value }}. Verdien må være mindre enn eller lik {{ compared_value }}. This value should not be equal to {{ compared_value }}. Verdien må ikke være lik {{ compared_value }}. This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Verdien må 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 maksimumsbildeforhold er {{ max_ratio }}. The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. Bildeforholdet er for lite ({{ ratio }}). Forventet maksimumsbildeforhold er {{ 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. src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf000066400000000000000000000454461266465517700272300ustar00rootroot00000000000000 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. To pole nie spodziewano. This field is missing. To pole jest chybianie. 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. 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf000066400000000000000000000435401266465517700272310ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf000066400000000000000000000445571266465517700276250ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf000066400000000000000000000425001266465517700272210ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf000066400000000000000000000536421266465517700272400ustar00rootroot00000000000000 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 }} кодировкой. src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf000066400000000000000000000451651266465517700272300ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf000066400000000000000000000460731266465517700272300ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf000066400000000000000000000325641266465517700272350ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf000066400000000000000000000511621266465517700302220ustar00rootroot00000000000000 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). Портретна оријентација слика није дозвољена. src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf000066400000000000000000000435551266465517700302160ustar00rootroot00000000000000 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. src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf000066400000000000000000000441061266465517700272350ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.th.xlf000066400000000000000000000505101266465517700272140ustar00rootroot00000000000000 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) ไม่อนุญาตภาพที่เป็นแนวตั้ง src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf000066400000000000000000000304461266465517700272340ustar00rootroot00000000000000 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ı. src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf000066400000000000000000000455261266465517700272330ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf000066400000000000000000000412111266465517700272150ustar00rootroot00000000000000 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 }}. src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf000066400000000000000000000424531266465517700276110ustar00rootroot00000000000000 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 }} 编码。 src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf000066400000000000000000000363431266465517700276440ustar00rootroot00000000000000 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 }} 相同。 src/Symfony/Component/Validator/Tests/000077500000000000000000000000001266465517700203255ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/ConstraintTest.php000066400000000000000000000136361266465517700240330ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->setExpectedException('Symfony\Component\Validator\Exception\InvalidOptionsException'); new ConstraintA(array( 'foo' => 'bar', )); } public function testMagicPropertiesAreNotAllowed() { $constraint = new ConstraintA(); $this->setExpectedException('Symfony\Component\Validator\Exception\InvalidOptionsException'); $constraint->foo = 'bar'; } public function testInvalidAndRequiredOptionsPassed() { $this->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->setExpectedException('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); new ConstraintB('foo'); } public function testRequiredOptionsMustBeDefined() { $this->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); } } src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php000066400000000000000000000067461266465517700265600ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; class ConstraintViolationListTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php000066400000000000000000000023571266465517700257160ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\ConstraintViolation; class ConstraintViolationTest extends \PHPUnit_Framework_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); } } src/Symfony/Component/Validator/Tests/Constraints/000077500000000000000000000000001266465517700226345ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php000066400000000000000000000117651266465517700324570ustar00rootroot00000000000000 * * 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; 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 AbstractConstraintValidatorTest { protected static function addPhp5Dot5Comparisons(array $comparisons) { if (PHP_VERSION_ID < 50500) { return $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); if (PHP_VERSION_ID < 50304 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) { $this->markTestSkipped('Intl supports formatting DateTime objects since 5.3.4'); } } $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) ->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); } src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php000066400000000000000000000313241266465517700316660ustar00rootroot00000000000000 * * 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\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\Context\LegacyExecutionContext; use Symfony\Component\Validator\ExecutionContextInterface as LegacyExecutionContextInterface; use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Mapping\PropertyMetadata; use Symfony\Component\Validator\Validation; /** * @since 2.5.3 * * @author Bernhard Schussek */ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Translation\TranslatorInterface'); $validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $contextualValidator = $this->getMock('Symfony\Component\Validator\Validator\ContextualValidatorInterface'); switch ($this->getApiVersion()) { case Validation::API_VERSION_2_5: $context = new ExecutionContext( $validator, $this->root, $translator ); break; case Validation::API_VERSION_2_4: case Validation::API_VERSION_2_5_BC: $context = new LegacyExecutionContext( $validator, $this->root, $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'), $translator ); break; default: throw new \RuntimeException('Invalid API version'); } $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; } /** * @param mixed $message * @param array $parameters * @param string $propertyPath * @param string $invalidValue * @param null $plural * @param null $code * * @return ConstraintViolation * * @deprecated to be removed in Symfony 3.0. Use {@link buildViolation()} instead. */ protected function createViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) { return new ConstraintViolation( null, $message, $parameters, $this->root, $propertyPath, $invalidValue, $plural, $code, $this->constraint ); } 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()), $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 mixed $message * @param array $parameters * @param string $propertyPath * @param string $invalidValue * @param null $plural * @param null $code * * @deprecated To be removed in Symfony 3.0. Use * {@link buildViolation()} instead. */ protected function assertViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); $this->buildViolation($message) ->setParameters($parameters) ->atPath($propertyPath) ->setInvalidValue($invalidValue) ->setCode($code) ->setPlural($plural) ->assertRaised(); } /** * @param array $expected * * @deprecated To be removed in Symfony 3.0. Use * {@link buildViolation()} instead. */ protected function assertViolations(array $expected) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); $violations = $this->context->getViolations(); $this->assertCount(count($expected), $violations); $i = 0; foreach ($expected as $violation) { $this->assertEquals($violation, $violations[$i++]); } } /** * @param $message * * @return ConstraintViolationAssertion */ protected function buildViolation($message) { return new ConstraintViolationAssertion($this->context, $message, $this->constraint); } protected function getApiVersion() { return Validation::API_VERSION_2_5; } abstract protected function createValidator(); } /** * @internal */ class ConstraintViolationAssertion { /** * @var LegacyExecutionContextInterface */ 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(LegacyExecutionContextInterface $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()); \PHPUnit_Framework_Assert::assertSame($expectedCount = count($expected), $violationsCount = count($violations), sprintf('%u violation(s) expected. Got %u.', $expectedCount, $violationsCount)); reset($violations); foreach ($expected as $violation) { \PHPUnit_Framework_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 ); } } src/Symfony/Component/Validator/Tests/Constraints/AllTest.php000066400000000000000000000017061266465517700247210ustar00rootroot00000000000000 * * 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\Valid; /** * @author Bernhard Schussek */ class AllTest extends \PHPUnit_Framework_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(), )); } } src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php000066400000000000000000000045501266465517700265670ustar00rootroot00000000000000 * * 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\Validation; class AllValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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))), ); } } src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php000066400000000000000000000031251266465517700271030ustar00rootroot00000000000000 * * 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\Validation; class BlankValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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) ->assertRaised(); } public function getInvalidValues() { return array( array('foobar', '"foobar"'), array(0, '0'), array(false, 'false'), array(1234, '1234'), ); } } src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php000066400000000000000000000242451266465517700275560ustar00rootroot00000000000000 * * 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\ExecutionContextInterface; use Symfony\Component\Validator\Validation; 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 AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacySingleMethodBc() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array('validate')); $this->validator->validate($object, $constraint); $this->buildViolation('My message') ->setParameter('{{ value }}', 'foobar') ->assertRaised(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacySingleMethodBcExplicitName() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array('methods' => array('validate'))); $this->validator->validate($object, $constraint); $this->buildViolation('My message') ->setParameter('{{ value }}', 'foobar') ->assertRaised(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacyMultipleMethodsBc() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array('validate', 'validateStatic')); $this->validator->validate($object, $constraint); $this->buildViolation('My message') ->setParameter('{{ value }}', 'foobar') ->buildNextViolation('Static message') ->setParameter('{{ value }}', 'baz') ->assertRaised(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacyMultipleMethodsBcExplicitName() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array( 'methods' => array('validate', 'validateStatic'), )); $this->validator->validate($object, $constraint); $this->buildViolation('My message') ->setParameter('{{ value }}', 'foobar') ->buildNextViolation('Static message') ->setParameter('{{ value }}', 'baz') ->assertRaised(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacySingleStaticMethodBc() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array( array(__CLASS__.'_Class', 'validateCallback'), )); $this->validator->validate($object, $constraint); $this->buildViolation('Callback message') ->setParameter('{{ value }}', 'foobar') ->assertRaised(); } // BC with Symfony < 2.4 /** * @group legacy */ public function testLegacySingleStaticMethodBcExplicitName() { $object = new CallbackValidatorTest_Object(); $constraint = new Callback(array( 'methods' => array(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')))); } /** * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException * @group legacy */ public function testLegacyExpectEitherCallbackOrMethods() { $object = new CallbackValidatorTest_Object(); $this->validator->validate($object, new Callback(array( 'callback' => 'validate', 'methods' => array('validateStatic'), ))); } 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); } } src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php000066400000000000000000000120531266465517700300520ustar00rootroot00000000000000 * * 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\Validation; class CardSchemeValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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('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 ); } } src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php000066400000000000000000000177541266465517700272630ustar00rootroot00000000000000 * * 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\Validation; function choice_callback() { return array('foo', 'bar'); } class ChoiceValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new ChoiceValidator(); } public static function staticCallback() { return array('foo', 'bar'); } /** * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException */ public function testExpectArrayIfMultipleIsTrue() { $constraint = new Choice(array( 'choices' => array('foo', 'bar'), 'multiple' => true, )); $this->validator->validate('asdf', $constraint); } public function testNullIsValid() { $this->validator->validate(null, new Choice(array('choices' => array('foo', 'bar')))); $this->assertNoViolation(); } /** * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException */ public function testChoicesOrCallbackExpected() { $this->validator->validate('foobar', new Choice()); } /** * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException */ public function testValidCallbackExpected() { $this->validator->validate('foobar', new Choice(array('callback' => 'abcd'))); } public function testValidChoiceArray() { $constraint = new Choice(array('choices' => array('foo', 'bar'))); $this->validator->validate('bar', $constraint); $this->assertNoViolation(); } public function testValidChoiceCallbackFunction() { $constraint = new Choice(array('callback' => __NAMESPACE__.'\choice_callback')); $this->validator->validate('bar', $constraint); $this->assertNoViolation(); } public function testValidChoiceCallbackClosure() { $constraint = new Choice(array('callback' => function () { return array('foo', 'bar'); })); $this->validator->validate('bar', $constraint); $this->assertNoViolation(); } public function testValidChoiceCallbackStaticMethod() { $constraint = new Choice(array('callback' => array(__CLASS__, 'staticCallback'))); $this->validator->validate('bar', $constraint); $this->assertNoViolation(); } public function testValidChoiceCallbackContextMethod() { // search $this for "staticCallback" $this->setObject($this); $constraint = new Choice(array('callback' => 'staticCallback')); $this->validator->validate('bar', $constraint); $this->assertNoViolation(); } public function testMultipleChoices() { $constraint = new Choice(array( 'choices' => array('foo', 'bar', 'baz'), 'multiple' => true, )); $this->validator->validate(array('baz', 'bar'), $constraint); $this->assertNoViolation(); } public function testInvalidChoice() { $constraint = new Choice(array( 'choices' => array('foo', 'bar'), 'message' => 'myMessage', )); $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', )); $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, )); $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', )); $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', )); $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(); } 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(); } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php000066400000000000000000000057041266465517700263060ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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); } } src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php000066400000000000000000000007421266465517700322770ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorArrayTest.php000066400000000000000000000007121266465517700311450ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php000066400000000000000000000010601266465517700334640ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php000066400000000000000000000237301266465517700301530ustar00rootroot00000000000000 * * 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\Validation; abstract class CollectionValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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); } } src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php000066400000000000000000000105201266465517700261450ustar00rootroot00000000000000 * * 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\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'; } } /** * @since 2.6 * * @author Bernhard Schussek */ class CompositeTest extends \PHPUnit_Framework_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(), )); } } src/Symfony/Component/Validator/Tests/Constraints/CountValidatorArrayTest.php000066400000000000000000000007751266465517700301530ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Constraints/CountValidatorCountableTest.php000066400000000000000000000011131266465517700307740ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTest.php000066400000000000000000000125271266465517700271520ustar00rootroot00000000000000 * * 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\Validation; /** * @author Bernhard Schussek */ abstract class CountValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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); } } src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php000066400000000000000000000050051266465517700275160ustar00rootroot00000000000000 * * 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\Validation; class CountryValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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.'"') ->assertRaised(); } public function getInvalidCountries() { return array( array('foobar'), array('EN'), ); } public function testValidateUsingCountrySpecificLocale() { // in order to test with "en_GB" IntlTestHelper::requireFullIntl($this); \Locale::setDefault('en_GB'); $existingCountry = 'GB'; $this->validator->validate($existingCountry, new Country()); $this->assertNoViolation(); } } src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php000066400000000000000000000051071266465517700276500ustar00rootroot00000000000000 * * 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\Validation; class CurrencyValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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); \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.'"') ->assertRaised(); } public function getInvalidCurrencies() { return array( array('EN'), array('foobar'), ); } } src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php000066400000000000000000000060071266465517700275520ustar00rootroot00000000000000 * * 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\Validation; class DateTimeValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } /** * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException */ public function testExpectsStringCompatibleType() { $this->validator->validate(new \stdClass(), new DateTime()); } /** * @dataProvider getValidDateTimes */ public function testValidDateTimes($dateTime) { $this->validator->validate($dateTime, new DateTime()); $this->assertNoViolation(); } public function getValidDateTimes() { return array( array('2010-01-01 01:02:03'), array('1955-12-12 00:00:00'), array('2030-05-31 23:59:59'), ); } /** * @dataProvider getInvalidDateTimes */ public function testInvalidDateTimes($dateTime, $code) { $constraint = new DateTime(array( 'message' => 'myMessage', )); $this->validator->validate($dateTime, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"'.$dateTime.'"') ->setCode($code) ->assertRaised(); } public function getInvalidDateTimes() { return array( array('foobar', DateTime::INVALID_FORMAT_ERROR), array('2010-01-01', DateTime::INVALID_FORMAT_ERROR), array('00:00:00', DateTime::INVALID_FORMAT_ERROR), array('2010-01-01 00:00', DateTime::INVALID_FORMAT_ERROR), array('2010-13-01 00:00:00', DateTime::INVALID_DATE_ERROR), array('2010-04-32 00:00:00', DateTime::INVALID_DATE_ERROR), array('2010-02-29 00:00:00', DateTime::INVALID_DATE_ERROR), array('2010-01-01 24:00:00', DateTime::INVALID_TIME_ERROR), array('2010-01-01 00:60:00', DateTime::INVALID_TIME_ERROR), array('2010-01-01 00:00:60', DateTime::INVALID_TIME_ERROR), ); } } src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php000066400000000000000000000051261266465517700267340ustar00rootroot00000000000000 * * 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\Validation; class DateValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } /** * @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), ); } } src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php000066400000000000000000000047611266465517700271120ustar00rootroot00000000000000 * * 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\Email; use Symfony\Component\Validator\Constraints\EmailValidator; use Symfony\Component\Validator\Validation; class EmailValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php000066400000000000000000000041661266465517700274340ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class EqualToValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new EqualToValidator(); } protected function createConstraint(array $options) { return new EqualTo($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php000066400000000000000000000132601266465517700302140ustar00rootroot00000000000000 * * 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\PropertyAccess\PropertyAccess; use Symfony\Component\Validator\Constraints\Expression; use Symfony\Component\Validator\Constraints\ExpressionValidator; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Validation; class ExpressionValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new ExpressionValidator(PropertyAccess::createPropertyAccessor()); } public function testExpressionIsEvaluatedWithNullValue() { $constraint = new Expression(array( 'expression' => 'false', 'message' => 'myMessage', )); $this->validator->validate(null, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'null') ->assertRaised(); } public function testExpressionIsEvaluatedWithEmptyStringValue() { $constraint = new Expression(array( 'expression' => 'false', 'message' => 'myMessage', )); $this->validator->validate('', $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '""') ->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') ->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') ->setParameter('{{ value }}', '"2"') ->atPath('data') ->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') ->setParameter('{{ value }}', '"2"') ->atPath('reference.data') ->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') ->setParameter('{{ value }}', '"2"') ->atPath('') ->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/FileTest.php000066400000000000000000000077651266465517700251030ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; class FileTest extends \PHPUnit_Framework_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 testInvalideMaxSize($maxSize) { $file = 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), ); } } src/Symfony/Component/Validator/Tests/Constraints/FileValidatorObjectTest.php000066400000000000000000000007571266465517700300720ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php000066400000000000000000000015411266465517700275500ustar00rootroot00000000000000 * * 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(); } } src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php000066400000000000000000000367101266465517700267410ustar00rootroot00000000000000 * * 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\Validation; abstract class FileValidatorTest extends AbstractConstraintValidatorTest { protected $path; protected $file; protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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); } src/Symfony/Component/Validator/Tests/Constraints/Fixtures/000077500000000000000000000000001266465517700244455ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Constraints/Fixtures/foo000066400000000000000000000000001266465517700251410ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test.gif000066400000000000000000000014411266465517700261130ustar00rootroot00000000000000GIF89a,;src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_4by3.gif000066400000000000000000000000711266465517700267520ustar00rootroot00000000000000GIF89a!Created with GIMP,V;src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_landscape.gif000066400000000000000000000000531266465517700301230ustar00rootroot00000000000000GIF89a! ,L ;src/Symfony/Component/Validator/Tests/Constraints/Fixtures/test_portrait.gif000066400000000000000000000000531266465517700300350ustar00rootroot00000000000000GIF89a! ,L ;src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php000066400000000000000000000043101266465517700315460ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new GreaterThanOrEqualValidator(); } protected function createConstraint(array $options) { return new GreaterThanOrEqual($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php000066400000000000000000000053421266465517700302630ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class GreaterThanValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new GreaterThanValidator(); } protected function createConstraint(array $options) { return new GreaterThan($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php000066400000000000000000000047761266465517700270100ustar00rootroot00000000000000 * * 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\GroupSequence; /** * @author Bernhard Schussek */ class GroupSequenceTest extends \PHPUnit_Framework_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); } /** * @group legacy */ public function testLegacyIterate() { $sequence = new GroupSequence(array('Group 1', 'Group 2')); $this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence)); } /** * @group legacy */ public function testLegacyCount() { $sequence = new GroupSequence(array('Group 1', 'Group 2')); $this->assertCount(2, $sequence); } /** * @group legacy */ public function testLegacyArrayAccess() { $sequence = new GroupSequence(array('Group 1', 'Group 2')); $this->assertSame('Group 1', $sequence[0]); $this->assertSame('Group 2', $sequence[1]); $this->assertTrue(isset($sequence[0])); $this->assertFalse(isset($sequence[2])); unset($sequence[0]); $this->assertFalse(isset($sequence[0])); $sequence[] = 'Group 3'; $this->assertTrue(isset($sequence[2])); $this->assertSame('Group 3', $sequence[2]); $sequence[0] = 'Group 1'; $this->assertTrue(isset($sequence[0])); $this->assertSame('Group 1', $sequence[0]); } /** * @expectedException \Symfony\Component\Validator\Exception\OutOfBoundsException * @group legacy */ public function testLegacyGetExpectsExistingKey() { $sequence = new GroupSequence(array('Group 1', 'Group 2')); $sequence[2]; } /** * @group legacy */ public function testLegacyUnsetIgnoresNonExistingKeys() { $sequence = new GroupSequence(array('Group 1', 'Group 2')); // should not fail unset($sequence[2]); } } src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php000066400000000000000000000522431266465517700267320ustar00rootroot00000000000000 * * 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\Validation; class IbanValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php000066400000000000000000000047601266465517700302610ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new IdenticalToValidator(); } protected function createConstraint(array $options) { return new IdenticalTo($options); } 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), ); if (PHP_VERSION_ID >= 50500) { $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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php000066400000000000000000000212741266465517700271030ustar00rootroot00000000000000 * * 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\Validation; /** * @requires extension fileinfo */ class ImageValidatorTest extends AbstractConstraintValidatorTest { protected $context; /** * @var ImageValidator */ protected $validator; protected $path; protected $image; protected $imageLandscape; protected $imagePortrait; protected $image4By3; protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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'; } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php000066400000000000000000000264771266465517700264430ustar00rootroot00000000000000 * * 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\Validation; class IpValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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.'"') ->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.'"') ->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.'"') ->assertRaised(); } public function getInvalidReservedIpsV4() { return array( array('0.0.0.0'), array('224.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.'"') ->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.'"') ->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.'"') ->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.'"') ->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.'"') ->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.'"') ->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.'"') ->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.'"') ->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.'"') ->assertRaised(); } public function getInvalidPublicIpsAll() { return array_merge($this->getInvalidPublicIpsV4(), $this->getInvalidPublicIpsV6()); } } src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php000066400000000000000000000024631266465517700274060ustar00rootroot00000000000000 * * 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\Validation; class IsFalseValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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') ->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php000066400000000000000000000031551266465517700272650ustar00rootroot00000000000000 * * 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\Validation; class IsNullValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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) ->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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php000066400000000000000000000024551266465517700272740ustar00rootroot00000000000000 * * 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\Validation; class IsTrueValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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') ->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php000066400000000000000000000166541266465517700267620ustar00rootroot00000000000000 * * 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\Validation; /** * @see https://en.wikipedia.org/wiki/Isbn */ class IsbnValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php000066400000000000000000000112101266465517700267620ustar00rootroot00000000000000 * * 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\Validation; /** * @see https://en.wikipedia.org/wiki/Issn */ class IssnValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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(); } } src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php000066400000000000000000000050441266465517700276010ustar00rootroot00000000000000 * * 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\Validation; class LanguageValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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.'"') ->assertRaised(); } public function getInvalidLanguages() { return array( array('EN'), array('foobar'), ); } public function testValidateUsingCountrySpecificLocale() { IntlTestHelper::requireFullIntl($this); \Locale::setDefault('fr_FR'); $existingLanguage = 'en'; $this->validator->validate($existingLanguage, new Language(array( 'message' => 'aMessage', ))); $this->assertNoViolation(); } } src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php000066400000000000000000000145471266465517700273070ustar00rootroot00000000000000 * * 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\Validation; class LengthValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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('éééééé'), ); } /** * @requires extension mbstring */ 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) ->assertRaised(); } } public function testConstraintGetDefaultOption() { $constraint = new Length(5); $this->assertEquals(5, $constraint->min); $this->assertEquals(5, $constraint->max); } } src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php000066400000000000000000000047211266465517700310710ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class LessThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new LessThanOrEqualValidator(); } protected function createConstraint(array $options) { return new LessThanOrEqual($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php000066400000000000000000000052321266465517700275760ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class LessThanValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new LessThanValidator(); } protected function createConstraint(array $options) { return new LessThan($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php000066400000000000000000000042411266465517700272530ustar00rootroot00000000000000 * * 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\Validation; class LocaleValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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'), ); } /** * @dataProvider getInvalidLocales */ public function testInvalidLocales($locale) { $constraint = new Locale(array( 'message' => 'myMessage', )); $this->validator->validate($locale, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"'.$locale.'"') ->assertRaised(); } public function getInvalidLocales() { return array( array('EN'), array('foobar'), ); } } src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php000066400000000000000000000064641266465517700267730ustar00rootroot00000000000000 * * 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\Validation; class LuhnValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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), ); } } src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php000066400000000000000000000046121266465517700275660ustar00rootroot00000000000000 * * 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\Validation; class NotBlankValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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') ->assertRaised(); } public function testBlankIsInvalid() { $constraint = new NotBlank(array( 'message' => 'myMessage', )); $this->validator->validate('', $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '""') ->assertRaised(); } public function testFalseIsInvalid() { $constraint = new NotBlank(array( 'message' => 'myMessage', )); $this->validator->validate(false, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'false') ->assertRaised(); } public function testEmptyArrayIsInvalid() { $constraint = new NotBlank(array( 'message' => 'myMessage', )); $this->validator->validate(array(), $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', 'array') ->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php000066400000000000000000000042311266465517700301060ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class NotEqualToValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new NotEqualToValidator(); } protected function createConstraint(array $options) { return new NotEqualTo($options); } /** * {@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'), ); } } src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php000066400000000000000000000046461266465517700307450ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Validation; /** * @author Daniel Holmes */ class NotIdenticalToValidatorTest extends AbstractComparisonValidatorTestCase { protected function getApiVersion() { return Validation::API_VERSION_2_5; } protected function createValidator() { return new NotIdenticalToValidator(); } protected function createConstraint(array $options) { return new NotIdenticalTo($options); } /** * {@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; } } src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php000066400000000000000000000025201266465517700274450ustar00rootroot00000000000000 * * 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\Validation; class NotNullValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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')->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php000066400000000000000000000266561266465517700271260ustar00rootroot00000000000000 * * 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\Validation; class RangeValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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::BELOW_RANGE_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::BEYOND_RANGE_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::BEYOND_RANGE_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::BELOW_RANGE_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')), ); if (PHP_VERSION_ID >= 50500) { $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'), ); if (PHP_VERSION_ID >= 50500) { $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'), ); if (PHP_VERSION_ID >= 50500) { $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); $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::BELOW_RANGE_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); $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::BEYOND_RANGE_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); $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::BEYOND_RANGE_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); $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::BELOW_RANGE_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_VALUE_ERROR) ->assertRaised(); } } src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php000066400000000000000000000056221266465517700252640ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Constraints; use Symfony\Component\Validator\Constraints\Regex; /** * @author Bernhard Schussek */ class RegexTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php000066400000000000000000000044661266465517700271370ustar00rootroot00000000000000 * * 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\Validation; class RegexValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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.'"') ->assertRaised(); } public function getInvalidValues() { return array( array('abcd'), array('090foo'), ); } } src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php000066400000000000000000000051761266465517700267620ustar00rootroot00000000000000 * * 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\Validation; class TimeValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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), ); } } src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php000066400000000000000000000123471266465517700270030ustar00rootroot00000000000000 * * 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\Validation; class TypeValidatorTest extends AbstractConstraintValidatorTest { protected static $file; protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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') ->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) ->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; } } } src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php000066400000000000000000000140541266465517700266210ustar00rootroot00000000000000 * * 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\Url; use Symfony\Component\Validator\Constraints\UrlValidator; use Symfony\Component\Validator\Validation; class UrlValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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://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.'"') ->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]/'), ); } } class EmailProvider { public function __toString() { return ''; } } src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php000066400000000000000000000214351266465517700267660ustar00rootroot00000000000000 * * 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\Validation; /** * @author Colin O'Dell */ class UuidValidatorTest extends AbstractConstraintValidatorTest { protected function getApiVersion() { return Validation::API_VERSION_2_5; } 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 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), ); } } src/Symfony/Component/Validator/Tests/Constraints/ValidTest.php000066400000000000000000000012441266465517700252450ustar00rootroot00000000000000 * * 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\Valid; /** * @author Bernhard Schussek */ class ValidTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException */ public function testRejectGroupsOption() { new Valid(array('groups' => 'foo')); } } src/Symfony/Component/Validator/Tests/Fixtures/000077500000000000000000000000001266465517700221365ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Fixtures/CallbackClass.php000066400000000000000000000010211266465517700253230ustar00rootroot00000000000000 * * 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\ExecutionContextInterface; /** * @author Bernhard Schussek */ class CallbackClass { public static function callback($object, ExecutionContextInterface $context) { } } src/Symfony/Component/Validator/Tests/Fixtures/ClassConstraint.php000066400000000000000000000007231266465517700257630ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php000066400000000000000000000012031266465517700250700ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php000066400000000000000000000016311266465517700267430ustar00rootroot00000000000000 * * 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\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; } } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php000066400000000000000000000010041266465517700250700ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php000066400000000000000000000011611266465517700250750ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php000066400000000000000000000012051266465517700266220ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php000066400000000000000000000012131266465517700304120ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/Countable.php000066400000000000000000000010241266465517700245600ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/CustomArrayObject.php000066400000000000000000000030341266465517700262470ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/Entity.php000066400000000000000000000043151266465517700241260ustar00rootroot00000000000000 * * 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\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 EntityInterface { /** * @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; 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; } /** * @Assert\IsTrue */ public function isValid() { return 'valid'; } /** * @Assert\IsTrue */ public function hasPermissions() { return 'permissions'; } public function getData() { return 'Overridden data'; } /** * @Assert\Callback */ public function validateMe(ExecutionContextInterface $context) { } /** * @Assert\Callback */ public static function validateMeStatic($object, ExecutionContextInterface $context) { } } src/Symfony/Component/Validator/Tests/Fixtures/EntityInterface.php000066400000000000000000000005031266465517700257420ustar00rootroot00000000000000 * * 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 EntityInterface { } src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php000066400000000000000000000010701266465517700252730ustar00rootroot00000000000000 * * 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 { protected $firstName; private $internal; private $data = 'Data'; /** * @NotNull */ protected $other; public function getData() { return 'Data'; } } src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraint.php000066400000000000000000000010301266465517700262570ustar00rootroot00000000000000 * * 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); } } src/Symfony/Component/Validator/Tests/Fixtures/FailingConstraintValidator.php000066400000000000000000000011261266465517700301330ustar00rootroot00000000000000 * * 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()); } } src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php000066400000000000000000000012151266465517700261430ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php000066400000000000000000000035671266465517700265210ustar00rootroot00000000000000 * * 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\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; } } src/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php000066400000000000000000000016201266465517700250370ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/GroupSequenceProviderEntity.php000066400000000000000000000014301266465517700303420ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraint.php000066400000000000000000000006011266465517700262770ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php000066400000000000000000000005121266465517700301460ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Validator/Tests/Fixtures/LegacyClassMetadata.php000066400000000000000000000011071266465517700265010ustar00rootroot00000000000000 * * 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\ClassBasedInterface; use Symfony\Component\Validator\MetadataInterface; use Symfony\Component\Validator\PropertyMetadataContainerInterface; interface LegacyClassMetadata extends MetadataInterface, PropertyMetadataContainerInterface, ClassBasedInterface { } src/Symfony/Component/Validator/Tests/Fixtures/PropertyConstraint.php000066400000000000000000000007311266465517700265410ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/Reference.php000066400000000000000000000010541266465517700245450ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php000066400000000000000000000027551266465517700301470ustar00rootroot00000000000000 * * 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\ConstraintViolationList; use Symfony\Component\Validator\GlobalExecutionContextInterface; use Symfony\Component\Validator\ValidationVisitorInterface; /** * @since 2.5.3 * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0 */ class StubGlobalExecutionContext implements GlobalExecutionContextInterface { private $violations; private $root; private $visitor; public function __construct($root = null, ValidationVisitorInterface $visitor = null) { $this->violations = new ConstraintViolationList(); $this->root = $root; $this->visitor = $visitor; } public function getViolations() { return $this->violations; } public function setRoot($root) { $this->root = $root; } public function getRoot() { return $this->root; } public function setVisitor(ValidationVisitorInterface $visitor) { $this->visitor = $visitor; } public function getVisitor() { return $this->visitor; } public function getValidatorFactory() { } public function getMetadataFactory() { } } src/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php000066400000000000000000000265241266465517700263440ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Constraints\Collection; use Symfony\Component\Validator\Constraints\All; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\ExecutionContext; use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; use Symfony\Component\Validator\ValidationVisitor; /** * @group legacy */ class LegacyExecutionContextTest extends \PHPUnit_Framework_TestCase { const TRANS_DOMAIN = 'trans_domain'; private $visitor; private $violations; private $metadata; private $metadataFactory; private $globalContext; private $translator; /** * @var ExecutionContext */ private $context; protected function setUp() { $this->visitor = $this->getMockBuilder('Symfony\Component\Validator\ValidationVisitor') ->disableOriginalConstructor() ->getMock(); $this->violations = new ConstraintViolationList(); $this->metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface'); $this->metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); $this->globalContext = $this->getMock('Symfony\Component\Validator\GlobalExecutionContextInterface'); $this->globalContext->expects($this->any()) ->method('getRoot') ->will($this->returnValue('Root')); $this->globalContext->expects($this->any()) ->method('getViolations') ->will($this->returnValue($this->violations)); $this->globalContext->expects($this->any()) ->method('getVisitor') ->will($this->returnValue($this->visitor)); $this->globalContext->expects($this->any()) ->method('getMetadataFactory') ->will($this->returnValue($this->metadataFactory)); $this->translator = $this->getMock('Symfony\Component\Translation\TranslatorInterface'); $this->context = new ExecutionContext($this->globalContext, $this->translator, self::TRANS_DOMAIN, $this->metadata, 'currentValue', 'Group', 'foo.bar'); } protected function tearDown() { $this->globalContext = null; $this->context = null; } public function testInit() { $this->assertCount(0, $this->context->getViolations()); $this->assertSame('Root', $this->context->getRoot()); $this->assertSame('foo.bar', $this->context->getPropertyPath()); $this->assertSame('Group', $this->context->getGroup()); } public function testClone() { $clone = clone $this->context; // Cloning the context keeps the reference to the original violation // list. This way we can efficiently duplicate context instances during // the validation run and only modify the properties that need to be // changed. $this->assertSame($this->context->getViolations(), $clone->getViolations()); } public function testAddViolation() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array('foo' => 'bar')) ->will($this->returnValue('Translated error')); $this->context->addViolation('Error', array('foo' => 'bar'), 'invalid'); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array('foo' => 'bar'), 'Root', 'foo.bar', 'invalid' ), )), $this->context->getViolations()); } public function testAddViolationUsesPreconfiguredValueIfNotPassed() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array()) ->will($this->returnValue('Translated error')); $this->context->addViolation('Error'); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array(), 'Root', 'foo.bar', 'currentValue' ), )), $this->context->getViolations()); } public function testAddViolationUsesPassedNullValue() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array('foo1' => 'bar1')) ->will($this->returnValue('Translated error')); $this->translator->expects($this->once()) ->method('transChoice') ->with('Choice error', 1, array('foo2' => 'bar2')) ->will($this->returnValue('Translated choice error')); // passed null value should override preconfigured value "invalid" $this->context->addViolation('Error', array('foo1' => 'bar1'), null); $this->context->addViolation('Choice error', array('foo2' => 'bar2'), null, 1); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array('foo1' => 'bar1'), 'Root', 'foo.bar', null ), new ConstraintViolation( 'Translated choice error', 'Choice error', array('foo2' => 'bar2'), 'Root', 'foo.bar', null, 1 ), )), $this->context->getViolations()); } public function testAddViolationAt() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array('foo' => 'bar')) ->will($this->returnValue('Translated error')); // override preconfigured property path $this->context->addViolationAt('bam.baz', 'Error', array('foo' => 'bar'), 'invalid'); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array('foo' => 'bar'), 'Root', 'foo.bar.bam.baz', 'invalid' ), )), $this->context->getViolations()); } public function testAddViolationAtUsesPreconfiguredValueIfNotPassed() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array()) ->will($this->returnValue('Translated error')); $this->context->addViolationAt('bam.baz', 'Error'); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array(), 'Root', 'foo.bar.bam.baz', 'currentValue' ), )), $this->context->getViolations()); } public function testAddViolationAtUsesPassedNullValue() { $this->translator->expects($this->once()) ->method('trans') ->with('Error', array('foo' => 'bar')) ->will($this->returnValue('Translated error')); $this->translator->expects($this->once()) ->method('transChoice') ->with('Choice error', 2, array('foo' => 'bar')) ->will($this->returnValue('Translated choice error')); // passed null value should override preconfigured value "invalid" $this->context->addViolationAt('bam.baz', 'Error', array('foo' => 'bar'), null); $this->context->addViolationAt('bam.baz', 'Choice error', array('foo' => 'bar'), null, 2); $this->assertEquals(new ConstraintViolationList(array( new ConstraintViolation( 'Translated error', 'Error', array('foo' => 'bar'), 'Root', 'foo.bar.bam.baz', null ), new ConstraintViolation( 'Translated choice error', 'Choice error', array('foo' => 'bar'), 'Root', 'foo.bar.bam.baz', null, 2 ), )), $this->context->getViolations()); } public function testAddViolationPluralTranslationError() { $this->translator->expects($this->once()) ->method('transChoice') ->with('foo') ->will($this->throwException(new \InvalidArgumentException())); $this->translator->expects($this->once()) ->method('trans') ->with('foo'); $this->context->addViolation('foo', array(), null, 2); } public function testGetPropertyPath() { $this->assertEquals('foo.bar', $this->context->getPropertyPath()); } public function testGetPropertyPathWithIndexPath() { $this->assertEquals('foo.bar[bam]', $this->context->getPropertyPath('[bam]')); } public function testGetPropertyPathWithEmptyPath() { $this->assertEquals('foo.bar', $this->context->getPropertyPath('')); } public function testGetPropertyPathWithEmptyCurrentPropertyPath() { $this->context = new ExecutionContext($this->globalContext, $this->translator, self::TRANS_DOMAIN, $this->metadata, 'currentValue', 'Group', ''); $this->assertEquals('bam.baz', $this->context->getPropertyPath('bam.baz')); } public function testGetPropertyPathWithNestedCollectionsAndAllMixed() { $constraints = new Collection(array( 'shelves' => new All(array('constraints' => array( new Collection(array( 'name' => new ConstraintA(), 'books' => new All(array('constraints' => array( new ConstraintA(), ))), )), ))), 'name' => new ConstraintA(), )); $data = array( 'shelves' => array( array( 'name' => 'Research', 'books' => array('foo', 'bar'), ), array( 'name' => 'VALID', 'books' => array('foozy', 'VALID', 'bazzy'), ), ), 'name' => 'Library', ); $expectedViolationPaths = array( '[shelves][0][name]', '[shelves][0][books][0]', '[shelves][0][books][1]', '[shelves][1][books][0]', '[shelves][1][books][2]', '[name]', ); $visitor = new ValidationVisitor('Root', $this->metadataFactory, new ConstraintValidatorFactory(), $this->translator); $context = new ExecutionContext($visitor, $this->translator, self::TRANS_DOMAIN); $context->validateValue($data, $constraints); foreach ($context->getViolations() as $violation) { $violationPaths[] = $violation->getPropertyPath(); } $this->assertEquals($expectedViolationPaths, $violationPaths); } } class ExecutionContextTest_TestClass { public $myProperty; } src/Symfony/Component/Validator/Tests/LegacyValidatorTest.php000066400000000000000000000025301266465517700247500ustar00rootroot00000000000000 * * 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 Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest; use Symfony\Component\Validator\Validator as LegacyValidator; /** * @group legacy */ class LegacyValidatorTest extends AbstractLegacyApiTest { protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { $translator = new IdentityTranslator(); $translator->setLocale('en'); return new LegacyValidator($metadataFactory, new ConstraintValidatorFactory(), $translator, 'validators', $objectInitializers); } /** * @expectedException \Symfony\Component\Validator\Exception\ValidatorException */ public function testValidateValueRejectsValid() { $this->validator->validateValue(new Entity(), new Valid()); } } src/Symfony/Component/Validator/Tests/Mapping/000077500000000000000000000000001266465517700217205ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Mapping/Cache/000077500000000000000000000000001266465517700227235ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php000066400000000000000000000047211266465517700267730ustar00rootroot00000000000000 * * 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 \PHPUnit_Framework_TestCase { private $cache; public function testWrite() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); $this->cache->write($meta); $this->assertInstanceOf( 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $this->cache->read('bar'), 'write() stores metadata' ); } public function testHas() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); $this->assertFalse($this->cache->has('bar'), 'has() returns false when there is no entry'); $this->cache->write($meta); $this->assertTrue($this->cache->has('bar'), 'has() returns true when the is an entry'); } public function testRead() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); $this->assertFalse($this->cache->read('bar'), 'read() returns false when there is no entry'); $this->cache->write($meta); $this->assertInstanceOf( 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $this->cache->read('bar'), 'read() returns metadata' ); } protected function setUp() { $this->cache = new DoctrineCache(new ArrayCache()); } } src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php000066400000000000000000000047071266465517700270600ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Mapping\Cache\ApcCache; /** * @group legacy * @requires extension apc */ class LegacyApcCacheTest extends \PHPUnit_Framework_TestCase { protected function setUp() { if (!ini_get('apc.enabled') || !ini_get('apc.enable_cli')) { $this->markTestSkipped('APC is not enabled.'); } } public function testWrite() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); $cache = new ApcCache('foo'); $cache->write($meta); $this->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', apc_fetch('foobar'), '->write() stores metadata in APC'); } public function testHas() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); apc_delete('foobar'); $cache = new ApcCache('foo'); $this->assertFalse($cache->has('bar'), '->has() returns false when there is no entry'); $cache->write($meta); $this->assertTrue($cache->has('bar'), '->has() returns true when the is an entry'); } public function testRead() { $meta = $this->getMockBuilder('Symfony\\Component\\Validator\\Mapping\\ClassMetadata') ->disableOriginalConstructor() ->setMethods(array('getClassName')) ->getMock(); $meta->expects($this->once()) ->method('getClassName') ->will($this->returnValue('bar')); $cache = new ApcCache('foo'); $cache->write($meta); $this->assertInstanceOf('Symfony\\Component\\Validator\\Mapping\\ClassMetadata', $cache->read('bar'), '->read() returns metadata'); } } src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php000066400000000000000000000235021266465517700260010ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_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->setExpectedException('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); $this->metadata->addConstraint(new Valid()); } public function testAddConstraintRequiresClassConstraints() { $this->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()); $this->metadata->mergeConstraints($parent); $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); $constraints = array( new ConstraintA(array('groups' => array( 'Default', 'EntityParent', 'Entity', ))), new ConstraintA(array('groups' => array( 'Default', 'Entity', ))), ); $members = $this->metadata->getPropertyMetadata('firstName'); $this->assertCount(1, $members); $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); $this->assertEquals($constraints, $members[0]->getConstraints()); } 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->setExpectedException('Symfony\Component\Validator\Exception\GroupDefinitionException'); $this->metadata->setGroupSequence(array('Foo', 'Bar')); } public function testGroupSequencesFailIfContainingDefault() { $this->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'); } } src/Symfony/Component/Validator/Tests/Mapping/Factory/000077500000000000000000000000001266465517700233275ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php000066400000000000000000000015651266465517700315240ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory; class BlackHoleMetadataFactoryTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \LogicException */ public function testGetMetadataForThrowsALogicException() { $metadataFactory = new BlackHoleMetadataFactory(); $metadataFactory->getMetadataFor('foo'); } public function testHasMetadataForReturnsFalse() { $metadataFactory = new BlackHoleMetadataFactory(); $this->assertFalse($metadataFactory->hasMetadataFor('foo')); } } src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php000066400000000000000000000077011266465517700321130ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; public function testLoadClassMetadata() { $factory = new LazyLoadingMetadataFactory(new TestLoader()); $metadata = $factory->getMetadataFor(self::PARENTCLASS); $constraints = array( new ConstraintA(array('groups' => array('Default', 'EntityParent'))), ); $this->assertEquals($constraints, $metadata->getConstraints()); } public function testMergeParentConstraints() { $factory = new LazyLoadingMetadataFactory(new TestLoader()); $metadata = $factory->getMetadataFor(self::CLASSNAME); $constraints = array( new ConstraintA(array('groups' => array( 'Default', 'EntityParent', 'Entity', ))), new ConstraintA(array('groups' => array( 'Default', 'EntityInterface', 'Entity', ))), new ConstraintA(array('groups' => array( 'Default', 'Entity', ))), ); $this->assertEquals($constraints, $metadata->getConstraints()); } public function testWriteMetadataToCache() { $cache = $this->getMock('Symfony\Component\Validator\Mapping\Cache\CacheInterface'); $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); $tester = $this; $constraints = array( new ConstraintA(array('groups' => array('Default', 'EntityParent'))), ); $cache->expects($this->never()) ->method('has'); $cache->expects($this->once()) ->method('read') ->with($this->equalTo(self::PARENTCLASS)) ->will($this->returnValue(false)); $cache->expects($this->once()) ->method('write') ->will($this->returnCallback(function ($metadata) use ($tester, $constraints) { $tester->assertEquals($constraints, $metadata->getConstraints()); })); $metadata = $factory->getMetadataFor(self::PARENTCLASS); $this->assertEquals(self::PARENTCLASS, $metadata->getClassName()); $this->assertEquals($constraints, $metadata->getConstraints()); } public function testReadMetadataFromCache() { $loader = $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $cache = $this->getMock('Symfony\Component\Validator\Mapping\Cache\CacheInterface'); $factory = new LazyLoadingMetadataFactory($loader, $cache); $tester = $this; $metadata = new ClassMetadata(self::PARENTCLASS); $metadata->addConstraint(new ConstraintA()); $loader->expects($this->never()) ->method('loadClassMetadata'); $cache->expects($this->never()) ->method('has'); $cache->expects($this->once()) ->method('read') ->will($this->returnValue($metadata)); $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENTCLASS)); } } class TestLoader implements LoaderInterface { public function loadClassMetadata(ClassMetadata $metadata) { $metadata->addConstraint(new ConstraintA()); } } src/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php000066400000000000000000000036051266465517700261700ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Mapping\GetterMetadata; use Symfony\Component\Validator\Tests\Fixtures\Entity; class GetterMetadataTest extends \PHPUnit_Framework_TestCase { const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; public function testInvalidPropertyName() { $this->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'); $this->assertEquals('valid', $metadata->getPropertyValue($entity)); } public function testGetPropertyValueFromHasser() { $entity = new Entity(); $metadata = new GetterMetadata(self::CLASSNAME, 'permissions'); $this->assertEquals('permissions', $metadata->getPropertyValue($entity)); } } src/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php000066400000000000000000000043311266465517700274510ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Mapping\ElementMetadata; use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; /** * @group legacy */ class LegacyElementMetadataTest extends \PHPUnit_Framework_TestCase { protected $metadata; protected function setUp() { $this->metadata = new TestElementMetadata(); } protected function tearDown() { $this->metadata = null; } public function testAddConstraints() { $this->metadata->addConstraint($constraint1 = new ConstraintA()); $this->metadata->addConstraint($constraint2 = new ConstraintA()); $this->assertEquals(array($constraint1, $constraint2), $this->metadata->getConstraints()); } public function testMultipleConstraintsOfTheSameType() { $constraint1 = new ConstraintA(array('property1' => 'A')); $constraint2 = new ConstraintA(array('property1' => 'B')); $this->metadata->addConstraint($constraint1); $this->metadata->addConstraint($constraint2); $this->assertEquals(array($constraint1, $constraint2), $this->metadata->getConstraints()); } public function testFindConstraintsByGroup() { $constraint1 = new ConstraintA(array('groups' => 'TestGroup')); $constraint2 = new ConstraintB(); $this->metadata->addConstraint($constraint1); $this->metadata->addConstraint($constraint2); $this->assertEquals(array($constraint1), $this->metadata->findConstraints('TestGroup')); } 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); } } class TestElementMetadata extends ElementMetadata { } src/Symfony/Component/Validator/Tests/Mapping/Loader/000077500000000000000000000000001266465517700231265ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php000066400000000000000000000007341266465517700310460ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php000066400000000000000000000161171266465517700277460ustar00rootroot00000000000000 * * 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 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\AnnotationLoader; use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; class AnnotationLoaderTest extends \PHPUnit_Framework_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('validateMe')); $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->addGetterConstraint('lastName', new NotNull()); $expected->addGetterConstraint('valid', 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('validateMe')); $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->addGetterConstraint('lastName', new NotNull()); $expected->addGetterConstraint('valid', 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); } } src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php000066400000000000000000000030741266465517700266740ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; class FilesLoaderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); } } src/Symfony/Component/Validator/Tests/Mapping/Loader/LoaderChainTest.php000066400000000000000000000054011266465517700266500ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Mapping\Loader\LoaderChain; class LoaderChainTest extends \PHPUnit_Framework_TestCase { public function testAllLoadersAreCalled() { $metadata = new ClassMetadata('\stdClass'); $loader1 = $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $loader1->expects($this->once()) ->method('loadClassMetadata') ->with($this->equalTo($metadata)); $loader2 = $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $loader1->expects($this->any()) ->method('loadClassMetadata') ->will($this->returnValue(true)); $loader2 = $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $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->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $loader1->expects($this->any()) ->method('loadClassMetadata') ->will($this->returnValue(false)); $loader2 = $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); $loader2->expects($this->any()) ->method('loadClassMetadata') ->will($this->returnValue(false)); $chain = new LoaderChain(array( $loader1, $loader2, )); $this->assertFalse($chain->loadClassMetadata($metadata)); } } src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php000066400000000000000000000076361266465517700302320ustar00rootroot00000000000000 * * 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; use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; class StaticMethodLoaderTest extends \PHPUnit_Framework_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()); } } src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php000066400000000000000000000131671266465517700271760ustar00rootroot00000000000000 * * 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\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\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 \PHPUnit_Framework_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->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->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->setExpectedException('\Symfony\Component\Validator\Exception\MappingException'); $loader->loadClassMetadata($metadata); } } } src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php000066400000000000000000000125651266465517700273410ustar00rootroot00000000000000 * * 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\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 \PHPUnit_Framework_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)); } /** * @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->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); } } src/Symfony/Component/Validator/Tests/Mapping/Loader/bad-format.yml000066400000000000000000000004401266465517700256630ustar00rootroot00000000000000namespaces: 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": ~ src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml000066400000000000000000000013341266465517700317450ustar00rootroot00000000000000 Symfony\Component\Validator\Tests\Fixtures\ src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.xml000066400000000000000000000065551266465517700275000ustar00rootroot00000000000000 Symfony\Component\Validator\Tests\Fixtures\ Foo Entity validateMe validateMeStatic Symfony\Component\Validator\Tests\Fixtures\CallbackClass callback A B src/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml000066400000000000000000000030041266465517700274630ustar00rootroot00000000000000namespaces: 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 src/Symfony/Component/Validator/Tests/Mapping/Loader/empty-mapping.yml000066400000000000000000000000001266465517700264260ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Mapping/Loader/nonvalid-mapping.yml000066400000000000000000000000041266465517700271060ustar00rootroot00000000000000foo src/Symfony/Component/Validator/Tests/Mapping/Loader/withdoctype.xml000066400000000000000000000006361266465517700262200ustar00rootroot00000000000000 src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php000066400000000000000000000064361266465517700261520ustar00rootroot00000000000000 * * 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 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 \PHPUnit_Framework_TestCase { protected $metadata; protected function setUp() { $this->metadata = new TestMemberMetadata( 'Symfony\Component\Validator\Tests\Fixtures\Entity', 'getLastName', 'lastName' ); } protected function tearDown() { $this->metadata = null; } /** * @group legacy */ public function testLegacyAddValidSetsMemberToCascaded() { $result = $this->metadata->addConstraint(new Valid()); $this->assertEquals(array(), $this->metadata->getConstraints()); $this->assertEquals($result, $this->metadata); $this->assertTrue($this->metadata->isCascaded()); } /** * @group legacy */ public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded() { $result = $this->metadata->addConstraint($constraint = new ConstraintA()); $this->assertEquals(array($constraint), $this->metadata->getConstraints()); $this->assertEquals($result, $this->metadata); $this->assertFalse($this->metadata->isCascaded()); } public function testAddConstraintRequiresClassConstraints() { $this->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); } /** * @group legacy */ public function testLegacySerializeCollectionCascadedDeeply() { $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) { } } src/Symfony/Component/Validator/Tests/Mapping/PropertyMetadataTest.php000066400000000000000000000026471266465517700265670ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Mapping\PropertyMetadata; use Symfony\Component\Validator\Tests\Fixtures\Entity; class PropertyMetadataTest extends \PHPUnit_Framework_TestCase { const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; public function testInvalidPropertyName() { $this->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)); } } src/Symfony/Component/Validator/Tests/Resources/000077500000000000000000000000001266465517700222775ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php000066400000000000000000000014341266465517700271330ustar00rootroot00000000000000 * * 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; class TranslationFilesTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider provideTranslationFiles */ public function testTranslationFileIsValid($filePath) { \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') ); } } src/Symfony/Component/Validator/Tests/Util/000077500000000000000000000000001266465517700212425ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php000066400000000000000000000022261266465517700252560ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\Util\PropertyPath; class PropertyPathTest extends \PHPUnit_Framework_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.'), ); } } src/Symfony/Component/Validator/Tests/Validator/000077500000000000000000000000001266465517700222525ustar00rootroot00000000000000src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php000066400000000000000000000664051266465517700266510ustar00rootroot00000000000000 * * 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\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\MetadataFactoryInterface; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Tests\Fixtures\FailingConstraint; use Symfony\Component\Validator\Tests\Fixtures\FakeClassMetadata; use Symfony\Component\Validator\Tests\Fixtures\Reference; use Symfony\Component\Validator\Validator\ValidatorInterface; /** * Verifies that a validator satisfies the API of Symfony 2.5+. * * @since 2.5 * * @author Bernhard Schussek */ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest { /** * @var ValidatorInterface */ protected $validator; /** * @param MetadataFactoryInterface $metadataFactory * * @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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $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 */ $test->assertCount(1, $violations); $test->assertSame('Message value', $violations[0]->getMessage()); $test->assertSame('Message %param%', $violations[0]->getMessageTemplate()); $test->assertSame(array('%param%' => 'value'), $violations[0]->getParameters()); $test->assertSame('', $violations[0]->getPropertyPath()); // The root is different as we're in a new context $test->assertSame($entity->reference, $violations[0]->getRoot()); $test->assertSame($entity->reference, $violations[0]->getInvalidValue()); $test->assertNull($violations[0]->getPlural()); $test->assertNull($violations[0]->getCode()); // Verify that this method is called $context->addViolation('Separate violation'); }; $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity->reference, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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); $test->assertSame('Separate violation', $violations[0]->getMessage()); } public function testValidateInContext() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { $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 $test->assertSame($previousValue, $context->getValue()); $test->assertSame($previousObject, $context->getObject()); $test->assertSame($previousMetadata, $context->getMetadata()); $test->assertSame($previousPath, $context->getPropertyPath()); $test->assertSame($previousGroup, $context->getGroup()); }; $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('subpath', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { $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 $test->assertSame($previousValue, $context->getValue()); $test->assertSame($previousObject, $context->getObject()); $test->assertSame($previousMetadata, $context->getMetadata()); $test->assertSame($previousPath, $context->getPropertyPath()); $test->assertSame($previousGroup, $context->getGroup()); }; $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('subpath[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array('key' => $entity)); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($traversable, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array('key' => $entity)); $callback = function ($value, ExecutionContextInterface $context) use ($test) { $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new \ArrayIterator(array('key' => new Reference())); $callback = function ($value, ExecutionContextInterface $context) use ($test) { $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new \ArrayIterator(array('key' => new Reference())); $callback = function ($value, ExecutionContextInterface $context) use ($test) { $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new \ArrayIterator(array('key' => new Reference())); $callback = function ($value, ExecutionContextInterface $context) use ($test) { $test->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()); } /** * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException * @group legacy */ public function testMetadataMustImplementClassMetadataInterface() { $entity = new Entity(); $metadata = $this->getMock('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata'); $metadata->expects($this->any()) ->method('getClassName') ->will($this->returnValue(get_class($entity))); $this->metadataFactory->addMetadata($metadata); $this->validator->validate($entity); } /** * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException * @group legacy */ public function testReferenceMetadataMustImplementClassMetadataInterface() { $entity = new Entity(); $entity->reference = new Reference(); $metadata = $this->getMock('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata'); $metadata->expects($this->any()) ->method('getClassName') ->will($this->returnValue(get_class($entity->reference))); $this->metadataFactory->addMetadata($metadata); $this->metadata->addPropertyConstraint('reference', new Valid()); $this->validator->validate($entity); } /** * @expectedException \Symfony\Component\Validator\Exception\UnsupportedMetadataException * @group legacy */ public function testLegacyPropertyMetadataMustImplementPropertyMetadataInterface() { $entity = new Entity(); // Legacy interface $propertyMetadata = $this->getMock('Symfony\Component\Validator\MetadataInterface'); $metadata = new FakeClassMetadata(get_class($entity)); $metadata->addCustomPropertyMetadata('firstName', $propertyMetadata); $this->metadataFactory->addMetadata($metadata); $this->validator->validate($entity); } 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() { $test = $this; $called = false; $entity = new Entity(); $entity->firstName = 'Bernhard'; $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, &$called) { $called = true; $test->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() { $test = $this; $entity = new Entity(); $entity->initialized = false; // prepare initializers that set "initialized" to true $initializer1 = $this->getMock('Symfony\\Component\\Validator\\ObjectInitializerInterface'); $initializer2 = $this->getMock('Symfony\\Component\\Validator\\ObjectInitializerInterface'); $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) use ($test) { $test->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()); } } src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php000066400000000000000000000274171266465517700271600ustar00rootroot00000000000000 * * 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\Valid; use Symfony\Component\Validator\ConstraintViolationInterface; use Symfony\Component\Validator\ExecutionContextInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Tests\Fixtures\Reference; use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; /** * Verifies that a validator satisfies the API of Symfony < 2.5. * * @since 2.5 * * @author Bernhard Schussek * @group legacy */ abstract class AbstractLegacyApiTest extends AbstractValidatorTest { /** * @var LegacyValidatorInterface */ protected $validator; /** * @param MetadataFactoryInterface $metadataFactory * * @return LegacyValidatorInterface */ 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) { if (null === $constraints) { $constraints = new Valid(); } if ($constraints instanceof Valid) { return $this->validator->validate($value, $groups, $constraints->traverse, $constraints->deep); } return $this->validator->validateValue($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); } /** * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException */ public function testTraversableTraverseDisabled() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array('key' => $entity)); $callback = function () use ($test) { $test->fail('Should not be called'); }; $this->metadata->addConstraint(new Callback(array( 'callback' => $callback, 'groups' => 'Group', ))); $this->validator->validate($traversable, 'Group'); } /** * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException */ public function testRecursiveTraversableRecursiveTraversalDisabled() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array( 2 => new \ArrayIterator(array('key' => $entity)), )); $callback = function () use ($test) { $test->fail('Should not be called'); }; $this->metadata->addConstraint(new Callback(array( 'callback' => $callback, 'groups' => 'Group', ))); $this->validator->validate($traversable, 'Group'); } public function testValidateInContext() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { $previousValue = $context->getValue(); $previousMetadata = $context->getMetadata(); $previousPath = $context->getPropertyPath(); $previousGroup = $context->getGroup(); $context->validate($value->reference, 'subpath'); // context changes shouldn't leak out of the validate() call $test->assertSame($previousValue, $context->getValue()); $test->assertSame($previousMetadata, $context->getMetadata()); $test->assertSame($previousPath, $context->getPropertyPath()); $test->assertSame($previousGroup, $context->getGroup()); }; $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('subpath', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($test->metadataFactory, $context->getMetadataFactory()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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, '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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { $previousValue = $context->getValue(); $previousMetadata = $context->getMetadata(); $previousPath = $context->getPropertyPath(); $previousGroup = $context->getGroup(); $context->validate(array('key' => $value->reference), 'subpath'); // context changes shouldn't leak out of the validate() call $test->assertSame($previousValue, $context->getValue()); $test->assertSame($previousMetadata, $context->getMetadata()); $test->assertSame($previousPath, $context->getPropertyPath()); $test->assertSame($previousGroup, $context->getGroup()); }; $callback2 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('subpath[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($test->metadataFactory, $context->getMetadataFactory()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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, '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 testAddCustomizedViolation() { $entity = new Entity(); $callback = function ($value, ExecutionContextInterface $context) { $context->addViolation( 'Message %param%', array('%param%' => 'value'), 'Invalid value', 2, 'Code' ); }; $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('Code', $violations[0]->getCode()); } public function testInitializeObjectsOnFirstValidation() { $test = $this; $entity = new Entity(); $entity->initialized = false; // prepare initializers that set "initialized" to true $initializer1 = $this->getMock('Symfony\\Component\\Validator\\ObjectInitializerInterface'); $initializer2 = $this->getMock('Symfony\\Component\\Validator\\ObjectInitializerInterface'); $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) use ($test) { $test->assertTrue($object->initialized); // validate again in same group $context->validate($object); // validate again in other group $context->validate($object, '', 'SomeGroup'); }; $this->metadata->addConstraint(new Callback($callback)); $this->validate($entity); $this->assertTrue($entity->initialized); } public function testGetMetadataFactory() { $this->assertSame($this->metadataFactory, $this->validator->getMetadataFactory()); } } src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php000066400000000000000000001504611266465517700272430ustar00rootroot00000000000000 * * 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\GroupSequence; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\ConstraintViolationInterface; use Symfony\Component\Validator\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; /** * @since 2.5 * * @author Bernhard Schussek */ abstract class AbstractValidatorTest extends \PHPUnit_Framework_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() { $test = $this; $callback = function ($value, ExecutionContextInterface $context) use ($test) { $test->assertNull($context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame('Bernhard', $context->getRoot()); $test->assertSame('Bernhard', $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->firstName = 'Bernhard'; $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertSame('firstName', $context->getPropertyName()); $test->assertSame('firstName', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Bernhard', $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->setLastName('Schussek'); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->metadata->getPropertyMetadata('lastName'); $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertSame('lastName', $context->getPropertyName()); $test->assertSame('lastName', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Schussek', $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $array = array('key' => $entity); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $array) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($array, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $array = array(2 => array('key' => $entity)); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $array) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('[2][key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($array, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array('key' => $entity)); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($traversable, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $traversable = new \ArrayIterator(array( 2 => new \ArrayIterator(array('key' => $entity)), )); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, $traversable) { $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('[2][key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->metadata, $context->getMetadata()); $test->assertSame($traversable, $context->getRoot()); $test->assertSame($entity, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('reference', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference, $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $entity->reference->value = 'Foobar'; $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->referenceMetadata->getPropertyMetadata('value'); $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertSame('value', $context->getPropertyName()); $test->assertSame('reference.value', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Foobar', $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new Reference(); $entity->reference->setPrivateValue('Bamboo'); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->referenceMetadata->getPropertyMetadata('privateValue'); $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertSame('privateValue', $context->getPropertyName()); $test->assertSame('reference.privateValue', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Bamboo', $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = array('key' => new Reference()); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('reference[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference['key'], $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = array(2 => array('key' => new Reference())); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('reference[2][key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference[2]['key'], $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new \ArrayIterator(array('key' => new Reference())); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('reference[key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference['key'], $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->reference = new \ArrayIterator(array( 2 => new \ArrayIterator(array('key' => new Reference())), )); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $test->assertSame($test::REFERENCE_CLASS, $context->getClassName()); $test->assertNull($context->getPropertyName()); $test->assertSame('reference[2][key]', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($test->referenceMetadata, $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame($entity->reference[2]['key'], $context->getValue()); $test->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() { $test = $this; $entity = new Entity(); $entity->firstName = 'Bernhard'; $entity->setLastName('Schussek'); $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertSame('firstName', $context->getPropertyName()); $test->assertSame('firstName', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Bernhard', $context->getValue()); $test->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()); } /** * Cannot be UnsupportedMetadataException for BC with Symfony < 2.5. * * @expectedException \Symfony\Component\Validator\Exception\ValidatorException * @group legacy */ public function testLegacyValidatePropertyFailsIfPropertiesNotSupported() { // $metadata does not implement PropertyMetadataContainerInterface $metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface'); $this->metadataFactory->addMetadataForValue('VALUE', $metadata); $this->validateProperty('VALUE', 'someProperty'); } /** * 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() { $test = $this; $entity = new Entity(); $entity->setLastName('Schussek'); $callback1 = function ($value, ExecutionContextInterface $context) use ($test, $entity) { $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertSame('firstName', $context->getPropertyName()); $test->assertSame('firstName', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame($entity, $context->getRoot()); $test->assertSame('Bernhard', $context->getValue()); $test->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() { $test = $this; $callback1 = function ($value, ExecutionContextInterface $context) use ($test) { $propertyMetadatas = $test->metadata->getPropertyMetadata('firstName'); $test->assertSame($test::ENTITY_CLASS, $context->getClassName()); $test->assertSame('firstName', $context->getPropertyName()); $test->assertSame('', $context->getPropertyPath()); $test->assertSame('Group', $context->getGroup()); $test->assertSame($propertyMetadatas[0], $context->getMetadata()); $test->assertSame('Bernhard', $context->getRoot()); $test->assertSame('Bernhard', $context->getValue()); $test->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()); } /** * Cannot be UnsupportedMetadataException for BC with Symfony < 2.5. * * @expectedException \Symfony\Component\Validator\Exception\ValidatorException * @group legacy */ public function testLegacyValidatePropertyValueFailsIfPropertiesNotSupported() { // $metadata does not implement PropertyMetadataContainerInterface $metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface'); $this->metadataFactory->addMetadataForValue('VALUE', $metadata); $this->validatePropertyValue('VALUE', 'someProperty', 'someValue'); } /** * 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()); } public function testReplaceDefaultGroupWithObjectFromGroupSequenceProvider() { $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3', 'Entity')); $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(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } public function testReplaceDefaultGroupWithArrayFromGroupSequenceProvider() { $sequence = array('Group 1', 'Group 2', 'Group 3', 'Entity'); $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(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } } src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php000066400000000000000000000022251266465517700301460ustar00rootroot00000000000000 * * 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\LegacyExecutionContextFactory; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\LegacyValidator; /** * @group legacy */ class LegacyValidator2Dot5ApiTest extends Abstract2Dot5ApiTest { protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { $translator = new IdentityTranslator(); $translator->setLocale('en'); $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); $validatorFactory = new ConstraintValidatorFactory(); return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); } } src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php000066400000000000000000000022271266465517700304570ustar00rootroot00000000000000 * * 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\LegacyExecutionContextFactory; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\LegacyValidator; /** * @group legacy */ class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest { protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { $translator = new IdentityTranslator(); $translator->setLocale('en'); $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); $validatorFactory = new ConstraintValidatorFactory(); return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); } } src/Symfony/Component/Validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php000066400000000000000000000037271266465517700307210ustar00rootroot00000000000000 * * 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\MetadataFactoryInterface; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Validator\RecursiveValidator; class RecursiveValidator2Dot5ApiTest extends Abstract2Dot5ApiTest { 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(); $validatorContext = $this->getMock('Symfony\Component\Validator\Validator\ContextualValidatorInterface'); $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()); } } src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php000066400000000000000000000063321266465517700251360ustar00rootroot00000000000000 * * 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 Symfony\Component\Validator\ValidatorBuilder; use Symfony\Component\Validator\ValidatorBuilderInterface; class ValidatorBuilderTest extends \PHPUnit_Framework_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->getMock('Symfony\Component\Validator\ObjectInitializerInterface') )); } 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->getMock('Symfony\Component\Validator\Mapping\Cache\CacheInterface')) ); } public function testSetConstraintValidatorFactory() { $this->assertSame($this->builder, $this->builder->setConstraintValidatorFactory( $this->getMock('Symfony\Component\Validator\ConstraintValidatorFactoryInterface')) ); } public function testSetTranslator() { $this->assertSame($this->builder, $this->builder->setTranslator( $this->getMock('Symfony\Component\Translation\TranslatorInterface')) ); } 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()); } } src/Symfony/Component/Validator/Util/000077500000000000000000000000001266465517700201405ustar00rootroot00000000000000src/Symfony/Component/Validator/Util/PropertyPath.php000066400000000000000000000027641266465517700233230ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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() { } } src/Symfony/Component/Validator/Validation.php000066400000000000000000000030111266465517700220210ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Entry point for the Validator component. * * @author Bernhard Schussek */ final class Validation { /** * The Validator API provided by Symfony 2.4 and older. * * @deprecated use API_VERSION_2_5_BC instead. */ const API_VERSION_2_4 = 1; /** * The Validator API provided by Symfony 2.5 and newer. */ const API_VERSION_2_5 = 2; /** * The Validator API provided by Symfony 2.5 and newer with a backwards * compatibility layer for 2.4 and older. */ const API_VERSION_2_5_BC = 3; /** * 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() { } } src/Symfony/Component/Validator/ValidationVisitor.php000066400000000000000000000150401266465517700234060ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; @trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\NoSuchMetadataException; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** * Default implementation of {@link ValidationVisitorInterface} and * {@link GlobalExecutionContextInterface}. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. */ class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionContextInterface { /** * @var mixed */ private $root; /** * @var MetadataFactoryInterface */ private $metadataFactory; /** * @var ConstraintValidatorFactoryInterface */ private $validatorFactory; /** * @var TranslatorInterface */ private $translator; /** * @var null|string */ private $translationDomain; /** * @var array */ private $objectInitializers; /** * @var ConstraintViolationList */ private $violations; /** * @var array */ private $validatedObjects = array(); /** * Creates a new validation visitor. * * @param mixed $root The value passed to the validator. * @param MetadataFactoryInterface $metadataFactory The factory for obtaining metadata instances. * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating constraint validators. * @param TranslatorInterface $translator The translator for translating violation messages. * @param string|null $translationDomain The domain of the translation messages. * @param ObjectInitializerInterface[] $objectInitializers The initializers for preparing objects before validation. * * @throws UnexpectedTypeException If any of the object initializers is not an instance of ObjectInitializerInterface */ public function __construct($root, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = null, array $objectInitializers = array()) { foreach ($objectInitializers as $initializer) { if (!$initializer instanceof ObjectInitializerInterface) { throw new UnexpectedTypeException($initializer, 'Symfony\Component\Validator\ObjectInitializerInterface'); } } $this->root = $root; $this->metadataFactory = $metadataFactory; $this->validatorFactory = $validatorFactory; $this->translator = $translator; $this->translationDomain = $translationDomain; $this->objectInitializers = $objectInitializers; $this->violations = new ConstraintViolationList(); } /** * {@inheritdoc} */ public function visit(MetadataInterface $metadata, $value, $group, $propertyPath) { $context = new ExecutionContext( $this, $this->translator, $this->translationDomain, $metadata, $value, $group, $propertyPath ); $context->validateValue($value, $metadata->findConstraints($group)); } /** * {@inheritdoc} */ public function validate($value, $group, $propertyPath, $traverse = false, $deep = false) { if (null === $value) { return; } if (is_object($value)) { $hash = spl_object_hash($value); // Exit, if the object is already validated for the current group if (isset($this->validatedObjects[$hash][$group])) { return; } // Initialize if the object wasn't initialized before if (!isset($this->validatedObjects[$hash])) { foreach ($this->objectInitializers as $initializer) { if (!$initializer instanceof ObjectInitializerInterface) { throw new \LogicException('Validator initializers must implement ObjectInitializerInterface.'); } $initializer->initialize($value); } } // Remember validating this object before starting and possibly // traversing the object graph $this->validatedObjects[$hash][$group] = true; } // Validate arrays recursively by default, otherwise every driver needs // to implement special handling for arrays. // https://github.com/symfony/symfony/issues/6246 if (is_array($value) || ($traverse && $value instanceof \Traversable)) { foreach ($value as $key => $element) { // Ignore any scalar values in the collection if (is_object($element) || is_array($element)) { // Only repeat the traversal if $deep is set $this->validate($element, $group, $propertyPath.'['.$key.']', $deep, $deep); } } try { $this->metadataFactory->getMetadataFor($value)->accept($this, $value, $group, $propertyPath); } catch (NoSuchMetadataException $e) { // Metadata doesn't necessarily have to exist for // traversable objects, because we know how to validate // them anyway. Optionally, additional metadata is supported. } } else { $this->metadataFactory->getMetadataFor($value)->accept($this, $value, $group, $propertyPath); } } /** * {@inheritdoc} */ public function getViolations() { return $this->violations; } /** * {@inheritdoc} */ public function getRoot() { return $this->root; } /** * {@inheritdoc} */ public function getVisitor() { return $this; } /** * {@inheritdoc} */ public function getValidatorFactory() { return $this->validatorFactory; } /** * {@inheritdoc} */ public function getMetadataFactory() { return $this->metadataFactory; } } src/Symfony/Component/Validator/ValidationVisitorInterface.php000066400000000000000000000070221266465517700252300ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Validates values against constraints defined in {@link MetadataInterface} * instances. * * This interface is an implementation of the Visitor design pattern. A value * is validated by first passing it to the {@link validate} method. That method * will determine the matching {@link MetadataInterface} for validating the * value. It then calls the {@link MetadataInterface::accept} method of that * metadata. accept() does two things: * *
      *
    1. It calls {@link visit} to validate the value against the constraints of * the metadata.
    2. *
    3. It calls accept() on all nested metadata instances with the * corresponding values extracted from the current value. For example, if the * current metadata represents a class and the current value is an object of * that class, the metadata contains nested instances for each property of that * class. It forwards the call to these nested metadata with the values of the * corresponding properties in the original object.
    4. *
    * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. */ interface ValidationVisitorInterface { /** * Validates a value. * * If the value is an array or a traversable object, you can set the * parameter $traverse to true in order to run through * the collection and validate each element. If these elements can be * collections again and you want to traverse them recursively, set the * parameter $deep to true as well. * * If you set $traversable to true, the visitor will * nevertheless try to find metadata for the collection and validate its * constraints. If no such metadata is found, the visitor ignores that and * only iterates the collection. * * If you don't set $traversable to true and the visitor * does not find metadata for the given value, it will fail with an * exception. * * @param mixed $value The value to validate. * @param string $group The validation group to validate. * @param string $propertyPath The current property path in the validation graph. * @param bool $traverse Whether to traverse the value if it is traversable. * @param bool $deep Whether to traverse nested traversable values recursively. * * @throws Exception\NoSuchMetadataException If no metadata can be found for * the given value. */ public function validate($value, $group, $propertyPath, $traverse = false, $deep = false); /** * Validates a value against the constraints defined in some metadata. * * This method implements the Visitor design pattern. See also * {@link ValidationVisitorInterface}. * * @param MetadataInterface $metadata The metadata holding the constraints. * @param mixed $value The value to validate. * @param string $group The validation group to validate. * @param string $propertyPath The current property path in the validation graph. */ public function visit(MetadataInterface $metadata, $value, $group, $propertyPath); } src/Symfony/Component/Validator/Validator.php000066400000000000000000000164551266465517700216740ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; @trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\Exception\ValidatorException; /** * Default implementation of {@link ValidatorInterface}. * * @author Fabien Potencier * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\RecursiveValidator} instead. */ class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryInterface { /** * @var MetadataFactoryInterface */ private $metadataFactory; /** * @var ConstraintValidatorFactoryInterface */ private $validatorFactory; /** * @var TranslatorInterface */ private $translator; /** * @var null|string */ private $translationDomain; /** * @var array */ private $objectInitializers; public function __construct( MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = 'validators', array $objectInitializers = array() ) { $this->metadataFactory = $metadataFactory; $this->validatorFactory = $validatorFactory; $this->translator = $translator; $this->translationDomain = $translationDomain; $this->objectInitializers = $objectInitializers; } /** * {@inheritdoc} */ public function getMetadataFactory() { return $this->metadataFactory; } /** * {@inheritdoc} */ public function getMetadataFor($value) { return $this->metadataFactory->getMetadataFor($value); } /** * {@inheritdoc} */ public function hasMetadataFor($value) { return $this->metadataFactory->hasMetadataFor($value); } /** * {@inheritdoc} */ public function validate($value, $groups = null, $traverse = false, $deep = false) { $visitor = $this->createVisitor($value); foreach ($this->resolveGroups($groups) as $group) { $visitor->validate($value, $group, '', $traverse, $deep); } return $visitor->getViolations(); } /** * {@inheritdoc} * * @throws ValidatorException If the metadata for the value does not support properties. */ public function validateProperty($containingValue, $property, $groups = null) { $visitor = $this->createVisitor($containingValue); $metadata = $this->metadataFactory->getMetadataFor($containingValue); if (!$metadata instanceof PropertyMetadataContainerInterface) { $valueAsString = is_scalar($containingValue) ? '"'.$containingValue.'"' : 'the value of type '.gettype($containingValue); throw new ValidatorException(sprintf('The metadata for %s does not support properties.', $valueAsString)); } foreach ($this->resolveGroups($groups) as $group) { if (!$metadata->hasPropertyMetadata($property)) { continue; } foreach ($metadata->getPropertyMetadata($property) as $propMeta) { $propMeta->accept($visitor, $propMeta->getPropertyValue($containingValue), $group, $property); } } return $visitor->getViolations(); } /** * {@inheritdoc} * * @throws ValidatorException If the metadata for the value does not support properties. */ public function validatePropertyValue($containingValue, $property, $value, $groups = null) { $visitor = $this->createVisitor(is_object($containingValue) ? $containingValue : $value); $metadata = $this->metadataFactory->getMetadataFor($containingValue); if (!$metadata instanceof PropertyMetadataContainerInterface) { $valueAsString = is_scalar($containingValue) ? '"'.$containingValue.'"' : 'the value of type '.gettype($containingValue); throw new ValidatorException(sprintf('The metadata for '.$valueAsString.' does not support properties.')); } // If $containingValue is passed as class name, take $value as root // and start the traversal with an empty property path $propertyPath = is_object($containingValue) ? $property : ''; foreach ($this->resolveGroups($groups) as $group) { if (!$metadata->hasPropertyMetadata($property)) { continue; } foreach ($metadata->getPropertyMetadata($property) as $propMeta) { $propMeta->accept($visitor, $value, $group, $propertyPath); } } return $visitor->getViolations(); } /** * {@inheritdoc} */ public function validateValue($value, $constraints, $groups = null) { $context = new ExecutionContext($this->createVisitor($value), $this->translator, $this->translationDomain); $constraints = is_array($constraints) ? $constraints : array($constraints); foreach ($constraints as $constraint) { if ($constraint instanceof Valid) { // Why can't the Valid constraint be executed directly? // // It cannot be executed like regular other constraints, because regular // constraints are only executed *if they belong to the validated group*. // The Valid constraint, on the other hand, is always executed and propagates // the group to the cascaded object. The propagated group depends on // // * Whether a group sequence is currently being executed. Then the default // group is propagated. // // * Otherwise the validated group is propagated. throw new ValidatorException( sprintf( 'The constraint %s cannot be validated. Use the method validate() instead.', get_class($constraint) ) ); } $context->validateValue($value, $constraint, '', $groups); } return $context->getViolations(); } /** * @param mixed $root * * @return ValidationVisitor */ private function createVisitor($root) { return new ValidationVisitor( $root, $this->metadataFactory, $this->validatorFactory, $this->translator, $this->translationDomain, $this->objectInitializers ); } /** * @param null|string|string[] $groups * * @return string[] */ private function resolveGroups($groups) { return $groups ? (array) $groups : array(Constraint::DEFAULT_GROUP); } } src/Symfony/Component/Validator/Validator/000077500000000000000000000000001266465517700211505ustar00rootroot00000000000000src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php000066400000000000000000000063001266465517700274750ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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 ContextualValidatorInterface This validator */ 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 ContextualValidatorInterface This validator */ 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 ContextualValidatorInterface This validator */ 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 ContextualValidatorInterface This validator */ 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(); } src/Symfony/Component/Validator/Validator/LegacyValidator.php000066400000000000000000000014661266465517700247420ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Validator; @trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); /** * A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+. * * @since 2.5 * * @author Bernhard Schussek * * @see \Symfony\Component\Validator\ValidatorInterface * @see \Symfony\Component\Validator\Validator\ValidatorInterface * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyValidator extends RecursiveValidator { } src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php000066400000000000000000001053231266465517700275510ustar00rootroot00000000000000 * * 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\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\MetadataFactoryInterface; use Symfony\Component\Validator\ObjectInitializerInterface; use Symfony\Component\Validator\Util\PropertyPath; /** * Recursive implementation of {@link ContextualValidatorInterface}. * * @since 2.5 * * @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(); // 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); 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, true, $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) { // Cannot be UnsupportedMetadataException because of BC with // Symfony < 2.5 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.':'.$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) { // Cannot be UnsupportedMetadataException because of BC with // Symfony < 2.5 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.':'.$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, $traversalStrategy & TraversalStrategy::STOP_RECURSION, $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 bool $stopRecursion Whether to disable * recursive iteration. For * backwards compatibility * with Symfony < 2.5. * @param ExecutionContextInterface $context The current execution context * * @see ClassNode * @see CollectionNode */ private function validateEachObjectIn($collection, $propertyPath, array $groups, $stopRecursion, ExecutionContextInterface $context) { if ($stopRecursion) { $traversalStrategy = TraversalStrategy::NONE; } else { $traversalStrategy = TraversalStrategy::IMPLICIT; } foreach ($collection as $key => $value) { if (is_array($value)) { // Arrays are always cascaded, independent of the specified // traversal strategy // (BC with Symfony < 2.5) $this->validateEachObjectIn( $value, $propertyPath.'['.$key.']', $groups, $stopRecursion, $context ); continue; } // Scalar and null values in the collection are ignored // (BC with Symfony < 2.5) if (is_object($value)) { $this->validateObject( $value, $propertyPath.'['.$key.']', $groups, $traversalStrategy, $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.':'.$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) { // Keep the STOP_RECURSION flag, if it was set $traversalStrategy = $metadata->getTraversalStrategy() | ($traversalStrategy & TraversalStrategy::STOP_RECURSION); } // 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) { // Must throw a ConstraintDefinitionException for backwards // compatibility reasons with Symfony < 2.5 throw new ConstraintDefinitionException(sprintf( 'Traversal was enabled for "%s", but this class '. 'does not implement "\Traversable".', get_class($object) )); } $this->validateEachObjectIn( $object, $propertyPath, $groups, $traversalStrategy & TraversalStrategy::STOP_RECURSION, $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) { // Keep the STOP_RECURSION flag, if it was set $traversalStrategy = $metadata->getTraversalStrategy() | ($traversalStrategy & TraversalStrategy::STOP_RECURSION); } // The $cascadedGroups property is set, if the "Default" group is // overridden by a group sequence // See validateClassNode() $cascadedGroups = count($cascadedGroups) > 0 ? $cascadedGroups : $groups; if (is_array($value)) { // Arrays are always traversed, independent of the specified // traversal strategy // (BC with Symfony < 2.5) $this->validateEachObjectIn( $value, $propertyPath, $cascadedGroups, $traversalStrategy & TraversalStrategy::STOP_RECURSION, $context ); return; } // If the value is a scalar, pass it anyway, because we want // a NoSuchMetadataException to be thrown in that case // (BC with Symfony < 2.5) $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); } } } src/Symfony/Component/Validator/Validator/RecursiveValidator.php000066400000000000000000000150341266465517700255010ustar00rootroot00000000000000 * * 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\Constraints\Valid; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; use Symfony\Component\Validator\Context\ExecutionContextFactoryInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\ObjectInitializerInterface; use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; /** * Recursive implementation of {@link ValidatorInterface}. * * @since 2.5 * * @author Bernhard Schussek */ class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface { /** * @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, $groups = null, $traverse = false, $deep = false) { $numArgs = func_num_args(); // Use new signature if constraints are given in the second argument if (self::testConstraints($groups) && ($numArgs < 3 || 3 === $numArgs && self::testGroups($traverse))) { // Rename to avoid total confusion ;) $constraints = $groups; $groups = $traverse; } else { @trigger_error('The Symfony\Component\Validator\ValidatorInterface::validate method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); $constraints = new Valid(array('traverse' => $traverse, 'deep' => $deep)); } 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(); } /** * {@inheritdoc} */ public function validateValue($value, $constraints, $groups = null) { @trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); return $this->validate($value, $constraints, $groups); } /** * {@inheritdoc} */ public function getMetadataFactory() { @trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); return $this->metadataFactory; } private static function testConstraints($constraints) { return null === $constraints || $constraints instanceof Constraint || (is_array($constraints) && (0 === count($constraints) || current($constraints) instanceof Constraint)); } private static function testGroups($groups) { return null === $groups || is_string($groups) || $groups instanceof GroupSequence || (is_array($groups) && (0 === count($groups) || is_string(current($groups)) || current($groups) instanceof GroupSequence)); } } src/Symfony/Component/Validator/Validator/ValidatorInterface.php000066400000000000000000000100231266465517700254230ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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); } src/Symfony/Component/Validator/ValidatorBuilder.php000066400000000000000000000267211266465517700232000ustar00rootroot00000000000000 * * 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\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Context\ExecutionContextFactory; use Symfony\Component\Validator\Exception\InvalidArgumentException; 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\Loader\AnnotationLoader; use Symfony\Component\Validator\Mapping\Loader\LoaderChain; use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; use Symfony\Component\Validator\Mapping\Loader\XmlFilesLoader; use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; use Symfony\Component\Validator\Mapping\Loader\YamlFilesLoader; 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; /** * @var PropertyAccessorInterface|null */ private $propertyAccessor; /** * {@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) { if (null !== $this->propertyAccessor) { throw new ValidatorException('You cannot set a validator factory after setting a custom property accessor. Remove the call to setPropertyAccessor() if you want to call setConstraintValidatorFactory().'); } $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; } /** * {@inheritdoc} * * @deprecated since version 2.5, to be removed in 3.0. * The validator will function without a property accessor. */ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) { @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); if (null !== $this->validatorFactory) { throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.'); } $this->propertyAccessor = $propertyAccessor; return $this; } /** * {@inheritdoc} * * @deprecated since version 2.7, to be removed in 3.0. */ public function setApiVersion($apiVersion) { @trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED); if (!in_array($apiVersion, array(Validation::API_VERSION_2_4, Validation::API_VERSION_2_5, Validation::API_VERSION_2_5_BC))) { throw new InvalidArgumentException(sprintf('The requested API version is invalid: "%s"', $apiVersion)); } return $this; } /** * {@inheritdoc} */ public function getValidator() { $metadataFactory = $this->metadataFactory; if (!$metadataFactory) { $loaders = array(); if (count($this->xmlMappings) > 1) { $loaders[] = new XmlFilesLoader($this->xmlMappings); } elseif (1 === count($this->xmlMappings)) { $loaders[] = new XmlFileLoader($this->xmlMappings[0]); } if (count($this->yamlMappings) > 1) { $loaders[] = new YamlFilesLoader($this->yamlMappings); } elseif (1 === count($this->yamlMappings)) { $loaders[] = new YamlFileLoader($this->yamlMappings[0]); } foreach ($this->methodMappings as $methodName) { $loaders[] = new StaticMethodLoader($methodName); } if ($this->annotationReader) { $loaders[] = new AnnotationLoader($this->annotationReader); } $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($this->propertyAccessor); $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); } } src/Symfony/Component/Validator/ValidatorBuilderInterface.php000066400000000000000000000134771266465517700250250ustar00rootroot00000000000000 * * 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\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Mapping\Cache\CacheInterface; /** * A configurable builder for ValidatorInterface objects. * * @author Bernhard Schussek */ interface ValidatorBuilderInterface { /** * Adds an object initializer to the validator. * * @param ObjectInitializerInterface $initializer The initializer * * @return ValidatorBuilderInterface The builder object */ public function addObjectInitializer(ObjectInitializerInterface $initializer); /** * Adds a list of object initializers to the validator. * * @param array $initializers The initializer * * @return ValidatorBuilderInterface The builder object */ public function addObjectInitializers(array $initializers); /** * Adds an XML constraint mapping file to the validator. * * @param string $path The path to the mapping file * * @return ValidatorBuilderInterface The builder object */ 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 ValidatorBuilderInterface The builder object */ public function addXmlMappings(array $paths); /** * Adds a YAML constraint mapping file to the validator. * * @param string $path The path to the mapping file * * @return ValidatorBuilderInterface The builder object */ 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 ValidatorBuilderInterface The builder object */ public function addYamlMappings(array $paths); /** * Enables constraint mapping using the given static method. * * @param string $methodName The name of the method * * @return ValidatorBuilderInterface The builder object */ public function addMethodMapping($methodName); /** * Enables constraint mapping using the given static methods. * * @param array $methodNames The names of the methods * * @return ValidatorBuilderInterface The builder object */ public function addMethodMappings(array $methodNames); /** * Enables annotation based constraint mapping. * * @param Reader $annotationReader The annotation reader to be used * * @return ValidatorBuilderInterface The builder object */ public function enableAnnotationMapping(Reader $annotationReader = null); /** * Disables annotation based constraint mapping. * * @return ValidatorBuilderInterface The builder object */ public function disableAnnotationMapping(); /** * Sets the class metadata factory used by the validator. * * @param MetadataFactoryInterface $metadataFactory The metadata factory * * @return ValidatorBuilderInterface The builder object */ public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); /** * Sets the cache for caching class metadata. * * @param CacheInterface $cache The cache instance * * @return ValidatorBuilderInterface The builder object */ public function setMetadataCache(CacheInterface $cache); /** * Sets the constraint validator factory used by the validator. * * @param ConstraintValidatorFactoryInterface $validatorFactory The validator factory * * @return ValidatorBuilderInterface The builder object */ public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); /** * Sets the translator used for translating violation messages. * * @param TranslatorInterface $translator The translator instance * * @return ValidatorBuilderInterface The builder object */ 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 ValidatorBuilderInterface The builder object */ public function setTranslationDomain($translationDomain); /** * Sets the property accessor for resolving property paths. * * @param PropertyAccessorInterface $propertyAccessor The property accessor * * @return ValidatorBuilderInterface The builder object * * @deprecated since version 2.5, to be removed in 3.0. */ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor); /** * Sets the API version that the returned validator should support. * * @param int $apiVersion The required API version * * @return ValidatorBuilderInterface The builder object * * @see Validation::API_VERSION_2_5 * @see Validation::API_VERSION_2_5_BC * @deprecated since version 2.7, to be removed in 3.0. */ public function setApiVersion($apiVersion); /** * Builds and returns a new validator object. * * @return ValidatorInterface The built validator. */ public function getValidator(); } src/Symfony/Component/Validator/ValidatorInterface.php000066400000000000000000000102041266465517700234770ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * Validates values and graphs of objects and arrays. * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link \Symfony\Component\Validator\Validator\ValidatorInterface} instead. */ interface ValidatorInterface { /** * Validates a value. * * The accepted values depend on the {@link MetadataFactoryInterface} * implementation. * * The signature changed with Symfony 2.5 (see * {@link Validator\ValidatorInterface::validate()}. This signature will be * disabled in Symfony 3.0. * * @param mixed $value The value to validate * @param array|null $groups The validation groups to validate. * @param bool $traverse Whether to traverse the value if it is traversable. * @param bool $deep Whether to traverse nested traversable values recursively. * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. */ public function validate($value, $groups = null, $traverse = false, $deep = false); /** * Validates a property of a value against its current value. * * The accepted values depend on the {@link MetadataFactoryInterface} * implementation. * * @param mixed $containingValue The value containing the property. * @param string $property The name of the property to validate. * @param array|null $groups The validation groups to validate. * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. */ public function validateProperty($containingValue, $property, $groups = null); /** * Validate a property of a value against a potential value. * * The accepted values depend on the {@link MetadataFactoryInterface} * implementation. * * @param mixed $containingValue The value containing the property. * @param string $property The name of the property to validate * @param string $value The value to validate against the * constraints of the property. * @param array|null $groups The validation groups to validate. * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. */ public function validatePropertyValue($containingValue, $property, $value, $groups = null); /** * Validates a value against a constraint or a list of constraints. * * @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. * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. * * @deprecated since version 2.5, to be removed in 3.0. * Renamed to {@link Validator\ValidatorInterface::validate()} * in Symfony 2.5. */ public function validateValue($value, $constraints, $groups = null); /** * Returns the factory for metadata instances. * * @return MetadataFactoryInterface The metadata factory. * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\ValidatorInterface::getMetadataFor()} or * {@link Validator\ValidatorInterface::hasMetadataFor()} * instead. */ public function getMetadataFactory(); } src/Symfony/Component/Validator/Violation/000077500000000000000000000000001266465517700211675ustar00rootroot00000000000000src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php000066400000000000000000000113061266465517700272210ustar00rootroot00000000000000 * * 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}. * * @since 2.5 * * @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 )); } } src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php000066400000000000000000000065201266465517700310440ustar00rootroot00000000000000 * * 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. * * @since 2.5 * * @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 ConstraintViolationBuilderInterface This builder */ 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 ConstraintViolationBuilderInterface This builder */ 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 ConstraintViolationBuilderInterface This builder */ 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 ConstraintViolationBuilderInterface This builder * * @see \Symfony\Component\Translation\TranslatorInterface */ public function setTranslationDomain($translationDomain); /** * Sets the invalid value that caused this violation. * * @param mixed $invalidValue The invalid value * * @return ConstraintViolationBuilderInterface This builder */ 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 ConstraintViolationBuilderInterface This builder * * @see \Symfony\Component\Translation\TranslatorInterface::transChoice() */ public function setPlural($number); /** * Sets the violation code. * * @param int $code The violation code * * @return ConstraintViolationBuilderInterface This builder */ public function setCode($code); /** * Sets the cause of the violation. * * @param mixed $cause The cause of the violation * * @return ConstraintViolationBuilderInterface This builder */ public function setCause($cause); /** * Adds the violation to the current execution context. */ public function addViolation(); } src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php000066400000000000000000000064301266465517700303500ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Violation; @trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Validator\ExecutionContextInterface; /** * Backwards-compatible implementation of {@link ConstraintViolationBuilderInterface}. * * @author Bernhard Schussek * * @internal You should not instantiate or use this class. Code against * {@link ConstraintViolationBuilderInterface} instead. * * @deprecated since version 2.5.5, to be removed in 3.0. */ class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInterface { /** * @var ExecutionContextInterface */ private $context; /** * @var string */ private $message; /** * @var array */ private $parameters; /** * @var mixed */ private $invalidValue; /** * @var string */ private $propertyPath; /** * @var int|null */ private $plural; /** * @var mixed */ private $code; public function __construct(ExecutionContextInterface $context, $message, array $parameters) { $this->context = $context; $this->message = $message; $this->parameters = $parameters; $this->invalidValue = $context->getValue(); } /** * {@inheritdoc} */ public function atPath($path) { $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) { // can't be set in the old API 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) { // do nothing - we can't save the cause through the old API return $this; } /** * {@inheritdoc} */ public function addViolation() { if ($this->propertyPath) { $this->context->addViolationAt($this->propertyPath, $this->message, $this->parameters, $this->invalidValue, $this->plural, $this->code); return; } $this->context->addViolation($this->message, $this->parameters, $this->invalidValue, $this->plural, $this->code); } } src/Symfony/Component/Validator/composer.json000066400000000000000000000034161266465517700217510ustar00rootroot00000000000000{ "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.3.9", "symfony/translation": "~2.4" }, "require-dev": { "doctrine/common": "~2.3", "symfony/http-foundation": "~2.1", "symfony/intl": "~2.4", "symfony/yaml": "~2.0,>=2.0.5", "symfony/config": "~2.2", "symfony/property-access": "~2.3", "symfony/expression-language": "~2.4", "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", "egulias/email-validator": "~1.2,>=1.2.1" }, "suggest": { "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 2.4 Validator API", "symfony/expression-language": "For using the 2.4 Expression validator" }, "autoload": { "psr-4": { "Symfony\\Component\\Validator\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Validator/phpunit.xml.dist000066400000000000000000000014751266465517700224050ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/VarDumper/000077500000000000000000000000001266465517700172035ustar00rootroot00000000000000src/Symfony/Component/VarDumper/.gitignore000066400000000000000000000000421266465517700211670ustar00rootroot00000000000000composer.lock phpunit.xml vendor/ src/Symfony/Component/VarDumper/CHANGELOG.md000066400000000000000000000002221266465517700210100ustar00rootroot00000000000000CHANGELOG ========= 2.7.0 ----- * deprecated Cloner\Data::getLimitedClone(). Use withMaxDepth, withMaxItemsPerDepth or withRefHandles instead. src/Symfony/Component/VarDumper/Caster/000077500000000000000000000000001266465517700204245ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Caster/AmqpCaster.php000066400000000000000000000125461266465517700232050ustar00rootroot00000000000000 * * 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; // BC layer in the amqp lib if (method_exists($c, 'getReadTimeout')) { $timeout = $c->getReadTimeout(); } else { $timeout = $c->getTimeout(); } $a += array( $prefix.'isConnected' => $c->isConnected(), $prefix.'login' => $c->getLogin(), $prefix.'password' => $c->getPassword(), $prefix.'host' => $c->getHost(), $prefix.'port' => $c->getPort(), $prefix.'vhost' => $c->getVhost(), $prefix.'readTimeout' => $timeout, ); return $a; } public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; $a += array( $prefix.'isConnected' => $c->isConnected(), $prefix.'channelId' => $c->getChannelId(), $prefix.'prefetchSize' => $c->getPrefetchSize(), $prefix.'prefetchCount' => $c->getPrefetchCount(), $prefix.'connection' => $c->getConnection(), ); return $a; } public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; $a += array( $prefix.'name' => $c->getName(), $prefix.'flags' => self::extractFlags($c->getFlags()), $prefix.'arguments' => $c->getArguments(), $prefix.'connection' => $c->getConnection(), $prefix.'channel' => $c->getChannel(), ); return $a; } public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; $a += array( $prefix.'name' => $c->getName(), $prefix.'flags' => self::extractFlags($c->getFlags()), $prefix.'type' => isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(), $prefix.'arguments' => $c->getArguments(), $prefix.'channel' => $c->getChannel(), $prefix.'connection' => $c->getConnection(), ); return $a; } public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) { $prefix = Caster::PREFIX_VIRTUAL; if (!($filter & Caster::EXCLUDE_VERBOSE)) { $a += array($prefix.'body' => $c->getBody()); } $a += array( $prefix.'routingKey' => $c->getRoutingKey(), $prefix.'deliveryTag' => $c->getDeliveryTag(), $prefix.'deliveryMode' => new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()), $prefix.'exchangeName' => $c->getExchangeName(), $prefix.'isRedelivery' => $c->isRedelivery(), $prefix.'contentType' => $c->getContentType(), $prefix.'contentEncoding' => $c->getContentEncoding(), $prefix.'type' => $c->getType(), $prefix.'timestamp' => $c->getTimestamp(), $prefix.'priority' => $c->getPriority(), $prefix.'expiration' => $c->getExpiration(), $prefix.'userId' => $c->getUserId(), $prefix.'appId' => $c->getAppId(), $prefix.'messageId' => $c->getMessageId(), $prefix.'replyTo' => $c->getReplyTo(), $prefix.'correlationId' => $c->getCorrelationId(), $prefix.'headers' => $c->getHeaders(), ); 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); } } src/Symfony/Component/VarDumper/Caster/Caster.php000066400000000000000000000077201266465517700223640ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\VarDumper\Caster; /** * 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(); } else { $a = (array) $obj; } if ($a) { $p = array_keys($a); foreach ($p as $i => $k) { if (!isset($k[0]) || ("\0" !== $k[0] && !$reflector->hasProperty($k))) { $p[$i] = self::PREFIX_DYNAMIC.$k; } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) { $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0"); } } $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. * * @return array The filtered array */ public static function filter(array $a, $filter, array $listedProperties = array()) { 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]); } } return $a; } } src/Symfony/Component/VarDumper/Caster/ConstStub.php000066400000000000000000000011051266465517700230560ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/VarDumper/Caster/CutStub.php000066400000000000000000000032151266465517700225270ustar00rootroot00000000000000 * * 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': $this->type = self::TYPE_RESOURCE; $this->handle = (int) $value; $this->class = @get_resource_type($value); $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) : (function_exists('iconv_strlen') ? iconv_strlen($value, 'UTF-8') : -1); $this->value = ''; break; } } } src/Symfony/Component/VarDumper/Caster/DOMCaster.php000066400000000000000000000232571266465517700227270ustar00rootroot00000000000000 * * 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, '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, '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, ); 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; } } src/Symfony/Component/VarDumper/Caster/DoctrineCaster.php000066400000000000000000000031701266465517700240470ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php000066400000000000000000000105211266465517700242340ustar00rootroot00000000000000 * * 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 $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', ); public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) { return self::filterExceptionArray($a, "\0Error\0", $filter); } public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) { return self::filterExceptionArray($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'][0])) { $b = (array) $a[$xPrefix.'previous']; $b[$xPrefix.'trace'][0] += array( 'file' => $b[$prefix.'file'], 'line' => $b[$prefix.'line'], ); array_splice($b[$xPrefix.'trace'], -1 - count($a[$xPrefix.'trace'])); static::filterTrace($b[$xPrefix.'trace'], false); $a[Caster::PREFIX_VIRTUAL.'trace'] = $b[$xPrefix.'trace']; } unset($a[$xPrefix.'trace'], $a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); return $a; } public static function filterTrace(&$trace, $dumpArgs, $offset = 0) { if (0 > $offset || empty($trace[$offset])) { return $trace = null; } $t = $trace[$offset]; if (empty($t['class']) && isset($t['function'])) { if ('user_error' === $t['function'] || 'trigger_error' === $t['function']) { ++$offset; } } if ($offset) { array_splice($trace, 0, $offset); } foreach ($trace as &$t) { $t = array( 'call' => (isset($t['class']) ? $t['class'].$t['type'] : '').$t['function'].'()', 'file' => isset($t['line']) ? "{$t['file']}:{$t['line']}" : '', 'args' => &$t['args'], ); if (!isset($t['args']) || !$dumpArgs) { unset($t['args']); } } } private static function filterExceptionArray(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)) { static::filterTrace($trace, static::$traceArgs); if (null !== $trace) { $a[$xPrefix.'trace'] = $trace; } } if (empty($a[$xPrefix.'previous'])) { unset($a[$xPrefix.'previous']); } unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); return $a; } } src/Symfony/Component/VarDumper/Caster/MongoCaster.php000066400000000000000000000014731266465517700233630ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/VarDumper/Caster/PdoCaster.php000066400000000000000000000063521266465517700230270ustar00rootroot00000000000000 * * 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) { } } $prefix = Caster::PREFIX_VIRTUAL; $a += array( $prefix.'inTransaction' => method_exists($c, 'inTransaction'), $prefix.'errorInfo' => $c->errorInfo(), $prefix.'attributes' => $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; } } src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php000066400000000000000000000200541266465517700243720ustar00rootroot00000000000000 * * 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', ); /** * @deprecated since Symfony 2.7, to be removed in 3.0. */ public static function castReflector(\Reflector $c, array $a, Stub $stub, $isNested) { @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); $a[Caster::PREFIX_VIRTUAL.'reflection'] = $c->__toString(); return $a; } 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'] as &$v) { $param = $v; $v = array(); foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { if ("\0" === $k[0]) { $v[substr($k, 3)] = $param; } } unset($v['position'], $v['isVariadic'], $v['byReference'], $v); } } if ($f = $c->getFileName()) { $a[$prefix.'file'] = $f; $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); } $prefix = Caster::PREFIX_DYNAMIC; unset($a['name'], $a[$prefix.'0'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); 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'])) { $a[$prefix.'returnType'] = (string) $a[$prefix.'returnType']; } if (isset($a[$prefix.'this'])) { $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); } foreach ($c->getParameters() as $v) { $k = '$'.$v->name; if ($v->isPassedByReference()) { $k = '&'.$k; } if (method_exists($v, 'isVariadic') && $v->isVariadic()) { $k = '...'.$k; } $a[$prefix.'parameters'][$k] = $v; } if ($v = $c->getStaticVariables()) { foreach ($v as $k => &$v) { $a[$prefix.'use']['$'.$k] = &$v; } unset($v); } if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { self::addExtra($a, $c); } 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', )); try { if (method_exists($c, 'hasType')) { if ($c->hasType()) { $a[$prefix.'typeHint'] = $c->getType()->__toString(); } } elseif ($c->isArray()) { $a[$prefix.'typeHint'] = 'array'; } elseif (method_exists($c, 'isCallable') && $c->isCallable()) { $a[$prefix.'typeHint'] = 'callable'; } elseif ($v = $c->getClass()) { $a[$prefix.'typeHint'] = $v->name; } } catch (\ReflectionException $e) { if (preg_match('/^Class ([^ ]++) does not exist$/', $e->getMessage(), $m)) { $a[$prefix.'typeHint'] = $m[1]; } } try { $a[$prefix.'default'] = $v = $c->getDefaultValue(); if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) { $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); } } catch (\ReflectionException $e) { if (isset($a[$prefix.'typeHint']) && $c->allowsNull()) { $a[$prefix.'default'] = null; } } 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) { $a = &$a[Caster::PREFIX_VIRTUAL.'extra']; if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { $a['file'] = $m; $a['line'] = $c->getStartLine().' to '.$c->getEndLine(); } self::addMap($a, $c, self::$extraMap, ''); } 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; } } } } src/Symfony/Component/VarDumper/Caster/ResourceCaster.php000066400000000000000000000032541266465517700240720ustar00rootroot00000000000000 * * 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) { return stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); } 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; } } src/Symfony/Component/VarDumper/Caster/SplCaster.php000066400000000000000000000057341266465517700230460ustar00rootroot00000000000000 * * 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 { 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' => $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_KEEP) ? 'IT_MODE_KEEP' : 'IT_MODE_DELETE'), $mode), $prefix.'dllist' => iterator_to_array($c), ); $c->setIteratorMode($mode); 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; } } src/Symfony/Component/VarDumper/Caster/StubCaster.php000066400000000000000000000017301266465517700232150ustar00rootroot00000000000000 * * 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; return array(); } } public static function cutInternals($obj, array $a, Stub $stub, $isNested) { if ($isNested) { $stub->cut += count($a); return array(); } return $a; } } src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php000066400000000000000000000047171266465517700245600ustar00rootroot00000000000000 * * 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; } } src/Symfony/Component/VarDumper/Cloner/000077500000000000000000000000001266465517700204255ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php000066400000000000000000000310341266465517700240450ustar00rootroot00000000000000 * * 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( 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', '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', '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', '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', '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', 'MongoCursorInterface' => 'Symfony\Component\VarDumper\Caster\MongoCaster::castCursor', ':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', ':process' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castProcess', ':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->filter = $filter; $this->prevErrorHandler = set_error_handler(array($this, 'handleError')); try { if (!function_exists('iconv')) { $this->maxString = -1; } $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('*' => '*')), ); $this->classInfo[$class] = $classInfo; } $a = $this->callCaster('Symfony\Component\VarDumper\Caster\Caster::castObject', $obj, $classInfo[0], null, $isNested); foreach ($classInfo[1] as $p) { if (!empty($this->casters[$p = strtolower($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[(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠'] = new ThrowingCasterException($callback, $e); } return $a; } /** * Special handling for errors: cloning must be fail-safe. * * @internal */ public function handleError($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; } } src/Symfony/Component/VarDumper/Cloner/ClonerInterface.php000066400000000000000000000010761266465517700242050ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/VarDumper/Cloner/Cursor.php000066400000000000000000000017441266465517700224210ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/VarDumper/Cloner/Data.php000066400000000000000000000203321266465517700220070ustar00rootroot00000000000000 * * 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 Data { private $data; 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; } /** * Returns a depth limited clone of $this. * * @param int $maxDepth The max dumped depth level. * @param int $maxItemsPerDepth The max number of items dumped per depth level. * @param bool $useRefHandles False to hide ref. handles. * * @return self A depth limited clone of $this. * * @deprecated since Symfony 2.7, to be removed in 3.0. Use withMaxDepth, withMaxItemsPerDepth or withRefHandles instead. */ public function getLimitedClone($maxDepth, $maxItemsPerDepth, $useRefHandles = true) { @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7 and will be removed in 3.0. Use withMaxDepth, withMaxItemsPerDepth or withRefHandles methods instead.', E_USER_DEPRECATED); $data = clone $this; $data->maxDepth = (int) $maxDepth; $data->maxItemsPerDepth = (int) $maxItemsPerDepth; $data->useRefHandles = $useRefHandles ? -1 : 0; return $data; } /** * Dumps data with a DumperInterface dumper. */ public function dump(DumperInterface $dumper) { $refs = array(0); $this->dumpItem($dumper, new Cursor(), $refs, $this->data[0][0]); } /** * 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) { $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; } $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; $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); } 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. * * @return int The final number of removed items. */ private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType) { $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 = $key; $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; } } src/Symfony/Component/VarDumper/Cloner/DumperInterface.php000066400000000000000000000037501266465517700242200ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/VarDumper/Cloner/Stub.php000066400000000000000000000015651266465517700220620ustar00rootroot00000000000000 * * 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; } src/Symfony/Component/VarDumper/Cloner/VarCloner.php000066400000000000000000000325251266465517700230400ustar00rootroot00000000000000 * * 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; $i = 0; // Current iteration position in $queue $len = 1; // Length of $queue $pos = 0; // Number of cloned items past the first level $refs = 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 $step = $queue[$i]; // Copy of the currently iterated array used for hard references detection foreach ($step as $k => $v) { // $k is the original key // $v is the original value or a stub object in case of hard references if ($indexed && $k !== ++$j) { $indexed = false; } if ($useExt) { $zval = symfony_zval_info($k, $step); } else { $step[$k] = $cookie; if ($zval['zval_isref'] = $queue[$i][$k] === $cookie) { $zval['zval_hash'] = $v instanceof Stub ? spl_object_hash($v) : null; } $zval['type'] = gettype($v); } if ($zval['zval_isref']) { $queue[$i][$k] = &$stub; // Break hard references to make $queue completely unset($stub); // independent from the original structure if (isset($hardRefs[$zval['zval_hash']])) { $queue[$i][$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($step[$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 = iconv_strlen($v, 'UTF-8') - $maxString) { $stub = new Stub(); $stub->type = Stub::TYPE_STRING; $stub->class = Stub::STRING_UTF8; $stub->cut = $cut; $stub->value = iconv_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) { 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': if (empty($resRefs[$h = (int) $v])) { $stub = new Stub(); $stub->type = Stub::TYPE_RESOURCE; $stub->class = $zval['resource_type'] ?: get_resource_type($v); $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) { $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = $v = new Stub(); $v->value = $stub; } else { $step[$k] = new Stub(); $step[$k]->value = $stub; $h = spl_object_hash($step[$k]); $queue[$i][$k] = $hardRefs[$h] = &$step[$k]; $values[$h] = $v; } $queue[$i][$k]->handle = ++$refs; } else { $queue[$i][$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) { $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = new Stub(); $queue[$i][$k]->value = $v; } else { $step[$k] = $queue[$i][$k] = new Stub(); $step[$k]->value = $v; $h = spl_object_hash($step[$k]); $hardRefs[$h] = &$step[$k]; $values[$h] = $v; } $queue[$i][$k]->handle = ++$refs; } } 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(PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) { $frame['line'] = 0; break; } } if (!empty($frame['line'])) { ob_start(); debug_zval_dump($obj); self::$hashMask = substr(ob_get_clean(), 17); } } self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); } } src/Symfony/Component/VarDumper/Dumper/000077500000000000000000000000001266465517700204375ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php000066400000000000000000000150371266465517700240760ustar00rootroot00000000000000 * * 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 { public static $defaultOutput = 'php://output'; protected $line = ''; protected $lineDumper; protected $outputStream; protected $decimalPoint; // This is locale dependent protected $indentPad = ' '; private $charset; private $charsetConverter; /** * @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. */ public function __construct($output = null, $charset = null) { $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; $this->charsetConverter = 'fallback'; $charset = strtoupper($charset); $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; $supported = true; set_error_handler(function () use (&$supported) {$supported = false;}); if (function_exists('mb_encoding_aliases') && mb_encoding_aliases($charset)) { $this->charset = $charset; $this->charsetConverter = 'mbstring'; } elseif (function_exists('iconv')) { $supported = true; iconv($charset, 'UTF-8', ''); if ($supported) { $this->charset = $charset; $this->charsetConverter = 'iconv'; } } if ('fallback' === $this->charsetConverter) { $this->charset = 'ISO-8859-1'; } restore_error_handler(); 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|null $output A line dumper callable, an opened stream or an output path. */ public function dump(Data $data, $output = null) { $exception = null; if ($output) { $prevOutput = $this->setOutput($output); } try { $data->dump($this); $this->dumpLine(-1); } catch (\Exception $exception) { // Re-thrown below } if ($output) { $this->setOutput($prevOutput); } if (null !== $exception) { throw $exception; } } /** * 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. */ 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 ('mbstring' === $this->charsetConverter) { return mb_convert_encoding($s, 'UTF-8', mb_check_encoding($s, $this->charset) ? $this->charset : '8bit'); } if ('iconv' === $this->charsetConverter) { $valid = true; set_error_handler(function () use (&$valid) {$valid = false;}); $c = iconv($this->charset, 'UTF-8', $s); restore_error_handler(); if ($valid) { return $c; } } $s .= $s; $len = strlen($s); for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { switch (true) { case $s[$i] < "\x80": $s[$j] = $s[$i]; break; case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; default: $s[$j] = "\xC3"; $s[++$j] = chr(ord($s[$i]) - 64); break; } } return substr($s, 0, $j); } } src/Symfony/Component/VarDumper/Dumper/CliDumper.php000066400000000000000000000365531266465517700230500ustar00rootroot00000000000000 * * 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) { parent::__construct($output, $charset); if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON')) { // Use only the base 16 xterm colors when using ANSICON $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) { if (function_exists('iconv')) { $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 = array(); switch ($type) { 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['value'] = isset($value[0]) && !preg_match('//u', $value) ? $this->utf8Encode($value) : $value; $value = isset($type[0]) && !preg_match('//u', $type) ? $this->utf8Encode($type) : $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); if ($bin) { $str = $this->utf8Encode($str); } if ('' === $str) { $this->line .= '""'; $this->dumpLine($cursor->depth, true); } else { $attr = array( 'length' => 0 <= $cut && function_exists('iconv_strlen') ? iconv_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 ($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 = iconv_strlen($str, 'UTF-8')) { $str = iconv_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); if (!preg_match('//u', $class)) { $class = $this->utf8Encode($class); } if (Cursor::HASH_OBJECT === $type) { $prefix = 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; } elseif (Cursor::HASH_RESOURCE === $type) { $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); } else { $prefix = $class ? $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: $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]) { case '+': // User inserted keys $attr['dynamic'] = true; $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; break 2; case '~': $style = 'meta'; 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 = @(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); } } src/Symfony/Component/VarDumper/Dumper/DataDumperInterface.php000066400000000000000000000011241266465517700250150ustar00rootroot00000000000000 * * 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); } src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php000066400000000000000000000343751266465517700232450ustar00rootroot00000000000000 * * 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', ); /** * {@inheritdoc} */ public function __construct($output = null, $charset = null) { AbstractDumper::__construct($output, $charset); $this->dumpId = 'sf-dump-'.mt_rand(); } /** * {@inheritdoc} */ public function setOutput($output) { if ($output !== $prev = parent::setOutput($output)) { $this->headerIsDumped = false; } return $prev; } /** * {@inheritdoc} */ public function setStyles(array $styles) { $this->headerIsDumped = false; $this->styles = $styles + $this->styles; } /** * 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) { parent::dump($data, $output); $this->dumpId = 'sf-dump-'.mt_rand(); } /** * Dumps the HTML header. */ protected function getDumpHeader() { $this->headerIsDumped = true; if (null !== $this->dumpHeader) { return $this->dumpHeader; } $line = <<<'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 = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); 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 && array_key_exists('value', $attr)) { $style .= sprintf(' title="%s"', htmlspecialchars(json_encode($attr['value']), ENT_QUOTES, 'UTF-8')); } 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="%s%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 ('private' === $style) { $style .= sprintf(' title="Private property defined in class: `%s`"', $attr['class']); } $map = static::$controlCharsMap; $style = ""; $v = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $style) { $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.$style; }, $v, -1, $cchrCount); if ($cchrCount && '<' === $v[0]) { $v = substr($v, 7); } else { $v = $style.$v; } if ($cchrCount && '>' === substr($v, -1)) { $v = substr($v, 0, -strlen($style)); } else { $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) { $this->line = $this->getDumpHeader().$this->line; } if (-1 === $depth) { $this->line .= sprintf($this->dumpSuffix, $this->dumpId); } $this->lastDepth = $depth; // Replaces non-ASCII UTF-8 chars by numeric HTML entities $this->line = preg_replace_callback( '/[\x80-\xFF]+/', function ($m) { $m = unpack('C*', $m[0]); $i = 1; $entities = ''; while (isset($m[$i])) { 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; }, $this->line ); if (-1 === $depth) { AbstractDumper::dumpLine(0); } AbstractDumper::dumpLine($depth); } } src/Symfony/Component/VarDumper/Exception/000077500000000000000000000000001266465517700211415ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php000066400000000000000000000013151266465517700264740ustar00rootroot00000000000000 * * 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 callable $caster The failing caster * @param \Exception $prev The exception thrown from the caster */ public function __construct($caster, \Exception $prev) { parent::__construct('Unexpected '.get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); } } src/Symfony/Component/VarDumper/LICENSE000066400000000000000000000020511266465517700202060ustar00rootroot00000000000000Copyright (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. src/Symfony/Component/VarDumper/README.md000066400000000000000000000012341266465517700204620ustar00rootroot00000000000000Symfony mechanism for exploring and dumping PHP variables ========================================================= This component provides a mechanism that allows exploring then dumping any PHP variable. It handles scalars, objects and resources properly, taking hard and soft references into account. More than being immune to infinite recursion problems, it allows dumping where references link to each other. It explores recursive structures using a breadth-first algorithm. The component exposes all the parts involved in the different steps of cloning then dumping a PHP variable, while applying size limits and having specialized output formats and methods. src/Symfony/Component/VarDumper/Resources/000077500000000000000000000000001266465517700211555ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Resources/functions/000077500000000000000000000000001266465517700231655ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Resources/functions/dump.php000066400000000000000000000007671266465517700246550ustar00rootroot00000000000000 * * 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); } } } src/Symfony/Component/VarDumper/Test/000077500000000000000000000000001266465517700201225ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php000066400000000000000000000023161266465517700241760ustar00rootroot00000000000000 * * 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 */ abstract class VarDumperTestCase extends \PHPUnit_Framework_TestCase { public function assertDumpEquals($dump, $data, $message = '') { $this->assertSame(rtrim($dump), $this->getVarDumperDump($data), $message); } public function assertDumpMatchesFormat($dump, $data, $message = '') { $this->assertStringMatchesFormat(rtrim($dump), $this->getVarDumperDump($data), $message); } private function getVarDumperDump($data) { $h = fopen('php://memory', 'r+b'); $cloner = new VarCloner(); $dumper = new CliDumper($h); $dumper->setColors(false); $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); $data = stream_get_contents($h, -1, 0); fclose($h); return rtrim($data); } } src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php000066400000000000000000000023041266465517700244030ustar00rootroot00000000000000 * * 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->getVarDumperDump($data), $message); } public function assertDumpMatchesFormat($dump, $data, $message = '') { $this->assertStringMatchesFormat(rtrim($dump), $this->getVarDumperDump($data), $message); } private function getVarDumperDump($data) { $h = fopen('php://memory', 'r+b'); $cloner = new VarCloner(); $cloner->setMaxItems(-1); $dumper = new CliDumper($h); $dumper->setColors(false); $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); $data = stream_get_contents($h, -1, 0); fclose($h); return rtrim($data); } } src/Symfony/Component/VarDumper/Tests/000077500000000000000000000000001266465517700203055ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Tests/Caster/000077500000000000000000000000001266465517700215265ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php000066400000000000000000000114441266465517700243240ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Caster\Caster; use Symfony\Component\VarDumper\Test\VarDumperTestCase; /** * @author Nicolas Grekas */ class CasterTest extends VarDumperTestCase { 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 ); } } src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php000066400000000000000000000034741266465517700247730ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Caster\PdoCaster; use Symfony\Component\VarDumper\Cloner\Stub; /** * @author Nicolas Grekas */ class PdoCasterTest extends \PHPUnit_Framework_TestCase { /** * @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); $attr = $cast["\0~\0attributes"]; $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']); $this->assertSame('NATURAL', $attr['CASE']->class); $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); $xCast = array( "\0~\0inTransaction" => $pdo->inTransaction(), "\0~\0attributes" => array( 'CASE' => $attr['CASE'], 'ERRMODE' => $attr['ERRMODE'], 'PERSISTENT' => false, 'DRIVER_NAME' => 'sqlite', 'ORACLE_NULLS' => $attr['ORACLE_NULLS'], 'CLIENT_VERSION' => $pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION), 'SERVER_VERSION' => $pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), 'STATEMENT_CLASS' => array('PDOStatement'), 'DEFAULT_FETCH_MODE' => $attr['DEFAULT_FETCH_MODE'], ), ); unset($cast["\0~\0attributes"]['STATEMENT_CLASS'][1]); $this->assertSame($xCast, $cast); } } src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php000066400000000000000000000051631266465517700263400ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Test\VarDumperTestCase; /** * @author Nicolas Grekas */ class ReflectionCasterTest extends VarDumperTestCase { 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" extra: null } %A] methods: array:%d [ %A "export" => ReflectionMethod { +name: "export" +class: "ReflectionClass" parameters: array:2 [ "$%s" => ReflectionParameter { %A position: 0 %A } ] modifiers: "public static" } %A } EOTXT , $var ); } public function testReflectionParameter() { $var = new \ReflectionParameter(__NAMESPACE__.'\reflectionParameterFixture', 0); $this->assertDumpMatchesFormat( <<<'EOTXT' ReflectionParameter { +name: "arg1" position: 0 typeHint: "Symfony\Component\VarDumper\Tests\Caster\NotExistingClass" 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( << * * 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 Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Test\VarDumperTestCase; /** * @author Nicolas Grekas */ class CliDumperTest extends VarDumperTestCase { 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']; $closure54 = ''; $r = defined('HHVM_VERSION') ? '' : '#%d'; if (PHP_VERSION_ID >= 50400) { $closure54 = <<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}{$closure54} parameters: array:2 [ "\$a" => [] "&\$b" => array:2 [ "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( <<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( <<setColors(false); $cloner = new VarCloner(); $cloner->addCasters(array( ':stream' => function ($res, $a) { unset($a['wrapper_data']); return $a; }, )); $cloner->addCasters(array( ':stream' => function () { throw new \Exception('Foobar'); }, )); $line = __LINE__ - 3; $file = __FILE__; $ref = (int) $out; $data = $cloner->cloneVar($out); $dumper->dump($data, $out); rewind($out); $out = stream_get_contents($out); $r = defined('HHVM_VERSION') ? '' : '#%d'; $this->assertStringMatchesFormat( << array:2 [ "call" => "%slosure%s()" "file" => "{$file}:{$line}" ] ] } } EOTXT , $out ); } public function testRefsInProperties() { $var = (object) array('foo' => 'foo'); $var->bar = &$var->foo; $dumper = new CliDumper(); $dumper->setColors(false); $cloner = new VarCloner(); $out = fopen('php://memory', 'r+b'); $data = $cloner->cloneVar($var); $dumper->dump($data, $out); rewind($out); $out = stream_get_contents($out); $r = defined('HHVM_VERSION') ? '' : '#%d'; $this->assertStringMatchesFormat( <<getSpecialVars(); $this->assertDumpEquals( << 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( << 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( << array:1 [ 0 => array:1 [ 0 => array:1 [ …1] ] ] ] EOTXT , $out ); } private function getSpecialVars() { foreach (array_keys($GLOBALS) as $var) { if ('GLOBALS' !== $var) { unset($GLOBALS[$var]); } } $var = function &() { $var = array(); $var[] = &$var; return $var; }; return array($var(), $GLOBALS, &$GLOBALS); } } src/Symfony/Component/VarDumper/Tests/Fixtures/000077500000000000000000000000001266465517700221165ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php000066400000000000000000000014611266465517700243460ustar00rootroot00000000000000bar = '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); src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php000066400000000000000000000166761266465517700237570ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\HtmlDumper; /** * @author Nicolas Grekas */ class HtmlDumperTest extends \PHPUnit_Framework_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']; $closure54 = ''; $r = defined('HHVM_VERSION') ? '' : '#%d'; if (PHP_VERSION_ID >= 50400) { $closure54 = <<class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" this: HtmlDumperTest {{$r} …} EOTXT; } $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é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" => DumbFoo {#%d +foo: "foo" +"bar": "bar" } "closure" => Closure {{$r}{$closure54} parameters: array:2 [ "\$a" => [] "&\$b" => array:2 [ "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" => DumbFoo {#%d} "snobj" => &3 {#%d} "snobj2" => {#%d} "file" => "{$var['file']}" b"bin-key-é" => "" ] EOTXT , $out ); } /** * @requires extension mbstring */ 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 = fopen('php://memory', 'r+b'); $dumper->dump($data, $out); rewind($out); $out = stream_get_contents($out); $this->assertStringMatchesFormat( <<
    b"Словарь" EOTXT , $out ); } } src/Symfony/Component/VarDumper/Tests/Test/000077500000000000000000000000001266465517700212245ustar00rootroot00000000000000src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitRequire54.php000066400000000000000000000017141266465517700272170ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Test\VarDumperTestCase; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; class VarDumperTestTraitRequire54 extends VarDumperTestCase { 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); } } src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php000066400000000000000000000005551266465517700263530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ // Skipping trait tests for PHP < 5.4 if (PHP_VERSION_ID >= 50400) { require __DIR__.'/VarDumperTestTraitRequire54.php'; } src/Symfony/Component/VarDumper/Tests/VarClonerTest.php000066400000000000000000000124551266465517700235600ustar00rootroot00000000000000 * * 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 Symfony\Component\VarDumper\Cloner\VarCloner; /** * @author Nicolas Grekas */ class VarClonerTest extends \PHPUnit_Framework_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 ) ) [1] => Array ( [%s] => 123 ) ) [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 ) ) [1] => Array ( [\000+\0001] => Symfony\Component\VarDumper\Cloner\Stub Object ( [type] => object [class] => stdClass [value] => [cut] => 0 [handle] => %i [refCount] => 0 [position] => 2 ) [\000+\0002] => Symfony\Component\VarDumper\Cloner\Stub Object ( [type] => object [class] => stdClass [value] => [cut] => 0 [handle] => %i [refCount] => 0 [position] => 3 ) ) [2] => Array ( [\000+\000var] => val ) [3] => Array ( [\000+\000var] => val ) ) [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 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 ) ) [1] => Array ( [foo] => 124 ) ) [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)); } } src/Symfony/Component/VarDumper/VarDumper.php000066400000000000000000000025071266465517700216250ustar00rootroot00000000000000 * * 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) { if (null !== $callable && !is_callable($callable, true)) { throw new \InvalidArgumentException('Invalid PHP callback.'); } $prevHandler = self::$handler; self::$handler = $callable; return $prevHandler; } } src/Symfony/Component/VarDumper/composer.json000066400000000000000000000016201266465517700217240ustar00rootroot00000000000000{ "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.3.9" }, "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": "2.7-dev" } } } src/Symfony/Component/VarDumper/phpunit.xml.dist000066400000000000000000000014751266465517700223650ustar00rootroot00000000000000 ./Tests/ ./ ./Resources ./Tests ./vendor src/Symfony/Component/Yaml/000077500000000000000000000000001266465517700162005ustar00rootroot00000000000000src/Symfony/Component/Yaml/.gitignore000066400000000000000000000000421266465517700201640ustar00rootroot00000000000000vendor/ composer.lock phpunit.xml src/Symfony/Component/Yaml/CHANGELOG.md000066400000000000000000000002621266465517700200110ustar00rootroot00000000000000CHANGELOG ========= 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) src/Symfony/Component/Yaml/Dumper.php000066400000000000000000000046011266465517700201460ustar00rootroot00000000000000 * * 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 = 4; /** * Sets the indentation. * * @param int $num The amount of spaces to use for indentation of nested nodes. */ public function setIndentation($num) { $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 bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * * @return string The YAML representation of the PHP value */ public function dump($input, $inline = 0, $indent = 0, $exceptionOnInvalidType = false, $objectSupport = false) { $output = ''; $prefix = $indent ? str_repeat(' ', $indent) : ''; if ($inline <= 0 || !is_array($input) || empty($input)) { $output .= $prefix.Inline::dump($input, $exceptionOnInvalidType, $objectSupport); } else { $isAHash = array_keys($input) !== range(0, count($input) - 1); foreach ($input as $key => $value) { $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); $output .= sprintf('%s%s%s%s', $prefix, $isAHash ? Inline::dump($key, $exceptionOnInvalidType, $objectSupport).':' : '-', $willBeInlined ? ' ' : "\n", $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $exceptionOnInvalidType, $objectSupport) ).($willBeInlined ? "\n" : ''); } } return $output; } } src/Symfony/Component/Yaml/Escaper.php000066400000000000000000000074201266465517700202760ustar00rootroot00000000000000 * * 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 */ 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)); } } src/Symfony/Component/Yaml/Exception/000077500000000000000000000000001266465517700201365ustar00rootroot00000000000000src/Symfony/Component/Yaml/Exception/DumpException.php000066400000000000000000000007071266465517700234370ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Yaml/Exception/ExceptionInterface.php000066400000000000000000000006731266465517700244340ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Yaml/Exception/ParseException.php000066400000000000000000000067721266465517700236140ustar00rootroot00000000000000 * * 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) { if (PHP_VERSION_ID >= 50400) { $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; } else { $jsonOptions = 0; } $this->message .= sprintf(' in %s', json_encode($this->parsedFile, $jsonOptions)); } 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 .= '.'; } } } src/Symfony/Component/Yaml/Exception/RuntimeException.php000066400000000000000000000007451266465517700241570ustar00rootroot00000000000000 * * 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 { } src/Symfony/Component/Yaml/Inline.php000066400000000000000000000500241266465517700201300ustar00rootroot00000000000000 * * 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 */ class Inline { const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; private static $exceptionOnInvalidType = false; private static $objectSupport = false; private static $objectForMap = false; /** * Converts a YAML string to a PHP array. * * @param string $value A YAML string * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * @param bool $objectForMap true if maps should return a stdClass instead of array() * @param array $references Mapping of variable names to values * * @return array A PHP array representing the YAML string * * @throws ParseException */ public static function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false, $references = array()) { self::$exceptionOnInvalidType = $exceptionOnInvalidType; self::$objectSupport = $objectSupport; self::$objectForMap = $objectForMap; $value = trim($value); if ('' === $value) { return ''; } if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('ASCII'); } $i = 0; switch ($value[0]) { case '[': $result = self::parseSequence($value, $i, $references); ++$i; break; case '{': $result = self::parseMapping($value, $i, $references); ++$i; break; default: $result = self::parseScalar($value, 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 bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * * @return string The YAML string representing the PHP array * * @throws DumpException When trying to dump PHP resource */ public static function dump($value, $exceptionOnInvalidType = false, $objectSupport = false) { switch (true) { case is_resource($value): if ($exceptionOnInvalidType) { throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); } return 'null'; case is_object($value): if ($objectSupport) { return '!php/object:'.serialize($value); } if ($exceptionOnInvalidType) { throw new DumpException('Object support when dumping a YAML file has been disabled.'); } return 'null'; case is_array($value): return self::dumpArray($value, $exceptionOnInvalidType, $objectSupport); 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 Escaper::requiresDoubleQuoting($value): return Escaper::escapeWithDoubleQuotes($value); case Escaper::requiresSingleQuoting($value): case preg_match(self::getHexRegex(), $value): case preg_match(self::getTimestampRegex(), $value): return Escaper::escapeWithSingleQuotes($value); default: return $value; } } /** * Dumps a PHP array to a YAML string. * * @param array $value The PHP array to dump * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * * @return string The YAML string representing the PHP array */ private static function dumpArray($value, $exceptionOnInvalidType, $objectSupport) { // array $keys = array_keys($value); $keysCount = count($keys); if ((1 === $keysCount && '0' == $keys[0]) || ($keysCount > 1 && array_reduce($keys, function ($v, $w) { return (int) $v + $w; }, 0) === $keysCount * ($keysCount - 1) / 2) ) { $output = array(); foreach ($value as $val) { $output[] = self::dump($val, $exceptionOnInvalidType, $objectSupport); } return sprintf('[%s]', implode(', ', $output)); } // mapping $output = array(); foreach ($value as $key => $val) { $output[] = sprintf('%s: %s', self::dump($key, $exceptionOnInvalidType, $objectSupport), self::dump($val, $exceptionOnInvalidType, $objectSupport)); } return sprintf('{ %s }', implode(', ', $output)); } /** * Parses a scalar to a YAML string. * * @param string $scalar * @param string $delimiters * @param array $stringDelimiters * @param int &$i * @param bool $evaluate * @param array $references * * @return string A YAML string * * @throws ParseException When malformed inline YAML string is parsed */ public static function parseScalar($scalar, $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)); } if ($evaluate) { $output = self::evaluateScalar($output, $references); } } return $output; } /** * Parses a quoted scalar to YAML. * * @param string $scalar * @param int &$i * * @return string A YAML 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 sequence to a YAML string. * * @param string $sequence * @param int &$i * @param array $references * * @return string A YAML string * * @throws ParseException When malformed inline YAML string is parsed */ private static function parseSequence($sequence, &$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, $i, $references); break; case '{': // nested mapping $output[] = self::parseMapping($sequence, $i, $references); break; case ']': return $output; case ',': case ' ': break; default: $isQuoted = in_array($sequence[$i], array('"', "'")); $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i, true, $references); // the value can be an array if a reference has been resolved to an array var if (!is_array($value) && !$isQuoted && false !== strpos($value, ': ')) { // embedded mapping? try { $pos = 0; $value = self::parseMapping('{'.$value.'}', $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 mapping to a YAML string. * * @param string $mapping * @param int &$i * @param array $references * * @return string A YAML string * * @throws ParseException When malformed inline YAML string is parsed */ private static function parseMapping($mapping, &$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, array(':', ' '), array('"', "'"), $i, false); // value $done = false; while ($i < $len) { switch ($mapping[$i]) { case '[': // nested sequence $value = self::parseSequence($mapping, $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; } $done = true; break; case '{': // nested mapping $value = self::parseMapping($mapping, $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; } $done = true; break; case ':': case ' ': break; default: $value = self::parseScalar($mapping, 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; } $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 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, $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)); 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) { 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, '!!float '): return (float) substr($scalar, 8); 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): 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 preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar): return (float) str_replace(',', '', $scalar); case preg_match(self::getTimestampRegex(), $scalar): $timeZone = date_default_timezone_get(); date_default_timezone_set('UTC'); $time = strtotime($scalar); date_default_timezone_set($timeZone); return $time; } default: return (string) $scalar; } } /** * 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'; } } src/Symfony/Component/Yaml/LICENSE000066400000000000000000000020511266465517700172030ustar00rootroot00000000000000Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. src/Symfony/Component/Yaml/Parser.php000066400000000000000000000716261266465517700201610ustar00rootroot00000000000000 * * 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 BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; // BC - wrongly named const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN; private $offset = 0; private $lines = array(); private $currentLineNb = -1; private $currentLine = ''; private $refs = array(); /** * Constructor. * * @param int $offset The offset of YAML document (used for line numbers in error messages) */ public function __construct($offset = 0) { $this->offset = $offset; } /** * Parses a YAML string to a PHP value. * * @param string $value A YAML string * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * @param bool $objectForMap true if maps should return a stdClass instead of array() * * @return mixed A PHP value * * @throws ParseException If the YAML is not valid */ public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) { 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 (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { $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'); } $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'], ' '), '#')) { $c = $this->getRealCurrentLineNb() + 1; $parser = new self($c); $parser->refs = &$this->refs; $data[] = $parser->parse($this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport, $objectForMap); } 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 $c = $this->getRealCurrentLineNb(); $parser = new self($c); $parser->refs = &$this->refs; $block = $values['value']; if ($this->isNextLineIndented()) { $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + strlen($values['leadspaces']) + 1); } $data[] = $parser->parse($block, $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap); } } 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'); } $context = 'mapping'; // force correct settings Inline::parse(null, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); try { $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); } foreach ($refValue as $key => $value) { if (!isset($data[$key])) { $data[$key] = $value; } } } else { if (isset($values['value']) && $values['value'] !== '') { $value = $values['value']; } else { $value = $this->getNextEmbedBlock(); } $c = $this->getRealCurrentLineNb() + 1; $parser = new self($c); $parser->refs = &$this->refs; $parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap); 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); } foreach ($parsedItem as $key => $value) { if (!isset($data[$key])) { $data[$key] = $value; } } } } 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. foreach ($parsed as $key => $value) { if (!isset($data[$key])) { $data[$key] = $value; } } } } } 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 { $c = $this->getRealCurrentLineNb() + 1; $parser = new self($c); $parser->refs = &$this->refs; $value = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); // 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 { $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap); // 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; } } if ($isRef) { $this->refs[$isRef] = $data[$key]; } if ($objectForMap && !is_object($data)) { $data = (object) $data; } } else { // multiple documents are not supported if ('---' === $this->currentLine) { throw new ParseException('Multiple documents are not supported.'); } // 1-liner optionally followed by newline(s) if (is_string($value) && $this->lines[0] === trim($value)) { try { $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); throw $e; } if (is_array($value)) { $first = reset($value); if (is_string($first) && 0 === strpos($first, '*')) { $data = array(); foreach ($value as $alias) { $data[] = $this->refs[substr($alias, 1)]; } $value = $data; } } 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); } return empty($data) ? null : $data; } /** * Returns the current line number (takes the offset into account). * * @return int The current line number */ private function getRealCurrentLineNb() { return $this->currentLineNb + $this->offset; } /** * 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->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()) { 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. */ private function moveToPreviousLine() { $this->currentLine = $this->lines[--$this->currentLineNb]; } /** * Parses a YAML value. * * @param string $value A YAML value * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise * @param bool $objectSupport True if object support is enabled, false otherwise * @param bool $objectForMap true if maps should return a stdClass instead of array() * * @return mixed A PHP value * * @throws ParseException When reference does not exist */ private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap) { 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->currentLine); } return $this->refs[$value]; } if (preg_match('/^'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; return $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers)); } try { return Inline::parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); } 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(); } // folded style if ('>' === $style) { $text = ''; $previousLineIndented = false; $previousLineBlank = false; for ($i = 0; $i < count($blockLines); ++$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] === '#'; } /** * 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 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); } } src/Symfony/Component/Yaml/README.md000066400000000000000000000005531266465517700174620ustar00rootroot00000000000000Yaml Component ============== YAML implements most of the YAML 1.2 specification. ```php use Symfony\Component\Yaml\Yaml; $array = Yaml::parse(file_get_contents(filename)); print Yaml::dump($array); ``` Resources --------- You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Yaml/ $ composer install $ phpunit src/Symfony/Component/Yaml/Tests/000077500000000000000000000000001266465517700173025ustar00rootroot00000000000000src/Symfony/Component/Yaml/Tests/DumperTest.php000066400000000000000000000146451266465517700221210ustar00rootroot00000000000000 * * 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 Symfony\Component\Yaml\Parser; use Symfony\Component\Yaml\Dumper; class DumperTest extends \PHPUnit_Framework_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 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, 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, true, false); } /** * @dataProvider getEscapeSequences */ public function testEscapedEscapeSequencesInQuotedScalar($input, $expected) { $this->assertEquals($expected, $this->dumper->dump($input)); } public function getEscapeSequences() { return array( 'null' => array("\t\\0", '"\t\\\\0"'), 'bell' => array("\t\\a", '"\t\\\\a"'), 'backspace' => array("\t\\b", '"\t\\\\b"'), 'horizontal-tab' => array("\t\\t", '"\t\\\\t"'), 'line-feed' => array("\t\\n", '"\t\\\\n"'), 'vertical-tab' => array("\t\\v", '"\t\\\\v"'), 'form-feed' => array("\t\\f", '"\t\\\\f"'), 'carriage-return' => array("\t\\r", '"\t\\\\r"'), 'escape' => array("\t\\e", '"\t\\\\e"'), 'space' => array("\t\\ ", '"\t\\\\ "'), 'double-quote' => array("\t\\\"", '"\t\\\\\\""'), 'slash' => array("\t\\/", '"\t\\\\/"'), 'backslash' => array("\t\\\\", '"\t\\\\\\\\"'), 'next-line' => array("\t\\N", '"\t\\\\N"'), 'non-breaking-space' => array("\t\\�", '"\t\\\\�"'), 'line-separator' => array("\t\\L", '"\t\\\\L"'), 'paragraph-separator' => array("\t\\P", '"\t\\\\P"'), ); } } class A { public $a = 'foo'; } src/Symfony/Component/Yaml/Tests/Fixtures/000077500000000000000000000000001266465517700211135ustar00rootroot00000000000000src/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml000066400000000000000000000015331266465517700245240ustar00rootroot00000000000000--- %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')) src/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml000066400000000000000000000104631266465517700244060ustar00rootroot00000000000000--- %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 ) ) src/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml000066400000000000000000000016271266465517700247120ustar00rootroot00000000000000--- 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', ) src/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml000066400000000000000000000027731266465517700260060ustar00rootroot00000000000000--- %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" ) src/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml000066400000000000000000000011611266465517700244510ustar00rootroot00000000000000--- 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) src/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml000066400000000000000000000031301266465517700254410ustar00rootroot00000000000000--- 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)) src/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml000066400000000000000000000075721266465517700250570ustar00rootroot00000000000000--- %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" ) src/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml000066400000000000000000000012531266465517700254060ustar00rootroot00000000000000--- %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: | '' src/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml000066400000000000000000001211621266465517700266200ustar00rootroot00000000000000--- %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 decimal: +12,345 octal: 014 hexadecimal: 0xC php: | array( 'canonical' => 12345, 'decimal' => 12345.0, 'octal' => 014, 'hexadecimal' => 0xC ) --- # FIX: spec shows parens around -inf and NaN test: Floating point spec: 2.20 yaml: | canonical: 1.23015e+3 exponential: 12.3015e+02 fixed: 1,230.15 negative infinity: -.inf not a number: .NaN float as whole number: !!float 1 php: | array( 'canonical' => 1230.15, 'exponential' => 1230.15, 'fixed' => 1230.15, 'negative infinity' => log(0), 'not a number' => -log(0), 'float as whole number' => (float) 1 ) --- 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 decimal: +12,345 octal: 014 hexadecimal: 0xC php: | array( 'canonical' => 12345, 'decimal' => 12345.0, 'octal' => 12, 'hexadecimal' => 12 ) --- test: Float yaml: | canonical: 1.23015e+3 exponential: 12.3015e+02 fixed: 1,230.15 negative infinity: -.inf not a number: .NaN php: | array( 'canonical' => 1230.15, 'exponential' => 1230.15, 'fixed' => 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' ) } src/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml000066400000000000000000000153501266465517700251530ustar00rootroot00000000000000--- %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 one-thousand: 1,000 negative one-thousand: -1,000 php: | array( 'zero' => 0, 'simple' => 12, 'one-thousand' => 1000.0, '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 larger float: 1,000.09 scientific notation: 1.00009e+3 php: | array( 'a simple float' => 2.0, 'larger float' => 1000.09, 'scientific notation' => 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 ) src/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml000066400000000000000000000000371266465517700236730ustar00rootroot00000000000000value: src/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml000066400000000000000000000037651266465517700252550ustar00rootroot00000000000000test: 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'" ) src/Symfony/Component/Yaml/Tests/Fixtures/index.yml000066400000000000000000000004701266465517700227460ustar00rootroot00000000000000- escapedCharacters - sfComments - sfCompact - sfTests - sfObjects - sfMergeKey - sfQuotes - YtsAnchorAlias - YtsBasicTests - YtsBlockMapping - YtsDocumentSeparator - YtsErrorTests - YtsFlowCollections - YtsFoldedScalars - YtsNullsAndEmpties - YtsSpecificationExamples - YtsTypeTransfers - unindentedCollections src/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml000066400000000000000000000032261266465517700237570ustar00rootroot00000000000000--- %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') src/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml000066400000000000000000000055251266465517700235640ustar00rootroot00000000000000--- %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' ) ) ) src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml000066400000000000000000000033701266465517700237020ustar00rootroot00000000000000--- %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 bar: a: before d: other <<: *foo b: new x: Oren c: foo: bar foo: ignore bar: foo duplicate: foo: bar foo: ignore 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'), 'bar' => array('a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'), 'duplicate' => array('foo' => 'bar'), 'foo2' => array('a' => 'Ballmer'), 'ding' => array('fi', 'fei', 'fo', 'fam'), 'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'), 'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', '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)) ) src/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml000066400000000000000000000004341266465517700235610ustar00rootroot00000000000000--- %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') src/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml000066400000000000000000000013451266465517700234520ustar00rootroot00000000000000--- %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', ), ) src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml000066400000000000000000000046711266465517700233010ustar00rootroot00000000000000--- %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') src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml000066400000000000000000000034301266465517700261720ustar00rootroot00000000000000--- %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'))) src/Symfony/Component/Yaml/Tests/InlineTest.php000066400000000000000000000423451266465517700221010ustar00rootroot00000000000000 * * 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 Symfony\Component\Yaml\Inline; class InlineTest extends \PHPUnit_Framework_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, 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))); setlocale(LC_NUMERIC, $locale); } catch (\Exception $e) { setlocale(LC_NUMERIC, $locale); throw $e; } } public function testHashStringsResemblingExponentialNumericsShouldNotBeChangedToINF() { $value = '686e444'; $this->assertSame($value, Inline::parse(Inline::dump($value))); } /** * @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); } /** * @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, 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]', 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 }'); } public function getTestsForParse() { 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'), // 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(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("'quoted string'", 'quoted string'), array('!!float 1230', 12.30e+02), array('1234', 0x4D2), array('1243', 02333), 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')), ); } } src/Symfony/Component/Yaml/Tests/ParseExceptionTest.php000066400000000000000000000025151266465517700236070ustar00rootroot00000000000000 * * 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 Symfony\Component\Yaml\Exception\ParseException; class ParseExceptionTest extends \PHPUnit_Framework_TestCase { public function testGetMessage() { $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml'); if (PHP_VERSION_ID >= 50400) { $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")'; } else { $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'); if (PHP_VERSION_ID >= 50400) { $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")'; } else { $message = 'Error message in "\u00e4\u00f6\u00fc.yml" at line 42 (near "foo: bar")'; } $this->assertEquals($message, $exception->getMessage()); } } src/Symfony/Component/Yaml/Tests/ParserTest.php000066400000000000000000000516511266465517700221170ustar00rootroot00000000000000 * * 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 Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Parser; class ParserTest extends \PHPUnit_Framework_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) { $this->assertEquals($expected, var_export($this->parser->parse($yaml), true), $comment); } 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']); } } } 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: | 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 = <<assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); $input = <<assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->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'); } public function testObjectForMapEnabledWithMapping() { $yaml = <<parser->parse($yaml, false, false, true); $this->assertInstanceOf('stdClass', $result); $this->assertInstanceOf('stdClass', $result->foo); $this->assertEquals(array('cat'), $result->foo->fiz); } public function testObjectForMapEnabledWithInlineMapping() { $result = $this->parser->parse('{ "foo": "bar", "fiz": "cat" }', false, false, true); $this->assertInstanceOf('stdClass', $result); $this->assertEquals('bar', $result->foo); $this->assertEquals('cat', $result->fiz); } /** * @dataProvider invalidDumpedObjectProvider * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ public function testObjectsSupportDisabledWithExceptions($yaml) { $this->parser->parse($yaml, true, false); } public function invalidDumpedObjectProvider() { $yamlTag = << 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 * @expectedExceptionMessage 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 ); } /** * @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(<< 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 */ public function testMappingDuplicateKeyBlock() { $input = << array( 'child' => 'first', ), ); $this->assertSame($expected, Yaml::parse($input)); } public function testMappingDuplicateKeyFlow() { $input = << array( 'child' => 'first', ), ); $this->assertSame($expected, Yaml::parse($input)); } public function testEmptyValue() { $input = <<<'EOF' hash: EOF; $this->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)); } /** * @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 = << line1 line2> baz: # comment foobar: ~ EOT; $expected = array( 'foo' => array( 'bar' => array( 'scalar-block' => 'line1 line2>', ), '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 = <<

    A heading

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

    A heading

    • a list
    • may be a good example
    EOT; $this->assertSame( array( 'test' => <<A heading
    • a list
    • may be a good example
    EOT , ), $this->parser->parse($yaml) ); } } class B { public $b = 'foo'; } src/Symfony/Component/Yaml/Tests/YamlTest.php000066400000000000000000000017041266465517700215570ustar00rootroot00000000000000 * * 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 Symfony\Component\Yaml\Yaml; class YamlTest extends \PHPUnit_Framework_TestCase { public function testParseAndDump() { $data = array('lorem' => 'ipsum', 'dolor' => 'sit'); $yml = Yaml::dump($data); $parsed = Yaml::parse($yml); $this->assertEquals($data, $parsed); } /** * @group legacy */ public function testLegacyParseFromFile() { $filename = __DIR__.'/Fixtures/index.yml'; $contents = file_get_contents($filename); $parsedByFilename = Yaml::parse($filename); $parsedByContents = Yaml::parse($contents); $this->assertEquals($parsedByFilename, $parsedByContents); } } src/Symfony/Component/Yaml/Unescaper.php000066400000000000000000000077271266465517700206530ustar00rootroot00000000000000 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Yaml; /** * Unescaper encapsulates unescaping rules for single and double-quoted * YAML strings. * * @author Matthew Lewinski */ class Unescaper { /** * Parser and Inline assume UTF-8 encoding, so escaped Unicode characters * must be converted to that encoding. * * @deprecated since version 2.5, to be removed in 3.0 * * @internal */ const ENCODING = 'UTF-8'; /** * Regex fragment that matches an escaped character in a double quoted string. */ const REGEX_ESCAPED_CHARACTER = "\\\\([0abt\tnvfre \\\"\\/\\\\N_LP]|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) { $self = $this; $callback = function ($match) use ($self) { return $self->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 */ public 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))); } } /** * 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); } } src/Symfony/Component/Yaml/Yaml.php000066400000000000000000000071441266465517700176210ustar00rootroot00000000000000 * * 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 { /** * Parses YAML into a PHP value. * * Usage: * * $array = Yaml::parse(file_get_contents('config.yml')); * print_r($array); * * * As this method accepts both plain strings and file names as an input, * you must validate the input before calling this method. Passing a file * as an input is a deprecated feature and will be removed in 3.0. * * Note: the ability to pass file names to the Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. * * @param string $input Path to a YAML file or a string containing YAML * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise * @param bool $objectSupport True if object support is enabled, false otherwise * @param bool $objectForMap True if maps should return a stdClass instead of array() * * @return mixed The YAML converted to a PHP value * * @throws ParseException If the YAML is not valid */ public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) { // if input is a file, process it $file = ''; if (strpos($input, "\n") === false && is_file($input)) { @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); if (false === is_readable($input)) { throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input)); } $file = $input; $input = file_get_contents($file); } $yaml = new Parser(); try { return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap); } catch (ParseException $e) { if ($file) { $e->setParsedFile($file); } throw $e; } } /** * Dumps a PHP array to a YAML string. * * The dump method, when supplied with an array, will do its best * to convert the array into friendly YAML. * * @param array $array PHP array * @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 bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * * @return string A YAML string representing the original PHP array */ public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) { $yaml = new Dumper(); $yaml->setIndentation($indent); return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport); } } src/Symfony/Component/Yaml/composer.json000066400000000000000000000013551266465517700207260ustar00rootroot00000000000000{ "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.3.9" }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-master": "2.7-dev" } } } src/Symfony/Component/Yaml/phpunit.xml.dist000066400000000000000000000014051266465517700213530ustar00rootroot00000000000000 ./Tests/ ./ ./Tests ./vendor