From 2eed7b082f83630301e51f57ca8394de228a8605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 18 Aug 2019 21:14:58 -0500 Subject: first commit --- .../vendor/symfony/polyfill-ctype/Ctype.php | 227 ++ .../storage/vendor/symfony/polyfill-ctype/LICENSE | 19 + .../vendor/symfony/polyfill-ctype/README.md | 12 + .../vendor/symfony/polyfill-ctype/bootstrap.php | 26 + .../vendor/symfony/polyfill-ctype/composer.json | 34 + .../vendor/symfony/polyfill-mbstring/LICENSE | 19 + .../vendor/symfony/polyfill-mbstring/Mbstring.php | 800 +++++++ .../vendor/symfony/polyfill-mbstring/README.md | 13 + .../Resources/unidata/lowerCase.php | 1096 ++++++++++ .../Resources/unidata/titleCaseRegexp.php | 5 + .../Resources/unidata/upperCase.php | 1104 ++++++++++ .../vendor/symfony/polyfill-mbstring/bootstrap.php | 58 + .../vendor/symfony/polyfill-mbstring/composer.json | 34 + .../storage/vendor/symfony/translation/.gitignore | 3 + .../vendor/symfony/translation/CHANGELOG.md | 69 + .../translation/Catalogue/AbstractOperation.php | 171 ++ .../translation/Catalogue/MergeOperation.php | 55 + .../translation/Catalogue/OperationInterface.php | 77 + .../translation/Catalogue/TargetOperation.php | 69 + .../DataCollector/TranslationDataCollector.php | 150 ++ .../translation/DataCollectorTranslator.php | 152 ++ .../symfony/translation/Dumper/CsvFileDumper.php | 63 + .../symfony/translation/Dumper/DumperInterface.php | 31 + .../symfony/translation/Dumper/FileDumper.php | 123 ++ .../translation/Dumper/IcuResFileDumper.php | 106 + .../symfony/translation/Dumper/IniFileDumper.php | 45 + .../symfony/translation/Dumper/JsonFileDumper.php | 44 + .../symfony/translation/Dumper/MoFileDumper.php | 82 + .../symfony/translation/Dumper/PhpFileDumper.php | 38 + .../symfony/translation/Dumper/PoFileDumper.php | 61 + .../symfony/translation/Dumper/QtFileDumper.php | 50 + .../symfony/translation/Dumper/XliffFileDumper.php | 183 ++ .../symfony/translation/Dumper/YamlFileDumper.php | 54 + .../translation/Exception/ExceptionInterface.php | 21 + .../Exception/InvalidResourceException.php | 21 + .../Exception/NotFoundResourceException.php | 21 + .../Extractor/AbstractFileExtractor.php | 83 + .../translation/Extractor/ChainExtractor.php | 60 + .../translation/Extractor/ExtractorInterface.php | 38 + .../symfony/translation/IdentityTranslator.php | 65 + .../vendor/symfony/translation/Interval.php | 107 + .../storage/vendor/symfony/translation/LICENSE | 19 + .../symfony/translation/Loader/ArrayLoader.php | 66 + .../symfony/translation/Loader/CsvFileLoader.php | 65 + .../symfony/translation/Loader/FileLoader.php | 65 + .../translation/Loader/IcuDatFileLoader.php | 62 + .../translation/Loader/IcuResFileLoader.php | 92 + .../symfony/translation/Loader/IniFileLoader.php | 28 + .../symfony/translation/Loader/JsonFileLoader.php | 64 + .../symfony/translation/Loader/LoaderInterface.php | 38 + .../symfony/translation/Loader/MoFileLoader.php | 154 ++ .../symfony/translation/Loader/PhpFileLoader.php | 28 + .../symfony/translation/Loader/PoFileLoader.php | 151 ++ .../symfony/translation/Loader/QtFileLoader.php | 77 + .../symfony/translation/Loader/XliffFileLoader.php | 321 +++ .../symfony/translation/Loader/YamlFileLoader.php | 48 + .../dic/xliff-core/xliff-core-1.2-strict.xsd | 2223 ++++++++++++++++++++ .../schema/dic/xliff-core/xliff-core-2.0.xsd | 411 ++++ .../Loader/schema/dic/xliff-core/xml.xsd | 309 +++ .../symfony/translation/LoggingTranslator.php | 124 ++ .../symfony/translation/MessageCatalogue.php | 270 +++ .../translation/MessageCatalogueInterface.php | 142 ++ .../vendor/symfony/translation/MessageSelector.php | 86 + .../symfony/translation/MetadataAwareInterface.php | 54 + .../symfony/translation/PluralizationRules.php | 209 ++ .../storage/vendor/symfony/translation/README.md | 13 + .../Tests/Catalogue/AbstractOperationTest.php | 73 + .../Tests/Catalogue/MergeOperationTest.php | 83 + .../Tests/Catalogue/TargetOperationTest.php | 82 + .../DataCollector/TranslationDataCollectorTest.php | 148 ++ .../Tests/DataCollectorTranslatorTest.php | 93 + .../translation/Tests/Dumper/CsvFileDumperTest.php | 29 + .../translation/Tests/Dumper/FileDumperTest.php | 83 + .../Tests/Dumper/IcuResFileDumperTest.php | 28 + .../translation/Tests/Dumper/IniFileDumperTest.php | 28 + .../Tests/Dumper/JsonFileDumperTest.php | 38 + .../translation/Tests/Dumper/MoFileDumperTest.php | 28 + .../translation/Tests/Dumper/PhpFileDumperTest.php | 28 + .../translation/Tests/Dumper/PoFileDumperTest.php | 28 + .../translation/Tests/Dumper/QtFileDumperTest.php | 28 + .../Tests/Dumper/XliffFileDumperTest.php | 89 + .../Tests/Dumper/YamlFileDumperTest.php | 46 + .../translation/Tests/IdentityTranslatorTest.php | 95 + .../symfony/translation/Tests/IntervalTest.php | 48 + .../translation/Tests/Loader/CsvFileLoaderTest.php | 60 + .../Tests/Loader/IcuDatFileLoaderTest.php | 64 + .../Tests/Loader/IcuResFileLoaderTest.php | 51 + .../translation/Tests/Loader/IniFileLoaderTest.php | 50 + .../Tests/Loader/JsonFileLoaderTest.php | 61 + .../translation/Tests/Loader/LocalizedTestCase.php | 22 + .../translation/Tests/Loader/MoFileLoaderTest.php | 71 + .../translation/Tests/Loader/PhpFileLoaderTest.php | 49 + .../translation/Tests/Loader/PoFileLoaderTest.php | 108 + .../translation/Tests/Loader/QtFileLoaderTest.php | 67 + .../Tests/Loader/XliffFileLoaderTest.php | 183 ++ .../Tests/Loader/YamlFileLoaderTest.php | 70 + .../translation/Tests/LoggingTranslatorTest.php | 49 + .../translation/Tests/MessageCatalogueTest.php | 214 ++ .../translation/Tests/MessageSelectorTest.php | 130 ++ .../translation/Tests/PluralizationRulesTest.php | 123 ++ .../translation/Tests/TranslatorCacheTest.php | 299 +++ .../symfony/translation/Tests/TranslatorTest.php | 533 +++++ .../translation/Tests/Util/ArrayConverterTest.php | 73 + .../Tests/Writer/TranslationWriterTest.php | 65 + .../Tests/fixtures/empty-translation.mo | Bin 0 -> 49 bytes .../Tests/fixtures/empty-translation.po | 3 + .../symfony/translation/Tests/fixtures/empty.csv | 0 .../symfony/translation/Tests/fixtures/empty.ini | 0 .../symfony/translation/Tests/fixtures/empty.json | 0 .../symfony/translation/Tests/fixtures/empty.mo | 0 .../symfony/translation/Tests/fixtures/empty.po | 0 .../symfony/translation/Tests/fixtures/empty.xlf | 0 .../symfony/translation/Tests/fixtures/empty.yml | 0 .../translation/Tests/fixtures/encoding.xlf | 16 + .../Tests/fixtures/escaped-id-plurals.po | 10 + .../translation/Tests/fixtures/escaped-id.po | 8 + .../Tests/fixtures/fuzzy-translations.po | 10 + .../Tests/fixtures/invalid-xml-resources.xlf | 23 + .../translation/Tests/fixtures/malformed.json | 3 + .../translation/Tests/fixtures/messages.yml | 3 + .../translation/Tests/fixtures/messages_linear.yml | 2 + .../translation/Tests/fixtures/non-valid.xlf | 11 + .../translation/Tests/fixtures/non-valid.yml | 1 + .../symfony/translation/Tests/fixtures/plurals.mo | Bin 0 -> 74 bytes .../symfony/translation/Tests/fixtures/plurals.po | 5 + .../symfony/translation/Tests/fixtures/resname.xlf | 19 + .../resourcebundle/corrupted/resources.dat | 1 + .../Tests/fixtures/resourcebundle/dat/en.res | Bin 0 -> 120 bytes .../Tests/fixtures/resourcebundle/dat/en.txt | 3 + .../Tests/fixtures/resourcebundle/dat/fr.res | Bin 0 -> 124 bytes .../Tests/fixtures/resourcebundle/dat/fr.txt | 3 + .../fixtures/resourcebundle/dat/packagelist.txt | 2 + .../fixtures/resourcebundle/dat/resources.dat | Bin 0 -> 352 bytes .../Tests/fixtures/resourcebundle/res/en.res | Bin 0 -> 84 bytes .../Tests/fixtures/resources-2.0-clean.xlf | 23 + .../translation/Tests/fixtures/resources-2.0.xlf | 25 + .../translation/Tests/fixtures/resources-clean.xlf | 25 + .../Tests/fixtures/resources-target-attributes.xlf | 14 + .../Tests/fixtures/resources-tool-info.xlf | 14 + .../translation/Tests/fixtures/resources.csv | 4 + .../translation/Tests/fixtures/resources.dump.json | 1 + .../translation/Tests/fixtures/resources.ini | 1 + .../translation/Tests/fixtures/resources.json | 3 + .../translation/Tests/fixtures/resources.mo | Bin 0 -> 52 bytes .../translation/Tests/fixtures/resources.php | 5 + .../translation/Tests/fixtures/resources.po | 8 + .../translation/Tests/fixtures/resources.ts | 10 + .../translation/Tests/fixtures/resources.xlf | 23 + .../translation/Tests/fixtures/resources.yml | 1 + .../symfony/translation/Tests/fixtures/valid.csv | 4 + .../translation/Tests/fixtures/with-attributes.xlf | 21 + .../translation/Tests/fixtures/withdoctype.xlf | 12 + .../translation/Tests/fixtures/withnote.xlf | 22 + .../vendor/symfony/translation/Translator.php | 441 ++++ .../symfony/translation/TranslatorBagInterface.php | 31 + .../symfony/translation/TranslatorInterface.php | 65 + .../symfony/translation/Util/ArrayConverter.php | 99 + .../translation/Writer/TranslationWriter.php | 89 + .../vendor/symfony/translation/composer.json | 48 + .../vendor/symfony/translation/phpunit.xml.dist | 28 + .../storage/vendor/symfony/validator/.gitignore | 3 + .../storage/vendor/symfony/validator/CHANGELOG.md | 175 ++ .../symfony/validator/ClassBasedInterface.php | 30 + .../vendor/symfony/validator/Constraint.php | 298 +++ .../symfony/validator/ConstraintValidator.php | 214 ++ .../validator/ConstraintValidatorFactory.php | 51 + .../ConstraintValidatorFactoryInterface.php | 27 + .../validator/ConstraintValidatorInterface.php | 33 + .../symfony/validator/ConstraintViolation.php | 204 ++ .../validator/ConstraintViolationInterface.php | 123 ++ .../symfony/validator/ConstraintViolationList.php | 161 ++ .../validator/ConstraintViolationListInterface.php | 65 + .../validator/Constraints/AbstractComparison.php | 51 + .../Constraints/AbstractComparisonValidator.php | 94 + .../vendor/symfony/validator/Constraints/All.php | 38 + .../symfony/validator/Constraints/AllValidator.php | 56 + .../vendor/symfony/validator/Constraints/Bic.php | 39 + .../symfony/validator/Constraints/BicValidator.php | 90 + .../vendor/symfony/validator/Constraints/Blank.php | 31 + .../validator/Constraints/BlankValidator.php | 47 + .../symfony/validator/Constraints/Callback.php | 77 + .../validator/Constraints/CallbackValidator.php | 74 + .../symfony/validator/Constraints/CardScheme.php | 47 + .../validator/Constraints/CardSchemeValidator.php | 143 ++ .../symfony/validator/Constraints/Choice.php | 52 + .../validator/Constraints/ChoiceValidator.php | 133 ++ .../symfony/validator/Constraints/Collection.php | 85 + .../validator/Constraints/Collection/Optional.php | 29 + .../validator/Constraints/Collection/Required.php | 29 + .../validator/Constraints/CollectionValidator.php | 110 + .../symfony/validator/Constraints/Composite.php | 149 ++ .../vendor/symfony/validator/Constraints/Count.php | 54 + .../validator/Constraints/CountValidator.php | 85 + .../symfony/validator/Constraints/Country.php | 31 + .../validator/Constraints/CountryValidator.php | 61 + .../symfony/validator/Constraints/Currency.php | 32 + .../validator/Constraints/CurrencyValidator.php | 62 + .../vendor/symfony/validator/Constraints/Date.php | 33 + .../symfony/validator/Constraints/DateTime.php | 35 + .../validator/Constraints/DateTimeValidator.php | 88 + .../validator/Constraints/DateValidator.php | 91 + .../vendor/symfony/validator/Constraints/Email.php | 38 + .../validator/Constraints/EmailValidator.php | 155 ++ .../symfony/validator/Constraints/EqualTo.php | 30 + .../validator/Constraints/EqualToValidator.php | 37 + .../symfony/validator/Constraints/Existence.php | 30 + .../symfony/validator/Constraints/Expression.php | 65 + .../validator/Constraints/ExpressionValidator.php | 110 + .../vendor/symfony/validator/Constraints/False.php | 26 + .../validator/Constraints/FalseValidator.php | 23 + .../vendor/symfony/validator/Constraints/File.php | 123 ++ .../validator/Constraints/FileValidator.php | 329 +++ .../symfony/validator/Constraints/GreaterThan.php | 30 + .../validator/Constraints/GreaterThanOrEqual.php | 30 + .../Constraints/GreaterThanOrEqualValidator.php | 37 + .../validator/Constraints/GreaterThanValidator.php | 37 + .../validator/Constraints/GroupSequence.php | 208 ++ .../Constraints/GroupSequenceProvider.php | 24 + .../vendor/symfony/validator/Constraints/Iban.php | 47 + .../validator/Constraints/IbanValidator.php | 293 +++ .../symfony/validator/Constraints/IdenticalTo.php | 30 + .../validator/Constraints/IdenticalToValidator.php | 37 + .../vendor/symfony/validator/Constraints/Image.php | 77 + .../validator/Constraints/ImageValidator.php | 261 +++ .../vendor/symfony/validator/Constraints/Ip.php | 86 + .../symfony/validator/Constraints/IpValidator.php | 110 + .../symfony/validator/Constraints/IsFalse.php | 31 + .../validator/Constraints/IsFalseValidator.php | 49 + .../symfony/validator/Constraints/IsNull.php | 31 + .../validator/Constraints/IsNullValidator.php | 47 + .../symfony/validator/Constraints/IsTrue.php | 31 + .../validator/Constraints/IsTrueValidator.php | 51 + .../vendor/symfony/validator/Constraints/Isbn.php | 67 + .../validator/Constraints/IsbnValidator.php | 216 ++ .../vendor/symfony/validator/Constraints/Issn.php | 44 + .../validator/Constraints/IssnValidator.php | 183 ++ .../symfony/validator/Constraints/Language.php | 31 + .../validator/Constraints/LanguageValidator.php | 61 + .../symfony/validator/Constraints/Length.php | 58 + .../validator/Constraints/LengthValidator.php | 109 + .../symfony/validator/Constraints/LessThan.php | 30 + .../validator/Constraints/LessThanOrEqual.php | 30 + .../Constraints/LessThanOrEqualValidator.php | 37 + .../validator/Constraints/LessThanValidator.php | 37 + .../symfony/validator/Constraints/Locale.php | 31 + .../validator/Constraints/LocaleValidator.php | 62 + .../vendor/symfony/validator/Constraints/Luhn.php | 37 + .../validator/Constraints/LuhnValidator.php | 111 + .../symfony/validator/Constraints/NotBlank.php | 31 + .../validator/Constraints/NotBlankValidator.php | 47 + .../symfony/validator/Constraints/NotEqualTo.php | 30 + .../validator/Constraints/NotEqualToValidator.php | 37 + .../validator/Constraints/NotIdenticalTo.php | 30 + .../Constraints/NotIdenticalToValidator.php | 37 + .../symfony/validator/Constraints/NotNull.php | 31 + .../validator/Constraints/NotNullValidator.php | 47 + .../vendor/symfony/validator/Constraints/Null.php | 26 + .../validator/Constraints/NullValidator.php | 23 + .../symfony/validator/Constraints/Optional.php | 22 + .../vendor/symfony/validator/Constraints/Range.php | 67 + .../validator/Constraints/RangeValidator.php | 104 + .../vendor/symfony/validator/Constraints/Regex.php | 102 + .../validator/Constraints/RegexValidator.php | 60 + .../symfony/validator/Constraints/Required.php | 22 + .../vendor/symfony/validator/Constraints/Time.php | 33 + .../validator/Constraints/TimeValidator.php | 91 + .../symfony/validator/Constraints/Traverse.php | 50 + .../vendor/symfony/validator/Constraints/True.php | 26 + .../validator/Constraints/TrueValidator.php | 23 + .../vendor/symfony/validator/Constraints/Type.php | 48 + .../validator/Constraints/TypeValidator.php | 64 + .../vendor/symfony/validator/Constraints/Url.php | 34 + .../symfony/validator/Constraints/UrlValidator.php | 100 + .../vendor/symfony/validator/Constraints/Uuid.php | 77 + .../validator/Constraints/UuidValidator.php | 350 +++ .../vendor/symfony/validator/Constraints/Valid.php | 44 + .../symfony/validator/Context/ExecutionContext.php | 467 ++++ .../validator/Context/ExecutionContextFactory.php | 56 + .../Context/ExecutionContextFactoryInterface.php | 36 + .../Context/ExecutionContextInterface.php | 225 ++ .../validator/Context/LegacyExecutionContext.php | 46 + .../Context/LegacyExecutionContextFactory.php | 64 + .../vendor/symfony/validator/DefaultTranslator.php | 171 ++ .../validator/Exception/BadMethodCallException.php | 21 + .../Exception/ConstraintDefinitionException.php | 16 + .../validator/Exception/ExceptionInterface.php | 21 + .../Exception/GroupDefinitionException.php | 16 + .../Exception/InvalidArgumentException.php | 21 + .../Exception/InvalidOptionsException.php | 29 + .../validator/Exception/MappingException.php | 16 + .../Exception/MissingOptionsException.php | 29 + .../Exception/NoSuchMetadataException.php | 19 + .../validator/Exception/OutOfBoundsException.php | 21 + .../validator/Exception/RuntimeException.php | 21 + .../Exception/UnexpectedTypeException.php | 20 + .../Exception/UnsupportedMetadataException.php | 19 + .../validator/Exception/ValidatorException.php | 16 + .../vendor/symfony/validator/ExecutionContext.php | 269 +++ .../validator/ExecutionContextInterface.php | 299 +++ .../validator/GlobalExecutionContextInterface.php | 71 + .../validator/GroupSequenceProviderInterface.php | 28 + .../storage/vendor/symfony/validator/LICENSE | 19 + .../validator/Mapping/BlackholeMetadataFactory.php | 28 + .../symfony/validator/Mapping/Cache/ApcCache.php | 57 + .../validator/Mapping/Cache/CacheInterface.php | 43 + .../validator/Mapping/Cache/DoctrineCache.php | 59 + .../validator/Mapping/CascadingStrategy.php | 52 + .../symfony/validator/Mapping/ClassMetadata.php | 591 ++++++ .../validator/Mapping/ClassMetadataFactory.php | 28 + .../validator/Mapping/ClassMetadataInterface.php | 79 + .../symfony/validator/Mapping/ElementMetadata.php | 30 + .../Mapping/Factory/BlackHoleMetadataFactory.php | 40 + .../Mapping/Factory/LazyLoadingMetadataFactory.php | 167 ++ .../Mapping/Factory/MetadataFactoryInterface.php | 23 + .../symfony/validator/Mapping/GenericMetadata.php | 237 +++ .../symfony/validator/Mapping/GetterMetadata.php | 80 + .../validator/Mapping/Loader/AbstractLoader.php | 88 + .../validator/Mapping/Loader/AnnotationLoader.php | 92 + .../validator/Mapping/Loader/FileLoader.php | 51 + .../validator/Mapping/Loader/FilesLoader.php | 61 + .../validator/Mapping/Loader/LoaderChain.php | 59 + .../validator/Mapping/Loader/LoaderInterface.php | 29 + .../Mapping/Loader/StaticMethodLoader.php | 66 + .../validator/Mapping/Loader/XmlFileLoader.php | 213 ++ .../validator/Mapping/Loader/XmlFilesLoader.php | 31 + .../validator/Mapping/Loader/YamlFileLoader.php | 178 ++ .../validator/Mapping/Loader/YamlFilesLoader.php | 31 + .../constraint-mapping/constraint-mapping-1.0.xsd | 160 ++ .../symfony/validator/Mapping/MemberMetadata.php | 248 +++ .../validator/Mapping/MetadataInterface.php | 58 + .../symfony/validator/Mapping/PropertyMetadata.php | 74 + .../Mapping/PropertyMetadataInterface.php | 35 + .../validator/Mapping/TraversalStrategy.php | 65 + .../symfony/validator/MetadataFactoryInterface.php | 43 + .../vendor/symfony/validator/MetadataInterface.php | 73 + .../validator/ObjectInitializerInterface.php | 31 + .../PropertyMetadataContainerInterface.php | 45 + .../validator/PropertyMetadataInterface.php | 46 + .../storage/vendor/symfony/validator/README.md | 16 + .../Resources/translations/validators.af.xlf | 227 ++ .../Resources/translations/validators.ar.xlf | 315 +++ .../Resources/translations/validators.az.xlf | 227 ++ .../Resources/translations/validators.bg.xlf | 323 +++ .../Resources/translations/validators.ca.xlf | 311 +++ .../Resources/translations/validators.cs.xlf | 323 +++ .../Resources/translations/validators.cy.xlf | 227 ++ .../Resources/translations/validators.da.xlf | 251 +++ .../Resources/translations/validators.de.xlf | 327 +++ .../Resources/translations/validators.el.xlf | 283 +++ .../Resources/translations/validators.en.xlf | 331 +++ .../Resources/translations/validators.es.xlf | 327 +++ .../Resources/translations/validators.et.xlf | 283 +++ .../Resources/translations/validators.eu.xlf | 291 +++ .../Resources/translations/validators.fa.xlf | 283 +++ .../Resources/translations/validators.fi.xlf | 231 ++ .../Resources/translations/validators.fr.xlf | 327 +++ .../Resources/translations/validators.gl.xlf | 319 +++ .../Resources/translations/validators.he.xlf | 307 +++ .../Resources/translations/validators.hr.xlf | 323 +++ .../Resources/translations/validators.hu.xlf | 327 +++ .../Resources/translations/validators.hy.xlf | 319 +++ .../Resources/translations/validators.id.xlf | 323 +++ .../Resources/translations/validators.it.xlf | 327 +++ .../Resources/translations/validators.ja.xlf | 331 +++ .../Resources/translations/validators.lb.xlf | 327 +++ .../Resources/translations/validators.lt.xlf | 311 +++ .../Resources/translations/validators.lv.xlf | 315 +++ .../Resources/translations/validators.mn.xlf | 151 ++ .../Resources/translations/validators.nb.xlf | 319 +++ .../Resources/translations/validators.nl.xlf | 323 +++ .../Resources/translations/validators.nn.xlf | 227 ++ .../Resources/translations/validators.no.xlf | 319 +++ .../Resources/translations/validators.pl.xlf | 331 +++ .../Resources/translations/validators.pt.xlf | 311 +++ .../Resources/translations/validators.pt_BR.xlf | 319 +++ .../Resources/translations/validators.ro.xlf | 287 +++ .../Resources/translations/validators.ru.xlf | 319 +++ .../Resources/translations/validators.sk.xlf | 319 +++ .../Resources/translations/validators.sl.xlf | 323 +++ .../Resources/translations/validators.sq.xlf | 227 ++ .../Resources/translations/validators.sr_Cyrl.xlf | 303 +++ .../Resources/translations/validators.sr_Latn.xlf | 303 +++ .../Resources/translations/validators.sv.xlf | 323 +++ .../Resources/translations/validators.th.xlf | 303 +++ .../Resources/translations/validators.tl.xlf | 319 +++ .../Resources/translations/validators.tr.xlf | 231 ++ .../Resources/translations/validators.uk.xlf | 323 +++ .../Resources/translations/validators.vi.xlf | 283 +++ .../Resources/translations/validators.zh_CN.xlf | 319 +++ .../Resources/translations/validators.zh_TW.xlf | 283 +++ .../symfony/validator/Tests/ConstraintTest.php | 245 +++ .../Tests/ConstraintViolationListTest.php | 135 ++ .../validator/Tests/ConstraintViolationTest.php | 56 + .../AbstractComparisonValidatorTestCase.php | 192 ++ .../AbstractConstraintValidatorTest.php | 441 ++++ .../validator/Tests/Constraints/AllTest.php | 42 + .../Tests/Constraints/AllValidatorTest.php | 93 + .../Tests/Constraints/BicValidatorTest.php | 106 + .../Tests/Constraints/BlankValidatorTest.php | 70 + .../Tests/Constraints/CallbackValidatorTest.php | 351 ++++ .../Tests/Constraints/CardSchemeValidatorTest.php | 143 ++ .../Tests/Constraints/ChoiceValidatorTest.php | 304 +++ .../validator/Tests/Constraints/CollectionTest.php | 113 + .../CollectionValidatorArrayObjectTest.php | 20 + .../Constraints/CollectionValidatorArrayTest.php | 20 + .../CollectionValidatorCustomArrayObjectTest.php | 22 + .../Tests/Constraints/CollectionValidatorTest.php | 389 ++++ .../validator/Tests/Constraints/CompositeTest.php | 148 ++ .../Tests/Constraints/CountValidatorArrayTest.php | 23 + .../Constraints/CountValidatorCountableTest.php | 25 + .../Tests/Constraints/CountValidatorTest.php | 203 ++ .../Tests/Constraints/CountryValidatorTest.php | 110 + .../Tests/Constraints/CurrencyValidatorTest.php | 112 + .../Tests/Constraints/DateTimeValidatorTest.php | 110 + .../Tests/Constraints/DateValidatorTest.php | 106 + .../Tests/Constraints/EmailValidatorTest.php | 190 ++ .../Tests/Constraints/EqualToValidatorTest.php | 74 + .../Tests/Constraints/ExpressionValidatorTest.php | 279 +++ .../validator/Tests/Constraints/FileTest.php | 139 ++ .../Tests/Constraints/FileValidatorObjectTest.php | 22 + .../Tests/Constraints/FileValidatorPathTest.php | 36 + .../Tests/Constraints/FileValidatorTest.php | 483 +++++ .../validator/Tests/Constraints/Fixtures/foo | 0 .../validator/Tests/Constraints/Fixtures/test.gif | Bin 0 -> 801 bytes .../Tests/Constraints/Fixtures/test_4by3.gif | Bin 0 -> 57 bytes .../Tests/Constraints/Fixtures/test_landscape.gif | Bin 0 -> 43 bytes .../Tests/Constraints/Fixtures/test_portrait.gif | Bin 0 -> 43 bytes .../GreaterThanOrEqualValidatorTest.php | 76 + .../Tests/Constraints/GreaterThanValidatorTest.php | 79 + .../Tests/Constraints/GroupSequenceTest.php | 100 + .../Tests/Constraints/IbanValidatorTest.php | 450 ++++ .../Tests/Constraints/IdenticalToValidatorTest.php | 94 + .../Tests/Constraints/ImageValidatorTest.php | 332 +++ .../Tests/Constraints/IpValidatorTest.php | 456 ++++ .../Tests/Constraints/IsFalseValidatorTest.php | 57 + .../Tests/Constraints/IsNullValidatorTest.php | 67 + .../Tests/Constraints/IsTrueValidatorTest.php | 57 + .../Tests/Constraints/IsbnValidatorTest.php | 271 +++ .../Tests/Constraints/IssnValidatorTest.php | 187 ++ .../Tests/Constraints/LanguageValidatorTest.php | 110 + .../Tests/Constraints/LengthValidatorTest.php | 252 +++ .../Constraints/LessThanOrEqualValidatorTest.php | 79 + .../Tests/Constraints/LessThanValidatorTest.php | 78 + .../Tests/Constraints/LocaleValidatorTest.php | 98 + .../Tests/Constraints/LuhnValidatorTest.php | 127 ++ .../Tests/Constraints/NotBlankValidatorTest.php | 106 + .../Tests/Constraints/NotEqualToValidatorTest.php | 74 + .../Constraints/NotIdenticalToValidatorTest.php | 92 + .../Tests/Constraints/NotNullValidatorTest.php | 63 + .../Tests/Constraints/RangeValidatorTest.php | 403 ++++ .../validator/Tests/Constraints/RegexTest.php | 88 + .../Tests/Constraints/RegexValidatorTest.php | 98 + .../Tests/Constraints/TimeValidatorTest.php | 107 + .../Tests/Constraints/TypeValidatorTest.php | 187 ++ .../Tests/Constraints/UrlValidatorTest.php | 242 +++ .../Tests/Constraints/UuidValidatorTest.php | 221 ++ .../validator/Tests/Constraints/ValidTest.php | 29 + .../validator/Tests/Fixtures/CallbackClass.php | 24 + .../validator/Tests/Fixtures/ClassConstraint.php | 22 + .../validator/Tests/Fixtures/ConstraintA.php | 31 + .../Tests/Fixtures/ConstraintAValidator.php | 37 + .../validator/Tests/Fixtures/ConstraintB.php | 23 + .../validator/Tests/Fixtures/ConstraintC.php | 30 + .../Tests/Fixtures/ConstraintWithValue.php | 31 + .../Fixtures/ConstraintWithValueAsDefault.php | 31 + .../symfony/validator/Tests/Fixtures/Countable.php | 27 + .../validator/Tests/Fixtures/CustomArrayObject.php | 70 + .../symfony/validator/Tests/Fixtures/Entity.php | 104 + .../validator/Tests/Fixtures/EntityInterfaceA.php | 16 + .../validator/Tests/Fixtures/EntityInterfaceB.php | 16 + .../validator/Tests/Fixtures/EntityParent.php | 31 + .../Tests/Fixtures/EntityParentInterface.php | 16 + .../validator/Tests/Fixtures/EntityStaticCar.php | 23 + .../Tests/Fixtures/EntityStaticCarTurbo.php | 23 + .../Tests/Fixtures/EntityStaticVehicle.php | 25 + .../validator/Tests/Fixtures/FailingConstraint.php | 24 + .../Tests/Fixtures/FailingConstraintValidator.php | 23 + .../validator/Tests/Fixtures/FakeClassMetadata.php | 26 + .../Tests/Fixtures/FakeMetadataFactory.php | 72 + .../validator/Tests/Fixtures/FilesLoader.php | 39 + .../Fixtures/GroupSequenceProviderChildEntity.php | 16 + .../Tests/Fixtures/GroupSequenceProviderEntity.php | 36 + .../validator/Tests/Fixtures/InvalidConstraint.php | 18 + .../Tests/Fixtures/InvalidConstraintValidator.php | 16 + .../Tests/Fixtures/LegacyClassMetadata.php | 20 + .../Tests/Fixtures/PropertyConstraint.php | 22 + .../symfony/validator/Tests/Fixtures/Reference.php | 29 + .../Tests/Fixtures/StubGlobalExecutionContext.php | 68 + .../symfony/validator/Tests/Fixtures/ToString.php | 22 + .../validator/Tests/LegacyExecutionContextTest.php | 335 +++ .../validator/Tests/LegacyValidatorTest.php | 42 + .../Tests/Mapping/Cache/DoctrineCacheTest.php | 85 + .../Tests/Mapping/Cache/LegacyApcCacheTest.php | 83 + .../validator/Tests/Mapping/ClassMetadataTest.php | 323 +++ .../Factory/BlackHoleMetadataFactoryTest.php | 34 + .../Factory/LazyLoadingMetadataFactoryTest.php | 218 ++ .../validator/Tests/Mapping/GetterMetadataTest.php | 72 + .../Tests/Mapping/LegacyElementMetadataTest.php | 79 + .../Mapping/Loader/AbstractStaticMethodLoader.php | 19 + .../Tests/Mapping/Loader/AnnotationLoaderTest.php | 164 ++ .../Tests/Mapping/Loader/FilesLoaderTest.php | 49 + .../Tests/Mapping/Loader/LoaderChainTest.php | 85 + .../Mapping/Loader/StaticMethodLoaderTest.php | 140 ++ .../Tests/Mapping/Loader/XmlFileLoaderTest.php | 136 ++ .../Tests/Mapping/Loader/YamlFileLoaderTest.php | 139 ++ .../validator/Tests/Mapping/Loader/bad-format.yml | 9 + .../Loader/constraint-mapping-non-strings.xml | 19 + .../Tests/Mapping/Loader/constraint-mapping.xml | 124 ++ .../Tests/Mapping/Loader/constraint-mapping.yml | 62 + .../Tests/Mapping/Loader/empty-mapping.yml | 0 .../Tests/Mapping/Loader/nonvalid-mapping.yml | 1 + .../validator/Tests/Mapping/Loader/withdoctype.xml | 7 + .../validator/Tests/Mapping/MemberMetadataTest.php | 120 ++ .../Tests/Mapping/PropertyMetadataTest.php | 56 + .../Tests/Resources/TranslationFilesTest.php | 48 + .../validator/Tests/Util/PropertyPathTest.php | 37 + .../Tests/Validator/Abstract2Dot5ApiTest.php | 742 +++++++ .../Tests/Validator/AbstractLegacyApiTest.php | 313 +++ .../Tests/Validator/AbstractValidatorTest.php | 1284 +++++++++++ .../Validator/LegacyValidator2Dot5ApiTest.php | 35 + .../Validator/LegacyValidatorLegacyApiTest.php | 35 + .../Validator/RecursiveValidator2Dot5ApiTest.php | 57 + .../validator/Tests/ValidatorBuilderTest.php | 117 ++ .../vendor/symfony/validator/Util/PropertyPath.php | 56 + .../vendor/symfony/validator/Validation.php | 68 + .../vendor/symfony/validator/ValidationVisitor.php | 181 ++ .../validator/ValidationVisitorInterface.php | 82 + .../storage/vendor/symfony/validator/Validator.php | 208 ++ .../Validator/ContextualValidatorInterface.php | 83 + .../validator/Validator/LegacyValidator.php | 27 + .../Validator/RecursiveContextualValidator.php | 831 ++++++++ .../validator/Validator/RecursiveValidator.php | 171 ++ .../validator/Validator/ValidatorInterface.php | 92 + .../vendor/symfony/validator/ValidatorBuilder.php | 372 ++++ .../validator/ValidatorBuilderInterface.php | 181 ++ .../symfony/validator/ValidatorInterface.php | 103 + .../Violation/ConstraintViolationBuilder.php | 181 ++ .../ConstraintViolationBuilderInterface.php | 114 + .../Violation/LegacyConstraintViolationBuilder.php | 166 ++ .../storage/vendor/symfony/validator/composer.json | 58 + .../vendor/symfony/validator/phpunit.xml.dist | 31 + 541 files changed, 62899 insertions(+) create mode 100644 public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php create mode 100644 public/system/storage/vendor/symfony/polyfill-ctype/LICENSE create mode 100644 public/system/storage/vendor/symfony/polyfill-ctype/README.md create mode 100644 public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php create mode 100644 public/system/storage/vendor/symfony/polyfill-ctype/composer.json create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/README.md create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php create mode 100644 public/system/storage/vendor/symfony/polyfill-mbstring/composer.json create mode 100644 public/system/storage/vendor/symfony/translation/.gitignore create mode 100644 public/system/storage/vendor/symfony/translation/CHANGELOG.md create mode 100644 public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php create mode 100644 public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php create mode 100644 public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php create mode 100644 public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php create mode 100644 public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php create mode 100644 public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php create mode 100644 public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php create mode 100644 public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php create mode 100644 public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php create mode 100644 public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/IdentityTranslator.php create mode 100644 public/system/storage/vendor/symfony/translation/Interval.php create mode 100644 public/system/storage/vendor/symfony/translation/LICENSE create mode 100644 public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/FileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php create mode 100644 public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd create mode 100644 public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd create mode 100644 public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd create mode 100644 public/system/storage/vendor/symfony/translation/LoggingTranslator.php create mode 100644 public/system/storage/vendor/symfony/translation/MessageCatalogue.php create mode 100644 public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/MessageSelector.php create mode 100644 public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/PluralizationRules.php create mode 100644 public/system/storage/vendor/symfony/translation/README.md create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf create mode 100644 public/system/storage/vendor/symfony/translation/Translator.php create mode 100644 public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/TranslatorInterface.php create mode 100644 public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php create mode 100644 public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php create mode 100644 public/system/storage/vendor/symfony/translation/composer.json create mode 100644 public/system/storage/vendor/symfony/translation/phpunit.xml.dist create mode 100644 public/system/storage/vendor/symfony/validator/.gitignore create mode 100644 public/system/storage/vendor/symfony/validator/CHANGELOG.md create mode 100644 public/system/storage/vendor/symfony/validator/ClassBasedInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraint.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintViolation.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintViolationList.php create mode 100644 public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/All.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Bic.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Blank.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Callback.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Choice.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Collection.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Composite.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Count.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Country.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Currency.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Date.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/DateTime.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Email.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Existence.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Expression.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/False.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/File.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Iban.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Image.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Ip.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsNull.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Isbn.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Issn.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Language.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Length.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LessThan.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Locale.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Luhn.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotNull.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Null.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Optional.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Range.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Regex.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Required.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Time.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Traverse.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/True.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Type.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Url.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Uuid.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Constraints/Valid.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php create mode 100644 public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/DefaultTranslator.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/MappingException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php create mode 100644 public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php create mode 100644 public/system/storage/vendor/symfony/validator/ExecutionContext.php create mode 100644 public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/LICENSE create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php create mode 100644 public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/MetadataInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/README.md create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf create mode 100644 public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php create mode 100644 public/system/storage/vendor/symfony/validator/Util/PropertyPath.php create mode 100644 public/system/storage/vendor/symfony/validator/Validation.php create mode 100644 public/system/storage/vendor/symfony/validator/ValidationVisitor.php create mode 100644 public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php create mode 100644 public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ValidatorBuilder.php create mode 100644 public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/ValidatorInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php create mode 100644 public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php create mode 100644 public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php create mode 100644 public/system/storage/vendor/symfony/validator/composer.json create mode 100644 public/system/storage/vendor/symfony/validator/phpunit.xml.dist (limited to 'public/system/storage/vendor/symfony') diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php b/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php new file mode 100644 index 0000000..58414dc --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/Ctype.php @@ -0,0 +1,227 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Ctype; + +/** + * Ctype implementation through regex. + * + * @internal + * + * @author Gert de Pagter + */ +final class Ctype +{ + /** + * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. + * + * @see https://php.net/ctype-alnum + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_alnum($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is a letter, FALSE otherwise. + * + * @see https://php.net/ctype-alpha + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_alpha($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); + } + + /** + * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. + * + * @see https://php.net/ctype-cntrl + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_cntrl($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); + } + + /** + * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. + * + * @see https://php.net/ctype-digit + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_digit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. + * + * @see https://php.net/ctype-graph + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_graph($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); + } + + /** + * Returns TRUE if every character in text is a lowercase letter. + * + * @see https://php.net/ctype-lower + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_lower($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); + } + + /** + * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. + * + * @see https://php.net/ctype-print + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_print($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); + } + + /** + * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. + * + * @see https://php.net/ctype-punct + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_punct($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); + } + + /** + * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. + * + * @see https://php.net/ctype-space + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_space($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); + } + + /** + * Returns TRUE if every character in text is an uppercase letter. + * + * @see https://php.net/ctype-upper + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_upper($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); + } + + /** + * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. + * + * @see https://php.net/ctype-xdigit + * + * @param string|int $text + * + * @return bool + */ + public static function ctype_xdigit($text) + { + $text = self::convert_int_to_char_for_ctype($text); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); + } + + /** + * Converts integers to their char versions according to normal ctype behaviour, if needed. + * + * If an integer between -128 and 255 inclusive is provided, + * it is interpreted as the ASCII value of a single character + * (negative values have 256 added in order to allow characters in the Extended ASCII range). + * Any other integer is interpreted as a string containing the decimal digits of the integer. + * + * @param string|int $int + * + * @return mixed + */ + private static function convert_int_to_char_for_ctype($int) + { + if (!\is_int($int)) { + return $int; + } + + if ($int < -128 || $int > 255) { + return (string) $int; + } + + if ($int < 0) { + $int += 256; + } + + return \chr($int); + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE b/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/README.md b/public/system/storage/vendor/symfony/polyfill-ctype/README.md new file mode 100644 index 0000000..8add1ab --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Ctype +======================== + +This component provides `ctype_*` functions to users who run php versions without the ctype extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php b/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 0000000..14d1d0f --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (!function_exists('ctype_alnum')) { + function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } + function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } + function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } + function ctype_digit($text) { return p\Ctype::ctype_digit($text); } + function ctype_graph($text) { return p\Ctype::ctype_graph($text); } + function ctype_lower($text) { return p\Ctype::ctype_lower($text); } + function ctype_print($text) { return p\Ctype::ctype_print($text); } + function ctype_punct($text) { return p\Ctype::ctype_punct($text); } + function ctype_space($text) { return p\Ctype::ctype_space($text); } + function ctype_upper($text) { return p\Ctype::ctype_upper($text); } + function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } +} diff --git a/public/system/storage/vendor/symfony/polyfill-ctype/composer.json b/public/system/storage/vendor/symfony/polyfill-ctype/composer.json new file mode 100644 index 0000000..c24e20c --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-ctype/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-ctype", + "type": "library", + "description": "Symfony polyfill for ctype functions", + "keywords": ["polyfill", "compatibility", "portable", "ctype"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE b/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..a5e4a8f --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,800 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'Å¿', "\xCD\x85", 'Ï‚', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'Ï€', 'κ', 'Ï', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/README.md b/public/system/storage/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..342e828 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](http://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..e6fbfa6 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1096 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Ã' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Ã…' => 'Ã¥', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'ÃŒ' => 'ì', + 'Ã' => 'í', + 'ÃŽ' => 'î', + 'Ã' => 'ï', + 'Ã' => 'ð', + 'Ñ' => 'ñ', + 'Ã’' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ã' => 'ý', + 'Þ' => 'þ', + 'Ä€' => 'Ä', + 'Ä‚' => 'ă', + 'Ä„' => 'Ä…', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'ÄŠ' => 'Ä‹', + 'ÄŒ' => 'Ä', + 'ÄŽ' => 'Ä', + 'Ä' => 'Ä‘', + 'Ä’' => 'Ä“', + 'Ä”' => 'Ä•', + 'Ä–' => 'Ä—', + 'Ę' => 'Ä™', + 'Äš' => 'Ä›', + 'Äœ' => 'Ä', + 'Äž' => 'ÄŸ', + 'Ä ' => 'Ä¡', + 'Ä¢' => 'Ä£', + 'Ĥ' => 'Ä¥', + 'Ħ' => 'ħ', + 'Ĩ' => 'Ä©', + 'Ī' => 'Ä«', + 'Ĭ' => 'Ä­', + 'Ä®' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ä´' => 'ĵ', + 'Ķ' => 'Ä·', + 'Ĺ' => 'ĺ', + 'Ä»' => 'ļ', + 'Ľ' => 'ľ', + 'Ä¿' => 'Å€', + 'Å' => 'Å‚', + 'Ń' => 'Å„', + 'Å…' => 'ņ', + 'Ň' => 'ň', + 'ÅŠ' => 'Å‹', + 'ÅŒ' => 'Å', + 'ÅŽ' => 'Å', + 'Å' => 'Å‘', + 'Å’' => 'Å“', + 'Å”' => 'Å•', + 'Å–' => 'Å—', + 'Ř' => 'Å™', + 'Åš' => 'Å›', + 'Åœ' => 'Å', + 'Åž' => 'ÅŸ', + 'Å ' => 'Å¡', + 'Å¢' => 'Å£', + 'Ť' => 'Å¥', + 'Ŧ' => 'ŧ', + 'Ũ' => 'Å©', + 'Ū' => 'Å«', + 'Ŭ' => 'Å­', + 'Å®' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Å´' => 'ŵ', + 'Ŷ' => 'Å·', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Å»' => 'ż', + 'Ž' => 'ž', + 'Æ' => 'É“', + 'Æ‚' => 'ƃ', + 'Æ„' => 'Æ…', + 'Ɔ' => 'É”', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'É–', + 'ÆŠ' => 'É—', + 'Æ‹' => 'ÆŒ', + 'ÆŽ' => 'Ç', + 'Æ' => 'É™', + 'Æ' => 'É›', + 'Æ‘' => 'Æ’', + 'Æ“' => 'É ', + 'Æ”' => 'É£', + 'Æ–' => 'É©', + 'Æ—' => 'ɨ', + 'Ƙ' => 'Æ™', + 'Æœ' => 'ɯ', + 'Æ' => 'ɲ', + 'ÆŸ' => 'ɵ', + 'Æ ' => 'Æ¡', + 'Æ¢' => 'Æ£', + 'Ƥ' => 'Æ¥', + 'Ʀ' => 'Ê€', + 'Ƨ' => 'ƨ', + 'Æ©' => 'ʃ', + 'Ƭ' => 'Æ­', + 'Æ®' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ÊŠ', + 'Ʋ' => 'Ê‹', + 'Ƴ' => 'Æ´', + 'Ƶ' => 'ƶ', + 'Æ·' => 'Ê’', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'Ç„' => 'dž', + 'Ç…' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'ÇŠ' => 'ÇŒ', + 'Ç‹' => 'ÇŒ', + 'Ç' => 'ÇŽ', + 'Ç' => 'Ç', + 'Ç‘' => 'Ç’', + 'Ç“' => 'Ç”', + 'Ç•' => 'Ç–', + 'Ç—' => 'ǘ', + 'Ç™' => 'Çš', + 'Ç›' => 'Çœ', + 'Çž' => 'ÇŸ', + 'Ç ' => 'Ç¡', + 'Ç¢' => 'Ç£', + 'Ǥ' => 'Ç¥', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'Ç©', + 'Ǫ' => 'Ç«', + 'Ǭ' => 'Ç­', + 'Ç®' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ç´' => 'ǵ', + 'Ƕ' => 'Æ•', + 'Ç·' => 'Æ¿', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'Ç»', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'Ç¿', + 'È€' => 'È', + 'È‚' => 'ȃ', + 'È„' => 'È…', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'ÈŠ' => 'È‹', + 'ÈŒ' => 'È', + 'ÈŽ' => 'È', + 'È' => 'È‘', + 'È’' => 'È“', + 'È”' => 'È•', + 'È–' => 'È—', + 'Ș' => 'È™', + 'Èš' => 'È›', + 'Èœ' => 'È', + 'Èž' => 'ÈŸ', + 'È ' => 'Æž', + 'È¢' => 'È£', + 'Ȥ' => 'È¥', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'È©', + 'Ȫ' => 'È«', + 'Ȭ' => 'È­', + 'È®' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'â±¥', + 'È»' => 'ȼ', + 'Ƚ' => 'Æš', + 'Ⱦ' => 'ⱦ', + 'É' => 'É‚', + 'Ƀ' => 'Æ€', + 'É„' => 'ʉ', + 'É…' => 'ÊŒ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'ÉŠ' => 'É‹', + 'ÉŒ' => 'É', + 'ÉŽ' => 'É', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'Í·', + 'Í¿' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'ÎŒ' => 'ÏŒ', + 'ÎŽ' => 'Ï', + 'Î' => 'ÏŽ', + 'Α' => 'α', + 'Î’' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Î' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'Ï€', + 'Ρ' => 'Ï', + 'Σ' => 'σ', + 'Τ' => 'Ï„', + 'Î¥' => 'Ï…', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ÏŠ', + 'Ϋ' => 'Ï‹', + 'Ï' => 'Ï—', + 'Ϙ' => 'Ï™', + 'Ïš' => 'Ï›', + 'Ïœ' => 'Ï', + 'Ïž' => 'ÏŸ', + 'Ï ' => 'Ï¡', + 'Ï¢' => 'Ï£', + 'Ϥ' => 'Ï¥', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'Ï©', + 'Ϫ' => 'Ï«', + 'Ϭ' => 'Ï­', + 'Ï®' => 'ϯ', + 'Ï´' => 'θ', + 'Ï·' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'Ï»', + 'Ͻ' => 'Í»', + 'Ͼ' => 'ͼ', + 'Ï¿' => 'ͽ', + 'Ѐ' => 'Ñ', + 'Ð' => 'Ñ‘', + 'Ђ' => 'Ñ’', + 'Ѓ' => 'Ñ“', + 'Є' => 'Ñ”', + 'Ð…' => 'Ñ•', + 'І' => 'Ñ–', + 'Ї' => 'Ñ—', + 'Ј' => 'ј', + 'Љ' => 'Ñ™', + 'Њ' => 'Ñš', + 'Ћ' => 'Ñ›', + 'ÐŒ' => 'Ñœ', + 'Ð' => 'Ñ', + 'ÐŽ' => 'Ñž', + 'Ð' => 'ÑŸ', + 'Ð' => 'а', + 'Б' => 'б', + 'Ð’' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Ð' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'Ñ€', + 'С' => 'Ñ', + 'Т' => 'Ñ‚', + 'У' => 'у', + 'Ф' => 'Ñ„', + 'Ð¥' => 'Ñ…', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ÑŠ', + 'Ы' => 'Ñ‹', + 'Ь' => 'ÑŒ', + 'Э' => 'Ñ', + 'Ю' => 'ÑŽ', + 'Я' => 'Ñ', + 'Ñ ' => 'Ñ¡', + 'Ñ¢' => 'Ñ£', + 'Ѥ' => 'Ñ¥', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'Ñ©', + 'Ѫ' => 'Ñ«', + 'Ѭ' => 'Ñ­', + 'Ñ®' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ñ´' => 'ѵ', + 'Ѷ' => 'Ñ·', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'Ñ»', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'Ñ¿', + 'Ò€' => 'Ò', + 'ÒŠ' => 'Ò‹', + 'ÒŒ' => 'Ò', + 'ÒŽ' => 'Ò', + 'Ò' => 'Ò‘', + 'Ò’' => 'Ò“', + 'Ò”' => 'Ò•', + 'Ò–' => 'Ò—', + 'Ò˜' => 'Ò™', + 'Òš' => 'Ò›', + 'Òœ' => 'Ò', + 'Òž' => 'ÒŸ', + 'Ò ' => 'Ò¡', + 'Ò¢' => 'Ò£', + 'Ò¤' => 'Ò¥', + 'Ò¦' => 'Ò§', + 'Ò¨' => 'Ò©', + 'Òª' => 'Ò«', + 'Ò¬' => 'Ò­', + 'Ò®' => 'Ò¯', + 'Ò°' => 'Ò±', + 'Ò²' => 'Ò³', + 'Ò´' => 'Òµ', + 'Ò¶' => 'Ò·', + 'Ò¸' => 'Ò¹', + 'Òº' => 'Ò»', + 'Ò¼' => 'Ò½', + 'Ò¾' => 'Ò¿', + 'Ó€' => 'Ó', + 'Ó' => 'Ó‚', + 'Óƒ' => 'Ó„', + 'Ó…' => 'Ó†', + 'Ó‡' => 'Óˆ', + 'Ó‰' => 'ÓŠ', + 'Ó‹' => 'ÓŒ', + 'Ó' => 'ÓŽ', + 'Ó' => 'Ó‘', + 'Ó’' => 'Ó“', + 'Ó”' => 'Ó•', + 'Ó–' => 'Ó—', + 'Ó˜' => 'Ó™', + 'Óš' => 'Ó›', + 'Óœ' => 'Ó', + 'Óž' => 'ÓŸ', + 'Ó ' => 'Ó¡', + 'Ó¢' => 'Ó£', + 'Ó¤' => 'Ó¥', + 'Ó¦' => 'Ó§', + 'Ó¨' => 'Ó©', + 'Óª' => 'Ó«', + 'Ó¬' => 'Ó­', + 'Ó®' => 'Ó¯', + 'Ó°' => 'Ó±', + 'Ó²' => 'Ó³', + 'Ó´' => 'Óµ', + 'Ó¶' => 'Ó·', + 'Ó¸' => 'Ó¹', + 'Óº' => 'Ó»', + 'Ó¼' => 'Ó½', + 'Ó¾' => 'Ó¿', + 'Ô€' => 'Ô', + 'Ô‚' => 'Ôƒ', + 'Ô„' => 'Ô…', + 'Ô†' => 'Ô‡', + 'Ôˆ' => 'Ô‰', + 'ÔŠ' => 'Ô‹', + 'ÔŒ' => 'Ô', + 'ÔŽ' => 'Ô', + 'Ô' => 'Ô‘', + 'Ô’' => 'Ô“', + 'Ô”' => 'Ô•', + 'Ô–' => 'Ô—', + 'Ô˜' => 'Ô™', + 'Ôš' => 'Ô›', + 'Ôœ' => 'Ô', + 'Ôž' => 'ÔŸ', + 'Ô ' => 'Ô¡', + 'Ô¢' => 'Ô£', + 'Ô¤' => 'Ô¥', + 'Ô¦' => 'Ô§', + 'Ô¨' => 'Ô©', + 'Ôª' => 'Ô«', + 'Ô¬' => 'Ô­', + 'Ô®' => 'Ô¯', + 'Ô±' => 'Õ¡', + 'Ô²' => 'Õ¢', + 'Ô³' => 'Õ£', + 'Ô´' => 'Õ¤', + 'Ôµ' => 'Õ¥', + 'Ô¶' => 'Õ¦', + 'Ô·' => 'Õ§', + 'Ô¸' => 'Õ¨', + 'Ô¹' => 'Õ©', + 'Ôº' => 'Õª', + 'Ô»' => 'Õ«', + 'Ô¼' => 'Õ¬', + 'Ô½' => 'Õ­', + 'Ô¾' => 'Õ®', + 'Ô¿' => 'Õ¯', + 'Õ€' => 'Õ°', + 'Õ' => 'Õ±', + 'Õ‚' => 'Õ²', + 'Õƒ' => 'Õ³', + 'Õ„' => 'Õ´', + 'Õ…' => 'Õµ', + 'Õ†' => 'Õ¶', + 'Õ‡' => 'Õ·', + 'Õˆ' => 'Õ¸', + 'Õ‰' => 'Õ¹', + 'ÕŠ' => 'Õº', + 'Õ‹' => 'Õ»', + 'ÕŒ' => 'Õ¼', + 'Õ' => 'Õ½', + 'ÕŽ' => 'Õ¾', + 'Õ' => 'Õ¿', + 'Õ' => 'Ö€', + 'Õ‘' => 'Ö', + 'Õ’' => 'Ö‚', + 'Õ“' => 'Öƒ', + 'Õ”' => 'Ö„', + 'Õ•' => 'Ö…', + 'Õ–' => 'Ö†', + 'á‚ ' => 'â´€', + 'á‚¡' => 'â´', + 'á‚¢' => 'â´‚', + 'á‚£' => 'â´ƒ', + 'Ⴄ' => 'â´„', + 'á‚¥' => 'â´…', + 'Ⴆ' => 'â´†', + 'á‚§' => 'â´‡', + 'Ⴈ' => 'â´ˆ', + 'á‚©' => 'â´‰', + 'Ⴊ' => 'â´Š', + 'á‚«' => 'â´‹', + 'Ⴌ' => 'â´Œ', + 'á‚­' => 'â´', + 'á‚®' => 'â´Ž', + 'Ⴏ' => 'â´', + 'á‚°' => 'â´', + 'Ⴑ' => 'â´‘', + 'Ⴒ' => 'â´’', + 'Ⴓ' => 'â´“', + 'á‚´' => 'â´”', + 'Ⴕ' => 'â´•', + 'á‚¶' => 'â´–', + 'á‚·' => 'â´—', + 'Ⴘ' => 'â´˜', + 'Ⴙ' => 'â´™', + 'Ⴚ' => 'â´š', + 'á‚»' => 'â´›', + 'Ⴜ' => 'â´œ', + 'Ⴝ' => 'â´', + 'Ⴞ' => 'â´ž', + 'á‚¿' => 'â´Ÿ', + 'Ⴠ' => 'â´ ', + 'áƒ' => 'â´¡', + 'Ⴢ' => 'â´¢', + 'Ⴣ' => 'â´£', + 'Ⴤ' => 'â´¤', + 'Ⴥ' => 'â´¥', + 'Ⴧ' => 'â´§', + 'áƒ' => 'â´­', + 'Ḁ' => 'á¸', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'á¸', + 'Ḏ' => 'á¸', + 'á¸' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'á¸', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'á¹€' => 'á¹', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'á¹…', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'á¹', + 'Ṏ' => 'á¹', + 'á¹' => 'ṑ', + 'á¹’' => 'ṓ', + 'á¹”' => 'ṕ', + 'á¹–' => 'á¹—', + 'Ṙ' => 'á¹™', + 'Ṛ' => 'á¹›', + 'Ṝ' => 'á¹', + 'Ṟ' => 'ṟ', + 'á¹ ' => 'ṡ', + 'á¹¢' => 'á¹£', + 'Ṥ' => 'á¹¥', + 'Ṧ' => 'á¹§', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'á¹­', + 'á¹®' => 'ṯ', + 'á¹°' => 'á¹±', + 'á¹²' => 'á¹³', + 'á¹´' => 'á¹µ', + 'á¹¶' => 'á¹·', + 'Ṹ' => 'á¹¹', + 'Ṻ' => 'á¹»', + 'á¹¼' => 'á¹½', + 'á¹¾' => 'ṿ', + 'Ẁ' => 'áº', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'áº', + 'Ẏ' => 'áº', + 'áº' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'á»', + 'Ể' => 'ể', + 'Ễ' => 'á»…', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'á»', + 'Ỏ' => 'á»', + 'á»' => 'ố', + 'á»’' => 'ồ', + 'á»”' => 'ổ', + 'á»–' => 'á»—', + 'Ộ' => 'á»™', + 'Ớ' => 'á»›', + 'Ờ' => 'á»', + 'Ở' => 'ở', + 'á» ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'á»§', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'á»­', + 'á»®' => 'ữ', + 'á»°' => 'á»±', + 'Ỳ' => 'ỳ', + 'á»´' => 'ỵ', + 'á»¶' => 'á»·', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'á»»', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'á¼€', + 'Ἁ' => 'á¼', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'á¼' => 'á¼…', + 'Ἆ' => 'ἆ', + 'á¼' => 'ἇ', + 'Ἐ' => 'á¼', + 'á¼™' => 'ἑ', + 'Ἒ' => 'á¼’', + 'á¼›' => 'ἓ', + 'Ἔ' => 'á¼”', + 'á¼' => 'ἕ', + 'Ἠ' => 'á¼ ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'á¼¢', + 'Ἣ' => 'á¼£', + 'Ἤ' => 'ἤ', + 'á¼­' => 'á¼¥', + 'á¼®' => 'ἦ', + 'Ἧ' => 'á¼§', + 'Ἰ' => 'á¼°', + 'á¼¹' => 'á¼±', + 'Ἲ' => 'á¼²', + 'á¼»' => 'á¼³', + 'á¼¼' => 'á¼´', + 'á¼½' => 'á¼µ', + 'á¼¾' => 'á¼¶', + 'Ἷ' => 'á¼·', + 'Ὀ' => 'á½€', + 'Ὁ' => 'á½', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'á½' => 'á½…', + 'á½™' => 'ὑ', + 'á½›' => 'ὓ', + 'á½' => 'ὕ', + 'Ὗ' => 'á½—', + 'Ὠ' => 'á½ ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'á½¢', + 'Ὣ' => 'á½£', + 'Ὤ' => 'ὤ', + 'á½­' => 'á½¥', + 'á½®' => 'ὦ', + 'Ὧ' => 'á½§', + 'ᾈ' => 'á¾€', + 'ᾉ' => 'á¾', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'á¾' => 'á¾…', + 'ᾎ' => 'ᾆ', + 'á¾' => 'ᾇ', + 'ᾘ' => 'á¾', + 'á¾™' => 'ᾑ', + 'ᾚ' => 'á¾’', + 'á¾›' => 'ᾓ', + 'ᾜ' => 'á¾”', + 'á¾' => 'ᾕ', + 'ᾞ' => 'á¾–', + 'ᾟ' => 'á¾—', + 'ᾨ' => 'á¾ ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'á¾¢', + 'ᾫ' => 'á¾£', + 'ᾬ' => 'ᾤ', + 'á¾­' => 'á¾¥', + 'á¾®' => 'ᾦ', + 'ᾯ' => 'á¾§', + 'Ᾰ' => 'á¾°', + 'á¾¹' => 'á¾±', + 'Ὰ' => 'á½°', + 'á¾»' => 'á½±', + 'á¾¼' => 'á¾³', + 'Ὲ' => 'á½²', + 'Έ' => 'á½³', + 'Ὴ' => 'á½´', + 'á¿‹' => 'á½µ', + 'ῌ' => 'ῃ', + 'Ῐ' => 'á¿', + 'á¿™' => 'á¿‘', + 'Ὶ' => 'á½¶', + 'á¿›' => 'á½·', + 'Ῠ' => 'á¿ ', + 'á¿©' => 'á¿¡', + 'Ὺ' => 'ὺ', + 'á¿«' => 'á½»', + 'Ῥ' => 'á¿¥', + 'Ὸ' => 'ὸ', + 'Ό' => 'á½¹', + 'Ὼ' => 'á½¼', + 'á¿»' => 'á½½', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'â„«' => 'Ã¥', + 'Ⅎ' => 'â…Ž', + 'â… ' => 'â…°', + 'â…¡' => 'â…±', + 'â…¢' => 'â…²', + 'â…£' => 'â…³', + 'â…¤' => 'â…´', + 'â…¥' => 'â…µ', + 'â…¦' => 'â…¶', + 'â…§' => 'â…·', + 'â…¨' => 'â…¸', + 'â…©' => 'â…¹', + 'â…ª' => 'â…º', + 'â…«' => 'â…»', + 'â…¬' => 'â…¼', + 'â…­' => 'â…½', + 'â…®' => 'â…¾', + 'â…¯' => 'â…¿', + 'Ↄ' => 'ↄ', + 'â’¶' => 'â“', + 'â’·' => 'â“‘', + 'â’¸' => 'â“’', + 'â’¹' => 'â““', + 'â’º' => 'â“”', + 'â’»' => 'â“•', + 'â’¼' => 'â“–', + 'â’½' => 'â“—', + 'â’¾' => 'ⓘ', + 'â’¿' => 'â“™', + 'â“€' => 'ⓚ', + 'â“' => 'â“›', + 'â“‚' => 'ⓜ', + 'Ⓝ' => 'â“', + 'â“„' => 'ⓞ', + 'â“…' => 'ⓟ', + 'Ⓠ' => 'â“ ', + 'Ⓡ' => 'â“¡', + 'Ⓢ' => 'â“¢', + 'Ⓣ' => 'â“£', + 'Ⓤ' => 'ⓤ', + 'â“‹' => 'â“¥', + 'Ⓦ' => 'ⓦ', + 'â“' => 'â“§', + 'Ⓨ' => 'ⓨ', + 'â“' => 'â“©', + 'â°€' => 'â°°', + 'â°' => 'â°±', + 'â°‚' => 'â°²', + 'â°ƒ' => 'â°³', + 'â°„' => 'â°´', + 'â°…' => 'â°µ', + 'â°†' => 'â°¶', + 'â°‡' => 'â°·', + 'â°ˆ' => 'â°¸', + 'â°‰' => 'â°¹', + 'â°Š' => 'â°º', + 'â°‹' => 'â°»', + 'â°Œ' => 'â°¼', + 'â°' => 'â°½', + 'â°Ž' => 'â°¾', + 'â°' => 'â°¿', + 'â°' => 'â±€', + 'â°‘' => 'â±', + 'â°’' => 'ⱂ', + 'â°“' => 'ⱃ', + 'â°”' => 'ⱄ', + 'â°•' => 'â±…', + 'â°–' => 'ⱆ', + 'â°—' => 'ⱇ', + 'â°˜' => 'ⱈ', + 'â°™' => 'ⱉ', + 'â°š' => 'ⱊ', + 'â°›' => 'ⱋ', + 'â°œ' => 'ⱌ', + 'â°' => 'â±', + 'â°ž' => 'ⱎ', + 'â°Ÿ' => 'â±', + 'â° ' => 'â±', + 'â°¡' => 'ⱑ', + 'â°¢' => 'â±’', + 'â°£' => 'ⱓ', + 'â°¤' => 'â±”', + 'â°¥' => 'ⱕ', + 'â°¦' => 'â±–', + 'â°§' => 'â±—', + 'â°¨' => 'ⱘ', + 'â°©' => 'â±™', + 'â°ª' => 'ⱚ', + 'â°«' => 'â±›', + 'â°¬' => 'ⱜ', + 'â°­' => 'â±', + 'â°®' => 'ⱞ', + 'â± ' => 'ⱡ', + 'â±¢' => 'É«', + 'â±£' => 'áµ½', + 'Ɽ' => 'ɽ', + 'â±§' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'â±­' => 'É‘', + 'â±®' => 'ɱ', + 'Ɐ' => 'É', + 'â±°' => 'É’', + 'â±²' => 'â±³', + 'â±µ' => 'â±¶', + 'â±¾' => 'È¿', + 'Ɀ' => 'É€', + 'â²€' => 'â²', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'â²…', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'â²', + 'Ⲏ' => 'â²', + 'â²' => 'ⲑ', + 'â²’' => 'ⲓ', + 'â²”' => 'ⲕ', + 'â²–' => 'â²—', + 'Ⲙ' => 'â²™', + 'Ⲛ' => 'â²›', + 'Ⲝ' => 'â²', + 'Ⲟ' => 'ⲟ', + 'â² ' => 'ⲡ', + 'â²¢' => 'â²£', + 'Ⲥ' => 'â²¥', + 'Ⲧ' => 'â²§', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'â²­', + 'â²®' => 'ⲯ', + 'â²°' => 'â²±', + 'â²²' => 'â²³', + 'â²´' => 'â²µ', + 'â²¶' => 'â²·', + 'Ⲹ' => 'â²¹', + 'Ⲻ' => 'â²»', + 'â²¼' => 'â²½', + 'â²¾' => 'ⲿ', + 'â³€' => 'â³', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'â³…', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'â³', + 'Ⳏ' => 'â³', + 'â³' => 'ⳑ', + 'â³’' => 'ⳓ', + 'â³”' => 'ⳕ', + 'â³–' => 'â³—', + 'Ⳙ' => 'â³™', + 'Ⳛ' => 'â³›', + 'Ⳝ' => 'â³', + 'Ⳟ' => 'ⳟ', + 'â³ ' => 'ⳡ', + 'â³¢' => 'â³£', + 'Ⳬ' => 'ⳬ', + 'â³­' => 'â³®', + 'â³²' => 'â³³', + 'Ꙁ' => 'ê™', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ê™…', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ê™', + 'Ꙏ' => 'ê™', + 'ê™' => 'ꙑ', + 'ê™’' => 'ꙓ', + 'ê™”' => 'ꙕ', + 'ê™–' => 'ê™—', + 'Ꙙ' => 'ê™™', + 'Ꙛ' => 'ê™›', + 'Ꙝ' => 'ê™', + 'Ꙟ' => 'ꙟ', + 'ê™ ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ê™§', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ê™­', + 'Ꚁ' => 'êš', + 'êš‚' => 'ꚃ', + 'êš„' => 'êš…', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'êš‹', + 'Ꚍ' => 'êš', + 'Ꚏ' => 'êš', + 'êš' => 'êš‘', + 'êš’' => 'êš“', + 'êš”' => 'êš•', + 'êš–' => 'êš—', + 'Ꚙ' => 'êš™', + 'êšš' => 'êš›', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'ê€' => 'ê', + 'ê‚' => 'êƒ', + 'ê„' => 'ê…', + 'ê†' => 'ê‡', + 'êˆ' => 'ê‰', + 'êŠ' => 'ê‹', + 'êŒ' => 'ê', + 'êŽ' => 'ê', + 'ê' => 'ê‘', + 'ê’' => 'ê“', + 'ê”' => 'ê•', + 'ê–' => 'ê—', + 'ê˜' => 'ê™', + 'êš' => 'ê›', + 'êœ' => 'ê', + 'êž' => 'êŸ', + 'ê ' => 'ê¡', + 'ê¢' => 'ê£', + 'ê¤' => 'ê¥', + 'ê¦' => 'ê§', + 'ê¨' => 'ê©', + 'êª' => 'ê«', + 'ê¬' => 'ê­', + 'ê®' => 'ê¯', + 'ê¹' => 'êº', + 'ê»' => 'ê¼', + 'ê½' => 'áµ¹', + 'ê¾' => 'ê¿', + 'Ꞁ' => 'êž', + 'êž‚' => 'ꞃ', + 'êž„' => 'êž…', + 'Ꞇ' => 'ꞇ', + 'êž‹' => 'ꞌ', + 'êž' => 'É¥', + 'êž' => 'êž‘', + 'êž’' => 'êž“', + 'êž–' => 'êž—', + 'Ꞙ' => 'êž™', + 'êžš' => 'êž›', + 'êžœ' => 'êž', + 'êžž' => 'ꞟ', + 'êž ' => 'êž¡', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'êž§', + 'Ꞩ' => 'êž©', + 'Ɦ' => 'ɦ', + 'êž«' => 'Éœ', + 'Ɡ' => 'É¡', + 'êž­' => 'ɬ', + 'êž°' => 'Êž', + 'êž±' => 'ʇ', + 'A' => 'ï½', + 'ï¼¢' => 'b', + 'ï¼£' => 'c', + 'D' => 'd', + 'ï¼¥' => 'ï½…', + 'F' => 'f', + 'ï¼§' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'ï¼­' => 'ï½', + 'ï¼®' => 'n', + 'O' => 'ï½', + 'ï¼°' => 'ï½', + 'ï¼±' => 'q', + 'ï¼²' => 'ï½’', + 'ï¼³' => 's', + 'ï¼´' => 'ï½”', + 'ï¼µ' => 'u', + 'ï¼¶' => 'ï½–', + 'ï¼·' => 'ï½—', + 'X' => 'x', + 'ï¼¹' => 'ï½™', + 'Z' => 'z', + 'ð€' => 'ð¨', + 'ð' => 'ð©', + 'ð‚' => 'ðª', + 'ðƒ' => 'ð«', + 'ð„' => 'ð¬', + 'ð…' => 'ð­', + 'ð†' => 'ð®', + 'ð‡' => 'ð¯', + 'ðˆ' => 'ð°', + 'ð‰' => 'ð±', + 'ðŠ' => 'ð²', + 'ð‹' => 'ð³', + 'ðŒ' => 'ð´', + 'ð' => 'ðµ', + 'ðŽ' => 'ð¶', + 'ð' => 'ð·', + 'ð' => 'ð¸', + 'ð‘' => 'ð¹', + 'ð’' => 'ðº', + 'ð“' => 'ð»', + 'ð”' => 'ð¼', + 'ð•' => 'ð½', + 'ð–' => 'ð¾', + 'ð—' => 'ð¿', + 'ð˜' => 'ð‘€', + 'ð™' => 'ð‘', + 'ðš' => 'ð‘‚', + 'ð›' => 'ð‘ƒ', + 'ðœ' => 'ð‘„', + 'ð' => 'ð‘…', + 'ðž' => 'ð‘†', + 'ðŸ' => 'ð‘‡', + 'ð ' => 'ð‘ˆ', + 'ð¡' => 'ð‘‰', + 'ð¢' => 'ð‘Š', + 'ð£' => 'ð‘‹', + 'ð¤' => 'ð‘Œ', + 'ð¥' => 'ð‘', + 'ð¦' => 'ð‘Ž', + 'ð§' => 'ð‘', + 'ð‘¢ ' => 'ð‘£€', + '𑢡' => 'ð‘£', + 'ð‘¢¢' => '𑣂', + 'ð‘¢£' => '𑣃', + '𑢤' => '𑣄', + 'ð‘¢¥' => 'ð‘£…', + '𑢦' => '𑣆', + 'ð‘¢§' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + 'ð‘¢­' => 'ð‘£', + 'ð‘¢®' => '𑣎', + '𑢯' => 'ð‘£', + 'ð‘¢°' => 'ð‘£', + 'ð‘¢±' => '𑣑', + 'ð‘¢²' => 'ð‘£’', + 'ð‘¢³' => '𑣓', + 'ð‘¢´' => 'ð‘£”', + 'ð‘¢µ' => '𑣕', + 'ð‘¢¶' => 'ð‘£–', + 'ð‘¢·' => 'ð‘£—', + '𑢸' => '𑣘', + 'ð‘¢¹' => 'ð‘£™', + '𑢺' => '𑣚', + 'ð‘¢»' => 'ð‘£›', + 'ð‘¢¼' => '𑣜', + 'ð‘¢½' => 'ð‘£', + 'ð‘¢¾' => '𑣞', + '𑢿' => '𑣟', +); diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Ã', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'Ã¥' => 'Ã…', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'ÃŒ', + 'í' => 'Ã', + 'î' => 'ÃŽ', + 'ï' => 'Ã', + 'ð' => 'Ã', + 'ñ' => 'Ñ', + 'ò' => 'Ã’', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ã', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'Ä' => 'Ä€', + 'ă' => 'Ä‚', + 'Ä…' => 'Ä„', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'Ä‹' => 'ÄŠ', + 'Ä' => 'ÄŒ', + 'Ä' => 'ÄŽ', + 'Ä‘' => 'Ä', + 'Ä“' => 'Ä’', + 'Ä•' => 'Ä”', + 'Ä—' => 'Ä–', + 'Ä™' => 'Ę', + 'Ä›' => 'Äš', + 'Ä' => 'Äœ', + 'ÄŸ' => 'Äž', + 'Ä¡' => 'Ä ', + 'Ä£' => 'Ä¢', + 'Ä¥' => 'Ĥ', + 'ħ' => 'Ħ', + 'Ä©' => 'Ĩ', + 'Ä«' => 'Ī', + 'Ä­' => 'Ĭ', + 'į' => 'Ä®', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ä´', + 'Ä·' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ä»', + 'ľ' => 'Ľ', + 'Å€' => 'Ä¿', + 'Å‚' => 'Å', + 'Å„' => 'Ń', + 'ņ' => 'Å…', + 'ň' => 'Ň', + 'Å‹' => 'ÅŠ', + 'Å' => 'ÅŒ', + 'Å' => 'ÅŽ', + 'Å‘' => 'Å', + 'Å“' => 'Å’', + 'Å•' => 'Å”', + 'Å—' => 'Å–', + 'Å™' => 'Ř', + 'Å›' => 'Åš', + 'Å' => 'Åœ', + 'ÅŸ' => 'Åž', + 'Å¡' => 'Å ', + 'Å£' => 'Å¢', + 'Å¥' => 'Ť', + 'ŧ' => 'Ŧ', + 'Å©' => 'Ũ', + 'Å«' => 'Ū', + 'Å­' => 'Ŭ', + 'ů' => 'Å®', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Å´', + 'Å·' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Å»', + 'ž' => 'Ž', + 'Å¿' => 'S', + 'Æ€' => 'Ƀ', + 'ƃ' => 'Æ‚', + 'Æ…' => 'Æ„', + 'ƈ' => 'Ƈ', + 'ÆŒ' => 'Æ‹', + 'Æ’' => 'Æ‘', + 'Æ•' => 'Ƕ', + 'Æ™' => 'Ƙ', + 'Æš' => 'Ƚ', + 'Æž' => 'È ', + 'Æ¡' => 'Æ ', + 'Æ£' => 'Æ¢', + 'Æ¥' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'Æ­' => 'Ƭ', + 'ư' => 'Ư', + 'Æ´' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'Æ¿' => 'Ç·', + 'Ç…' => 'Ç„', + 'dž' => 'Ç„', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Ç‹' => 'ÇŠ', + 'ÇŒ' => 'ÇŠ', + 'ÇŽ' => 'Ç', + 'Ç' => 'Ç', + 'Ç’' => 'Ç‘', + 'Ç”' => 'Ç“', + 'Ç–' => 'Ç•', + 'ǘ' => 'Ç—', + 'Çš' => 'Ç™', + 'Çœ' => 'Ç›', + 'Ç' => 'ÆŽ', + 'ÇŸ' => 'Çž', + 'Ç¡' => 'Ç ', + 'Ç£' => 'Ç¢', + 'Ç¥' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'Ç©' => 'Ǩ', + 'Ç«' => 'Ǫ', + 'Ç­' => 'Ǭ', + 'ǯ' => 'Ç®', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ç´', + 'ǹ' => 'Ǹ', + 'Ç»' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'Ç¿' => 'Ǿ', + 'È' => 'È€', + 'ȃ' => 'È‚', + 'È…' => 'È„', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'È‹' => 'ÈŠ', + 'È' => 'ÈŒ', + 'È' => 'ÈŽ', + 'È‘' => 'È', + 'È“' => 'È’', + 'È•' => 'È”', + 'È—' => 'È–', + 'È™' => 'Ș', + 'È›' => 'Èš', + 'È' => 'Èœ', + 'ÈŸ' => 'Èž', + 'È£' => 'È¢', + 'È¥' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'È©' => 'Ȩ', + 'È«' => 'Ȫ', + 'È­' => 'Ȭ', + 'ȯ' => 'È®', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'È»', + 'È¿' => 'â±¾', + 'É€' => 'Ɀ', + 'É‚' => 'É', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'É‹' => 'ÉŠ', + 'É' => 'ÉŒ', + 'É' => 'ÉŽ', + 'É' => 'Ɐ', + 'É‘' => 'â±­', + 'É’' => 'â±°', + 'É“' => 'Æ', + 'É”' => 'Ɔ', + 'É–' => 'Ɖ', + 'É—' => 'ÆŠ', + 'É™' => 'Æ', + 'É›' => 'Æ', + 'Éœ' => 'êž«', + 'É ' => 'Æ“', + 'É¡' => 'Ɡ', + 'É£' => 'Æ”', + 'É¥' => 'êž', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Æ—', + 'É©' => 'Æ–', + 'É«' => 'â±¢', + 'ɬ' => 'êž­', + 'ɯ' => 'Æœ', + 'ɱ' => 'â±®', + 'ɲ' => 'Æ', + 'ɵ' => 'ÆŸ', + 'ɽ' => 'Ɽ', + 'Ê€' => 'Ʀ', + 'ʃ' => 'Æ©', + 'ʇ' => 'êž±', + 'ʈ' => 'Æ®', + 'ʉ' => 'É„', + 'ÊŠ' => 'Ʊ', + 'Ê‹' => 'Ʋ', + 'ÊŒ' => 'É…', + 'Ê’' => 'Æ·', + 'Êž' => 'êž°', + 'Í…' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'Í·' => 'Ͷ', + 'Í»' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ï¿', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Î’', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Î', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'Ï€' => 'Π', + 'Ï' => 'Ρ', + 'Ï‚' => 'Σ', + 'σ' => 'Σ', + 'Ï„' => 'Τ', + 'Ï…' => 'Î¥', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ÏŠ' => 'Ϊ', + 'Ï‹' => 'Ϋ', + 'ÏŒ' => 'ÎŒ', + 'Ï' => 'ÎŽ', + 'ÏŽ' => 'Î', + 'Ï' => 'Î’', + 'Ï‘' => 'Θ', + 'Ï•' => 'Φ', + 'Ï–' => 'Π', + 'Ï—' => 'Ï', + 'Ï™' => 'Ϙ', + 'Ï›' => 'Ïš', + 'Ï' => 'Ïœ', + 'ÏŸ' => 'Ïž', + 'Ï¡' => 'Ï ', + 'Ï£' => 'Ï¢', + 'Ï¥' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'Ï©' => 'Ϩ', + 'Ï«' => 'Ϫ', + 'Ï­' => 'Ϭ', + 'ϯ' => 'Ï®', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Í¿', + 'ϵ' => 'Ε', + 'ϸ' => 'Ï·', + 'Ï»' => 'Ϻ', + 'а' => 'Ð', + 'б' => 'Б', + 'в' => 'Ð’', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Ð', + 'о' => 'О', + 'п' => 'П', + 'Ñ€' => 'Р', + 'Ñ' => 'С', + 'Ñ‚' => 'Т', + 'у' => 'У', + 'Ñ„' => 'Ф', + 'Ñ…' => 'Ð¥', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ÑŠ' => 'Ъ', + 'Ñ‹' => 'Ы', + 'ÑŒ' => 'Ь', + 'Ñ' => 'Э', + 'ÑŽ' => 'Ю', + 'Ñ' => 'Я', + 'Ñ' => 'Ѐ', + 'Ñ‘' => 'Ð', + 'Ñ’' => 'Ђ', + 'Ñ“' => 'Ѓ', + 'Ñ”' => 'Є', + 'Ñ•' => 'Ð…', + 'Ñ–' => 'І', + 'Ñ—' => 'Ї', + 'ј' => 'Ј', + 'Ñ™' => 'Љ', + 'Ñš' => 'Њ', + 'Ñ›' => 'Ћ', + 'Ñœ' => 'ÐŒ', + 'Ñ' => 'Ð', + 'Ñž' => 'ÐŽ', + 'ÑŸ' => 'Ð', + 'Ñ¡' => 'Ñ ', + 'Ñ£' => 'Ñ¢', + 'Ñ¥' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'Ñ©' => 'Ѩ', + 'Ñ«' => 'Ѫ', + 'Ñ­' => 'Ѭ', + 'ѯ' => 'Ñ®', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ñ´', + 'Ñ·' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'Ñ»' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'Ñ¿' => 'Ѿ', + 'Ò' => 'Ò€', + 'Ò‹' => 'ÒŠ', + 'Ò' => 'ÒŒ', + 'Ò' => 'ÒŽ', + 'Ò‘' => 'Ò', + 'Ò“' => 'Ò’', + 'Ò•' => 'Ò”', + 'Ò—' => 'Ò–', + 'Ò™' => 'Ò˜', + 'Ò›' => 'Òš', + 'Ò' => 'Òœ', + 'ÒŸ' => 'Òž', + 'Ò¡' => 'Ò ', + 'Ò£' => 'Ò¢', + 'Ò¥' => 'Ò¤', + 'Ò§' => 'Ò¦', + 'Ò©' => 'Ò¨', + 'Ò«' => 'Òª', + 'Ò­' => 'Ò¬', + 'Ò¯' => 'Ò®', + 'Ò±' => 'Ò°', + 'Ò³' => 'Ò²', + 'Òµ' => 'Ò´', + 'Ò·' => 'Ò¶', + 'Ò¹' => 'Ò¸', + 'Ò»' => 'Òº', + 'Ò½' => 'Ò¼', + 'Ò¿' => 'Ò¾', + 'Ó‚' => 'Ó', + 'Ó„' => 'Óƒ', + 'Ó†' => 'Ó…', + 'Óˆ' => 'Ó‡', + 'ÓŠ' => 'Ó‰', + 'ÓŒ' => 'Ó‹', + 'ÓŽ' => 'Ó', + 'Ó' => 'Ó€', + 'Ó‘' => 'Ó', + 'Ó“' => 'Ó’', + 'Ó•' => 'Ó”', + 'Ó—' => 'Ó–', + 'Ó™' => 'Ó˜', + 'Ó›' => 'Óš', + 'Ó' => 'Óœ', + 'ÓŸ' => 'Óž', + 'Ó¡' => 'Ó ', + 'Ó£' => 'Ó¢', + 'Ó¥' => 'Ó¤', + 'Ó§' => 'Ó¦', + 'Ó©' => 'Ó¨', + 'Ó«' => 'Óª', + 'Ó­' => 'Ó¬', + 'Ó¯' => 'Ó®', + 'Ó±' => 'Ó°', + 'Ó³' => 'Ó²', + 'Óµ' => 'Ó´', + 'Ó·' => 'Ó¶', + 'Ó¹' => 'Ó¸', + 'Ó»' => 'Óº', + 'Ó½' => 'Ó¼', + 'Ó¿' => 'Ó¾', + 'Ô' => 'Ô€', + 'Ôƒ' => 'Ô‚', + 'Ô…' => 'Ô„', + 'Ô‡' => 'Ô†', + 'Ô‰' => 'Ôˆ', + 'Ô‹' => 'ÔŠ', + 'Ô' => 'ÔŒ', + 'Ô' => 'ÔŽ', + 'Ô‘' => 'Ô', + 'Ô“' => 'Ô’', + 'Ô•' => 'Ô”', + 'Ô—' => 'Ô–', + 'Ô™' => 'Ô˜', + 'Ô›' => 'Ôš', + 'Ô' => 'Ôœ', + 'ÔŸ' => 'Ôž', + 'Ô¡' => 'Ô ', + 'Ô£' => 'Ô¢', + 'Ô¥' => 'Ô¤', + 'Ô§' => 'Ô¦', + 'Ô©' => 'Ô¨', + 'Ô«' => 'Ôª', + 'Ô­' => 'Ô¬', + 'Ô¯' => 'Ô®', + 'Õ¡' => 'Ô±', + 'Õ¢' => 'Ô²', + 'Õ£' => 'Ô³', + 'Õ¤' => 'Ô´', + 'Õ¥' => 'Ôµ', + 'Õ¦' => 'Ô¶', + 'Õ§' => 'Ô·', + 'Õ¨' => 'Ô¸', + 'Õ©' => 'Ô¹', + 'Õª' => 'Ôº', + 'Õ«' => 'Ô»', + 'Õ¬' => 'Ô¼', + 'Õ­' => 'Ô½', + 'Õ®' => 'Ô¾', + 'Õ¯' => 'Ô¿', + 'Õ°' => 'Õ€', + 'Õ±' => 'Õ', + 'Õ²' => 'Õ‚', + 'Õ³' => 'Õƒ', + 'Õ´' => 'Õ„', + 'Õµ' => 'Õ…', + 'Õ¶' => 'Õ†', + 'Õ·' => 'Õ‡', + 'Õ¸' => 'Õˆ', + 'Õ¹' => 'Õ‰', + 'Õº' => 'ÕŠ', + 'Õ»' => 'Õ‹', + 'Õ¼' => 'ÕŒ', + 'Õ½' => 'Õ', + 'Õ¾' => 'ÕŽ', + 'Õ¿' => 'Õ', + 'Ö€' => 'Õ', + 'Ö' => 'Õ‘', + 'Ö‚' => 'Õ’', + 'Öƒ' => 'Õ“', + 'Ö„' => 'Õ”', + 'Ö…' => 'Õ•', + 'Ö†' => 'Õ–', + 'áµ¹' => 'ê½', + 'áµ½' => 'â±£', + 'á¸' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'á¸' => 'Ḍ', + 'á¸' => 'Ḏ', + 'ḑ' => 'á¸', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'á¸' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'á¹' => 'á¹€', + 'ṃ' => 'Ṃ', + 'á¹…' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'á¹' => 'Ṍ', + 'á¹' => 'Ṏ', + 'ṑ' => 'á¹', + 'ṓ' => 'á¹’', + 'ṕ' => 'á¹”', + 'á¹—' => 'á¹–', + 'á¹™' => 'Ṙ', + 'á¹›' => 'Ṛ', + 'á¹' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'á¹ ', + 'á¹£' => 'á¹¢', + 'á¹¥' => 'Ṥ', + 'á¹§' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'á¹­' => 'Ṭ', + 'ṯ' => 'á¹®', + 'á¹±' => 'á¹°', + 'á¹³' => 'á¹²', + 'á¹µ' => 'á¹´', + 'á¹·' => 'á¹¶', + 'á¹¹' => 'Ṹ', + 'á¹»' => 'Ṻ', + 'á¹½' => 'á¹¼', + 'ṿ' => 'á¹¾', + 'áº' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'áº' => 'Ẍ', + 'áº' => 'Ẏ', + 'ẑ' => 'áº', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'á¹ ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'á»' => 'Ề', + 'ể' => 'Ể', + 'á»…' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'á»' => 'Ọ', + 'á»' => 'Ỏ', + 'ố' => 'á»', + 'ồ' => 'á»’', + 'ổ' => 'á»”', + 'á»—' => 'á»–', + 'á»™' => 'Ộ', + 'á»›' => 'Ớ', + 'á»' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'á» ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'á»§' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'á»­' => 'Ử', + 'ữ' => 'á»®', + 'á»±' => 'á»°', + 'ỳ' => 'Ỳ', + 'ỵ' => 'á»´', + 'á»·' => 'á»¶', + 'ỹ' => 'Ỹ', + 'á»»' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'á¼€' => 'Ἀ', + 'á¼' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'á¼…' => 'á¼', + 'ἆ' => 'Ἆ', + 'ἇ' => 'á¼', + 'á¼' => 'Ἐ', + 'ἑ' => 'á¼™', + 'á¼’' => 'Ἒ', + 'ἓ' => 'á¼›', + 'á¼”' => 'Ἔ', + 'ἕ' => 'á¼', + 'á¼ ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'á¼¢' => 'Ἢ', + 'á¼£' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'á¼¥' => 'á¼­', + 'ἦ' => 'á¼®', + 'á¼§' => 'Ἧ', + 'á¼°' => 'Ἰ', + 'á¼±' => 'á¼¹', + 'á¼²' => 'Ἲ', + 'á¼³' => 'á¼»', + 'á¼´' => 'á¼¼', + 'á¼µ' => 'á¼½', + 'á¼¶' => 'á¼¾', + 'á¼·' => 'Ἷ', + 'á½€' => 'Ὀ', + 'á½' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'á½…' => 'á½', + 'ὑ' => 'á½™', + 'ὓ' => 'á½›', + 'ὕ' => 'á½', + 'á½—' => 'Ὗ', + 'á½ ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'á½¢' => 'Ὢ', + 'á½£' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'á½¥' => 'á½­', + 'ὦ' => 'á½®', + 'á½§' => 'Ὧ', + 'á½°' => 'Ὰ', + 'á½±' => 'á¾»', + 'á½²' => 'Ὲ', + 'á½³' => 'Έ', + 'á½´' => 'Ὴ', + 'á½µ' => 'á¿‹', + 'á½¶' => 'Ὶ', + 'á½·' => 'á¿›', + 'ὸ' => 'Ὸ', + 'á½¹' => 'Ό', + 'ὺ' => 'Ὺ', + 'á½»' => 'á¿«', + 'á½¼' => 'Ὼ', + 'á½½' => 'á¿»', + 'á¾€' => 'ᾈ', + 'á¾' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'á¾…' => 'á¾', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'á¾', + 'á¾' => 'ᾘ', + 'ᾑ' => 'á¾™', + 'á¾’' => 'ᾚ', + 'ᾓ' => 'á¾›', + 'á¾”' => 'ᾜ', + 'ᾕ' => 'á¾', + 'á¾–' => 'ᾞ', + 'á¾—' => 'ᾟ', + 'á¾ ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'á¾¢' => 'ᾪ', + 'á¾£' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'á¾¥' => 'á¾­', + 'ᾦ' => 'á¾®', + 'á¾§' => 'ᾯ', + 'á¾°' => 'Ᾰ', + 'á¾±' => 'á¾¹', + 'á¾³' => 'á¾¼', + 'á¾¾' => 'Ι', + 'ῃ' => 'ῌ', + 'á¿' => 'Ῐ', + 'á¿‘' => 'á¿™', + 'á¿ ' => 'Ῠ', + 'á¿¡' => 'á¿©', + 'á¿¥' => 'Ῥ', + 'ῳ' => 'ῼ', + 'â…Ž' => 'Ⅎ', + 'â…°' => 'â… ', + 'â…±' => 'â…¡', + 'â…²' => 'â…¢', + 'â…³' => 'â…£', + 'â…´' => 'â…¤', + 'â…µ' => 'â…¥', + 'â…¶' => 'â…¦', + 'â…·' => 'â…§', + 'â…¸' => 'â…¨', + 'â…¹' => 'â…©', + 'â…º' => 'â…ª', + 'â…»' => 'â…«', + 'â…¼' => 'â…¬', + 'â…½' => 'â…­', + 'â…¾' => 'â…®', + 'â…¿' => 'â…¯', + 'ↄ' => 'Ↄ', + 'â“' => 'â’¶', + 'â“‘' => 'â’·', + 'â“’' => 'â’¸', + 'â““' => 'â’¹', + 'â“”' => 'â’º', + 'â“•' => 'â’»', + 'â“–' => 'â’¼', + 'â“—' => 'â’½', + 'ⓘ' => 'â’¾', + 'â“™' => 'â’¿', + 'ⓚ' => 'â“€', + 'â“›' => 'â“', + 'ⓜ' => 'â“‚', + 'â“' => 'Ⓝ', + 'ⓞ' => 'â“„', + 'ⓟ' => 'â“…', + 'â“ ' => 'Ⓠ', + 'â“¡' => 'Ⓡ', + 'â“¢' => 'Ⓢ', + 'â“£' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'â“¥' => 'â“‹', + 'ⓦ' => 'Ⓦ', + 'â“§' => 'â“', + 'ⓨ' => 'Ⓨ', + 'â“©' => 'â“', + 'â°°' => 'â°€', + 'â°±' => 'â°', + 'â°²' => 'â°‚', + 'â°³' => 'â°ƒ', + 'â°´' => 'â°„', + 'â°µ' => 'â°…', + 'â°¶' => 'â°†', + 'â°·' => 'â°‡', + 'â°¸' => 'â°ˆ', + 'â°¹' => 'â°‰', + 'â°º' => 'â°Š', + 'â°»' => 'â°‹', + 'â°¼' => 'â°Œ', + 'â°½' => 'â°', + 'â°¾' => 'â°Ž', + 'â°¿' => 'â°', + 'â±€' => 'â°', + 'â±' => 'â°‘', + 'ⱂ' => 'â°’', + 'ⱃ' => 'â°“', + 'ⱄ' => 'â°”', + 'â±…' => 'â°•', + 'ⱆ' => 'â°–', + 'ⱇ' => 'â°—', + 'ⱈ' => 'â°˜', + 'ⱉ' => 'â°™', + 'ⱊ' => 'â°š', + 'ⱋ' => 'â°›', + 'ⱌ' => 'â°œ', + 'â±' => 'â°', + 'ⱎ' => 'â°ž', + 'â±' => 'â°Ÿ', + 'â±' => 'â° ', + 'ⱑ' => 'â°¡', + 'â±’' => 'â°¢', + 'ⱓ' => 'â°£', + 'â±”' => 'â°¤', + 'ⱕ' => 'â°¥', + 'â±–' => 'â°¦', + 'â±—' => 'â°§', + 'ⱘ' => 'â°¨', + 'â±™' => 'â°©', + 'ⱚ' => 'â°ª', + 'â±›' => 'â°«', + 'ⱜ' => 'â°¬', + 'â±' => 'â°­', + 'ⱞ' => 'â°®', + 'ⱡ' => 'â± ', + 'â±¥' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'â±§', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'â±³' => 'â±²', + 'â±¶' => 'â±µ', + 'â²' => 'â²€', + 'ⲃ' => 'Ⲃ', + 'â²…' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'â²' => 'Ⲍ', + 'â²' => 'Ⲏ', + 'ⲑ' => 'â²', + 'ⲓ' => 'â²’', + 'ⲕ' => 'â²”', + 'â²—' => 'â²–', + 'â²™' => 'Ⲙ', + 'â²›' => 'Ⲛ', + 'â²' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'â² ', + 'â²£' => 'â²¢', + 'â²¥' => 'Ⲥ', + 'â²§' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'â²­' => 'Ⲭ', + 'ⲯ' => 'â²®', + 'â²±' => 'â²°', + 'â²³' => 'â²²', + 'â²µ' => 'â²´', + 'â²·' => 'â²¶', + 'â²¹' => 'Ⲹ', + 'â²»' => 'Ⲻ', + 'â²½' => 'â²¼', + 'ⲿ' => 'â²¾', + 'â³' => 'â³€', + 'ⳃ' => 'Ⳃ', + 'â³…' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'â³' => 'Ⳍ', + 'â³' => 'Ⳏ', + 'ⳑ' => 'â³', + 'ⳓ' => 'â³’', + 'ⳕ' => 'â³”', + 'â³—' => 'â³–', + 'â³™' => 'Ⳙ', + 'â³›' => 'Ⳛ', + 'â³' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'â³ ', + 'â³£' => 'â³¢', + 'ⳬ' => 'Ⳬ', + 'â³®' => 'â³­', + 'â³³' => 'â³²', + 'â´€' => 'á‚ ', + 'â´' => 'á‚¡', + 'â´‚' => 'á‚¢', + 'â´ƒ' => 'á‚£', + 'â´„' => 'Ⴄ', + 'â´…' => 'á‚¥', + 'â´†' => 'Ⴆ', + 'â´‡' => 'á‚§', + 'â´ˆ' => 'Ⴈ', + 'â´‰' => 'á‚©', + 'â´Š' => 'Ⴊ', + 'â´‹' => 'á‚«', + 'â´Œ' => 'Ⴌ', + 'â´' => 'á‚­', + 'â´Ž' => 'á‚®', + 'â´' => 'Ⴏ', + 'â´' => 'á‚°', + 'â´‘' => 'Ⴑ', + 'â´’' => 'Ⴒ', + 'â´“' => 'Ⴓ', + 'â´”' => 'á‚´', + 'â´•' => 'Ⴕ', + 'â´–' => 'á‚¶', + 'â´—' => 'á‚·', + 'â´˜' => 'Ⴘ', + 'â´™' => 'Ⴙ', + 'â´š' => 'Ⴚ', + 'â´›' => 'á‚»', + 'â´œ' => 'Ⴜ', + 'â´' => 'Ⴝ', + 'â´ž' => 'Ⴞ', + 'â´Ÿ' => 'á‚¿', + 'â´ ' => 'Ⴠ', + 'â´¡' => 'áƒ', + 'â´¢' => 'Ⴢ', + 'â´£' => 'Ⴣ', + 'â´¤' => 'Ⴤ', + 'â´¥' => 'Ⴥ', + 'â´§' => 'Ⴧ', + 'â´­' => 'áƒ', + 'ê™' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ê™…' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ê™' => 'Ꙍ', + 'ê™' => 'Ꙏ', + 'ꙑ' => 'ê™', + 'ꙓ' => 'ê™’', + 'ꙕ' => 'ê™”', + 'ê™—' => 'ê™–', + 'ê™™' => 'Ꙙ', + 'ê™›' => 'Ꙛ', + 'ê™' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'ê™ ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ê™§' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ê™­' => 'Ꙭ', + 'êš' => 'Ꚁ', + 'ꚃ' => 'êš‚', + 'êš…' => 'êš„', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'êš‹' => 'Ꚋ', + 'êš' => 'Ꚍ', + 'êš' => 'Ꚏ', + 'êš‘' => 'êš', + 'êš“' => 'êš’', + 'êš•' => 'êš”', + 'êš—' => 'êš–', + 'êš™' => 'Ꚙ', + 'êš›' => 'êšš', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ê' => 'ê€', + 'êƒ' => 'ê‚', + 'ê…' => 'ê„', + 'ê‡' => 'ê†', + 'ê‰' => 'êˆ', + 'ê‹' => 'êŠ', + 'ê' => 'êŒ', + 'ê' => 'êŽ', + 'ê‘' => 'ê', + 'ê“' => 'ê’', + 'ê•' => 'ê”', + 'ê—' => 'ê–', + 'ê™' => 'ê˜', + 'ê›' => 'êš', + 'ê' => 'êœ', + 'êŸ' => 'êž', + 'ê¡' => 'ê ', + 'ê£' => 'ê¢', + 'ê¥' => 'ê¤', + 'ê§' => 'ê¦', + 'ê©' => 'ê¨', + 'ê«' => 'êª', + 'ê­' => 'ê¬', + 'ê¯' => 'ê®', + 'êº' => 'ê¹', + 'ê¼' => 'ê»', + 'ê¿' => 'ê¾', + 'êž' => 'Ꞁ', + 'ꞃ' => 'êž‚', + 'êž…' => 'êž„', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'êž‹', + 'êž‘' => 'êž', + 'êž“' => 'êž’', + 'êž—' => 'êž–', + 'êž™' => 'Ꞙ', + 'êž›' => 'êžš', + 'êž' => 'êžœ', + 'ꞟ' => 'êžž', + 'êž¡' => 'êž ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'êž§' => 'Ꞧ', + 'êž©' => 'Ꞩ', + 'ï½' => 'A', + 'b' => 'ï¼¢', + 'c' => 'ï¼£', + 'd' => 'D', + 'ï½…' => 'ï¼¥', + 'f' => 'F', + 'g' => 'ï¼§', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'ï½' => 'ï¼­', + 'n' => 'ï¼®', + 'ï½' => 'O', + 'ï½' => 'ï¼°', + 'q' => 'ï¼±', + 'ï½’' => 'ï¼²', + 's' => 'ï¼³', + 'ï½”' => 'ï¼´', + 'u' => 'ï¼µ', + 'ï½–' => 'ï¼¶', + 'ï½—' => 'ï¼·', + 'x' => 'X', + 'ï½™' => 'ï¼¹', + 'z' => 'Z', + 'ð¨' => 'ð€', + 'ð©' => 'ð', + 'ðª' => 'ð‚', + 'ð«' => 'ðƒ', + 'ð¬' => 'ð„', + 'ð­' => 'ð…', + 'ð®' => 'ð†', + 'ð¯' => 'ð‡', + 'ð°' => 'ðˆ', + 'ð±' => 'ð‰', + 'ð²' => 'ðŠ', + 'ð³' => 'ð‹', + 'ð´' => 'ðŒ', + 'ðµ' => 'ð', + 'ð¶' => 'ðŽ', + 'ð·' => 'ð', + 'ð¸' => 'ð', + 'ð¹' => 'ð‘', + 'ðº' => 'ð’', + 'ð»' => 'ð“', + 'ð¼' => 'ð”', + 'ð½' => 'ð•', + 'ð¾' => 'ð–', + 'ð¿' => 'ð—', + 'ð‘€' => 'ð˜', + 'ð‘' => 'ð™', + 'ð‘‚' => 'ðš', + 'ð‘ƒ' => 'ð›', + 'ð‘„' => 'ðœ', + 'ð‘…' => 'ð', + 'ð‘†' => 'ðž', + 'ð‘‡' => 'ðŸ', + 'ð‘ˆ' => 'ð ', + 'ð‘‰' => 'ð¡', + 'ð‘Š' => 'ð¢', + 'ð‘‹' => 'ð£', + 'ð‘Œ' => 'ð¤', + 'ð‘' => 'ð¥', + 'ð‘Ž' => 'ð¦', + 'ð‘' => 'ð§', + 'ð‘£€' => 'ð‘¢ ', + 'ð‘£' => '𑢡', + '𑣂' => 'ð‘¢¢', + '𑣃' => 'ð‘¢£', + '𑣄' => '𑢤', + 'ð‘£…' => 'ð‘¢¥', + '𑣆' => '𑢦', + '𑣇' => 'ð‘¢§', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + 'ð‘£' => 'ð‘¢­', + '𑣎' => 'ð‘¢®', + 'ð‘£' => '𑢯', + 'ð‘£' => 'ð‘¢°', + '𑣑' => 'ð‘¢±', + 'ð‘£’' => 'ð‘¢²', + '𑣓' => 'ð‘¢³', + 'ð‘£”' => 'ð‘¢´', + '𑣕' => 'ð‘¢µ', + 'ð‘£–' => 'ð‘¢¶', + 'ð‘£—' => 'ð‘¢·', + '𑣘' => '𑢸', + 'ð‘£™' => 'ð‘¢¹', + '𑣚' => '𑢺', + 'ð‘£›' => 'ð‘¢»', + '𑣜' => 'ð‘¢¼', + 'ð‘£' => 'ð‘¢½', + '𑣞' => 'ð‘¢¾', + '𑣟' => '𑢿', +); diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php b/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..2fdcc5a --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_strlen')) { + define('MB_CASE_UPPER', 0); + define('MB_CASE_LOWER', 1); + define('MB_CASE_TITLE', 2); + + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} diff --git a/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json b/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..0bce087 --- /dev/null +++ b/public/system/storage/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/.gitignore b/public/system/storage/vendor/symfony/translation/.gitignore new file mode 100644 index 0000000..c49a5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/public/system/storage/vendor/symfony/translation/CHANGELOG.md b/public/system/storage/vendor/symfony/translation/CHANGELOG.md new file mode 100644 index 0000000..b011f9e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/CHANGELOG.md @@ -0,0 +1,69 @@ +CHANGELOG +========= + +3.0.0 +----- + + * removed `FileDumper::format()` method. + * Changed the visibility of the locale property in `Translator` from protected to private. + +2.8.0 +----- + + * deprecated FileDumper::format(), overwrite FileDumper::formatCatalogue() instead. + * deprecated Translator::getMessages(), rely on TranslatorBagInterface::getCatalogue() instead. + * added `FileDumper::formatCatalogue` which allows format the catalogue without dumping it into file. + * added option `json_encoding` to JsonFileDumper + * added options `as_tree`, `inline` to YamlFileDumper + * added support for XLIFF 2.0. + * added support for XLIFF target and tool attributes. + * added message parameters to DataCollectorTranslator. + * [DEPRECATION] The `DiffOperation` class has been deprecated and + will be removed in Symfony 3.0, since its operation has nothing to do with 'diff', + so the class name is misleading. The `TargetOperation` class should be used for + this use-case instead. + +2.7.0 +----- + + * added DataCollectorTranslator for collecting the translated messages. + +2.6.0 +----- + + * added possibility to cache catalogues + * added TranslatorBagInterface + * added LoggingTranslator + * added Translator::getMessages() for retrieving the message catalogue as an array + +2.5.0 +----- + + * added relative file path template to the file dumpers + * added optional backup to the file dumpers + * changed IcuResFileDumper to extend FileDumper + +2.3.0 +----- + + * added classes to make operations on catalogues (like making a diff or a merge on 2 catalogues) + * added Translator::getFallbackLocales() + * deprecated Translator::setFallbackLocale() in favor of the new Translator::setFallbackLocales() method + +2.2.0 +----- + + * QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3. + * [BC BREAK] uniformized the exception thrown by the load() method when an error occurs. The load() method now + throws Symfony\Component\Translation\Exception\NotFoundResourceException when a resource cannot be found + and Symfony\Component\Translation\Exception\InvalidResourceException when a resource is invalid. + * changed the exception class thrown by some load() methods from \RuntimeException to \InvalidArgumentException + (IcuDatFileLoader, IcuResFileLoader and QtFileLoader) + +2.1.0 +----- + + * added support for more than one fallback locale + * added support for extracting translation messages from templates (Twig and PHP) + * added dumpers for translation catalogs + * added support for QT, gettext, and ResourceBundles diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php new file mode 100644 index 0000000..9598e17 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Base catalogues binary operation class. + * + * A catalogue binary operation performs operation on + * source (the left argument) and target (the right argument) catalogues. + * + * @author Jean-François Simon + */ +abstract class AbstractOperation implements OperationInterface +{ + /** + * @var MessageCatalogueInterface The source catalogue + */ + protected $source; + + /** + * @var MessageCatalogueInterface The target catalogue + */ + protected $target; + + /** + * @var MessageCatalogue The result catalogue + */ + protected $result; + + /** + * @var null|array The domains affected by this operation + */ + private $domains; + + /** + * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. + * + * The data structure of this array is as follows: + * ```php + * array( + * 'domain 1' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * 'domain 2' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * ... + * ) + * ``` + * + * @var array The array that stores 'all', 'new' and 'obsolete' messages + */ + protected $messages; + + /** + * @param MessageCatalogueInterface $source The source catalogue + * @param MessageCatalogueInterface $target The target catalogue + * + * @throws \LogicException + */ + public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + if ($source->getLocale() !== $target->getLocale()) { + throw new \LogicException('Operated catalogues must belong to the same locale.'); + } + + $this->source = $source; + $this->target = $target; + $this->result = new MessageCatalogue($source->getLocale()); + $this->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; + } + + /** + * Performs operation on source and target catalogues for the given domain and + * stores the results. + * + * @param string $domain The domain which the operation will be performed for + */ + abstract protected function processDomain($domain); +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php new file mode 100644 index 0000000..6db3f80 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/MergeOperation.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Merge operation between two catalogues as follows: + * all = source ∪ target = {x: x ∈ source ∨ x ∈ target} + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅ + * Basically, the result contains messages from both catalogues. + * + * @author Jean-François Simon + */ +class MergeOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + foreach ($this->source->all($domain) as $id => $message) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php b/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php new file mode 100644 index 0000000..87d888e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/OperationInterface.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Represents an operation on catalogue(s). + * + * An instance of this interface performs an operation on one or more catalogues and + * stores intermediate and final results of the operation. + * + * The first catalogue in its argument(s) is called the 'source catalogue' or 'source' and + * the following results are stored: + * + * Messages: also called 'all', are valid messages for the given domain after the operation is performed. + * + * New Messages: also called 'new' (new = all ∖ source = {x: x ∈ all ∧ x ∉ source}). + * + * Obsolete Messages: also called 'obsolete' (obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ all}). + * + * Result: also called 'result', is the resulting catalogue for the given domain that holds the same messages as 'all'. + * + * @author Jean-François Simon + */ +interface OperationInterface +{ + /** + * Returns domains affected by operation. + * + * @return array + */ + public function getDomains(); + + /** + * Returns all valid messages ('all') after operation. + * + * @param string $domain + * + * @return array + */ + public function getMessages($domain); + + /** + * Returns new messages ('new') after operation. + * + * @param string $domain + * + * @return array + */ + public function getNewMessages($domain); + + /** + * Returns obsolete messages ('obsolete') after operation. + * + * @param string $domain + * + * @return array + */ + public function getObsoleteMessages($domain); + + /** + * Returns resulting catalogue ('result'). + * + * @return MessageCatalogueInterface + */ + public function getResult(); +} diff --git a/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php b/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php new file mode 100644 index 0000000..e081e13 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Catalogue/TargetOperation.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Catalogue; + +/** + * Target operation between two catalogues: + * intersection = source ∩ target = {x: x ∈ source ∧ x ∈ target} + * all = intersection ∪ (target ∖ intersection) = target + * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} + * obsolete = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target} + * Basically, the result contains messages from the target catalogue. + * + * @author Michael Lee + */ +class TargetOperation extends AbstractOperation +{ + /** + * {@inheritdoc} + */ + protected function processDomain($domain) + { + $this->messages[$domain] = array( + 'all' => array(), + 'new' => array(), + 'obsolete' => array(), + ); + + // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, + // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + // + // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` + // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} + // + // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` + // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} + + foreach ($this->source->all($domain) as $id => $message) { + if ($this->target->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->source->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } else { + $this->messages[$domain]['obsolete'][$id] = $message; + } + } + + foreach ($this->target->all($domain) as $id => $message) { + if (!$this->source->has($id, $domain)) { + $this->messages[$domain]['all'][$id] = $message; + $this->messages[$domain]['new'][$id] = $message; + $this->result->add(array($id => $message), $domain); + if (null !== $keyMetadata = $this->target->getMetadata($id, $domain)) { + $this->result->setMetadata($id, $keyMetadata, $domain); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php new file mode 100644 index 0000000..cb59d0a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -0,0 +1,150 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; +use Symfony\Component\Translation\DataCollectorTranslator; + +/** + * @author Abdellatif Ait boudad + */ +class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface +{ + /** + * @var DataCollectorTranslator + */ + private $translator; + + /** + * @param DataCollectorTranslator $translator + */ + public function __construct(DataCollectorTranslator $translator) + { + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function lateCollect() + { + $messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages()); + + $this->data = $this->computeCount($messages); + $this->data['messages'] = $messages; + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + } + + /** + * @return array + */ + public function getMessages() + { + return isset($this->data['messages']) ? $this->data['messages'] : array(); + } + + /** + * @return int + */ + public function getCountMissings() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_MISSING]) ? $this->data[DataCollectorTranslator::MESSAGE_MISSING] : 0; + } + + /** + * @return int + */ + public function getCountFallbacks() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK]) ? $this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK] : 0; + } + + /** + * @return int + */ + public function getCountDefines() + { + return isset($this->data[DataCollectorTranslator::MESSAGE_DEFINED]) ? $this->data[DataCollectorTranslator::MESSAGE_DEFINED] : 0; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'translation'; + } + + private function sanitizeCollectedMessages($messages) + { + $result = array(); + foreach ($messages as $key => $message) { + $messageId = $message['locale'].$message['domain'].$message['id']; + + if (!isset($result[$messageId])) { + $message['count'] = 1; + $message['parameters'] = !empty($message['parameters']) ? array($message['parameters']) : array(); + $messages[$key]['translation'] = $this->sanitizeString($message['translation']); + $result[$messageId] = $message; + } else { + if (!empty($message['parameters'])) { + $result[$messageId]['parameters'][] = $message['parameters']; + } + + ++$result[$messageId]['count']; + } + + unset($messages[$key]); + } + + return $result; + } + + private function computeCount($messages) + { + $count = array( + DataCollectorTranslator::MESSAGE_DEFINED => 0, + DataCollectorTranslator::MESSAGE_MISSING => 0, + DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK => 0, + ); + + foreach ($messages as $message) { + ++$count[$message['state']]; + } + + return $count; + } + + private function sanitizeString($string, $length = 80) + { + $string = trim(preg_replace('/\s+/', ' ', $string)); + + if (false !== $encoding = mb_detect_encoding($string, null, true)) { + if (mb_strlen($string, $encoding) > $length) { + return mb_substr($string, 0, $length - 3, $encoding).'...'; + } + } elseif (strlen($string) > $length) { + return substr($string, 0, $length - 3).'...'; + } + + return $string; + } +} diff --git a/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php b/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php new file mode 100644 index 0000000..2446723 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/DataCollectorTranslator.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * @author Abdellatif Ait boudad + */ +class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface +{ + const MESSAGE_DEFINED = 0; + const MESSAGE_MISSING = 1; + const MESSAGE_EQUALS_FALLBACK = 2; + + /** + * @var TranslatorInterface|TranslatorBagInterface + */ + private $translator; + + /** + * @var array + */ + private $messages = array(); + + /** + * @param TranslatorInterface $translator The translator must implement TranslatorBagInterface + */ + public function __construct(TranslatorInterface $translator) + { + if (!$translator instanceof TranslatorBagInterface) { + throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + } + + $this->translator = $translator; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->trans($id, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + $trans = $this->translator->transChoice($id, $number, $parameters, $domain, $locale); + $this->collectMessage($locale, $domain, $id, $trans, $parameters, $number); + + return $trans; + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->translator->setLocale($locale); + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->translator->getLocale(); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + + /** + * Passes through all unknown calls onto the translator object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->translator, $method), $args); + } + + /** + * @return array + */ + public function getCollectedMessages() + { + return $this->messages; + } + + /** + * @param string|null $locale + * @param string|null $domain + * @param string $id + * @param string $translation + * @param array|null $parameters + * @param int|null $number + */ + private function collectMessage($locale, $domain, $id, $translation, $parameters = array(), $number = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->translator->getCatalogue($locale); + $locale = $catalogue->getLocale(); + if ($catalogue->defines($id, $domain)) { + $state = self::MESSAGE_DEFINED; + } elseif ($catalogue->has($id, $domain)) { + $state = self::MESSAGE_EQUALS_FALLBACK; + + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + if ($fallbackCatalogue->defines($id, $domain)) { + $locale = $fallbackCatalogue->getLocale(); + break; + } + + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); + } + } else { + $state = self::MESSAGE_MISSING; + } + + $this->messages[] = array( + 'locale' => $locale, + 'domain' => $domain, + 'id' => $id, + 'translation' => $translation, + 'parameters' => $parameters, + 'transChoiceNumber' => $number, + 'state' => $state, + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php new file mode 100644 index 0000000..fe5dccb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/CsvFileDumper.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * CsvFileDumper generates a csv formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class CsvFileDumper extends FileDumper +{ + private $delimiter = ';'; + private $enclosure = '"'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $handle = fopen('php://memory', 'rb+'); + + foreach ($messages->all($domain) as $source => $target) { + fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); + } + + rewind($handle); + $output = stream_get_contents($handle); + fclose($handle); + + return $output; + } + + /** + * Sets the delimiter and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'csv'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php b/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php new file mode 100644 index 0000000..cebc65e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/DumperInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * DumperInterface is the interface implemented by all translation dumpers. + * There is no common option. + * + * @author Michel Salib + */ +interface DumperInterface +{ + /** + * Dumps the message catalogue. + * + * @param MessageCatalogue $messages The message catalogue + * @param array $options Options that are used by the dumper + */ + public function dump(MessageCatalogue $messages, $options = array()); +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php new file mode 100644 index 0000000..9c9a8ee --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/FileDumper.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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->formatCatalogue($messages, $domain, $options)); + } + } + + /** + * Transforms a domain of a message catalogue to its string representation. + * + * @param MessageCatalogue $messages + * @param string $domain + * @param array $options + * + * @return string representation + */ + abstract public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()); + + /** + * Gets the file extension of the dumper. + * + * @return string file extension + */ + abstract protected function getExtension(); + + /** + * Gets the relative file path using the template. + * + * @param string $domain The domain + * @param string $locale The locale + * + * @return string The relative file path + */ + private function getRelativePath($domain, $locale) + { + return strtr($this->relativePathTemplate, array( + '%domain%' => $domain, + '%locale%' => $locale, + '%extension%' => $this->getExtension(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php new file mode 100644 index 0000000..ceb4b42 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IcuResFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + protected $relativePathTemplate = '%domain%/%locale%.%extension%'; + + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $data = $indexes = $resources = ''; + + foreach ($messages->all($domain) as $source => $target) { + $indexes .= pack('v', strlen($data) + 28); + $data .= $source."\0"; + } + + $data .= $this->writePadding($data); + + $keyTop = $this->getPosition($data); + + foreach ($messages->all($domain) as $source => $target) { + $resources .= pack('V', $this->getPosition($data)); + + $data .= pack('V', strlen($target)) + .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') + .$this->writePadding($data) + ; + } + + $resOffset = $this->getPosition($data); + + $data .= pack('v', count($messages)) + .$indexes + .$this->writePadding($data) + .$resources + ; + + $bundleTop = $this->getPosition($data); + + $root = pack('V7', + $resOffset + (2 << 28), // Resource Offset + Resource Type + 6, // Index length + $keyTop, // Index keys top + $bundleTop, // Index resources top + $bundleTop, // Index bundle top + count($messages), // Index max table length + 0 // Index attributes + ); + + $header = pack('vC2v4C12@32', + 32, // Header size + 0xDA, 0x27, // Magic number 1 and 2 + 20, 0, 0, 2, // Rest of the header, ..., Size of a char + 0x52, 0x65, 0x73, 0x42, // Data format identifier + 1, 2, 0, 0, // Data version + 1, 4, 0, 0 // Unicode version + ); + + return $header.$root.$data; + } + + private function writePadding($data) + { + $padding = strlen($data) % 4; + + if ($padding) { + return str_repeat("\xAA", 4 - $padding); + } + } + + private function getPosition($data) + { + return (strlen($data) + 28) / 4; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'res'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php new file mode 100644 index 0000000..9ed3754 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/IniFileDumper.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * IniFileDumper generates an ini formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class IniFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = ''; + + foreach ($messages->all($domain) as $source => $target) { + $escapeTarget = str_replace('"', '\"', $target); + $output .= $source.'="'.$escapeTarget."\"\n"; + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ini'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php new file mode 100644 index 0000000..08b538e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/JsonFileDumper.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * JsonFileDumper generates an json formatted string representation of a message catalogue. + * + * @author singles + */ +class JsonFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (isset($options['json_encoding'])) { + $flags = $options['json_encoding']; + } else { + $flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; + } + + return json_encode($messages->all($domain), $flags); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'json'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php new file mode 100644 index 0000000..f9aae42 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Loader\MoFileLoader; + +/** + * MoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class MoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $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); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php new file mode 100644 index 0000000..c7c37aa --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/PhpFileDumper.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PhpFileDumper generates PHP files from a message catalogue. + * + * @author Michel Salib + */ +class PhpFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return "all($domain), true).";\n"; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'php'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php new file mode 100644 index 0000000..ed4418b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/PoFileDumper.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PoFileDumper generates a gettext formatted string representation of a message catalogue. + * + * @author Stealth35 + */ +class PoFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $output = 'msgid ""'."\n"; + $output .= 'msgstr ""'."\n"; + $output .= '"Content-Type: text/plain; charset=UTF-8\n"'."\n"; + $output .= '"Content-Transfer-Encoding: 8bit\n"'."\n"; + $output .= '"Language: '.$messages->getLocale().'\n"'."\n"; + $output .= "\n"; + + $newLine = false; + foreach ($messages->all($domain) as $source => $target) { + if ($newLine) { + $output .= "\n"; + } else { + $newLine = true; + } + $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); + $output .= sprintf('msgstr "%s"', $this->escape($target)); + } + + return $output; + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'po'; + } + + private function escape($str) + { + return addcslashes($str, "\0..\37\42\134"); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php new file mode 100644 index 0000000..a9073f2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/QtFileDumper.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * QtFileDumper generates ts files from a message catalogue. + * + * @author Benjamin Eberlei + */ +class QtFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + $ts = $dom->appendChild($dom->createElement('TS')); + $context = $ts->appendChild($dom->createElement('context')); + $context->appendChild($dom->createElement('name', $domain)); + + foreach ($messages->all($domain) as $source => $target) { + $message = $context->appendChild($dom->createElement('message')); + $message->appendChild($dom->createElement('source', $source)); + $message->appendChild($dom->createElement('translation', $target)); + } + + return $dom->saveXML(); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'ts'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php new file mode 100644 index 0000000..915dbca --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * XliffFileDumper generates xliff files from a message catalogue. + * + * @author Michel Salib + */ +class XliffFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + $xliffVersion = '1.2'; + if (array_key_exists('xliff_version', $options)) { + $xliffVersion = $options['xliff_version']; + } + + if (array_key_exists('default_locale', $options)) { + $defaultLocale = $options['default_locale']; + } else { + $defaultLocale = \Locale::getDefault(); + } + + if ('1.2' === $xliffVersion) { + return $this->dumpXliff1($defaultLocale, $messages, $domain, $options); + } + if ('2.0' === $xliffVersion) { + return $this->dumpXliff2($defaultLocale, $messages, $domain, $options); + } + + throw new \InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'xlf'; + } + + private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $toolInfo = array('tool-id' => 'symfony', 'tool-name' => 'Symfony'); + if (array_key_exists('tool_info', $options)) { + $toolInfo = array_merge($toolInfo, $options['tool_info']); + } + + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('version', '1.2'); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('source-language', str_replace('_', '-', $defaultLocale)); + $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); + $xliffFile->setAttribute('datatype', 'plaintext'); + $xliffFile->setAttribute('original', 'file.ext'); + + $xliffHead = $xliffFile->appendChild($dom->createElement('header')); + $xliffTool = $xliffHead->appendChild($dom->createElement('tool')); + foreach ($toolInfo as $id => $value) { + $xliffTool->setAttribute($id, $value); + } + + $xliffBody = $xliffFile->appendChild($dom->createElement('body')); + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('trans-unit'); + + $translation->setAttribute('id', md5($source)); + $translation->setAttribute('resname', $source); + + $s = $translation->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $translation->appendChild($targetElement); + $t->appendChild($text); + + if ($this->hasMetadataArrayInfo('notes', $metadata)) { + foreach ($metadata['notes'] as $note) { + if (!isset($note['content'])) { + continue; + } + + $n = $translation->appendChild($dom->createElement('note')); + $n->appendChild($dom->createTextNode($note['content'])); + + if (isset($note['priority'])) { + $n->setAttribute('priority', $note['priority']); + } + + if (isset($note['from'])) { + $n->setAttribute('from', $note['from']); + } + } + } + + $xliffBody->appendChild($translation); + } + + return $dom->saveXML(); + } + + private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) + { + $dom = new \DOMDocument('1.0', 'utf-8'); + $dom->formatOutput = true; + + $xliff = $dom->appendChild($dom->createElement('xliff')); + $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:2.0'); + $xliff->setAttribute('version', '2.0'); + $xliff->setAttribute('srcLang', str_replace('_', '-', $defaultLocale)); + $xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale())); + + $xliffFile = $xliff->appendChild($dom->createElement('file')); + $xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale()); + + foreach ($messages->all($domain) as $source => $target) { + $translation = $dom->createElement('unit'); + $translation->setAttribute('id', md5($source)); + + $segment = $translation->appendChild($dom->createElement('segment')); + + $s = $segment->appendChild($dom->createElement('source')); + $s->appendChild($dom->createTextNode($source)); + + // Does the target contain characters requiring a CDATA section? + $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); + + $targetElement = $dom->createElement('target'); + $metadata = $messages->getMetadata($source, $domain); + if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { + foreach ($metadata['target-attributes'] as $name => $value) { + $targetElement->setAttribute($name, $value); + } + } + $t = $segment->appendChild($targetElement); + $t->appendChild($text); + + $xliffFile->appendChild($translation); + } + + return $dom->saveXML(); + } + + /** + * @param string $key + * @param array|null $metadata + * + * @return bool + */ + private function hasMetadataArrayInfo($key, $metadata = null) + { + return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || is_array($metadata[$key])); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php b/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php new file mode 100644 index 0000000..625953c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Dumper/YamlFileDumper.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Util\ArrayConverter; +use Symfony\Component\Yaml\Yaml; + +/** + * YamlFileDumper generates yaml files from a message catalogue. + * + * @author Michel Salib + */ +class YamlFileDumper extends FileDumper +{ + /** + * {@inheritdoc} + */ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + throw new \LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); + } + + $data = $messages->all($domain); + + if (isset($options['as_tree']) && $options['as_tree']) { + $data = ArrayConverter::expandToTree($data); + } + + if (isset($options['inline']) && ($inline = (int) $options['inline']) > 0) { + return Yaml::dump($data, $inline); + } + + return Yaml::dump($data); + } + + /** + * {@inheritdoc} + */ + protected function getExtension() + { + return 'yml'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php b/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php new file mode 100644 index 0000000..c85fb93 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Exception interface for all exceptions thrown by the component. + * + * @author Fabien Potencier + */ +interface ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php b/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php new file mode 100644 index 0000000..cf07943 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/InvalidResourceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource cannot be loaded. + * + * @author Fabien Potencier + */ +class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php b/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php new file mode 100644 index 0000000..cff73ae --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Exception/NotFoundResourceException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Exception; + +/** + * Thrown when a resource does not exist. + * + * @author Fabien Potencier + */ +class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php new file mode 100644 index 0000000..57fd493 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\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 + * + * @return bool + * + * @throws \InvalidArgumentException + */ + protected function isFile($file) + { + if (!is_file($file)) { + throw new \InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); + } + + return true; + } + + /** + * @param string $file + * + * @return bool + */ + abstract protected function canBeExtracted($file); + + /** + * @param string|array $resource files, a file or a directory + * + * @return array files to be extracted + */ + abstract protected function extractFromDirectory($resource); +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php b/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php new file mode 100644 index 0000000..50e3c84 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/ChainExtractor.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ChainExtractor extracts translation messages from template files. + * + * @author Michel Salib + */ +class ChainExtractor implements ExtractorInterface +{ + /** + * The extractors. + * + * @var ExtractorInterface[] + */ + private $extractors = array(); + + /** + * Adds a loader to the translation extractor. + * + * @param string $format The format of the loader + * @param ExtractorInterface $extractor The loader + */ + public function addExtractor($format, ExtractorInterface $extractor) + { + $this->extractors[$format] = $extractor; + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + foreach ($this->extractors as $extractor) { + $extractor->setPrefix($prefix); + } + } + + /** + * {@inheritdoc} + */ + public function extract($directory, MessageCatalogue $catalogue) + { + foreach ($this->extractors as $extractor) { + $extractor->extract($directory, $catalogue); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php b/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php new file mode 100644 index 0000000..438f80b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Extractor/ExtractorInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * Extracts translation messages from a directory or files to the catalogue. + * New found messages are injected to the catalogue using the prefix. + * + * @author Michel Salib + */ +interface ExtractorInterface +{ + /** + * Extracts translation messages from files, a file or a directory to the catalogue. + * + * @param string|array $resource files, a file or a directory + * @param MessageCatalogue $catalogue The catalogue + */ + public function extract($resource, MessageCatalogue $catalogue); + + /** + * Sets the prefix that should be used for new found messages. + * + * @param string $prefix The prefix + */ + public function setPrefix($prefix); +} diff --git a/public/system/storage/vendor/symfony/translation/IdentityTranslator.php b/public/system/storage/vendor/symfony/translation/IdentityTranslator.php new file mode 100644 index 0000000..46a0463 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/IdentityTranslator.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * IdentityTranslator does not translate anything. + * + * @author Fabien Potencier + */ +class IdentityTranslator implements TranslatorInterface +{ + private $selector; + private $locale; + + /** + * Constructor. + * + * @param MessageSelector|null $selector The message selector for pluralization + */ + public function __construct(MessageSelector $selector = null) + { + $this->selector = $selector ?: new MessageSelector(); + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale ?: \Locale::getDefault(); + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + return strtr((string) $id, $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + return strtr($this->selector->choose((string) $id, (int) $number, $locale ?: $this->getLocale()), $parameters); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Interval.php b/public/system/storage/vendor/symfony/translation/Interval.php new file mode 100644 index 0000000..2a51156 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Interval.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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; + } +} diff --git a/public/system/storage/vendor/symfony/translation/LICENSE b/public/system/storage/vendor/symfony/translation/LICENSE new file mode 100644 index 0000000..12a7453 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2016 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php b/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php new file mode 100644 index 0000000..9a595b7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/ArrayLoader.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * ArrayLoader loads translations from a PHP array. + * + * @author Fabien Potencier + */ +class ArrayLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + $this->flatten($resource); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($resource, $domain); + + return $catalogue; + } + + /** + * Flattens an nested array of translations. + * + * The scheme used is: + * 'key' => array('key2' => array('key3' => 'value')) + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param array &$messages The array that will be flattened + * @param array $subnode Current subnode being parsed, used internally for recursive calls + * @param string $path Current path being parsed, used internally for recursive calls + */ + private function flatten(array &$messages, array $subnode = null, $path = null) + { + if (null === $subnode) { + $subnode = &$messages; + } + foreach ($subnode as $key => $value) { + if (is_array($value)) { + $nodePath = $path ? $path.'.'.$key : $key; + $this->flatten($messages, $value, $nodePath); + if (null === $path) { + unset($messages[$key]); + } + } elseif (null !== $path) { + $messages[$path.'.'.$key] = $value; + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php new file mode 100644 index 0000000..f1d3443 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/CsvFileLoader.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * CsvFileLoader loads translations from CSV files. + * + * @author SaÅ¡a Stamenković + */ +class CsvFileLoader extends FileLoader +{ + private $delimiter = ';'; + private $enclosure = '"'; + private $escape = '\\'; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + + try { + $file = new \SplFileObject($resource, 'rb'); + } catch (\RuntimeException $e) { + throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e); + } + + $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY); + $file->setCsvControl($this->delimiter, $this->enclosure, $this->escape); + + foreach ($file as $data) { + if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === count($data)) { + $messages[$data[0]] = $data[1]; + } + } + + return $messages; + } + + /** + * Sets the delimiter, enclosure, and escape character for CSV. + * + * @param string $delimiter delimiter character + * @param string $enclosure enclosure character + * @param string $escape escape character + */ + public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\') + { + $this->delimiter = $delimiter; + $this->enclosure = $enclosure; + $this->escape = $escape; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php new file mode 100644 index 0000000..a7f24f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/FileLoader.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @author Abdellatif Ait boudad + */ +abstract class FileLoader extends ArrayLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $messages = $this->loadResource($resource); + + // empty resource + if (null === $messages) { + $messages = array(); + } + + // not an array + if (!is_array($messages)) { + throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + } + + $catalogue = parent::load($messages, $locale, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + /* + * @param string $resource + * + * @return array + * + * @throws InvalidResourceException If stream content has an invalid format. + */ + abstract protected function loadResource($resource); +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php new file mode 100644 index 0000000..71ba90a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IcuDatFileLoader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuDatFileLoader extends IcuResFileLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource.'.dat')) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource.'.dat')) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource.'.dat')); + } + + return $catalogue; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php new file mode 100644 index 0000000..2f8037f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * IcuResFileLoader loads translations from a resource bundle. + * + * @author stealth35 + */ +class IcuResFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!is_dir($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $rb = new \ResourceBundle($locale, $resource); + } catch (\Exception $e) { + // HHVM compatibility: constructor throws on invalid resource + $rb = null; + } + + if (!$rb) { + throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource)); + } elseif (intl_is_failure($rb->getErrorCode())) { + throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); + } + + $messages = $this->flatten($rb); + $catalogue = new MessageCatalogue($locale); + $catalogue->add($messages, $domain); + + if (class_exists('Symfony\Component\Config\Resource\DirectoryResource')) { + $catalogue->addResource(new DirectoryResource($resource)); + } + + return $catalogue; + } + + /** + * Flattens an ResourceBundle. + * + * The scheme used is: + * key { key2 { key3 { "value" } } } + * Becomes: + * 'key.key2.key3' => 'value' + * + * This function takes an array by reference and will modify it + * + * @param \ResourceBundle $rb the ResourceBundle that will be flattened + * @param array $messages used internally for recursive calls + * @param string $path current path being parsed, used internally for recursive calls + * + * @return array the flattened ResourceBundle + */ + protected function flatten(\ResourceBundle $rb, array &$messages = array(), $path = null) + { + foreach ($rb as $key => $value) { + $nodePath = $path ? $path.'.'.$key : $key; + if ($value instanceof \ResourceBundle) { + $this->flatten($value, $messages, $nodePath); + } else { + $messages[$nodePath] = $value; + } + } + + return $messages; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php new file mode 100644 index 0000000..11d9b27 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/IniFileLoader.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * IniFileLoader loads translations from an ini file. + * + * @author stealth35 + */ +class IniFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return parse_ini_file($resource, true); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php new file mode 100644 index 0000000..ce4e91f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/JsonFileLoader.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * JsonFileLoader loads translations from an json file. + * + * @author singles + */ +class JsonFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $messages = array(); + if ($data = file_get_contents($resource)) { + $messages = json_decode($data, true); + + if (0 < $errorCode = json_last_error()) { + throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $this->getJSONErrorMessage($errorCode))); + } + } + + return $messages; + } + + /** + * Translates JSON_ERROR_* constant into meaningful message. + * + * @param int $errorCode Error code returned by json_last_error() call + * + * @return string Message string + */ + private function getJSONErrorMessage($errorCode) + { + switch ($errorCode) { + case JSON_ERROR_DEPTH: + return 'Maximum stack depth exceeded'; + case JSON_ERROR_STATE_MISMATCH: + return 'Underflow or the modes mismatch'; + case JSON_ERROR_CTRL_CHAR: + return 'Unexpected control character found'; + case JSON_ERROR_SYNTAX: + return 'Syntax error, malformed JSON'; + case JSON_ERROR_UTF8: + return 'Malformed UTF-8 characters, possibly incorrectly encoded'; + default: + return 'Unknown error'; + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php b/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php new file mode 100644 index 0000000..6b65fe3 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/LoaderInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; + +/** + * LoaderInterface is the interface implemented by all translation loaders. + * + * @author Fabien Potencier + */ +interface LoaderInterface +{ + /** + * Loads a locale. + * + * @param mixed $resource A resource + * @param string $locale A locale + * @param string $domain The domain + * + * @return MessageCatalogue A MessageCatalogue instance + * + * @throws NotFoundResourceException when the resource cannot be found + * @throws InvalidResourceException when the resource cannot be loaded + */ + public function load($resource, $locale, $domain = 'messages'); +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php new file mode 100644 index 0000000..2fcada2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/MoFileLoader.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + */ +class MoFileLoader extends FileLoader +{ + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was little endian. + * + * @var float + */ + const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; + + /** + * Magic used for validating the format of a MO file as well as + * detecting if the machine used to create that file was big endian. + * + * @var float + */ + const MO_BIG_ENDIAN_MAGIC = 0xde120495; + + /** + * The size of the header of a MO file in bytes. + * + * @var int Number of bytes + */ + const MO_HEADER_SIZE = 28; + + /** + * Parses machine object (MO) format, independent of the machine's endian it + * was created on. Both 32bit and 64bit systems are supported. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $stat = fstat($stream); + + if ($stat['size'] < self::MO_HEADER_SIZE) { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + $magic = unpack('V1', fread($stream, 4)); + $magic = hexdec(substr(dechex(current($magic)), -8)); + + if ($magic == self::MO_LITTLE_ENDIAN_MAGIC) { + $isBigEndian = false; + } elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) { + $isBigEndian = true; + } else { + throw new InvalidResourceException('MO stream content has an invalid format.'); + } + + // formatRevision + $this->readLong($stream, $isBigEndian); + $count = $this->readLong($stream, $isBigEndian); + $offsetId = $this->readLong($stream, $isBigEndian); + $offsetTranslated = $this->readLong($stream, $isBigEndian); + // sizeHashes + $this->readLong($stream, $isBigEndian); + // offsetHashes + $this->readLong($stream, $isBigEndian); + + $messages = array(); + + for ($i = 0; $i < $count; ++$i) { + $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); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php new file mode 100644 index 0000000..a0050e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/PhpFileLoader.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * PhpFileLoader loads translations from PHP files returning an array of translations. + * + * @author Fabien Potencier + */ +class PhpFileLoader extends FileLoader +{ + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + return require $resource; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php new file mode 100644 index 0000000..40f5464 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/PoFileLoader.php @@ -0,0 +1,151 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +/** + * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) + * @copyright Copyright (c) 2012, Clemens Tolboom + */ +class PoFileLoader extends FileLoader +{ + /** + * Parses portable object (PO) format. + * + * From http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files + * we should be able to parse files having: + * + * white-space + * # translator-comments + * #. extracted-comments + * #: reference... + * #, flag... + * #| msgid previous-untranslated-string + * msgid untranslated-string + * msgstr translated-string + * + * extra or different lines are: + * + * #| msgctxt previous-context + * #| msgid previous-untranslated-string + * msgctxt context + * + * #| msgid previous-untranslated-string-singular + * #| msgid_plural previous-untranslated-string-plural + * msgid untranslated-string-singular + * msgid_plural untranslated-string-plural + * msgstr[0] translated-string-case-0 + * ... + * msgstr[N] translated-string-case-n + * + * The definition states: + * - white-space and comments are optional. + * - msgid "" that an empty singleline defines a header. + * + * This parser sacrifices some features of the reference implementation the + * differences to that implementation are as follows. + * - No support for comments spanning multiple lines. + * - Translator and extracted comments are treated as being the same type. + * - Message IDs are allowed to have other encodings as just US-ASCII. + * + * Items with an empty id are ignored. + * + * {@inheritdoc} + */ + protected function loadResource($resource) + { + $stream = fopen($resource, 'r'); + + $defaults = array( + 'ids' => array(), + 'translated' => null, + ); + + $messages = array(); + $item = $defaults; + $flags = array(); + + while ($line = fgets($stream)) { + $line = trim($line); + + if ($line === '') { + // Whitespace indicated current item is done + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + $item = $defaults; + $flags = array(); + } elseif (substr($line, 0, 2) === '#,') { + $flags = array_map('trim', explode(',', substr($line, 2))); + } elseif (substr($line, 0, 7) === 'msgid "') { + // We start a new msg so save previous + // TODO: this fails when comments or contexts are added + $this->addMessage($messages, $item); + $item = $defaults; + $item['ids']['singular'] = substr($line, 7, -1); + } elseif (substr($line, 0, 8) === 'msgstr "') { + $item['translated'] = substr($line, 8, -1); + } elseif ($line[0] === '"') { + $continues = isset($item['translated']) ? 'translated' : 'ids'; + + if (is_array($item[$continues])) { + end($item[$continues]); + $item[$continues][key($item[$continues])] .= substr($line, 1, -1); + } else { + $item[$continues] .= substr($line, 1, -1); + } + } elseif (substr($line, 0, 14) === 'msgid_plural "') { + $item['ids']['plural'] = substr($line, 14, -1); + } elseif (substr($line, 0, 7) === 'msgstr[') { + $size = strpos($line, ']'); + $item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1); + } + } + // save last item + if (!in_array('fuzzy', $flags)) { + $this->addMessage($messages, $item); + } + fclose($stream); + + return $messages; + } + + /** + * Save a translation item to the messages. + * + * A .po file could contain by error missing plural indexes. We need to + * fix these before saving them. + * + * @param array $messages + * @param array $item + */ + private function addMessage(array &$messages, array $item) + { + if (is_array($item['translated'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); + if (isset($item['ids']['plural'])) { + $plurals = $item['translated']; + // PO are by definition indexed so sort by index. + ksort($plurals); + // Make sure every index is filled. + end($plurals); + $count = key($plurals); + // Fill missing spots with '-'. + $empties = array_fill(0, $count + 1, '-'); + $plurals += $empties; + ksort($plurals); + $messages[stripcslashes($item['ids']['plural'])] = stripcslashes(implode('|', $plurals)); + } + } elseif (!empty($item['ids']['singular'])) { + $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated']); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php new file mode 100644 index 0000000..657bd6e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/QtFileLoader.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * QtFileLoader loads translations from QT Translations XML files. + * + * @author Benjamin Eberlei + */ +class QtFileLoader implements LoaderInterface +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); + } + + $internalErrors = libxml_use_internal_errors(true); + libxml_clear_errors(); + + $xpath = new \DOMXPath($dom); + $nodes = $xpath->evaluate('//TS/context/name[text()="'.$domain.'"]'); + + $catalogue = new MessageCatalogue($locale); + if ($nodes->length == 1) { + $translations = $nodes->item(0)->nextSibling->parentNode->parentNode->getElementsByTagName('message'); + foreach ($translations as $translation) { + $translationValue = (string) $translation->getElementsByTagName('translation')->item(0)->nodeValue; + + if (!empty($translationValue)) { + $catalogue->set( + (string) $translation->getElementsByTagName('source')->item(0)->nodeValue, + $translationValue, + $domain + ); + } + $translation = $translation->nextSibling; + } + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + } + + libxml_use_internal_errors($internalErrors); + + return $catalogue; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php new file mode 100644 index 0000000..d3fbec9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -0,0 +1,321 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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)); + } + + $catalogue = new MessageCatalogue($locale); + $this->extract($resource, $catalogue, $domain); + + if (class_exists('Symfony\Component\Config\Resource\FileResource')) { + $catalogue->addResource(new FileResource($resource)); + } + + return $catalogue; + } + + private function extract($resource, MessageCatalogue $catalogue, $domain) + { + try { + $dom = XmlUtils::loadFile($resource); + } catch (\InvalidArgumentException $e) { + throw new InvalidResourceException(sprintf('Unable to load "%s": %s', $resource, $e->getMessage()), $e->getCode(), $e); + } + + $xliffVersion = $this->getVersionNumber($dom); + $this->validateSchema($xliffVersion, $dom, $this->getSchema($xliffVersion)); + + if ('1.2' === $xliffVersion) { + $this->extractXliff1($dom, $catalogue, $domain); + } + + if ('2.0' === $xliffVersion) { + $this->extractXliff2($dom, $catalogue, $domain); + } + } + + /** + * Extract messages and metadata from DOMDocument into a MessageCatalogue. + * + * @param \DOMDocument $dom Source to extract messages and metadata + * @param MessageCatalogue $catalogue Catalogue where we'll collect messages and metadata + * @param string $domain The domain + */ + private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:1.2'); + foreach ($xml->xpath('//xliff:trans-unit') as $translation) { + $attributes = $translation->attributes(); + + if (!(isset($attributes['resname']) || isset($translation->source))) { + continue; + } + + $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { + $metadata['notes'] = $notes; + } + if (isset($translation->target) && $translation->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($translation->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * @param \DOMDocument $dom + * @param MessageCatalogue $catalogue + * @param string $domain + */ + private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + { + $xml = simplexml_import_dom($dom); + $encoding = strtoupper($dom->encoding); + + $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); + + foreach ($xml->xpath('//xliff:unit/xliff:segment') as $segment) { + $source = $segment->source; + + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($segment->target) ? $segment->target : $source), $encoding); + + $catalogue->set((string) $source, $target, $domain); + + $metadata = array(); + if (isset($segment->target) && $segment->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($segment->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } + } + + /** + * Convert a UTF8 string to the specified encoding. + * + * @param string $content String to decode + * @param string $encoding Target encoding + * + * @return string + */ + private function utf8ToCharset($content, $encoding = null) + { + if ('UTF-8' !== $encoding && !empty($encoding)) { + return mb_convert_encoding($content, $encoding, 'UTF-8'); + } + + return $content; + } + + /** + * Validates and parses the given file into a DOMDocument. + * + * @param string $file + * @param \DOMDocument $dom + * @param string $schema source of the schema + * + * @throws InvalidResourceException + */ + private function validateSchema($file, \DOMDocument $dom, $schema) + { + $internalErrors = libxml_use_internal_errors(true); + + $disableEntities = libxml_disable_entity_loader(false); + + if (!@$dom->schemaValidateSource($schema)) { + libxml_disable_entity_loader($disableEntities); + + throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); + } + + libxml_disable_entity_loader($disableEntities); + + $dom->normalizeDocument(); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + } + + private function getSchema($xliffVersion) + { + if ('1.2' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-1.2-strict.xsd'); + $xmlUri = 'http://www.w3.org/2001/xml.xsd'; + } elseif ('2.0' === $xliffVersion) { + $schemaSource = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-2.0.xsd'); + $xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd'; + } else { + throw new \InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); + } + + return $this->fixXmlLocation($schemaSource, $xmlUri); + } + + /** + * Internally changes the URI of a dependent xsd to be loaded locally. + * + * @param string $schemaSource Current content of schema file + * @param string $xmlUri External URI of XML to convert to local + * + * @return string + */ + private function fixXmlLocation($schemaSource, $xmlUri) + { + $newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd'; + $parts = explode('/', $newPath); + if (0 === stripos($newPath, 'phar://')) { + $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); + if ($tmpfile) { + copy($newPath, $tmpfile); + $parts = explode('/', str_replace('\\', '/', $tmpfile)); + } + } + $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; + $newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); + + return str_replace($xmlUri, $newPath, $schemaSource); + } + + /** + * Returns the XML errors of the internal XML parser. + * + * @param bool $internalErrors + * + * @return array An array of errors + */ + private function getXmlErrors($internalErrors) + { + $errors = array(); + foreach (libxml_get_errors() as $error) { + $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', + $error->code, + trim($error->message), + $error->file ?: 'n/a', + $error->line, + $error->column + ); + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $errors; + } + + /** + * Gets xliff file version based on the root "version" attribute. + * Defaults to 1.2 for backwards compatibility. + * + * @param \DOMDocument $dom + * + * @throws \InvalidArgumentException + * + * @return string + */ + private function getVersionNumber(\DOMDocument $dom) + { + /** @var \DOMNode $xliff */ + foreach ($dom->getElementsByTagName('xliff') as $xliff) { + $version = $xliff->attributes->getNamedItem('version'); + if ($version) { + return $version->nodeValue; + } + + $namespace = $xliff->attributes->getNamedItem('xmlns'); + if ($namespace) { + if (substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34) !== 0) { + throw new \InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s"', $namespace)); + } + + return substr($namespace, 34); + } + } + + // Falls back to v1.2 + return '1.2'; + } + + /* + * @param \SimpleXMLElement|null $noteElement + * @param string|null $encoding + * + * @return array + */ + private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, $encoding = null) + { + $notes = array(); + + if (null === $noteElement) { + return $notes; + } + + foreach ($noteElement as $xmlNote) { + $noteAttributes = $xmlNote->attributes(); + $note = array('content' => $this->utf8ToCharset((string) $xmlNote, $encoding)); + if (isset($noteAttributes['priority'])) { + $note['priority'] = (int) $noteAttributes['priority']; + } + + if (isset($noteAttributes['from'])) { + $note['from'] = (string) $noteAttributes['from']; + } + + $notes[] = $note; + } + + return $notes; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php b/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php new file mode 100644 index 0000000..5d9a3ad --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/YamlFileLoader.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Yaml\Parser as YamlParser; +use Symfony\Component\Yaml\Exception\ParseException; + +/** + * YamlFileLoader loads translations from Yaml files. + * + * @author Fabien Potencier + */ +class YamlFileLoader extends FileLoader +{ + private $yamlParser; + + /** + * {@inheritdoc} + */ + protected function loadResource($resource) + { + if (null === $this->yamlParser) { + if (!class_exists('Symfony\Component\Yaml\Parser')) { + throw new \LogicException('Loading translations from the YAML format requires the Symfony Yaml component.'); + } + + $this->yamlParser = new YamlParser(); + } + + try { + $messages = $this->yamlParser->parse(file_get_contents($resource)); + } catch (ParseException $e) { + throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e); + } + + return $messages; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd new file mode 100644 index 0000000..3ce2a8e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd @@ -0,0 +1,2223 @@ + + + + + + + + + + + + + + + Values for the attribute 'context-type'. + + + + + Indicates a database content. + + + + + Indicates the content of an element within an XML document. + + + + + Indicates the name of an element within an XML document. + + + + + Indicates the line number from the sourcefile (see context-type="sourcefile") where the <source> is found. + + + + + Indicates a the number of parameters contained within the <source>. + + + + + Indicates notes pertaining to the parameters in the <source>. + + + + + Indicates the content of a record within a database. + + + + + Indicates the name of a record within a database. + + + + + Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original <file> attribute in that this sourcefile is one of many that make up that file. + + + + + + + Values for the attribute 'count-type'. + + + + + Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts. + + + + + Indicates the count units are translation units existing already in the same document. + + + + + Indicates a total count. + + + + + + + Values for the attribute 'ctype' when used other elements than <ph> or <x>. + + + + + Indicates a run of bolded text. + + + + + Indicates a run of text in italics. + + + + + Indicates a run of underlined text. + + + + + Indicates a run of hyper-text. + + + + + + + Values for the attribute 'ctype' when used with <ph> or <x>. + + + + + Indicates a inline image. + + + + + Indicates a page break. + + + + + Indicates a line break. + + + + + + + + + + + + Values for the attribute 'datatype'. + + + + + Indicates Active Server Page data. + + + + + Indicates C source file data. + + + + + Indicates Channel Definition Format (CDF) data. + + + + + Indicates ColdFusion data. + + + + + Indicates C++ source file data. + + + + + Indicates C-Sharp data. + + + + + Indicates strings from C, ASM, and driver files data. + + + + + Indicates comma-separated values data. + + + + + Indicates database data. + + + + + Indicates portions of document that follows data and contains metadata. + + + + + Indicates portions of document that precedes data and contains metadata. + + + + + Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import). + + + + + Indicates standard user input screen data. + + + + + Indicates HyperText Markup Language (HTML) data - document instance. + + + + + Indicates content within an HTML document’s <body> element. + + + + + Indicates Windows INI file data. + + + + + Indicates Interleaf data. + + + + + Indicates Java source file data (extension '.java'). + + + + + Indicates Java property resource bundle data. + + + + + Indicates Java list resource bundle data. + + + + + Indicates JavaScript source file data. + + + + + Indicates JScript source file data. + + + + + Indicates information relating to formatting. + + + + + Indicates LISP source file data. + + + + + Indicates information relating to margin formats. + + + + + Indicates a file containing menu. + + + + + Indicates numerically identified string table. + + + + + Indicates Maker Interchange Format (MIF) data. + + + + + Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute. + + + + + Indicates GNU Machine Object data. + + + + + Indicates Message Librarian strings created by Novell's Message Librarian Tool. + + + + + Indicates information to be displayed at the bottom of each page of a document. + + + + + Indicates information to be displayed at the top of each page of a document. + + + + + Indicates a list of property values (e.g., settings within INI files or preferences dialog). + + + + + Indicates Pascal source file data. + + + + + Indicates Hypertext Preprocessor data. + + + + + Indicates plain text file (no formatting other than, possibly, wrapping). + + + + + Indicates GNU Portable Object file. + + + + + Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc. + + + + + Indicates Windows .NET binary resources. + + + + + Indicates Windows .NET Resources. + + + + + Indicates Rich Text Format (RTF) data. + + + + + Indicates Standard Generalized Markup Language (SGML) data - document instance. + + + + + Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD). + + + + + Indicates Scalable Vector Graphic (SVG) data. + + + + + Indicates VisualBasic Script source file. + + + + + Indicates warning message. + + + + + Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file). + + + + + Indicates Extensible HyperText Markup Language (XHTML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD). + + + + + Indicates Extensible Stylesheet Language (XSL) data. + + + + + Indicates XUL elements. + + + + + + + Values for the attribute 'mtype'. + + + + + Indicates the marked text is an abbreviation. + + + + + ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept. + + + + + ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective'). + + + + + ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging'). + + + + + ISO-12620: A proper-name term, such as the name of an agency or other proper entity. + + + + + ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another. + + + + + ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language. + + + + + Indicates the marked text is a date and/or time. + + + + + ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign. + + + + + ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form. + + + + + ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula. + + + + + ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record. + + + + + ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy'). + + + + + ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body. + + + + + ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages. + + + + + ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like. + + + + + ISO-12620 2.1.17: A unit to track object. + + + + + Indicates the marked text is a name. + + + + + ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others. + + + + + ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system. + + + + + Indicates the marked text is a phrase. + + + + + ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase. + + + + + Indicates the marked text should not be translated. + + + + + ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet. + + + + + Indicates that the marked text represents a segment. + + + + + ISO-12620 2.1.18.2: A fixed, lexicalized phrase. + + + + + ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs'). + + + + + ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system. + + + + + ISO-12620 2.1.19: A fixed chunk of recurring text. + + + + + ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof. + + + + + ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry. + + + + + ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language. + + + + + Indicates the marked text is a term. + + + + + ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted. + + + + + ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system. + + + + + ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza'). + + + + + ISO-12620 2.1.9: One of the alternate forms of a term. + + + + + + + Values for the attribute 'restype'. + + + + + Indicates a Windows RC AUTO3STATE control. + + + + + Indicates a Windows RC AUTOCHECKBOX control. + + + + + Indicates a Windows RC AUTORADIOBUTTON control. + + + + + Indicates a Windows RC BEDIT control. + + + + + Indicates a bitmap, for example a BITMAP resource in Windows. + + + + + Indicates a button object, for example a BUTTON control Windows. + + + + + Indicates a caption, such as the caption of a dialog box. + + + + + Indicates the cell in a table, for example the content of the <td> element in HTML. + + + + + Indicates check box object, for example a CHECKBOX control in Windows. + + + + + Indicates a menu item with an associated checkbox. + + + + + Indicates a list box, but with a check-box for each item. + + + + + Indicates a color selection dialog. + + + + + Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows. + + + + + Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234). + + + + + Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403). + + + + + Indicates a UI base class element that cannot be represented by any other element. + + + + + Indicates a context menu. + + + + + Indicates a Windows RC CTEXT control. + + + + + Indicates a cursor, for example a CURSOR resource in Windows. + + + + + Indicates a date/time picker. + + + + + Indicates a Windows RC DEFPUSHBUTTON control. + + + + + Indicates a dialog box. + + + + + Indicates a Windows RC DLGINIT resource block. + + + + + Indicates an edit box object, for example an EDIT control in Windows. + + + + + Indicates a filename. + + + + + Indicates a file dialog. + + + + + Indicates a footnote. + + + + + Indicates a font name. + + + + + Indicates a footer. + + + + + Indicates a frame object. + + + + + Indicates a XUL grid element. + + + + + Indicates a groupbox object, for example a GROUPBOX control in Windows. + + + + + Indicates a header item. + + + + + Indicates a heading, such has the content of <h1>, <h2>, etc. in HTML. + + + + + Indicates a Windows RC HEDIT control. + + + + + Indicates a horizontal scrollbar. + + + + + Indicates an icon, for example an ICON resource in Windows. + + + + + Indicates a Windows RC IEDIT control. + + + + + Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF. + + + + + Indicates a label object. + + + + + Indicates a label that is also a HTML link (not necessarily a URL). + + + + + Indicates a list (a group of list-items, for example an <ol> or <ul> element in HTML). + + + + + Indicates a listbox object, for example an LISTBOX control in Windows. + + + + + Indicates an list item (an entry in a list). + + + + + Indicates a Windows RC LTEXT control. + + + + + Indicates a menu (a group of menu-items). + + + + + Indicates a toolbar containing one or more tope level menus. + + + + + Indicates a menu item (an entry in a menu). + + + + + Indicates a XUL menuseparator element. + + + + + Indicates a message, for example an entry in a MESSAGETABLE resource in Windows. + + + + + Indicates a calendar control. + + + + + Indicates an edit box beside a spin control. + + + + + Indicates a catch all for rectangular areas. + + + + + Indicates a standalone menu not necessarily associated with a menubar. + + + + + Indicates a pushbox object, for example a PUSHBOX control in Windows. + + + + + Indicates a Windows RC PUSHBUTTON control. + + + + + Indicates a radio button object. + + + + + Indicates a menuitem with associated radio button. + + + + + Indicates raw data resources for an application. + + + + + Indicates a row in a table. + + + + + Indicates a Windows RC RTEXT control. + + + + + Indicates a user navigable container used to show a portion of a document. + + + + + Indicates a generic divider object (e.g. menu group separator). + + + + + Windows accelerators, shortcuts in resource or property files. + + + + + Indicates a UI control to indicate process activity but not progress. + + + + + Indicates a splitter bar. + + + + + Indicates a Windows RC STATE3 control. + + + + + Indicates a window for providing feedback to the users, like 'read-only', etc. + + + + + Indicates a string, for example an entry in a STRINGTABLE resource in Windows. + + + + + Indicates a layers of controls with a tab to select layers. + + + + + Indicates a display and edits regular two-dimensional tables of cells. + + + + + Indicates a XUL textbox element. + + + + + Indicates a UI button that can be toggled to on or off state. + + + + + Indicates an array of controls, usually buttons. + + + + + Indicates a pop up tool tip text. + + + + + Indicates a bar with a pointer indicating a position within a certain range. + + + + + Indicates a control that displays a set of hierarchical data. + + + + + Indicates a URI (URN or URL). + + + + + Indicates a Windows RC USERBUTTON control. + + + + + Indicates a user-defined control like CONTROL control in Windows. + + + + + Indicates the text of a variable. + + + + + Indicates version information about a resource like VERSIONINFO in Windows. + + + + + Indicates a vertical scrollbar. + + + + + Indicates a graphical window. + + + + + + + Values for the attribute 'size-unit'. + + + + + Indicates a size in 8-bit bytes. + + + + + Indicates a size in Unicode characters. + + + + + Indicates a size in columns. Used for HTML text area. + + + + + Indicates a size in centimeters. + + + + + Indicates a size in dialog units, as defined in Windows resources. + + + + + Indicates a size in 'font-size' units (as defined in CSS). + + + + + Indicates a size in 'x-height' units (as defined in CSS). + + + + + Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster' + + + + + Indicates a size in inches. + + + + + Indicates a size in millimeters. + + + + + Indicates a size in percentage. + + + + + Indicates a size in pixels. + + + + + Indicates a size in point. + + + + + Indicates a size in rows. Used for HTML text area. + + + + + + + Values for the attribute 'state'. + + + + + Indicates the terminating state. + + + + + Indicates only non-textual information needs adaptation. + + + + + Indicates both text and non-textual information needs adaptation. + + + + + Indicates only non-textual information needs review. + + + + + Indicates both text and non-textual information needs review. + + + + + Indicates that only the text of the item needs to be reviewed. + + + + + Indicates that the item needs to be translated. + + + + + Indicates that the item is new. For example, translation units that were not in a previous version of the document. + + + + + Indicates that changes are reviewed and approved. + + + + + Indicates that the item has been translated. + + + + + + + Values for the attribute 'state-qualifier'. + + + + + Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously. + + + + + Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.). + + + + + Indicates a match based on matching IDs (in addition to matching text). + + + + + Indicates a translation derived from a glossary. + + + + + Indicates a translation derived from existing translation. + + + + + Indicates a translation derived from machine translation. + + + + + Indicates a translation derived from a translation repository. + + + + + Indicates a translation derived from a translation memory. + + + + + Indicates the translation is suggested by machine translation. + + + + + Indicates that the item has been rejected because of incorrect grammar. + + + + + Indicates that the item has been rejected because it is incorrect. + + + + + Indicates that the item has been rejected because it is too long or too short. + + + + + Indicates that the item has been rejected because of incorrect spelling. + + + + + Indicates the translation is suggested by translation memory. + + + + + + + Values for the attribute 'unit'. + + + + + Refers to words. + + + + + Refers to pages. + + + + + Refers to <trans-unit> elements. + + + + + Refers to <bin-unit> elements. + + + + + Refers to glyphs. + + + + + Refers to <trans-unit> and/or <bin-unit> elements. + + + + + Refers to the occurrences of instances defined by the count-type value. + + + + + Refers to characters. + + + + + Refers to lines. + + + + + Refers to sentences. + + + + + Refers to paragraphs. + + + + + Refers to segments. + + + + + Refers to placeables (inline elements). + + + + + + + Values for the attribute 'priority'. + + + + + Highest priority. + + + + + High priority. + + + + + High priority, but not as important as 2. + + + + + High priority, but not as important as 3. + + + + + Medium priority, but more important than 6. + + + + + Medium priority, but less important than 5. + + + + + Low priority, but more important than 8. + + + + + Low priority, but more important than 9. + + + + + Low priority. + + + + + Lowest priority. + + + + + + + + + This value indicates that all properties can be reformatted. This value must be used alone. + + + + + This value indicates that no properties should be reformatted. This value must be used alone. + + + + + + + + + + + + + This value indicates that all information in the coord attribute can be modified. + + + + + This value indicates that the x information in the coord attribute can be modified. + + + + + This value indicates that the y information in the coord attribute can be modified. + + + + + This value indicates that the cx information in the coord attribute can be modified. + + + + + This value indicates that the cy information in the coord attribute can be modified. + + + + + This value indicates that all the information in the font attribute can be modified. + + + + + This value indicates that the name information in the font attribute can be modified. + + + + + This value indicates that the size information in the font attribute can be modified. + + + + + This value indicates that the weight information in the font attribute can be modified. + + + + + This value indicates that the information in the css-style attribute can be modified. + + + + + This value indicates that the information in the style attribute can be modified. + + + + + This value indicates that the information in the exstyle attribute can be modified. + + + + + + + + + + + + + Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document. + + + + + Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed. + + + + + Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed. + + + + + + + + + Represents a translation proposal from a translation memory or other resource. + + + + + Represents a previous version of the target element. + + + + + Represents a rejected version of the target element. + + + + + Represents a translation to be used for reference purposes only, for example from a related product or a different language. + + + + + Represents a proposed translation that was used for the translation of the trans-unit, possibly modified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Values for the attribute 'coord'. + + + + + + + + Version values: 1.0 and 1.1 are allowed for backward compatibility. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd new file mode 100644 index 0000000..963232f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xliff-core-2.0.xsd @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd new file mode 100644 index 0000000..a46162a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Loader/schema/dic/xliff-core/xml.xsd @@ -0,0 +1,309 @@ + + + + + + +
+

About the XML namespace

+ +
+

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

+

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

+ +

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

+

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

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

lang (as an attribute name)

+

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

+ +
+
+

Notes

+

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

+

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

+

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

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

space (as an attribute name)

+

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

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

base (as an attribute name)

+

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

+ +

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

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

id (as an attribute name)

+

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

+ +

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

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

Father (in any context at all)

+ +
+

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

+
+

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

+
+
+
+
+
+ + + + +
+

About this schema document

+ +
+

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

+ +

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

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

+ or +

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

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

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

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

+ +
+
+
+
+ + + +
+

Versioning policy for this schema document

+ +
+

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

+

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

+ +

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

+

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

+ +
+
+
+
+ +
diff --git a/public/system/storage/vendor/symfony/translation/LoggingTranslator.php b/public/system/storage/vendor/symfony/translation/LoggingTranslator.php new file mode 100644 index 0000000..fa5c5cc --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/LoggingTranslator.php @@ -0,0 +1,124 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +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())); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/MessageCatalogue.php b/public/system/storage/vendor/symfony/translation/MessageCatalogue.php new file mode 100644 index 0000000..dd354a8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageCatalogue.php @@ -0,0 +1,270 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php b/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php new file mode 100644 index 0000000..b1b516d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageCatalogueInterface.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +use Symfony\Component\Config\Resource\ResourceInterface; + +/** + * MessageCatalogueInterface. + * + * @author Fabien Potencier + */ +interface MessageCatalogueInterface +{ + /** + * Gets the catalogue locale. + * + * @return string The locale + */ + public function getLocale(); + + /** + * Gets the domains. + * + * @return array An array of domains + */ + public function getDomains(); + + /** + * Gets the messages within a given domain. + * + * If $domain is null, it returns all messages. + * + * @param string $domain The domain name + * + * @return array An array of messages + */ + public function all($domain = null); + + /** + * Sets a message translation. + * + * @param string $id The message id + * @param string $translation The messages translation + * @param string $domain The domain name + */ + public function set($id, $translation, $domain = 'messages'); + + /** + * Checks if a message has a translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function has($id, $domain = 'messages'); + + /** + * Checks if a message has a translation (it does not take into account the fallback mechanism). + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return bool true if the message has a translation, false otherwise + */ + public function defines($id, $domain = 'messages'); + + /** + * Gets a message translation. + * + * @param string $id The message id + * @param string $domain The domain name + * + * @return string The message translation + */ + public function get($id, $domain = 'messages'); + + /** + * Sets translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function replace($messages, $domain = 'messages'); + + /** + * Adds translations for a given domain. + * + * @param array $messages An array of translations + * @param string $domain The domain name + */ + public function add($messages, $domain = 'messages'); + + /** + * Merges translations from the given Catalogue into the current one. + * + * The two catalogues must have the same locale. + * + * @param 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); +} diff --git a/public/system/storage/vendor/symfony/translation/MessageSelector.php b/public/system/storage/vendor/symfony/translation/MessageSelector.php new file mode 100644 index 0000000..bdbb0f9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MessageSelector.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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]; + } +} diff --git a/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php b/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php new file mode 100644 index 0000000..e93c6fb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/MetadataAwareInterface.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * MetadataAwareInterface. + * + * @author Fabien Potencier + */ +interface MetadataAwareInterface +{ + /** + * Gets metadata for the given domain and key. + * + * Passing an empty domain will return an array with all metadata indexed by + * domain and then by key. Passing an empty key will return an array with all + * metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + * + * @return mixed The value that was set or an array with the domains/keys or null + */ + public function getMetadata($key = '', $domain = 'messages'); + + /** + * Adds metadata to a message domain. + * + * @param string $key The key + * @param mixed $value The value + * @param string $domain The domain name + */ + public function setMetadata($key, $value, $domain = 'messages'); + + /** + * Deletes metadata for the given key and domain. + * + * Passing an empty domain will delete all metadata. Passing an empty key will + * delete all metadata for the given domain. + * + * @param string $key The key + * @param string $domain The domain name + */ + public function deleteMetadata($key = '', $domain = 'messages'); +} diff --git a/public/system/storage/vendor/symfony/translation/PluralizationRules.php b/public/system/storage/vendor/symfony/translation/PluralizationRules.php new file mode 100644 index 0000000..ef2be70 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/PluralizationRules.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * Returns the plural rules for a given locale. + * + * @author Fabien Potencier + */ +class PluralizationRules +{ + private static $rules = array(); + + /** + * Returns the plural position to use for the given locale and number. + * + * @param int $number The number + * @param string $locale The locale + * + * @return int The plural position + */ + public static function get($number, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + if (isset(self::$rules[$locale])) { + $return = call_user_func(self::$rules[$locale], $number); + + if (!is_int($return) || $return < 0) { + return 0; + } + + return $return; + } + + /* + * The plural rules are derived from code of the Zend Framework (2010-09-25), + * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). + * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + */ + switch ($locale) { + case 'az': + case 'bo': + case 'dz': + case 'id': + case 'ja': + case 'jv': + case 'ka': + case 'km': + case 'kn': + case 'ko': + case 'ms': + case 'th': + case 'tr': + case 'vi': + case 'zh': + return 0; + break; + + case 'af': + case 'bn': + case 'bg': + case 'ca': + case 'da': + case 'de': + case 'el': + case 'en': + case 'eo': + case 'es': + case 'et': + case 'eu': + case 'fa': + case 'fi': + case 'fo': + case 'fur': + case 'fy': + case 'gl': + case 'gu': + case 'ha': + case 'he': + case 'hu': + case 'is': + case 'it': + case 'ku': + case 'lb': + case 'ml': + case 'mn': + case 'mr': + case 'nah': + case 'nb': + case 'ne': + case 'nl': + case 'nn': + case 'no': + case 'om': + case 'or': + case 'pa': + case 'pap': + case 'ps': + case 'pt': + case 'so': + case 'sq': + case 'sv': + case 'sw': + case 'ta': + case 'te': + case 'tk': + case 'ur': + case 'zu': + return ($number == 1) ? 0 : 1; + + case 'am': + case 'bh': + case 'fil': + case 'fr': + case 'gun': + case 'hi': + case 'hy': + case 'ln': + case 'mg': + case 'nso': + case 'xbr': + case 'ti': + case 'wa': + return (($number == 0) || ($number == 1)) ? 0 : 1; + + case 'be': + case 'bs': + case 'hr': + case 'ru': + case 'sr': + case 'uk': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'cs': + case 'sk': + return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); + + case 'ga': + return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); + + case 'lt': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + + case 'sl': + return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); + + case 'mk': + return ($number % 10 == 1) ? 0 : 1; + + case 'mt': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); + + case 'lv': + return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); + + case 'pl': + return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); + + case 'cy': + return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); + + case 'ro': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); + + case 'ar': + return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); + + default: + return 0; + } + } + + /** + * Overrides the default plural rule for a given locale. + * + * @param callable $rule A PHP callable + * @param string $locale The locale + */ + public static function set(callable $rule, $locale) + { + if ('pt_BR' === $locale) { + // temporary set a locale for brazilian + $locale = 'xbr'; + } + + if (strlen($locale) > 3) { + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + } + + self::$rules[$locale] = $rule; + } +} diff --git a/public/system/storage/vendor/symfony/translation/README.md b/public/system/storage/vendor/symfony/translation/README.md new file mode 100644 index 0000000..46f3d1f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/README.md @@ -0,0 +1,13 @@ +Translation Component +===================== + +The Translation component provides tools to internationalize your application. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/translation/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php new file mode 100644 index 0000000..30c21af --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php new file mode 100644 index 0000000..8b51c15 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/MergeOperationTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class MergeOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array(), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $mergedCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b', 'c' => 'new_c'))); + $mergedCatalogue->setMetadata('a', 'foo', 'messages'); + $mergedCatalogue->setMetadata('b', 'bar', 'messages'); + $mergedCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $mergedCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new MergeOperation($source, $target); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php new file mode 100644 index 0000000..271d17f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Catalogue/TargetOperationTest.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Catalogue; + +use Symfony\Component\Translation\Catalogue\TargetOperation; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; + +class TargetOperationTest extends AbstractOperationTest +{ + public function testGetMessagesFromSingleDomain() + { + $operation = $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + ); + + $this->assertEquals( + array('a' => 'old_a', 'c' => 'new_c'), + $operation->getMessages('messages') + ); + + $this->assertEquals( + array('c' => 'new_c'), + $operation->getNewMessages('messages') + ); + + $this->assertEquals( + array('b' => 'old_b'), + $operation->getObsoleteMessages('messages') + ); + } + + public function testGetResultFromSingleDomain() + { + $this->assertEquals( + new MessageCatalogue('en', array( + 'messages' => array('a' => 'old_a', 'c' => 'new_c'), + )), + $this->createOperation( + new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))), + new MessageCatalogue('en', array('messages' => array('a' => 'new_a', 'c' => 'new_c'))) + )->getResult() + ); + } + + public function testGetResultWithMetadata() + { + $leftCatalogue = new MessageCatalogue('en', array('messages' => array('a' => 'old_a', 'b' => 'old_b'))); + $leftCatalogue->setMetadata('a', 'foo', 'messages'); + $leftCatalogue->setMetadata('b', 'bar', 'messages'); + $rightCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'new_b', 'c' => 'new_c'))); + $rightCatalogue->setMetadata('b', 'baz', 'messages'); + $rightCatalogue->setMetadata('c', 'qux', 'messages'); + + $diffCatalogue = new MessageCatalogue('en', array('messages' => array('b' => 'old_b', 'c' => 'new_c'))); + $diffCatalogue->setMetadata('b', 'bar', 'messages'); + $diffCatalogue->setMetadata('c', 'qux', 'messages'); + + $this->assertEquals( + $diffCatalogue, + $this->createOperation( + $leftCatalogue, + $rightCatalogue + )->getResult() + ); + } + + protected function createOperation(MessageCatalogueInterface $source, MessageCatalogueInterface $target) + { + return new TargetOperation($source, $target); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php b/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php new file mode 100644 index 0000000..3d1e86e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 3), + 'transChoiceNumber' => 3, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array('%count%' => 4, '%foo%' => 'bar'), + 'transChoiceNumber' => 4, + ), + ); + $expectedMessages = array( + array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'count' => 1, + 'parameters' => array(), + 'transChoiceNumber' => null, + ), + array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'count' => 3, + 'parameters' => array( + array('%count%' => 3), + array('%count%' => 3), + array('%count%' => 4, '%foo%' => 'bar'), + ), + 'transChoiceNumber' => 3, + ), + ); + + $translator = $this->getTranslator(); + $translator->expects($this->any())->method('getCollectedMessages')->will($this->returnValue($collectedMessages)); + + $dataCollector = new TranslationDataCollector($translator); + $dataCollector->lateCollect(); + + $this->assertEquals(1, $dataCollector->getCountMissings()); + $this->assertEquals(1, $dataCollector->getCountFallbacks()); + $this->assertEquals(1, $dataCollector->getCountDefines()); + $this->assertEquals($expectedMessages, array_values($dataCollector->getMessages())); + } + + private function getTranslator() + { + $translator = $this + ->getMockBuilder('Symfony\Component\Translation\DataCollectorTranslator') + ->disableOriginalConstructor() + ->getMock() + ; + + return $translator; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php new file mode 100644 index 0000000..5ef8171 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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'); + $collector->trans('bar_ru', array('foo' => 'bar')); + + $expectedMessages = array(); + $expectedMessages[] = array( + 'id' => 'foo', + 'translation' => 'foo (en)', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_DEFINED, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar', + 'translation' => 'bar (fr)', + 'locale' => 'fr', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'choice', + 'translation' => 'choice', + 'locale' => 'en', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_MISSING, + 'parameters' => array(), + 'transChoiceNumber' => 0, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array(), + 'transChoiceNumber' => null, + ); + $expectedMessages[] = array( + 'id' => 'bar_ru', + 'translation' => 'bar (ru)', + 'locale' => 'ru', + 'domain' => 'messages', + 'state' => DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK, + 'parameters' => array('foo' => 'bar'), + 'transChoiceNumber' => null, + ); + + $this->assertEquals($expectedMessages, $collector->getCollectedMessages()); + } + + private function createCollector() + { + $translator = new Translator('en'); + $translator->addLoader('array', new ArrayLoader()); + $translator->addResource('array', array('foo' => 'foo (en)'), 'en'); + $translator->addResource('array', array('bar' => 'bar (fr)'), 'fr'); + $translator->addResource('array', array('bar_ru' => 'bar (ru)'), 'ru'); + + $collector = new DataCollectorTranslator($translator); + + return $collector; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php new file mode 100644 index 0000000..9613192 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\CsvFileDumper; + +class CsvFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar', 'bar' => 'foo +foo', 'foo;foo' => 'bar')); + + $dumper = new CsvFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/valid.csv', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php new file mode 100644 index 0000000..ed58546 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\FileDumper; + +class FileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testDump() + { + $tempDir = sys_get_temp_dir(); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($tempDir.'/messages.en.concrete')); + } + + 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 +{ + public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) + { + return ''; + } + + protected function getExtension() + { + return 'concrete'; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php new file mode 100644 index 0000000..618783c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IcuResFileDumper; + +class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IcuResFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resourcebundle/res/en.res', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php new file mode 100644 index 0000000..d8ae4b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\IniFileDumper; + +class IniFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new IniFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ini', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php new file mode 100644 index 0000000..27e9f4d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\JsonFileDumper; + +class JsonFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.json', $dumper->formatCatalogue($catalogue, 'messages')); + } + + public function testDumpWithCustomEncoding() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => '"bar"')); + + $dumper = new JsonFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', array('json_encoding' => JSON_HEX_QUOT))); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php new file mode 100644 index 0000000..c47656c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\MoFileDumper; + +class MoFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new MoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.mo', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php new file mode 100644 index 0000000..d24cd2b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PhpFileDumper; + +class PhpFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PhpFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.php', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php new file mode 100644 index 0000000..445961a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\PoFileDumper; + +class PoFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new PoFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.po', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php new file mode 100644 index 0000000..690a4d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\QtFileDumper; + +class QtFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar'), 'resources'); + + $dumper = new QtFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.ts', $dumper->formatCatalogue($catalogue, 'resources')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php new file mode 100644 index 0000000..072b605 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\XliffFileDumper; + +class XliffFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testFormatCatalogue() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => ' & ', + )); + $catalogue->setMetadata('foo', array('notes' => array(array('priority' => 1, 'from' => 'bar', 'content' => 'baz')))); + $catalogue->setMetadata('key', array('notes' => array(array('content' => 'baz'), array('content' => 'qux')))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } + + public function testFormatCatalogueXliff2() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'key' => '', + 'key.with.cdata' => ' & ', + )); + $catalogue->setMetadata('key', array('target-attributes' => array('order' => 1))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-2.0-clean.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + ); + } + + public function testFormatCatalogueWithCustomToolInfo() + { + $options = array( + 'default_locale' => 'en_US', + 'tool_info' => array('tool-id' => 'foo', 'tool-name' => 'foo', 'tool-version' => '0.0', 'tool-company' => 'Foo'), + ); + + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-tool-info.xlf', + $dumper->formatCatalogue($catalogue, 'messages', $options) + ); + } + + public function testFormatCatalogueWithTargetAttributesMetadata() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + )); + $catalogue->setMetadata('foo', array('target-attributes' => array('state' => 'needs-translation'))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-target-attributes.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php b/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php new file mode 100644 index 0000000..d6bb477 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\YamlFileDumper; + +class YamlFileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testTreeFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages.yml', $dumper->formatCatalogue($catalogue, 'messages', array('as_tree' => true, 'inline' => 999))); + } + + public function testLinearFormatCatalogue() + { + $catalogue = new MessageCatalogue('en'); + $catalogue->add( + array( + 'foo.bar1' => 'value1', + 'foo.bar2' => 'value2', + )); + + $dumper = new YamlFileDumper(); + + $this->assertStringEqualsFile(__DIR__.'/../fixtures/messages_linear.yml', $dumper->formatCatalogue($catalogue, 'messages')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php new file mode 100644 index 0000000..352dd31 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/IdentityTranslatorTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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)), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php b/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php new file mode 100644 index 0000000..075c98b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/IntervalTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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]'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php new file mode 100644 index 0000000..463d3b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php new file mode 100644 index 0000000..888fb61 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuDatFileLoader; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @requires extension intl + */ +class IcuDatFileLoaderTest extends LocalizedTestCase +{ + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted/resources', 'es', 'domain2'); + } + + public function testDatEnglishLoad() + { + // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form + // you must specify an temporary build directory which is not the same as current directory and + // MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 is great'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + public function testDatFrenchLoad() + { + $loader = new IcuDatFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; + $catalogue = $loader->load($resource, 'fr', 'domain1'); + + $this->assertEquals(array('symfony' => 'Symfony 2 est génial'), $catalogue->all('domain1')); + $this->assertEquals('fr', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource.'.dat')), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuDatFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php new file mode 100644 index 0000000..8d9ed19 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use Symfony\Component\Translation\Loader\IcuResFileLoader; +use Symfony\Component\Config\Resource\DirectoryResource; + +/** + * @requires extension intl + */ +class IcuResFileLoaderTest extends LocalizedTestCase +{ + public function testLoad() + { + // resource is build using genrb command + $loader = new IcuResFileLoader(); + $resource = __DIR__.'/../fixtures/resourcebundle/res'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar'), $catalogue->all('domain1')); + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new DirectoryResource($resource)), $catalogue->getResources()); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new IcuResFileLoader(); + $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php new file mode 100644 index 0000000..1a5de0e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use 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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php new file mode 100644 index 0000000..cd5d633 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use 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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php new file mode 100644 index 0000000..0d1fff7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase +{ + protected function setUp() + { + if (!extension_loaded('intl')) { + $this->markTestSkipped('Extension intl is required.'); + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php new file mode 100644 index 0000000..34078d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Loader; + +use 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()); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php new file mode 100644 index 0000000..0816b0f --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php new file mode 100644 index 0000000..5d340c7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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"']); + } + + public function testSkipFuzzyTranslations() + { + $loader = new PoFileLoader(); + $resource = __DIR__.'/../fixtures/fuzzy-translations.po'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $messages = $catalogue->all('domain1'); + $this->assertArrayHasKey('foo1', $messages); + $this->assertArrayNotHasKey('foo2', $messages); + $this->assertArrayHasKey('foo3', $messages); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php new file mode 100644 index 0000000..3aca86a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php new file mode 100644 index 0000000..2f466d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 testLoadWithExternalEntitiesDisabled() + { + $disableEntities = libxml_disable_entity_loader(true); + + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + libxml_disable_entity_loader($disableEntities); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + } + + public function testLoadWithResname() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1')); + } + + public function testIncompleteResource() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/resources.xlf', 'en', 'domain1'); + + $this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1')); + } + + public function testEncoding() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1'); + + $this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1')); + $this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1')); + $this->assertEquals(array('notes' => array(array('content' => utf8_decode('bäz')))), $catalogue->getMetadata('foo', 'domain1')); + } + + public function testTargetAttributesAreStoredCorrectly() + { + $loader = new XliffFileLoader(); + $catalogue = $loader->load(__DIR__.'/../fixtures/with-attributes.xlf', 'en', 'domain1'); + + $metadata = $catalogue->getMetadata('foo', 'domain1'); + $this->assertEquals('translated', $metadata['target-attributes']['state']); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadInvalidResource() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/resources.php', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadResourceDoesNotValidate() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/non-valid.xlf', 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException + */ + public function testLoadNonExistingResource() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/non-existing.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + */ + public function testLoadThrowsAnExceptionIfFileNotLocal() + { + $loader = new XliffFileLoader(); + $resource = 'http://example.com/resources.xlf'; + $loader->load($resource, 'en', 'domain1'); + } + + /** + * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException + * @expectedExceptionMessage Document types are not allowed. + */ + public function testDocTypeIsNotAllowed() + { + $loader = new XliffFileLoader(); + $loader->load(__DIR__.'/../fixtures/withdoctype.xlf', 'en', 'domain1'); + } + + public function testParseEmptyFile() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/empty.xlf'; + $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')); + } + + public function testLoadVersion2() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources-2.0.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + $domains = $catalogue->all(); + $this->assertCount(3, $domains['domain1']); + $this->assertContainsOnly('string', $catalogue->all('domain1')); + + // target attributes + $this->assertEquals(array('target-attributes' => array('order' => 1)), $catalogue->getMetadata('bar', 'domain1')); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php b/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000..00f7163 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php new file mode 100644 index 0000000..9f3e849 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/LoggingTranslatorTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use 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)); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php b/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php new file mode 100644 index 0000000..6f55b8c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/MessageCatalogueTest.php @@ -0,0 +1,214 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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.'); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php b/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php new file mode 100644 index 0000000..f89bed1 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/MessageSelectorTest.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php b/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php new file mode 100644 index 0000000..78bbc87 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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($langCodes); + $this->validateMatrix($nplural, $matrix, false); + } + + /** + * @dataProvider successLangcodes + */ + public function testLangcodes($nplural, $langCodes) + { + $matrix = $this->generateTestData($langCodes); + $this->validateMatrix($nplural, $matrix); + } + + /** + * This array should contain all currently known langcodes. + * + * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. + * + * @return array + */ + public function successLangcodes() + { + return array( + array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), + array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), + array('3', array('be', 'bs', 'cs', 'hr')), + array('4', array('cy', 'mt', 'sl')), + array('5', array()), + array('6', array('ar')), + ); + } + + /** + * This array should be at least empty within the near future. + * + * This both depends on a complete list trying to add above as understanding + * the plural rules of the current failing languages. + * + * @return array with nplural together with langcodes + */ + public function failingLangcodes() + { + return array( + array('1', array('fa')), + array('2', array('jbo')), + array('3', array('cbs')), + array('4', array('gd', 'kw')), + array('5', array('ga')), + array('6', array()), + ); + } + + /** + * We validate only on the plural coverage. Thus the real rules is not tested. + * + * @param string $nplural plural expected + * @param array $matrix containing langcodes and their plural index values + * @param bool $expectSuccess + */ + protected function validateMatrix($nplural, $matrix, $expectSuccess = true) + { + foreach ($matrix as $langCode => $data) { + $indexes = array_flip($data); + if ($expectSuccess) { + $this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } else { + $this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + } + } + } + + protected function generateTestData($langCodes) + { + $matrix = array(); + foreach ($langCodes as $langCode) { + for ($count = 0; $count < 200; ++$count) { + $plural = PluralizationRules::get($count, $langCode); + $matrix[$langCode][$count] = $plural; + } + } + + return $matrix; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php b/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php new file mode 100644 index 0000000..7509358 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/TranslatorCacheTest.php @@ -0,0 +1,299 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests; + +use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\MessageCatalogue; + +class TranslatorCacheTest extends \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\SelfCheckingResourceInterface'); + $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 SelfCheckingResourceInterface +{ + public function isFresh($timestamp) + { + return false; + } + + public function getResource() + { + } + + public function __toString() + { + return ''; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php b/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php new file mode 100644 index 0000000..0f65d3e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/TranslatorTest.php @@ -0,0 +1,533 @@ + + * + * 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))); + } +} + +class StringClass +{ + protected $str; + + public function __construct($str) + { + $this->str = $str; + } + + public function __toString() + { + return $this->str; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php b/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php new file mode 100644 index 0000000..9eea275 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Util/ArrayConverterTest.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Util; + +use Symfony\Component\Translation\Util\ArrayConverter; + +class ArrayConverterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider messsagesData + */ + public function testDump($input, $expectedOutput) + { + $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input)); + } + + public function messsagesData() + { + return array( + array( + // input + array( + 'foo1' => 'bar', + 'foo.bar' => 'value', + ), + // expected output + array( + 'foo1' => 'bar', + 'foo' => array('bar' => 'value'), + ), + ), + array( + // input + array( + 'foo.bar' => 'value1', + 'foo.bar.test' => 'value2', + ), + // expected output + array( + 'foo' => array( + 'bar' => 'value1', + 'bar.test' => 'value2', + ), + ), + ), + array( + // input + array( + 'foo.level2.level3.level4' => 'value1', + 'foo.level2' => 'value2', + 'foo.bar' => 'value3', + ), + // expected output + array( + 'foo' => array( + 'level2' => 'value2', + 'level2.level3.level4' => 'value1', + 'bar' => 'value3', + ), + ), + ), + ); + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php b/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php new file mode 100644 index 0000000..f7a8a83 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Writer; + +use Symfony\Component\Translation\Dumper\DumperInterface; +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() + { + $nonBackupDumper = new NonBackupDumper(); + $backupDumper = new BackupDumper(); + + $writer = new TranslationWriter(); + $writer->addDumper('non_backup', $nonBackupDumper); + $writer->addDumper('backup', $backupDumper); + $writer->disableBackup(); + + $this->assertFalse($backupDumper->backup, 'backup can be disabled if setBackup() method does exist'); + } +} + +class NonBackupDumper implements DumperInterface +{ + public function dump(MessageCatalogue $messages, $options = array()) + { + } +} + +class BackupDumper implements DumperInterface +{ + public $backup = true; + + public function dump(MessageCatalogue $messages, $options = array()) + { + } + + public function setBackup($backup) + { + $this->backup = $backup; + } +} diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo new file mode 100644 index 0000000..ed01000 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.mo differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po new file mode 100644 index 0000000..ff6f22a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty-translation.po @@ -0,0 +1,3 @@ +msgid "foo" +msgstr "" + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.csv new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.ini new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.json new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.mo new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.po new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.xlf new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/empty.yml new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf new file mode 100644 index 0000000..0a88f92 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/encoding.xlf @@ -0,0 +1,16 @@ + + + + + + foo + bär + bäz + + + bar + föö + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po new file mode 100644 index 0000000..c412aa2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id-plurals.po @@ -0,0 +1,10 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgid_plural "escaped \"foos\"" +msgstr[0] "escaped \"bar\"" +msgstr[1] "escaped \"bars\"" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po new file mode 100644 index 0000000..308eadd --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/escaped-id.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "escaped \"foo\"" +msgstr "escaped \"bar\"" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po new file mode 100644 index 0000000..04d4047 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/fuzzy-translations.po @@ -0,0 +1,10 @@ +#, php-format +msgid "foo1" +msgstr "bar1" + +#, fuzzy, php-format +msgid "foo2" +msgstr "fuzzy bar2" + +msgid "foo3" +msgstr "bar3" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf new file mode 100644 index 0000000..7bf6c98 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/invalid-xml-resources.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + extra + + + key + + + + test + with + note + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json new file mode 100644 index 0000000..4563ec6 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/malformed.json @@ -0,0 +1,3 @@ +{ + "foo" "bar" +} \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml new file mode 100644 index 0000000..d4f82d7 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages.yml @@ -0,0 +1,3 @@ +foo: + bar1: value1 + bar2: value2 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml new file mode 100644 index 0000000..6c1687d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/messages_linear.yml @@ -0,0 +1,2 @@ +foo.bar1: value1 +foo.bar2: value2 diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf new file mode 100644 index 0000000..734fc97 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.xlf @@ -0,0 +1,11 @@ + + + + + + foo + bar + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/non-valid.yml @@ -0,0 +1 @@ +foo diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo new file mode 100644 index 0000000..6445e77 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.mo differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po new file mode 100644 index 0000000..439c41a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/plurals.po @@ -0,0 +1,5 @@ +msgid "foo" +msgid_plural "foos" +msgstr[0] "bar" +msgstr[1] "bars" + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf new file mode 100644 index 0000000..2df16af --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resname.xlf @@ -0,0 +1,19 @@ + + + + + + + bar + + + bar source + baz + + + baz + foo + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat new file mode 100644 index 0000000..391250c --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/corrupted/resources.dat @@ -0,0 +1 @@ +XXX \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res new file mode 100644 index 0000000..1fc1436 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.res differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt new file mode 100644 index 0000000..3d9e9ea --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/en.txt @@ -0,0 +1,3 @@ +en{ + symfony{"Symfony is great"} +} \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res new file mode 100644 index 0000000..f584160 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.res differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt new file mode 100644 index 0000000..182d0a0 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/fr.txt @@ -0,0 +1,3 @@ +fr{ + symfony{"Symfony est génial"} +} \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt new file mode 100644 index 0000000..c5783ed --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/packagelist.txt @@ -0,0 +1,2 @@ +en.res +fr.res diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat new file mode 100644 index 0000000..563b0ea Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/dat/resources.dat differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res new file mode 100644 index 0000000..ad894a9 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resourcebundle/res/en.res differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf new file mode 100644 index 0000000..2efa155 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + + + key + + + + + + key.with.cdata + & ]]> + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf new file mode 100644 index 0000000..166172a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-2.0.xlf @@ -0,0 +1,25 @@ + + + + + + Quetzal + Quetzal + + + + + + foo + XLIFF 文書を編集ã€ã¾ãŸã¯å‡¦ç† ã™ã‚‹ã‚¢ãƒ—リケーションã§ã™ã€‚ + + + + + bar + XLIFF データ・マãƒãƒ¼ã‚¸ãƒ£ + + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf new file mode 100644 index 0000000..436e19e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf @@ -0,0 +1,25 @@ + + + +
+ +
+ + + foo + bar + baz + + + key + + baz + qux + + + key.with.cdata + & ]]> + + +
+
diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf new file mode 100644 index 0000000..e3afb49 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf @@ -0,0 +1,14 @@ + + + +
+ +
+ + + foo + bar + + +
+
diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf new file mode 100644 index 0000000..1ed06d2 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf @@ -0,0 +1,14 @@ + + + +
+ +
+ + + foo + bar + + +
+
diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv new file mode 100644 index 0000000..374b9eb --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.csv @@ -0,0 +1,4 @@ +"foo"; "bar" +#"bar"; "foo" +"incorrect"; "number"; "columns"; "will"; "be"; "ignored" +"incorrect" \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json new file mode 100644 index 0000000..335965d --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.dump.json @@ -0,0 +1 @@ +{"foo":"\u0022bar\u0022"} \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini new file mode 100644 index 0000000..4953062 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ini @@ -0,0 +1 @@ +foo="bar" diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json new file mode 100644 index 0000000..8a79687 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +} \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo new file mode 100644 index 0000000..0a96602 Binary files /dev/null and b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.mo differ diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php new file mode 100644 index 0000000..c291398 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.php @@ -0,0 +1,5 @@ + 'bar', +); diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po new file mode 100644 index 0000000..ccfce6b --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.po @@ -0,0 +1,8 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" + +msgid "foo" +msgstr "bar" \ No newline at end of file diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts new file mode 100644 index 0000000..40e1852 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.ts @@ -0,0 +1,10 @@ + + + + resources + + foo + bar + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf new file mode 100644 index 0000000..b0e5988 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.xlf @@ -0,0 +1,23 @@ + + + + + + foo + bar + + + extra + + + key + + + + test + with + note + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml new file mode 100644 index 0000000..20e9ff3 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/resources.yml @@ -0,0 +1 @@ +foo: bar diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv b/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv new file mode 100644 index 0000000..59882e5 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/valid.csv @@ -0,0 +1,4 @@ +foo;bar +bar;"foo +foo" +"foo;foo";bar diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf new file mode 100644 index 0000000..7873062 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/with-attributes.xlf @@ -0,0 +1,21 @@ + + + + + + foo + bar + + + extra + bar + + + key + + baz + qux + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf new file mode 100644 index 0000000..f83e834 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withdoctype.xlf @@ -0,0 +1,12 @@ + + + + + + + foo + bar + + + + diff --git a/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf new file mode 100644 index 0000000..b1d3f83 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Tests/fixtures/withnote.xlf @@ -0,0 +1,22 @@ + + + + + + foo + bar + foo + + + extra + bar + + + key + + baz + qux + + + + diff --git a/public/system/storage/vendor/symfony/translation/Translator.php b/public/system/storage/vendor/symfony/translation/Translator.php new file mode 100644 index 0000000..309a2b8 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Translator.php @@ -0,0 +1,441 @@ + + * + * 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 + */ + private $locale; + + /** + * @var array + */ + private $fallbackLocales = array(); + + /** + * @var LoaderInterface[] + */ + private $loaders = array(); + + /** + * @var array + */ + private $resources = array(); + + /** + * @var MessageSelector + */ + private $selector; + + /** + * @var string + */ + private $cacheDir; + + /** + * @var bool + */ + private $debug; + + /** + * @var ConfigCacheFactoryInterface|null + */ + private $configCacheFactory; + + /** + * Constructor. + * + * @param string $locale The locale + * @param MessageSelector|null $selector The message selector for pluralization + * @param string|null $cacheDir The directory to use for the cache + * @param bool $debug Use cache in debug mode ? + * + * @throws \InvalidArgumentException If a locale contains invalid characters + */ + public function __construct($locale, MessageSelector $selector = null, $cacheDir = null, $debug = false) + { + $this->setLocale($locale); + $this->selector = $selector ?: new MessageSelector(); + $this->cacheDir = $cacheDir; + $this->debug = $debug; + } + + /** + * Sets the ConfigCache factory to use. + * + * @param ConfigCacheFactoryInterface $configCacheFactory + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->configCacheFactory = $configCacheFactory; + } + + /** + * Adds a Loader. + * + * @param string $format The name of the loader (@see addResource()) + * @param LoaderInterface $loader A LoaderInterface instance + */ + public function addLoader($format, LoaderInterface $loader) + { + $this->loaders[$format] = $loader; + } + + /** + * Adds a Resource. + * + * @param string $format The name of the loader (@see addLoader()) + * @param mixed $resource The resource name + * @param string $locale The locale + * @param string $domain The domain + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function addResource($format, $resource, $locale, $domain = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $this->assertValidLocale($locale); + + $this->resources[$locale][] = array($format, $resource, $domain); + + if (in_array($locale, $this->fallbackLocales)) { + $this->catalogues = array(); + } else { + unset($this->catalogues[$locale]); + } + } + + /** + * {@inheritdoc} + */ + public function setLocale($locale) + { + $this->assertValidLocale($locale); + $this->locale = $locale; + } + + /** + * {@inheritdoc} + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Sets the fallback locales. + * + * @param array $locales The fallback locales + * + * @throws \InvalidArgumentException If a locale contains invalid characters + */ + public function setFallbackLocales(array $locales) + { + // needed as the fallback locales are linked to the already loaded catalogues + $this->catalogues = array(); + + foreach ($locales as $locale) { + $this->assertValidLocale($locale); + } + + $this->fallbackLocales = $locales; + } + + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + return $this->fallbackLocales; + } + + /** + * {@inheritdoc} + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + return strtr($this->getCatalogue($locale)->get((string) $id, $domain), $parameters); + } + + /** + * {@inheritdoc} + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) + { + if (null === $domain) { + $domain = 'messages'; + } + + $id = (string) $id; + $catalogue = $this->getCatalogue($locale); + $locale = $catalogue->getLocale(); + while (!$catalogue->defines($id, $domain)) { + if ($cat = $catalogue->getFallbackCatalogue()) { + $catalogue = $cat; + $locale = $catalogue->getLocale(); + } else { + break; + } + } + + return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters); + } + + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + if (null === $locale) { + $locale = $this->getLocale(); + } else { + $this->assertValidLocale($locale); + } + + if (!isset($this->catalogues[$locale])) { + $this->loadCatalogue($locale); + } + + return $this->catalogues[$locale]; + } + + /** + * Gets the loaders. + * + * @return array LoaderInterface[] + */ + protected function getLoaders() + { + return $this->loaders; + } + + /** + * @param string $locale + */ + protected function loadCatalogue($locale) + { + if (null === $this->cacheDir) { + $this->initializeCatalogue($locale); + } else { + $this->initializeCacheCatalogue($locale); + } + } + + /** + * @param string $locale + */ + protected function initializeCatalogue($locale) + { + $this->assertValidLocale($locale); + + try { + $this->doLoadCatalogue($locale); + } catch (NotFoundResourceException $e) { + if (!$this->computeFallbackLocales($locale)) { + throw $e; + } + } + $this->loadFallbackCatalogues($locale); + } + + /** + * @param string $locale + */ + private function initializeCacheCatalogue($locale) + { + if (isset($this->catalogues[$locale])) { + /* Catalogue already initialized. */ + return; + } + + $this->assertValidLocale($locale); + $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), + function (ConfigCacheInterface $cache) use ($locale) { + $this->dumpCatalogue($locale, $cache); + } + ); + + if (isset($this->catalogues[$locale])) { + /* Catalogue has been initialized as it was written out to cache. */ + return; + } + + /* Read catalogue from cache. */ + $this->catalogues[$locale] = include $cache->getPath(); + } + + private function dumpCatalogue($locale, ConfigCacheInterface $cache) + { + $this->initializeCatalogue($locale); + $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); + + $content = sprintf(<<catalogues[$locale]->all(), true), + $fallbackContent + ); + + $cache->write($content, $this->catalogues[$locale]->getResources()); + } + + private function getFallbackContent(MessageCatalogue $catalogue) + { + $fallbackContent = ''; + $current = ''; + $replacementPattern = '/[^a-z0-9_]/i'; + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); + while ($fallbackCatalogue) { + $fallback = $fallbackCatalogue->getLocale(); + $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); + $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); + + $fallbackContent .= sprintf(<<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; + } +} diff --git a/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php b/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php new file mode 100644 index 0000000..14fbb17 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/TranslatorBagInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * TranslatorBagInterface. + * + * @author Abdellatif Ait boudad + */ +interface TranslatorBagInterface +{ + /** + * Gets the catalogue by locale. + * + * @param string|null $locale The locale or null to use the default + * + * @return MessageCatalogueInterface + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function getCatalogue($locale = null); +} diff --git a/public/system/storage/vendor/symfony/translation/TranslatorInterface.php b/public/system/storage/vendor/symfony/translation/TranslatorInterface.php new file mode 100644 index 0000000..6916c33 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/TranslatorInterface.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation; + +/** + * TranslatorInterface. + * + * @author Fabien Potencier + */ +interface TranslatorInterface +{ + /** + * Translates the given message. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function trans($id, array $parameters = array(), $domain = null, $locale = null); + + /** + * Translates the given choice message by choosing a translation according to a number. + * + * @param string $id The message id (may also be an object that can be cast to string) + * @param int $number The number to use to find the indice of the message + * @param array $parameters An array of parameters for the message + * @param string|null $domain The domain for the message or null to use the default + * @param string|null $locale The locale or null to use the default + * + * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null); + + /** + * Sets the current locale. + * + * @param string $locale The locale + * + * @throws \InvalidArgumentException If the locale contains invalid characters + */ + public function setLocale($locale); + + /** + * Returns the current locale. + * + * @return string The locale + */ + public function getLocale(); +} diff --git a/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php b/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php new file mode 100644 index 0000000..60a55e9 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Util/ArrayConverter.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Util; + +/** + * ArrayConverter generates tree like structure from a message catalogue. + * e.g. this + * 'foo.bar1' => 'test1', + * 'foo.bar2' => 'test2' + * converts to follows: + * foo: + * bar1: test1 + * bar2: test2. + * + * @author Gennady Telegin + */ +class ArrayConverter +{ + /** + * Converts linear messages array to tree-like array. + * For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')). + * + * @param array $messages Linear messages array + * + * @return array Tree-like messages array + */ + public static function expandToTree(array $messages) + { + $tree = array(); + + foreach ($messages as $id => $value) { + $referenceToElement = &self::getElementByPath($tree, explode('.', $id)); + + $referenceToElement = $value; + + unset($referenceToElement); + } + + return $tree; + } + + private static function &getElementByPath(array &$tree, array $parts) + { + $elem = &$tree; + $parentOfElem = null; + + foreach ($parts as $i => $part) { + if (isset($elem[$part]) && is_string($elem[$part])) { + /* Process next case: + * 'foo': 'test1', + * 'foo.bar': 'test2' + * + * $tree['foo'] was string before we found array {bar: test2}. + * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; + */ + $elem = &$elem[ implode('.', array_slice($parts, $i)) ]; + break; + } + $parentOfElem = &$elem; + $elem = &$elem[$part]; + } + + if (is_array($elem) && count($elem) > 0 && $parentOfElem) { + /* Process next case: + * 'foo.bar': 'test1' + * 'foo': 'test2' + * + * $tree['foo'] was array = {bar: 'test1'} before we found string constant `foo`. + * Cancel treating $tree['foo'] as array and cancel back it expansion, + * e.g. make it $tree['foo.bar'] = 'test1' again. + */ + self::cancelExpand($parentOfElem, $part, $elem); + } + + return $elem; + } + + private static function cancelExpand(array &$tree, $prefix, array $node) + { + $prefix .= '.'; + + foreach ($node as $id => $value) { + if (is_string($value)) { + $tree[$prefix.$id] = $value; + } else { + self::cancelExpand($tree, $prefix.$id, $value); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php b/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php new file mode 100644 index 0000000..2f5eaa1 --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/Writer/TranslationWriter.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); + } +} diff --git a/public/system/storage/vendor/symfony/translation/composer.json b/public/system/storage/vendor/symfony/translation/composer.json new file mode 100644 index 0000000..916cd1a --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/composer.json @@ -0,0 +1,48 @@ +{ + "name": "symfony/translation", + "type": "library", + "description": "Symfony Translation Component", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "suggest": { + "symfony/config": "", + "symfony/yaml": "", + "psr/log": "To use logging capability in translator" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Translation\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/translation/phpunit.xml.dist b/public/system/storage/vendor/symfony/translation/phpunit.xml.dist new file mode 100644 index 0000000..c25ec5e --- /dev/null +++ b/public/system/storage/vendor/symfony/translation/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Tests + ./vendor + + + + diff --git a/public/system/storage/vendor/symfony/validator/.gitignore b/public/system/storage/vendor/symfony/validator/.gitignore new file mode 100644 index 0000000..c49a5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/public/system/storage/vendor/symfony/validator/CHANGELOG.md b/public/system/storage/vendor/symfony/validator/CHANGELOG.md new file mode 100644 index 0000000..0ff667b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/CHANGELOG.md @@ -0,0 +1,175 @@ +CHANGELOG +========= + +2.8.0 +----- + + * added the BIC (SWIFT-Code) validator + +2.7.0 +----- + + * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` + * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent + +2.6.0 +----- + + * [BC BREAK] `FileValidator` disallow empty files + * [BC BREAK] `UserPasswordValidator` source message change + * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()` + * added `ConstraintViolation::getConstraint()` + * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string + * deprecated `ClassMetadata::hasMemberMetadatas()` + * deprecated `ClassMetadata::getMemberMetadatas()` + * deprecated `ClassMetadata::addMemberMetadata()` + * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()` + * added generic "payload" option to all constraints for attaching domain-specific data + * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()` + +2.5.0 +----- + + * deprecated `ApcCache` in favor of `DoctrineCache` + * added `DoctrineCache` to adapt any Doctrine cache + * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable` + * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array + * `Callback` can now be put onto properties (useful when you pass a closure to the constraint) + * deprecated `ClassBasedInterface` + * deprecated `MetadataInterface` + * deprecated `PropertyMetadataInterface` + * deprecated `PropertyMetadataContainerInterface` + * deprecated `Mapping\ElementMetadata` + * added `Mapping\MetadataInterface` + * added `Mapping\ClassMetadataInterface` + * added `Mapping\PropertyMetadataInterface` + * added `Mapping\GenericMetadata` + * added `Mapping\CascadingStrategy` + * added `Mapping\TraversalStrategy` + * deprecated `Mapping\ClassMetadata::accept()` + * deprecated `Mapping\MemberMetadata::accept()` + * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()` + * deprecated `MetadataFactoryInterface` + * deprecated `Mapping\BlackholeMetadataFactory` + * deprecated `Mapping\ClassMetadataFactory` + * added `Mapping\Factory\MetadataFactoryInterface` + * added `Mapping\Factory\BlackHoleMetadataFactory` + * added `Mapping\Factory\LazyLoadingMetadataFactory` + * deprecated `ExecutionContextInterface` + * deprecated `ExecutionContext` + * deprecated `GlobalExecutionContextInterface` + * added `Context\ExecutionContextInterface` + * added `Context\ExecutionContext` + * added `Context\ExecutionContextFactoryInterface` + * added `Context\ExecutionContextFactory` + * deprecated `ValidatorInterface` + * deprecated `Validator` + * deprecated `ValidationVisitorInterface` + * deprecated `ValidationVisitor` + * added `Validator\ValidatorInterface` + * added `Validator\RecursiveValidator` + * added `Validator\ContextualValidatorInterface` + * added `Validator\RecursiveContextualValidator` + * added `Violation\ConstraintViolationBuilderInterface` + * added `Violation\ConstraintViolationBuilder` + * added `ConstraintViolation::getParameters()` + * added `ConstraintViolation::getPlural()` + * added `Constraints\Traverse` + * deprecated `$deep` property in `Constraints\Valid` + * added `ValidatorBuilderInterface::setApiVersion()` + * added `Validation::API_VERSION_2_4` + * added `Validation::API_VERSION_2_5` + * added `Exception\OutOfBoundsException` + * added `Exception\UnsupportedMetadataException` + * made `Exception\ValidatorException` extend `Exception\RuntimeException` + * added `Util\PropertyPath` + * made the PropertyAccess component an optional dependency + * deprecated `ValidatorBuilder::setPropertyAccessor()` + * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead + +2.4.0 +----- + + * added a constraint the uses the expression language + * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator + +2.3.29 +------ + + * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) + +2.3.0 +----- + + * added the ISBN, ISSN, and IBAN validators + * copied the constraints `Optional` and `Required` to the + `Symfony\Component\Validator\Constraints\` namespace and deprecated the original + classes. + * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo) + +2.2.0 +----- + + * added a CardScheme validator + * added a Luhn validator + * moved @api-tags from `Validator` to `ValidatorInterface` + * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface` + * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface` + * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface` + * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext` + * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private + * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface` + * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor` + * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface` + * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface` + * deprecated `ExecutionContext::addViolationAtPath` + * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt` + * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName` + * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName` + * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue` + * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue` + * improved `ValidatorInterface::validateValue` to accept arrays of constraints + * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface` + * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`. + As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead. + * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference` + are ignored for arrays now. Arrays are always traversed recursively. + * added dependency to Translation component + * violation messages are now translated with a TranslatorInterface implementation + * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor` + * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator` + * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface` + * improved the Validator to support pluralized messages by default + * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version + * added ExceptionInterface, BadMethodCallException and InvalidArgumentException + +2.1.0 +----- + + * added support for `ctype_*` assertions in `TypeValidator` + * improved the ImageValidator with min width, max width, min height, and max height constraints + * added support for MIME with wildcard in FileValidator + * changed Collection validator to add "missing" and "extra" errors to + individual fields + * changed default value for `extraFieldsMessage` and `missingFieldsMessage` + in Collection constraint + * made ExecutionContext immutable + * deprecated Constraint methods `setMessage`, `getMessageTemplate` and + `getMessageParameters` + * added support for dynamic group sequences with the GroupSequenceProvider pattern + * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to + `validate`, its return value was dropped. ConstraintValidator still contains + `isValid` for BC + * [BC BREAK] collections in fields annotated with `Valid` are not traversed + recursively anymore by default. `Valid` contains a new property `deep` + which enables the BC behavior. + * added Count constraint + * added Length constraint + * added Range constraint + * deprecated the Min and Max constraints + * deprecated the MinLength and MaxLength constraints + * added Validation and ValidatorBuilderInterface + * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory diff --git a/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php b/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php new file mode 100644 index 0000000..c57da27 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ClassBasedInterface.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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(); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraint.php b/public/system/storage/vendor/symfony/validator/Constraint.php new file mode 100644 index 0000000..45d4bcf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraint.php @@ -0,0 +1,298 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\InvalidArgumentException; +use Symfony\Component\Validator\Exception\InvalidOptionsException; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * Contains the properties of a constraint definition. + * + * A constraint can be defined on a class, a property or a getter method. + * The Constraint class encapsulates all the configuration required for + * validating this class, property or getter result successfully. + * + * Constraint instances are immutable and serializable. + * + * @property array $groups The groups that the constraint belongs to + * + * @author Bernhard Schussek + */ +abstract class Constraint +{ + /** + * The name of the group given to all constraints with no explicit group. + */ + const DEFAULT_GROUP = 'Default'; + + /** + * Marks a constraint that can be put onto classes. + */ + const CLASS_CONSTRAINT = 'class'; + + /** + * Marks a constraint that can be put onto properties. + */ + const PROPERTY_CONSTRAINT = 'property'; + + /** + * Maps error codes to the names of their constants. + */ + protected static $errorNames = array(); + + /** + * Domain-specific data attached to a constraint. + * + * @var mixed + */ + public $payload; + + /** + * Returns the name of the given error code. + * + * @param string $errorCode The error code + * + * @return string The name of the error code + * + * @throws InvalidArgumentException If the error code does not exist + */ + public static function getErrorName($errorCode) + { + if (!isset(static::$errorNames[$errorCode])) { + throw new InvalidArgumentException(sprintf('The error code "%s" does not exist for constraint of type "%s".', $errorCode, \get_called_class())); + } + + return static::$errorNames[$errorCode]; + } + + /** + * Initializes the constraint with options. + * + * You should pass an associative array. The keys should be the names of + * existing properties in this class. The values should be the value for these + * properties. + * + * Alternatively you can override the method getDefaultOption() to return the + * name of an existing property. If no associative array is passed, this + * property is set instead. + * + * You can force that certain options are set by overriding + * getRequiredOptions() to return the names of these options. If any + * option is not set here, an exception is thrown. + * + * @param mixed $options The options (as associative array) + * or the value for the default + * option (any other type) + * + * @throws InvalidOptionsException When you pass the names of non-existing + * options + * @throws MissingOptionsException When you don't pass any of the options + * returned by getRequiredOptions() + * @throws ConstraintDefinitionException When you don't pass an associative + * array, but getDefaultOption() returns + * null + */ + public function __construct($options = null) + { + $invalidOptions = array(); + $missingOptions = array_flip((array) $this->getRequiredOptions()); + $knownOptions = get_object_vars($this); + + // The "groups" option is added to the object lazily + $knownOptions['groups'] = true; + + if (\is_array($options) && \count($options) >= 1 && isset($options['value']) && !property_exists($this, 'value')) { + $options[$this->getDefaultOption()] = $options['value']; + unset($options['value']); + } + + if (\is_array($options)) { + reset($options); + } + if (\is_array($options) && \count($options) > 0 && \is_string(key($options))) { + foreach ($options as $option => $value) { + if (array_key_exists($option, $knownOptions)) { + $this->$option = $value; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + } elseif (null !== $options && !(\is_array($options) && 0 === \count($options))) { + $option = $this->getDefaultOption(); + + if (null === $option) { + throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint %s', \get_class($this))); + } + + if (array_key_exists($option, $knownOptions)) { + $this->$option = $options; + unset($missingOptions[$option]); + } else { + $invalidOptions[] = $option; + } + } + + if (\count($invalidOptions) > 0) { + throw new InvalidOptionsException(sprintf('The options "%s" do not exist in constraint %s', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions); + } + + if (\count($missingOptions) > 0) { + throw new MissingOptionsException(sprintf('The options "%s" must be set for constraint %s', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions)); + } + } + + /** + * Sets the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * @param mixed $value The value to set + * + * @throws InvalidOptionsException If an invalid option name is given + */ + public function __set($option, $value) + { + if ('groups' === $option) { + $this->groups = (array) $value; + + return; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + } + + /** + * Returns the value of a lazily initialized option. + * + * Corresponding properties are added to the object on first access. Hence + * this method will be called at most once per constraint instance and + * option name. + * + * @param string $option The option name + * + * @return mixed The value of the option + * + * @throws InvalidOptionsException If an invalid option name is given + * + * @internal this method should not be used or overwritten in userland code + */ + public function __get($option) + { + if ('groups' === $option) { + $this->groups = array(self::DEFAULT_GROUP); + + return $this->groups; + } + + throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint %s', $option, \get_class($this)), array($option)); + } + + /** + * @param string $option The option name + * + * @return bool + */ + public function __isset($option) + { + return 'groups' === $option; + } + + /** + * Adds the given group if this constraint is in the Default group. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) { + $this->groups[] = $group; + } + } + + /** + * Returns the name of the default option. + * + * Override this method to define a default option. + * + * @return string + * + * @see __construct() + */ + public function getDefaultOption() + { + } + + /** + * Returns the name of the required options. + * + * Override this method if you want to define required options. + * + * @return array + * + * @see __construct() + */ + public function getRequiredOptions() + { + return array(); + } + + /** + * Returns the name of the class that validates this constraint. + * + * By default, this is the fully qualified name of the constraint class + * suffixed with "Validator". You can override this method to change that + * behaviour. + * + * @return string + */ + public function validatedBy() + { + return \get_class($this).'Validator'; + } + + /** + * Returns whether the constraint can be put onto classes, properties or + * both. + * + * This method should return one or more of the constants + * Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT. + * + * @return string|array One or more constant values + */ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } + + /** + * Optimizes the serialized value to minimize storage space. + * + * @return array The properties to serialize + * + * @internal This method may be replaced by an implementation of + * {@link \Serializable} in the future. Please don't use or + * overwrite it. + */ + public function __sleep() + { + // Initialize "groups" option if it is not set + $this->groups; + + return array_keys(get_object_vars($this)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidator.php b/public/system/storage/vendor/symfony/validator/ConstraintValidator.php new file mode 100644 index 0000000..6f8c05a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidator.php @@ -0,0 +1,214 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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"). + */ + const PRETTY_DATE = 1; + + /** + * Whether to cast objects with a "__toString()" method to strings. + */ + const OBJECT_TO_STRING = 2; + + /** + * @var ExecutionContextInterface2Dot5 + */ + 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 Symfony 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 Symfony 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 $format bitmask contains + * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted + * as RFC-3339 dates ("Y-m-d H:i:s"). + * + * Be careful when passing message parameters to a constraint violation + * that (may) contain objects, arrays or resources. These parameters + * should only be displayed for technical users. Non-technical users + * won't know what an "object", "array" or "resource" is and will be + * confused by the violation message. + * + * @param mixed $value The value to format as string + * @param int $format A bitwise combination of the format + * constants in this class + * + * @return string The string representation of the passed value + */ + protected function formatValue($value, $format = 0) + { + $isDateTime = $value instanceof \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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php new file mode 100644 index 0000000..cc6981b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactory.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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]; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php new file mode 100644 index 0000000..b647645 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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. + * + * @return ConstraintValidatorInterface + */ + public function getInstance(Constraint $constraint); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php new file mode 100644 index 0000000..85fd451 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintValidatorInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * @author Bernhard Schussek + */ +interface ConstraintValidatorInterface +{ + /** + * Initializes the constraint validator. + * + * @param ExecutionContextInterface $context The current validation context + */ + public function initialize(ExecutionContextInterface $context); + + /** + * Checks if the passed value is valid. + * + * @param mixed $value The value that should be validated + * @param Constraint $constraint The constraint for the validation + */ + public function validate($value, Constraint $constraint); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolation.php b/public/system/storage/vendor/symfony/validator/ConstraintViolation.php new file mode 100644 index 0000000..804aa2c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolation.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationInterface}. + * + * @author Bernhard Schussek + */ +class ConstraintViolation implements ConstraintViolationInterface +{ + private $message; + private $messageTemplate; + private $parameters; + private $plural; + private $root; + private $propertyPath; + private $invalidValue; + private $constraint; + private $code; + 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 Symfony 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 Symfony 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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php new file mode 100644 index 0000000..0ab53b0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationInterface.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 string|null The error code + */ + public function getCode(); +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php new file mode 100644 index 0000000..feb1732 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationList.php @@ -0,0 +1,161 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Default implementation of {@ConstraintViolationListInterface}. + * + * @author Bernhard Schussek + */ +class ConstraintViolationList implements \IteratorAggregate, ConstraintViolationListInterface +{ + /** + * @var ConstraintViolationInterface[] + */ + private $violations = array(); + + /** + * Creates a new constraint violation list. + * + * @param ConstraintViolationInterface[] $violations The constraint violations to add to the list + */ + public function __construct(array $violations = array()) + { + foreach ($violations as $violation) { + $this->add($violation); + } + } + + /** + * Converts the violation into a string for debugging purposes. + * + * @return string The violation as string + */ + public function __toString() + { + $string = ''; + + foreach ($this->violations as $violation) { + $string .= $violation."\n"; + } + + return $string; + } + + /** + * {@inheritdoc} + */ + public function add(ConstraintViolationInterface $violation) + { + $this->violations[] = $violation; + } + + /** + * {@inheritdoc} + */ + public function addAll(ConstraintViolationListInterface $otherList) + { + foreach ($otherList as $violation) { + $this->violations[] = $violation; + } + } + + /** + * {@inheritdoc} + */ + public function get($offset) + { + if (!isset($this->violations[$offset])) { + throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); + } + + return $this->violations[$offset]; + } + + /** + * {@inheritdoc} + */ + public function has($offset) + { + return isset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + */ + public function set($offset, ConstraintViolationInterface $violation) + { + $this->violations[$offset] = $violation; + } + + /** + * {@inheritdoc} + */ + public function remove($offset) + { + unset($this->violations[$offset]); + } + + /** + * {@inheritdoc} + * + * @return \ArrayIterator|ConstraintViolationInterface[] + */ + public function getIterator() + { + return new \ArrayIterator($this->violations); + } + + /** + * {@inheritdoc} + */ + public function count() + { + return \count($this->violations); + } + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return $this->has($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $violation) + { + if (null === $offset) { + $this->add($violation); + } else { + $this->set($offset, $violation); + } + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + $this->remove($offset); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php b/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php new file mode 100644 index 0000000..0489ab5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ConstraintViolationListInterface.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * A list of constraint violations. + * + * @author Bernhard Schussek + */ +interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess +{ + /** + * Adds a constraint violation to this list. + */ + public function add(ConstraintViolationInterface $violation); + + /** + * Merges an existing violation list into this list. + */ + public function addAll(ConstraintViolationListInterface $otherList); + + /** + * Returns the violation at a given offset. + * + * @param int $offset The offset of the violation + * + * @return ConstraintViolationInterface The violation + * + * @throws \OutOfBoundsException if the offset does not exist + */ + public function get($offset); + + /** + * Returns whether the given offset exists. + * + * @param int $offset The violation offset + * + * @return bool Whether the offset exists + */ + public function has($offset); + + /** + * Sets a violation at a given offset. + * + * @param int $offset The violation offset + * @param ConstraintViolationInterface $violation The violation + */ + public function set($offset, ConstraintViolationInterface $violation); + + /** + * Removes a violation at a given offset. + * + * @param int $offset The offset to remove + */ + public function remove($offset); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php new file mode 100644 index 0000000..15afebb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparison.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Used for the comparison of values. + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +abstract class AbstractComparison extends Constraint +{ + public $message; + public $value; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + if (null === $options) { + $options = array(); + } + + if (\is_array($options) && !isset($options['value'])) { + throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "value" option to be set.', \get_class($this))); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'value'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php new file mode 100644 index 0000000..9620ead --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode($this->getErrorCode()) + ->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)) + ->setCode($this->getErrorCode()) + ->addViolation(); + } + } + } + + /** + * Compares the two given values to find if their relationship is valid. + * + * @param mixed $value1 The first value to compare + * @param mixed $value2 The second value to compare + * + * @return bool true if the relationship is valid, false otherwise + */ + abstract protected function compareValues($value1, $value2); + + /** + * Returns the error code used if the comparison fails. + * + * @return string|null The error code or `null` if no code should be set + */ + protected function getErrorCode() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/All.php b/public/system/storage/vendor/symfony/validator/Constraints/All.php new file mode 100644 index 0000000..b531a1d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/All.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class All extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + public function getRequiredOptions() + { + return array('constraints'); + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php new file mode 100644 index 0000000..fa763c5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/AllValidator.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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.']'); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Bic.php b/public/system/storage/vendor/symfony/validator/Constraints/Bic.php new file mode 100644 index 0000000..dee5d52 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Bic.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Michael Hirschler + */ +class Bic extends Constraint +{ + const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; + const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; + const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; + const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; + const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; + + protected static $errorNames = array( + self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_BANK_CODE_ERROR => 'INVALID_BANK_CODE_ERROR', + self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + ); + + public $message = 'This is not a valid Business Identifier Code (BIC).'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php new file mode 100644 index 0000000..2a27bef --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/BicValidator.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Michael Hirschler + * + * @see https://en.wikipedia.org/wiki/ISO_9362#Structure + */ +class BicValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Bic) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Bic'); + } + + if (null === $value || '' === $value) { + return; + } + + $canonicalize = str_replace(' ', '', $value); + + // the bic must be either 8 or 11 characters long + if (!\in_array(\strlen($canonicalize), array(8, 11))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_LENGTH_ERROR) + ->addViolation(); + + return; + } + + // must contain alphanumeric values only + if (!ctype_alnum($canonicalize)) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CHARACTERS_ERROR) + ->addViolation(); + + return; + } + + // first 4 letters must be alphabetic (bank code) + if (!ctype_alpha(substr($canonicalize, 0, 4))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_BANK_CODE_ERROR) + ->addViolation(); + + return; + } + + // next 2 letters must be alphabetic (country code) + if (!ctype_alpha(substr($canonicalize, 4, 2))) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_COUNTRY_CODE_ERROR) + ->addViolation(); + + return; + } + + // should contain uppercase characters only + if (strtoupper($canonicalize) !== $canonicalize) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Bic::INVALID_CASE_ERROR) + ->addViolation(); + + return; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Blank.php b/public/system/storage/vendor/symfony/validator/Constraints/Blank.php new file mode 100644 index 0000000..030b21f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Blank.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Blank extends Constraint +{ + const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; + + protected static $errorNames = array( + self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', + ); + + public $message = 'This value should be blank.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php new file mode 100644 index 0000000..7e4d738 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/BlankValidator.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(Blank::NOT_BLANK_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Blank::NOT_BLANK_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Callback.php b/public/system/storage/vendor/symfony/validator/Constraints/Callback.php new file mode 100644 index 0000000..592ae00 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Callback.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Callback extends Constraint +{ + /** + * @var string|callable + */ + 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 Symfony 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']) && !isset($options['payload'])) { + 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php new file mode 100644 index 0000000..d4b440f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CallbackValidator.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php b/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php new file mode 100644 index 0000000..40c32e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CardScheme.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the CardSchemeValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel + * @author Bernhard Schussek + */ +class CardScheme extends Constraint +{ + const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; + const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; + + protected static $errorNames = array( + self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + ); + + public $message = 'Unsupported card type or invalid card number.'; + public $schemes; + + public function getDefaultOption() + { + return 'schemes'; + } + + public function getRequiredOptions() + { + return array('schemes'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php new file mode 100644 index 0000000..f667bde --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CardSchemeValidator.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates that a card number belongs to a specified scheme. + * + * @author Tim Nagel + * @author Bernhard Schussek + * + * @see http://en.wikipedia.org/wiki/Bank_card_number + * @see http://www.regular-expressions.info/creditcard.html + * @see http://www.barclaycard.co.uk/business/files/Ranges_and_Rules_September_2014.pdf + */ +class CardSchemeValidator extends ConstraintValidator +{ + protected $schemes = array( + // American Express card numbers start with 34 or 37 and have 15 digits. + 'AMEX' => array( + '/^3[47][0-9]{13}$/', + ), + // China UnionPay cards start with 62 and have between 16 and 19 digits. + // Please note that these cards do not follow Luhn Algorithm as a checksum. + 'CHINA_UNIONPAY' => array( + '/^62[0-9]{14,17}$/', + ), + // Diners Club card numbers begin with 300 through 305, 36 or 38. All have 14 digits. + // There are Diners Club cards that begin with 5 and have 16 digits. + // These are a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard. + 'DINERS' => array( + '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', + ), + // Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65. + // All have 16 digits. + 'DISCOVER' => array( + '/^6011[0-9]{12}$/', + '/^64[4-9][0-9]{13}$/', + '/^65[0-9]{14}$/', + '/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/', + ), + // InstaPayment cards begin with 637 through 639 and have 16 digits. + 'INSTAPAYMENT' => array( + '/^63[7-9][0-9]{13}$/', + ), + // JCB cards beginning with 2131 or 1800 have 15 digits. + // JCB cards beginning with 35 have 16 digits. + 'JCB' => array( + '/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/', + ), + // Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits. + 'LASER' => array( + '/^(6304|670[69]|6771)[0-9]{12,15}$/', + ), + // Maestro international cards begin with 675900..675999 and have between 12 and 19 digits. + // Maestro UK cards begin with either 500000..509999 or 560000..699999 and have between 12 and 19 digits. + 'MAESTRO' => array( + '/^(6759[0-9]{2})[0-9]{6,13}$/', + '/^(50[0-9]{4})[0-9]{6,13}$/', + '/^5[6-9][0-9]{10,17}$/', + '/^6[0-9]{11,18}$/', + ), + // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. + // October 2016 MasterCard numbers can also start with 222100 through 272099. + 'MASTERCARD' => array( + '/^5[1-5][0-9]{14}$/', + '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', + ), + // All Visa card numbers start with a 4 and have a length of 13, 16, or 19 digits. + 'VISA' => array( + '/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/', + ), + ); + + /** + * 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(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Choice.php b/public/system/storage/vendor/symfony/validator/Constraints/Choice.php new file mode 100644 index 0000000..4b93c70 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Choice.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Choice extends Constraint +{ + const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; + const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; + const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; + + protected static $errorNames = array( + self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $choices; + public $callback; + public $multiple = false; + public $strict = false; + public $min; + public $max; + public $message = 'The value you selected is not a valid choice.'; + public $multipleMessage = 'One or more of the given values is invalid.'; + public $minMessage = 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.'; + public $maxMessage = 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'choices'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php new file mode 100644 index 0000000..b92ba61 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ChoiceValidator.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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 (null !== $constraint->min && $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 (null !== $constraint->max && $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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection.php new file mode 100644 index 0000000..2b5679b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Collection extends Composite +{ + const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; + const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; + + protected static $errorNames = array( + self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', + self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', + ); + + public $fields = array(); + public $allowExtraFields = false; + public $allowMissingFields = false; + public $extraFieldsMessage = 'This field was not expected.'; + public $missingFieldsMessage = 'This field is missing.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + // no known options set? $options is the fields array + if (\is_array($options) + && !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) { + $options = array('fields' => $options); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + protected function initializeNestedConstraints() + { + parent::initializeNestedConstraints(); + + if (!\is_array($this->fields)) { + throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__)); + } + + foreach ($this->fields as $fieldName => $field) { + // the XmlFileLoader and YamlFileLoader pass the field Optional + // and Required constraint as an array with exactly one element + if (\is_array($field) && 1 == \count($field)) { + $this->fields[$fieldName] = $field = $field[0]; + } + + if (!$field instanceof Optional && !$field instanceof Required) { + $this->fields[$fieldName] = $field = new Required($field); + } + } + } + + public function getRequiredOptions() + { + return array('fields'); + } + + protected function getCompositeOption() + { + return 'fields'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php new file mode 100644 index 0000000..fbd3d7a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Optional.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints\Collection; + +@trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php new file mode 100644 index 0000000..96f9bc2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Collection/Required.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints\Collection; + +@trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php new file mode 100644 index 0000000..c2aae3a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CollectionValidator.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); + } + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Composite.php b/public/system/storage/vendor/symfony/validator/Constraints/Composite.php new file mode 100644 index 0000000..d233f06 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Composite.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * A constraint that is composed of other constraints. + * + * You should never use the nested constraint instances anywhere else, because + * their groups are adapted when passed to the constructor of this class. + * + * If you want to create your own composite constraint, extend this class and + * let {@link getCompositeOption()} return the name of the property which + * contains the nested constraints. + * + * @author Bernhard Schussek + */ +abstract class Composite extends Constraint +{ + /** + * {@inheritdoc} + * + * The groups of the composite and its nested constraints are made + * consistent using the following strategy: + * + * - If groups are passed explicitly to the composite constraint, but + * not to the nested constraints, the options of the composite + * constraint are copied to the nested constraints; + * + * - If groups are passed explicitly to the nested constraints, but not + * to the composite constraint, the groups of all nested constraints + * are merged and used as groups for the composite constraint; + * + * - If groups are passed explicitly to both the composite and its nested + * constraints, the groups of the nested constraints must be a subset + * of the groups of the composite constraint. If not, a + * {@link ConstraintDefinitionException} is thrown. + * + * All this is done in the constructor, because constraints can then be + * cached. When constraints are loaded from the cache, no more group + * checks need to be done. + */ + public function __construct($options = null) + { + parent::__construct($options); + + $this->initializeNestedConstraints(); + + /* @var Constraint[] $nestedConstraints */ + $compositeOption = $this->getCompositeOption(); + $nestedConstraints = $this->$compositeOption; + + if (!\is_array($nestedConstraints)) { + $nestedConstraints = array($nestedConstraints); + } + + foreach ($nestedConstraints as $constraint) { + if (!$constraint instanceof Constraint) { + if (\is_object($constraint)) { + $constraint = \get_class($constraint); + } + + throw new ConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, \get_class($this))); + } + + if ($constraint instanceof Valid) { + throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', \get_class($this))); + } + } + + if (!property_exists($this, 'groups')) { + $mergedGroups = array(); + + foreach ($nestedConstraints as $constraint) { + foreach ($constraint->groups as $group) { + $mergedGroups[$group] = true; + } + } + + $this->groups = array_keys($mergedGroups); + $this->$compositeOption = $nestedConstraints; + + return; + } + + foreach ($nestedConstraints as $constraint) { + if (property_exists($constraint, 'groups')) { + $excessGroups = array_diff($constraint->groups, $this->groups); + + if (\count($excessGroups) > 0) { + throw new ConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), \get_class($this))); + } + } else { + $constraint->groups = $this->groups; + } + } + + $this->$compositeOption = $nestedConstraints; + } + + /** + * {@inheritdoc} + * + * Implicit group names are forwarded to nested constraints. + * + * @param string $group + */ + public function addImplicitGroupName($group) + { + parent::addImplicitGroupName($group); + + /** @var Constraint[] $nestedConstraints */ + $nestedConstraints = $this->{$this->getCompositeOption()}; + + foreach ($nestedConstraints as $constraint) { + $constraint->addImplicitGroupName($group); + } + } + + /** + * Returns the name of the property that contains the nested constraints. + * + * @return string The property name + */ + abstract protected function getCompositeOption(); + + /** + * Initializes the nested constraints. + * + * This method can be overwritten in subclasses to clean up the nested + * constraints passed to the constructor. + * + * @see Collection::initializeNestedConstraints() + */ + protected function initializeNestedConstraints() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Count.php b/public/system/storage/vendor/symfony/validator/Constraints/Count.php new file mode 100644 index 0000000..0a54ee7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Count.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Count extends Constraint +{ + const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; + const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; + + protected static $errorNames = array( + self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', + self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', + ); + + public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'; + public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'; + public $exactMessage = 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.'; + public $min; + public $max; + + public function __construct($options = null) + { + if (null !== $options && !\is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php new file mode 100644 index 0000000..45be996 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CountValidator.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * @author Bernhard Schussek + */ +class CountValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Count) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Count'); + } + + 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Country.php b/public/system/storage/vendor/symfony/validator/Constraints/Country.php new file mode 100644 index 0000000..1b76570 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Country.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Country extends Constraint +{ + const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; + + protected static $errorNames = array( + self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', + ); + + public $message = 'This value is not a valid country.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php new file mode 100644 index 0000000..437b3d6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CountryValidator.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Currency.php b/public/system/storage/vendor/symfony/validator/Constraints/Currency.php new file mode 100644 index 0000000..d28f94c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Currency.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Miha Vrhovnik + * @author Bernhard Schussek + */ +class Currency extends Constraint +{ + const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; + + protected static $errorNames = array( + self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', + ); + + public $message = 'This value is not a valid currency.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php new file mode 100644 index 0000000..40e7920 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/CurrencyValidator.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid currency. + * + * @author Miha Vrhovnik + * @author Bernhard Schussek + */ +class CurrencyValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Currency) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Currency'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $currencies = Intl::getCurrencyBundle()->getCurrencyNames(); + + if (!isset($currencies[$value])) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Date.php b/public/system/storage/vendor/symfony/validator/Constraints/Date.php new file mode 100644 index 0000000..2563413 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Date.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Date extends Constraint +{ + const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; + const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + ); + + public $message = 'This value is not a valid date.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php b/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php new file mode 100644 index 0000000..35e2934 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateTime.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class DateTime extends Constraint +{ + const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; + const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; + const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $message = 'This value is not a valid datetime.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php new file mode 100644 index 0000000..3296935 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateTimeValidator.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php new file mode 100644 index 0000000..a4c95dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/DateValidator.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Email.php b/public/system/storage/vendor/symfony/validator/Constraints/Email.php new file mode 100644 index 0000000..a9d9ab1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Email.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Email extends Constraint +{ + const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; + const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; + const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', + self::MX_CHECK_FAILED_ERROR => 'MX_CHECK_FAILED_ERROR', + self::HOST_CHECK_FAILED_ERROR => 'HOST_CHECK_FAILED_ERROR', + ); + + public $message = 'This value is not a valid email address.'; + public $checkMX = false; + public $checkHost = false; + public $strict; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php new file mode 100644 index 0000000..2f0d25a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EmailValidator.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +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 Bernhard Schussek + */ +class EmailValidator extends ConstraintValidator +{ + private $isStrict; + + /** + * @param bool $strict + */ + 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') || interface_exists('\Egulias\EmailValidator\Validation\EmailValidation')) { + throw new RuntimeException('Strict email validation requires egulias/email-validator:~1.2'); + } + + $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 = (string) substr($value, strrpos($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 '' !== $host && 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 '' !== $host && ($this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php b/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php new file mode 100644 index 0000000..4b22c6d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EqualTo.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class EqualTo extends AbstractComparison +{ + const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; + + protected static $errorNames = array( + self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', + ); + + public $message = 'This value should be equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php new file mode 100644 index 0000000..fe1f362 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/EqualToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are equal (==). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class EqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 == $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Existence.php b/public/system/storage/vendor/symfony/validator/Constraints/Existence.php new file mode 100644 index 0000000..5ea6ffe --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Existence.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @author Bernhard Schussek + */ +abstract class Existence extends Composite +{ + public $constraints = array(); + + public function getDefaultOption() + { + return 'constraints'; + } + + protected function getCompositeOption() + { + return 'constraints'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Expression.php b/public/system/storage/vendor/symfony/validator/Constraints/Expression.php new file mode 100644 index 0000000..3329bd2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Expression.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +class Expression extends Constraint +{ + const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; + + protected static $errorNames = array( + self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $expression; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'expression'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('expression'); + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + } + + /** + * {@inheritdoc} + */ + public function validatedBy() + { + return 'validator.expression'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php new file mode 100644 index 0000000..85fc466 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ExpressionValidator.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + private $propertyAccessor; + private $expressionLanguage; + + public function __construct(PropertyAccessorInterface $propertyAccessor = null, ExpressionLanguage $expressionLanguage = null) + { + $this->propertyAccessor = $propertyAccessor; + $this->expressionLanguage = $expressionLanguage; + } + + /** + * {@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, self::OBJECT_TO_STRING)) + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING)) + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->addViolation(); + } + } + } + + private function getExpressionLanguage() + { + if (null === $this->expressionLanguage) { + if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) { + throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); + } + $this->expressionLanguage = new ExpressionLanguage(); + } + + return $this->expressionLanguage; + } + + 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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/False.php b/public/system/storage/vendor/symfony/validator/Constraints/False.php new file mode 100644 index 0000000..40dcc8e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/False.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\False class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php new file mode 100644 index 0000000..c54a347 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/FalseValidator.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/File.php b/public/system/storage/vendor/symfony/validator/Constraints/File.php new file mode 100644 index 0000000..c00ece3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/File.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @property int $maxSize + * + * @author Bernhard Schussek + */ +class File extends Constraint +{ + // Check the Image constraint for clashes if adding new constants here + + const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; + const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; + const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; + const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; + const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; + + protected static $errorNames = array( + self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', + self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', + self::EMPTY_ERROR => 'EMPTY_ERROR', + self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', + self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', + ); + + public $binaryFormat; + public $mimeTypes = array(); + public $notFoundMessage = 'The file could not be found.'; + public $notReadableMessage = 'The file is not readable.'; + public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'; + public $disallowEmptyMessage = 'An empty file is not allowed.'; + + public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; + public $uploadFormSizeErrorMessage = 'The file is too large.'; + public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; + public $uploadNoFileErrorMessage = 'No file was uploaded.'; + public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; + public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.'; + public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.'; + public $uploadErrorMessage = 'The file could not be uploaded.'; + + protected $maxSize; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null !== $this->maxSize) { + $this->normalizeBinaryFormat($this->maxSize); + } + } + + public function __set($option, $value) + { + if ('maxSize' === $option) { + $this->normalizeBinaryFormat($value); + + return; + } + + parent::__set($option, $value); + } + + public function __get($option) + { + if ('maxSize' === $option) { + return $this->maxSize; + } + + return parent::__get($option); + } + + public function __isset($option) + { + if ('maxSize' === $option) { + return true; + } + + return parent::__isset($option); + } + + private function normalizeBinaryFormat($maxSize) + { + $sizeInt = (int) $maxSize; + + if (ctype_digit((string) $maxSize)) { + $this->maxSize = $sizeInt; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++k$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++M$/i', $maxSize)) { + $this->maxSize = $sizeInt * 1000000; + $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; + } elseif (preg_match('/^\d++Ki$/i', $maxSize)) { + $this->maxSize = $sizeInt << 10; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } elseif (preg_match('/^\d++Mi$/i', $maxSize)) { + $this->maxSize = $sizeInt << 20; + $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; + } else { + throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize)); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php new file mode 100644 index 0000000..33c784b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/FileValidator.php @@ -0,0 +1,329 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\HttpFoundation\File\File as FileObject; +use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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 = null === $constraint->binaryFormat ? true : $constraint->binaryFormat; + } + + 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]); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php new file mode 100644 index 0000000..c2ca2dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThan.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThan extends AbstractComparison +{ + const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php new file mode 100644 index 0000000..9b3743d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanOrEqual extends AbstractComparison +{ + const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; + + protected static $errorNames = array( + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $message = 'This value should be greater than or equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php new file mode 100644 index 0000000..e196e68 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than or equal to the previous (>=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 >= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php new file mode 100644 index 0000000..9029e8f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GreaterThanValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are greater than the previous (>). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class GreaterThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 > $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php new file mode 100644 index 0000000..d2c4d4a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequence.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(array('Basic', 'Strict'))); + * + * In the first step, all constraints that belong to the group "Basic" will be + * validated. If none of the constraints fail, the validator will then validate + * the constraints in group "Strict". This is useful, for example, if "Strict" + * contains expensive checks that require a lot of CPU or slow, external + * services. You usually don't want to run expensive checks if any of the cheap + * checks fail. + * + * When adding metadata to a class, you can override the "Default" group of + * that class with a group sequence: + * + * /** + * * @GroupSequence({"Address", "Strict"}) + * *\/ + * class Address + * { + * // ... + * } + * + * Whenever you validate that object in the "Default" group, the group sequence + * will be validated: + * + * $validator->validate($address); + * + * If you want to execute the constraints of the "Default" group for a class + * with an overridden default group, pass the class name as group name instead: + * + * $validator->validate($address, null, "Address") + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek + * + * 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 Symfony 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 Symfony 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 Symfony 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 Symfony 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 Symfony 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 Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + return \count($this->groups); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php new file mode 100644 index 0000000..8a3fe63 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/GroupSequenceProvider.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Annotation to define a group sequence provider. + * + * @Annotation + * @Target({"CLASS", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class GroupSequenceProvider +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Iban.php b/public/system/storage/vendor/symfony/validator/Constraints/Iban.php new file mode 100644 index 0000000..9c4d383 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Iban.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @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 = '88e5e319-0aeb-4979-a27e-3d9ce0c16166'; + const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; + const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; + /** @deprecated, to be removed in 3.0. */ + const INVALID_CASE_ERROR = 'f4bf62fe-03ec-42af-a53b-68e21b1e7274'; + const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; + const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; + const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; + + protected static $errorNames = array( + self::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).'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php new file mode 100644 index 0000000..d475332 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IbanValidator.php @@ -0,0 +1,293 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 Manuel Reinhard + * @author Michael Schummel + * @author Bernhard Schussek + * + * @see http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ + */ +class IbanValidator extends ConstraintValidator +{ + /** + * IBAN country specific formats. + * + * The first 2 characters from an IBAN format are the two-character ISO country code. + * The following 2 characters represent the check digits calculated from the rest of the IBAN characters. + * The rest are up to thirty alphanumeric characters for + * a BBAN (Basic Bank Account Number) which has a fixed length per country and, + * included within it, a bank identifier with a fixed position and a fixed length per country + * + * @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf + */ + 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 + 'BY' => 'BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}', // Belarus - https://bank.codes/iban/structure/belarus/ + '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}0\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}\d{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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php new file mode 100644 index 0000000..a7dadff --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalTo.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class IdenticalTo extends AbstractComparison +{ + const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; + + protected static $errorNames = array( + self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', + ); + + public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php new file mode 100644 index 0000000..304f71f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IdenticalToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are identical (===). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class IdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 === $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Image.php b/public/system/storage/vendor/symfony/validator/Constraints/Image.php new file mode 100644 index 0000000..28803c4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Image.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Benjamin Dulau + * @author Bernhard Schussek + */ +class Image extends File +{ + const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; + const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; + const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; + const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; + const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; + const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; + const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; + const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; + const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; + const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; + + // 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.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php new file mode 100644 index 0000000..35ff408 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/ImageValidator.php @@ -0,0 +1,261 @@ + + * + * 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\Context\ExecutionContextInterface; +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) || (0 === $size[0]) || (0 === $size[1])) { + 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Ip.php b/public/system/storage/vendor/symfony/validator/Constraints/Ip.php new file mode 100644 index 0000000..f45c4ca --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Ip.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * Validates that a value is a valid IP address. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + * @author Joseph Bielawski + */ +class Ip extends Constraint +{ + const V4 = '4'; + const V6 = '6'; + const ALL = 'all'; + + // adds FILTER_FLAG_NO_PRIV_RANGE flag (skip private ranges) + const V4_NO_PRIV = '4_no_priv'; + const V6_NO_PRIV = '6_no_priv'; + const ALL_NO_PRIV = 'all_no_priv'; + + // adds FILTER_FLAG_NO_RES_RANGE flag (skip reserved ranges) + const V4_NO_RES = '4_no_res'; + const V6_NO_RES = '6_no_res'; + const ALL_NO_RES = 'all_no_res'; + + // adds FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags (skip both) + const V4_ONLY_PUBLIC = '4_public'; + const V6_ONLY_PUBLIC = '6_public'; + const ALL_ONLY_PUBLIC = 'all_public'; + + const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; + + protected static $versions = array( + self::V4, + self::V6, + self::ALL, + + self::V4_NO_PRIV, + self::V6_NO_PRIV, + self::ALL_NO_PRIV, + + self::V4_NO_RES, + self::V6_NO_RES, + self::ALL_NO_RES, + + self::V4_ONLY_PUBLIC, + self::V6_ONLY_PUBLIC, + self::ALL_ONLY_PUBLIC, + ); + + protected static $errorNames = array( + self::INVALID_IP_ERROR => 'INVALID_IP_ERROR', + ); + + public $version = self::V4; + + public $message = 'This is not a valid IP address.'; + + /** + * {@inheritdoc} + */ + public function __construct($options = null) + { + parent::__construct($options); + + if (!\in_array($this->version, self::$versions)) { + throw new ConstraintDefinitionException(sprintf('The option "version" must be one of "%s"', implode('", "', self::$versions))); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php new file mode 100644 index 0000000..a27d0e0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IpValidator.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(Ip::INVALID_IP_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Ip::INVALID_IP_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php b/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php new file mode 100644 index 0000000..8332e18 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsFalse.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsFalse extends Constraint +{ + const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; + + protected static $errorNames = array( + self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', + ); + + public $message = 'This value should be false.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php new file mode 100644 index 0000000..ff8e17e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsFalseValidator.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->addViolation(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php b/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php new file mode 100644 index 0000000..fdd2930 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsNull.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsNull extends Constraint +{ + const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; + + protected static $errorNames = array( + self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', + ); + + public $message = 'This value should be null.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php new file mode 100644 index 0000000..6e132c2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsNullValidator.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php b/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php new file mode 100644 index 0000000..405a96a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsTrue.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class IsTrue extends Constraint +{ + const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; + + protected static $errorNames = array( + self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', + ); + + public $message = 'This value should be true.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php new file mode 100644 index 0000000..5fd5793 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsTrueValidator.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 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)) + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php b/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php new file mode 100644 index 0000000..f1e83b9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Isbn.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author The Whole Life To Learn + * @author Manuel Reinhard + * @author Bernhard Schussek + */ +class Isbn extends Constraint +{ + const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; + const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; + const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; + const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; + const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR', + ); + + public $isbn10Message = 'This value is not a valid ISBN-10.'; + public $isbn13Message = 'This value is not a valid ISBN-13.'; + public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'; + public $type; + public $message; + + /** + * @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'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php new file mode 100644 index 0000000..838f672 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php @@ -0,0 +1,216 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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 Symfony 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 Symfony 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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Issn.php b/public/system/storage/vendor/symfony/validator/Constraints/Issn.php new file mode 100644 index 0000000..a2fecdd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Issn.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Antonio J. García Lagar + * @author Bernhard Schussek + */ +class Issn extends Constraint +{ + const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; + const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; + const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; + const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; + const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; + const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::MISSING_HYPHEN_ERROR => 'MISSING_HYPHEN_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'This value is not a valid ISSN.'; + public $caseSensitive = false; + public $requireHyphen = false; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php new file mode 100644 index 0000000..4413f45 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/IssnValidator.php @@ -0,0 +1,183 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Language.php b/public/system/storage/vendor/symfony/validator/Constraints/Language.php new file mode 100644 index 0000000..0e676b7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Language.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Language extends Constraint +{ + const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; + + protected static $errorNames = array( + self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', + ); + + public $message = 'This value is not a valid language.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php new file mode 100644 index 0000000..fa06438 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LanguageValidator.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Length.php b/public/system/storage/vendor/symfony/validator/Constraints/Length.php new file mode 100644 index 0000000..20a17fa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Length.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Length extends Constraint +{ + const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; + const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; + const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + ); + + public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; + public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; + public $exactMessage = 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'; + public $charsetMessage = 'This value does not match the expected {{ charset }} charset.'; + public $max; + public $min; + public $charset = 'UTF-8'; + + public function __construct($options = null) + { + if (null !== $options && !\is_array($options)) { + $options = array( + 'min' => $options, + 'max' => $options, + ); + } + + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php new file mode 100644 index 0000000..68e9428 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LengthValidator.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 LengthValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Length) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Length'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $stringValue = (string) $value; + + if (!$invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset)) { + $length = mb_strlen($stringValue, $constraint->charset); + } + + if ($invalidCharset) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->charsetMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ charset }}', $constraint->charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->charsetMessage) + ->setParameter('{{ value }}', $this->formatValue($stringValue)) + ->setParameter('{{ charset }}', $constraint->charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + if (null !== $constraint->max && $length > $constraint->max) { + 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php new file mode 100644 index 0000000..1bbb508 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThan.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThan extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php new file mode 100644 index 0000000..d118942 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqual.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanOrEqual extends AbstractComparison +{ + const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + + protected static $errorNames = array( + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + ); + + public $message = 'This value should be less than or equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php new file mode 100644 index 0000000..54281ee --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than or equal to the previous (<=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanOrEqualValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 <= $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php new file mode 100644 index 0000000..ef7535f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LessThanValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are less than the previous (<). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class LessThanValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 < $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Locale.php b/public/system/storage/vendor/symfony/validator/Constraints/Locale.php new file mode 100644 index 0000000..5aa7070 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Locale.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Locale extends Constraint +{ + const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; + + protected static $errorNames = array( + self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', + ); + + public $message = 'This value is not a valid locale.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php new file mode 100644 index 0000000..c9763a5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LocaleValidator.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Intl\Intl; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether a value is a valid locale code. + * + * @author Bernhard Schussek + */ +class LocaleValidator extends ConstraintValidator +{ + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Locale) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Locale'); + } + + if (null === $value || '' === $value) { + return; + } + + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + throw new UnexpectedTypeException($value, 'string'); + } + + $value = (string) $value; + $locales = Intl::getLocaleBundle()->getLocaleNames(); + $aliases = Intl::getLocaleBundle()->getAliases(); + + if (!isset($locales[$value]) && !\in_array($value, $aliases)) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php b/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php new file mode 100644 index 0000000..67f152d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Luhn.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * Metadata for the LuhnValidator. + * + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Tim Nagel + * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ + * @author Bernhard Schussek + */ +class Luhn extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; + const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', + ); + + public $message = 'Invalid card number.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php new file mode 100644 index 0000000..c3fb93d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/LuhnValidator.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php b/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php new file mode 100644 index 0000000..e059f10 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotBlank.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class NotBlank extends Constraint +{ + const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; + + protected static $errorNames = array( + self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', + ); + + public $message = 'This value should not be blank.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php new file mode 100644 index 0000000..6655012 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotBlankValidator.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(NotBlank::IS_BLANK_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotBlank::IS_BLANK_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php new file mode 100644 index 0000000..8c5abdd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualTo.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotEqualTo extends AbstractComparison +{ + const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; + + protected static $errorNames = array( + self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', + ); + + public $message = 'This value should not be equal to {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php new file mode 100644 index 0000000..b80c5ea --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotEqualToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values are all unequal (!=). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotEqualToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 != $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php new file mode 100644 index 0000000..4c9c63e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalTo.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotIdenticalTo extends AbstractComparison +{ + const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; + + protected static $errorNames = array( + self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', + ); + + public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php new file mode 100644 index 0000000..3ea8b5a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * Validates values aren't identical (!==). + * + * @author Daniel Holmes + * @author Bernhard Schussek + */ +class NotIdenticalToValidator extends AbstractComparisonValidator +{ + /** + * {@inheritdoc} + */ + protected function compareValues($value1, $value2) + { + return $value1 !== $value2; + } + + /** + * {@inheritdoc} + */ + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php b/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php new file mode 100644 index 0000000..1cfc1c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotNull.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class NotNull extends Constraint +{ + const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; + + protected static $errorNames = array( + self::IS_NULL_ERROR => 'IS_NULL_ERROR', + ); + + public $message = 'This value should not be null.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php new file mode 100644 index 0000000..0402b3d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NotNullValidator.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotNull::IS_NULL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(NotNull::IS_NULL_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Null.php b/public/system/storage/vendor/symfony/validator/Constraints/Null.php new file mode 100644 index 0000000..eef0826 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Null.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php new file mode 100644 index 0000000..61b6521 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/NullValidator.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Optional.php b/public/system/storage/vendor/symfony/validator/Constraints/Optional.php new file mode 100644 index 0000000..dab8b43 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Optional.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Optional extends Existence +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Range.php b/public/system/storage/vendor/symfony/validator/Constraints/Range.php new file mode 100644 index 0000000..bf050ac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Range.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\MissingOptionsException; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Range extends Constraint +{ + const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; + const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; + const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link INVALID_CHARACTERS_ERROR} instead. + */ + const INVALID_VALUE_ERROR = self::INVALID_CHARACTERS_ERROR; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link TOO_HIGH_ERROR} instead. + */ + const BEYOND_RANGE_ERROR = self::TOO_HIGH_ERROR; + + /** + * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use + * {@link TOO_LOW_ERROR} instead. + */ + const BELOW_RANGE_ERROR = self::TOO_LOW_ERROR; + + protected static $errorNames = array( + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', + self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', + ); + + public $minMessage = 'This value should be {{ limit }} or more.'; + public $maxMessage = 'This value should be {{ limit }} or less.'; + public $invalidMessage = 'This value should be a valid number.'; + public $min; + public $max; + + public function __construct($options = null) + { + parent::__construct($options); + + if (null === $this->min && null === $this->max) { + throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max')); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php new file mode 100644 index 0000000..924550a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/RangeValidator.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 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_CHARACTERS_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->invalidMessage) + ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->addViolation(); + } + + return; + } + + $min = $constraint->min; + $max = $constraint->max; + + // Convert strings to DateTimes if comparing another DateTime + // This allows to compare with any date/time value supported by + // the DateTime constructor: + // http://php.net/manual/en/datetime.formats.php + if ($value instanceof \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::TOO_HIGH_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::TOO_HIGH_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::TOO_LOW_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::TOO_LOW_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Regex.php b/public/system/storage/vendor/symfony/validator/Constraints/Regex.php new file mode 100644 index 0000000..cb12210 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Regex.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Regex extends Constraint +{ + const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; + + protected static $errorNames = array( + self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', + ); + + public $message = 'This value is not valid.'; + public $pattern; + public $htmlPattern; + public $match = true; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'pattern'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('pattern'); + } + + /** + * Converts the htmlPattern to a suitable format for HTML5 pattern. + * Example: /^[a-z]+$/ would be converted to [a-z]+ + * However, if options are specified, it cannot be converted. + * + * Pattern is also ignored if match=false since the pattern should + * then be reversed before application. + * + * @see http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute + * + * @return string|null + */ + public function getHtmlPattern() + { + // If htmlPattern is specified, use it + if (null !== $this->htmlPattern) { + return empty($this->htmlPattern) + ? null + : $this->htmlPattern; + } + + // Quit if delimiters not at very beginning/end (e.g. when options are passed) + if ($this->pattern[0] !== $this->pattern[\strlen($this->pattern) - 1]) { + return; + } + + $delimiter = $this->pattern[0]; + + // Unescape the delimiter + $pattern = str_replace('\\'.$delimiter, $delimiter, substr($this->pattern, 1, -1)); + + // If the pattern is inverted, we can simply wrap it in + // ((?!pattern).)* + if (!$this->match) { + return '((?!'.$pattern.').)*'; + } + + // If the pattern contains an or statement, wrap the pattern in + // .*(pattern).* and quit. Otherwise we'd need to parse the pattern + if (false !== strpos($pattern, '|')) { + return '.*('.$pattern.').*'; + } + + // Trim leading ^, otherwise prepend .* + $pattern = '^' === $pattern[0] ? substr($pattern, 1) : '.*'.$pattern; + + // Trim trailing $, otherwise append .* + $pattern = '$' === $pattern[\strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*'; + + return $pattern; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php new file mode 100644 index 0000000..07f1c5a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/RegexValidator.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +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)) + ->setCode(Regex::REGEX_FAILED_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Regex::REGEX_FAILED_ERROR) + ->addViolation(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Required.php b/public/system/storage/vendor/symfony/validator/Constraints/Required.php new file mode 100644 index 0000000..bd77a90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Required.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +/** + * @Annotation + * @Target({"ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Required extends Existence +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Time.php b/public/system/storage/vendor/symfony/validator/Constraints/Time.php new file mode 100644 index 0000000..6bd8dbd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Time.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Time extends Constraint +{ + const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; + const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; + + protected static $errorNames = array( + self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', + self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', + ); + + public $message = 'This value is not a valid time.'; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php new file mode 100644 index 0000000..97f188d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TimeValidator.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php b/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php new file mode 100644 index 0000000..4572c9b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Traverse.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +/** + * @Annotation + * + * @author Bernhard Schussek + */ +class Traverse extends Constraint +{ + public $traverse = true; + + public function __construct($options = null) + { + if (\is_array($options) && array_key_exists('groups', $options)) { + throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint %s', __CLASS__)); + } + + parent::__construct($options); + } + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'traverse'; + } + + /** + * {@inheritdoc} + */ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/True.php b/public/system/storage/vendor/symfony/validator/Constraints/True.php new file mode 100644 index 0000000..9dbf403 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/True.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\True class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php new file mode 100644 index 0000000..c4a886b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TrueValidator.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +@trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Type.php b/public/system/storage/vendor/symfony/validator/Constraints/Type.php new file mode 100644 index 0000000..e40b478 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Type.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Type extends Constraint +{ + const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; + + protected static $errorNames = array( + self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', + ); + + public $message = 'This value should be of type {{ type }}.'; + public $type; + + /** + * {@inheritdoc} + */ + public function getDefaultOption() + { + return 'type'; + } + + /** + * {@inheritdoc} + */ + public function getRequiredOptions() + { + return array('type'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php new file mode 100644 index 0000000..d69c5d3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/TypeValidator.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 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 = 'boolean' == $type ? '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) + ->setCode(Type::INVALID_TYPE_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setParameter('{{ type }}', $constraint->type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->addViolation(); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Url.php b/public/system/storage/vendor/symfony/validator/Constraints/Url.php new file mode 100644 index 0000000..8453a90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Url.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) + * + * @author Bernhard Schussek + */ +class Url extends Constraint +{ + const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; + + protected static $errorNames = array( + self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', + ); + + public $message = 'This value is not a valid URL.'; + public $dnsMessage = 'The host could not be resolved.'; + public $protocols = array('http', 'https'); + public $checkDNS = false; +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php new file mode 100644 index 0000000..4527ab2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/UrlValidator.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 UrlValidator extends ConstraintValidator +{ + const PATTERN = '~^ + (%s):// # protocol + (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth + ( + ([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (?:/ (?:[\pL\pN\-._\~!$&\'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path + (?:\? (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional) + (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) + $~ixu'; + + /** + * {@inheritdoc} + */ + public function validate($value, Constraint $constraint) + { + if (!$constraint instanceof Url) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Url'); + } + + 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 ('' === $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)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } + + return; + } + + if ($constraint->checkDNS) { + $host = parse_url($value, PHP_URL_HOST); + + if (!\is_string($host) || !checkdnsrr($host, 'ANY')) { + if ($this->context instanceof ExecutionContextInterface) { + $this->context->buildViolation($constraint->dnsMessage) + ->setParameter('{{ value }}', $this->formatValue($host)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } else { + $this->buildViolation($constraint->dnsMessage) + ->setParameter('{{ value }}', $this->formatValue($host)) + ->setCode(Url::INVALID_URL_ERROR) + ->addViolation(); + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php b/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php new file mode 100644 index 0000000..2deecba --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Uuid.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; + +/** + * @Annotation + * + * @author Colin O'Dell + * @author Bernhard Schussek + */ +class Uuid extends Constraint +{ + const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; + const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; + const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; + const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; + const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; + const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; + + protected static $errorNames = array( + self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', + self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', + self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', + self::INVALID_HYPHEN_PLACEMENT_ERROR => 'INVALID_HYPHEN_PLACEMENT_ERROR', + self::INVALID_VERSION_ERROR => 'INVALID_VERSION_ERROR', + self::INVALID_VARIANT_ERROR => 'INVALID_VARIANT_ERROR', + ); + + // Possible versions defined by RFC 4122 + const V1_MAC = 1; + const V2_DCE = 2; + const V3_MD5 = 3; + const V4_RANDOM = 4; + const V5_SHA1 = 5; + + /** + * Message to display when validation fails. + * + * @var string + */ + public $message = 'This is not a valid UUID.'; + + /** + * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122. + * + * Set this to `false` to allow legacy formats with different dash positioning or wrapping characters + * + * @var bool + */ + public $strict = true; + + /** + * Array of allowed versions (see version constants above). + * + * All UUID versions are allowed by default + * + * @var int[] + */ + public $versions = array( + self::V1_MAC, + self::V2_DCE, + self::V3_MD5, + self::V4_RANDOM, + self::V5_SHA1, + ); +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php b/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php new file mode 100644 index 0000000..8e2e5da --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/UuidValidator.php @@ -0,0 +1,350 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Deprecated\UuidValidator as Deprecated; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; + +/** + * Validates whether the value is a valid UUID (also known as GUID). + * + * Strict validation will allow a UUID as specified per RFC 4122. + * Loose validation will allow any type of UUID. + * + * For better compatibility, both loose and strict, you should consider using a specialized UUID library like "ramsey/uuid" instead. + * + * @author Colin O'Dell + * @author Bernhard Schussek + * + * @see http://tools.ietf.org/html/rfc4122 + * @see https://en.wikipedia.org/wiki/Universally_unique_identifier + * @see https://github.com/ramsey/uuid + */ +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 (!$constraint instanceof Uuid) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid'); + } + + 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 (8 !== (hexdec($value[self::STRICT_VARIANT_POSITION]) & 12)) { + 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(); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Constraints/Valid.php b/public/system/storage/vendor/symfony/validator/Constraints/Valid.php new file mode 100644 index 0000000..35a8edc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Constraints/Valid.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints; + +use Symfony\Component\Validator\Constraint; +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 Symfony 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php new file mode 100644 index 0000000..165c572 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContext.php @@ -0,0 +1,467 @@ + + * + * 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}. + * + * @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 Symfony 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; + } + + public function getConstraint() + { + return $this->constraint; + } + + /** + * {@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 Symfony 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 Symfony 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 Symfony 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 Symfony 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]); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php new file mode 100644 index 0000000..cbd9935 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactory.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates new {@link ExecutionContext} instances. + * + * @author Bernhard Schussek + * + * @internal You should not instantiate or use this class. Code against + * {@link ExecutionContextFactoryInterface} instead. + */ +class ExecutionContextFactory implements ExecutionContextFactoryInterface +{ + private $translator; + private $translationDomain; + + /** + * Creates a new context factory. + * + * @param TranslatorInterface $translator The translator + * @param string|null $translationDomain The translation domain to + * use for translating + * violation messages + */ + public function __construct(TranslatorInterface $translator, $translationDomain = null) + { + $this->translator = $translator; + $this->translationDomain = $translationDomain; + } + + /** + * {@inheritdoc} + */ + public function createContext(ValidatorInterface $validator, $root) + { + return new ExecutionContext( + $validator, + $root, + $this->translator, + $this->translationDomain + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php new file mode 100644 index 0000000..f3ab3dd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +use Symfony\Component\Validator\Validator\ValidatorInterface; + +/** + * Creates instances of {@link ExecutionContextInterface}. + * + * You can use a custom factory if you want to customize the execution context + * that is passed through the validation run. + * + * @author Bernhard Schussek + */ +interface ExecutionContextFactoryInterface +{ + /** + * Creates a new execution context. + * + * @param ValidatorInterface $validator The validator + * @param mixed $root The root value of the validated + * object graph + * + * @return ExecutionContextInterface The new execution context + */ + public function createContext(ValidatorInterface $validator, $root); +} diff --git a/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php new file mode 100644 index 0000000..548a4db --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/ExecutionContextInterface.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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. + * + * @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->validate($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); +} diff --git a/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php new file mode 100644 index 0000000..8c49c70 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContext.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since Symfony 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). + * + * @author Bernhard Schussek + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +class LegacyExecutionContext extends ExecutionContext +{ + /** + * 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 + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php new file mode 100644 index 0000000..3cd4f79 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Context; + +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since Symfony 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. + * + * @author Bernhard Schussek + * + * @deprecated since version 2.5, to be removed in 3.0. + */ +class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface +{ + private $metadataFactory; + private $translator; + 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 + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/DefaultTranslator.php b/public/system/storage/vendor/symfony/validator/DefaultTranslator.php new file mode 100644 index 0000000..cd9b5d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/DefaultTranslator.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since Symfony 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'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php b/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php new file mode 100644 index 0000000..939161b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/BadMethodCallException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base BadMethodCallException for the Validator component. + * + * @author Bernhard Schussek + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php b/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php new file mode 100644 index 0000000..b24fdd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ConstraintDefinitionException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class ConstraintDefinitionException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php b/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php new file mode 100644 index 0000000..77d09b9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ExceptionInterface.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base ExceptionInterface for the Validator component. + * + * @author Bernhard Schussek + */ +interface ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php b/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php new file mode 100644 index 0000000..ab7e91d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/GroupDefinitionException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class GroupDefinitionException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php b/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..22da39b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base InvalidArgumentException for the Validator component. + * + * @author Bernhard Schussek + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php b/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php new file mode 100644 index 0000000..ce87c42 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/InvalidOptionsException.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class InvalidOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/MappingException.php b/public/system/storage/vendor/symfony/validator/Exception/MappingException.php new file mode 100644 index 0000000..4c8c057 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/MappingException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class MappingException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php b/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php new file mode 100644 index 0000000..07c5d9e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/MissingOptionsException.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class MissingOptionsException extends ValidatorException +{ + private $options; + + public function __construct($message, array $options) + { + parent::__construct($message); + + $this->options = $options; + } + + public function getOptions() + { + return $this->options; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php b/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php new file mode 100644 index 0000000..4cac74c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/NoSuchMetadataException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek + */ +class NoSuchMetadataException extends ValidatorException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php b/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php new file mode 100644 index 0000000..30906e8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/OutOfBoundsException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base OutOfBoundsException for the Validator component. + * + * @author Bernhard Schussek + */ +class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php b/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php new file mode 100644 index 0000000..df4a50c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * Base RuntimeException for the Validator component. + * + * @author Bernhard Schussek + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php b/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php new file mode 100644 index 0000000..485dbca --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/UnexpectedTypeException.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class UnexpectedTypeException extends ValidatorException +{ + public function __construct($value, $expectedType) + { + parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, \is_object($value) ? \get_class($value) : \gettype($value))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php b/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php new file mode 100644 index 0000000..aff569b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/UnsupportedMetadataException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +/** + * @author Bernhard Schussek + */ +class UnsupportedMetadataException extends InvalidArgumentException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php b/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php new file mode 100644 index 0000000..28bd470 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Exception/ValidatorException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Exception; + +class ValidatorException extends RuntimeException +{ +} diff --git a/public/system/storage/vendor/symfony/validator/ExecutionContext.php b/public/system/storage/vendor/symfony/validator/ExecutionContext.php new file mode 100644 index 0000000..8d93e69 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ExecutionContext.php @@ -0,0 +1,269 @@ + + * + * 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 Symfony 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 +{ + private $globalContext; + private $translator; + private $translationDomain; + private $metadata; + private $value; + private $group; + 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 string|null $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); + + $visitor = $this->globalContext->getVisitor(); + foreach ($this->resolveGroups($groups) as $group) { + $visitor->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 string|string[]|null $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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php new file mode 100644 index 0000000..4d5d2f6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ExecutionContextInterface.php @@ -0,0 +1,299 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 string|string[]|null $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 string|string[]|null $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 = ''); +} diff --git a/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php b/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php new file mode 100644 index 0000000..d9bd315 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/GlobalExecutionContextInterface.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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(); +} diff --git a/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php b/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php new file mode 100644 index 0000000..5894397 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/GroupSequenceProviderInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * 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 string[]|GroupSequence An array of validation groups + */ + public function getGroupSequence(); +} diff --git a/public/system/storage/vendor/symfony/validator/LICENSE b/public/system/storage/vendor/symfony/validator/LICENSE new file mode 100644 index 0000000..21d7fb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2018 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php new file mode 100644 index 0000000..34a3b44 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/BlackholeMetadataFactory.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +@trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php new file mode 100644 index 0000000..0adaf04 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/ApcCache.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Cache; + +@trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since Symfony 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php new file mode 100644 index 0000000..f770f46 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/CacheInterface.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\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. + */ + public function write(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php b/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php new file mode 100644 index 0000000..36f1feb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Cache/DoctrineCache.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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; + + public function __construct(Cache $cache) + { + $this->cache = $cache; + } + + public function setCache(Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function has($class) + { + return $this->cache->contains($class); + } + + /** + * {@inheritdoc} + */ + public function read($class) + { + return $this->cache->fetch($class); + } + + /** + * {@inheritdoc} + */ + public function write(ClassMetadata $metadata) + { + $this->cache->save($metadata->getClassName(), $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php b/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php new file mode 100644 index 0000000..c78fb42 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/CascadingStrategy.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether an object should be cascaded. + * + * Cascading is relevant for any node type but class nodes. If such a node + * contains an object of value, and if cascading is enabled, then the node + * traverser will try to find class metadata for that object and validate the + * object against that metadata. + * + * If no metadata is found for a cascaded object, and if that object implements + * {@link \Traversable}, the node traverser will iterate over the object and + * cascade each object or collection contained within, unless iteration is + * prohibited by the specified {@link TraversalStrategy}. + * + * Although the constants currently represent a boolean switch, they are + * implemented as bit mask in order to allow future extensions. + * + * @author Bernhard Schussek + * + * @see TraversalStrategy + */ +class CascadingStrategy +{ + /** + * Specifies that a node should not be cascaded. + */ + const NONE = 1; + + /** + * Specifies that a node should be cascaded. + */ + const CASCADE = 2; + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php new file mode 100644 index 0000000..c3a6544 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadata.php @@ -0,0 +1,591 @@ + + * + * 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 Symfony 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 $this + */ + public function addPropertyConstraint($property, Constraint $constraint) + { + if (!isset($this->properties[$property])) { + $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->properties[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->properties[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addPropertyConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addPropertyConstraint($property, $constraint); + } + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * The name of the getter is assumed to be the name of the property with an + * uppercased first letter and either the prefix "get" or "is". + * + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterConstraint($property, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * Adds a constraint to the getter of the given property. + * + * @param string $property The name of the property + * @param string $method The name of the getter method + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterMethodConstraint($property, $method, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property, $method); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + + /** + * @param string $property + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterConstraints($property, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterConstraint($property, $constraint); + } + + return $this; + } + + /** + * @param string $property + * @param string $method + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterMethodConstraints($property, $method, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterMethodConstraint($property, $method, $constraint); + } + + return $this; + } + + /** + * Merges the constraints of the given metadata into this object. + */ + public function mergeConstraints(ClassMetadata $source) + { + if ($source->isGroupSequenceProvider()) { + $this->setGroupSequenceProvider(true); + } + + foreach ($source->getConstraints() as $constraint) { + $this->addConstraint(clone $constraint); + } + + foreach ($source->getConstrainedProperties() as $property) { + foreach ($source->getPropertyMetadata($property) as $member) { + $member = clone $member; + + foreach ($member->getConstraints() as $constraint) { + if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) { + $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint; + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + } + + $this->addPropertyMetadata($member); + + if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) { + $property = $member->getPropertyName(); + + if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) { + $this->properties[$property] = $member; + } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) { + $this->getters[$property] = $member; + } + } + } + } + } + + /** + * 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 Symfony 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 Symfony 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 Symfony 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 string[]|GroupSequence $groupSequence An array of group names + * + * @return $this + * + * @throws GroupDefinitionException + */ + public function setGroupSequence($groupSequence) + { + if ($this->isGroupSequenceProvider()) { + throw new GroupDefinitionException('Defining a static group sequence is not allowed with a group sequence provider'); + } + + if (\is_array($groupSequence)) { + $groupSequence = new GroupSequence($groupSequence); + } + + if (\in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is not allowed in group sequences', Constraint::DEFAULT_GROUP)); + } + + if (!\in_array($this->getDefaultGroup(), $groupSequence->groups, true)) { + throw new GroupDefinitionException(sprintf('The group "%s" is missing in the group sequence', $this->getDefaultGroup())); + } + + $this->groupSequence = $groupSequence; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function hasGroupSequence() + { + return $this->groupSequence && \count($this->groupSequence->groups) > 0; + } + + /** + * {@inheritdoc} + */ + public function getGroupSequence() + { + return $this->groupSequence; + } + + /** + * Returns a ReflectionClass instance for this class. + * + * @return \ReflectionClass + */ + public function getReflectionClass() + { + if (!$this->reflClass) { + $this->reflClass = new \ReflectionClass($this->getClassName()); + } + + return $this->reflClass; + } + + /** + * Sets whether a group sequence provider should be used. + * + * @param bool $active + * + * @throws GroupDefinitionException + */ + public function setGroupSequenceProvider($active) + { + if ($this->hasGroupSequence()) { + throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence'); + } + + if (!$this->getReflectionClass()->implementsInterface('Symfony\Component\Validator\GroupSequenceProviderInterface')) { + throw new GroupDefinitionException(sprintf('Class "%s" must implement GroupSequenceProviderInterface', $this->name)); + } + + $this->groupSequenceProvider = $active; + } + + /** + * {@inheritdoc} + */ + public function isGroupSequenceProvider() + { + return $this->groupSequenceProvider; + } + + /** + * Class nodes are never cascaded. + * + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return CascadingStrategy::NONE; + } + + private function addPropertyMetadata(PropertyMetadataInterface $metadata) + { + $property = $metadata->getPropertyName(); + + $this->members[$property][] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php new file mode 100644 index 0000000..17c459b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataFactory.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +@trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since Symfony 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php new file mode 100644 index 0000000..d8c3d84 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ClassMetadataInterface.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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. + * + * @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(); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php new file mode 100644 index 0000000..2c9b080 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/ElementMetadata.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php new file mode 100644 index 0000000..5b38d0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +/** + * Metadata factory that does not store metadata. + * + * This implementation is useful if you want to validate values against + * constraints only and you don't need to add constraints to classes and + * properties. + * + * @author Fabien Potencier + */ +class BlackHoleMetadataFactory implements MetadataFactoryInterface +{ + /** + * {@inheritdoc} + */ + public function getMetadataFor($value) + { + throw new \LogicException('This class does not support metadata.'); + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + return false; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php new file mode 100644 index 0000000..fc1236e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -0,0 +1,167 @@ + + * + * 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 +{ + protected $loader; + 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 (!class_exists($class) && !interface_exists($class, false)) { + throw new NoSuchMetadataException(sprintf('The class or interface "%s" does not exist.', $class)); + } + + if (null !== $this->cache && false !== ($metadata = $this->cache->read($class))) { + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + $metadata = new ClassMetadata($class); + + if (null !== $this->loader) { + $this->loader->loadClassMetadata($metadata); + } + + if (null !== $this->cache) { + $this->cache->write($metadata); + } + + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; + } + + private function mergeConstraints(ClassMetadata $metadata) + { + // Include constraints from the parent class + if ($parent = $metadata->getReflectionClass()->getParentClass()) { + $metadata->mergeConstraints($this->getMetadataFor($parent->name)); + } + + $interfaces = $metadata->getReflectionClass()->getInterfaces(); + + $interfaces = array_filter($interfaces, function ($interface) use ($parent, $interfaces) { + $interfaceName = $interface->getName(); + + if ($parent && $parent->implementsInterface($interfaceName)) { + return false; + } + + foreach ($interfaces as $i) { + if ($i !== $interface && $i->implementsInterface($interfaceName)) { + return false; + } + } + + return true; + }); + + // Include constraints from all directly implemented interfaces + foreach ($interfaces as $interface) { + if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { + continue; + } + $metadata->mergeConstraints($this->getMetadataFor($interface->name)); + } + } + + /** + * {@inheritdoc} + */ + public function hasMetadataFor($value) + { + if (!\is_object($value) && !\is_string($value)) { + return false; + } + + $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); + + return class_exists($class) || interface_exists($class, false); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php new file mode 100644 index 0000000..438ef98 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Factory; + +use Symfony\Component\Validator\MetadataFactoryInterface as LegacyMetadataFactoryInterface; + +/** + * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. + * + * @author Bernhard Schussek + */ +interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php new file mode 100644 index 0000000..2e4330f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/GenericMetadata.php @@ -0,0 +1,237 @@ + + * + * 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. + * + * @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 + * + * @return $this + * + * @throws ConstraintDefinitionException When trying to add the + * {@link Traverse} constraint + */ + public function addConstraint(Constraint $constraint) + { + if ($constraint instanceof Traverse) { + throw new ConstraintDefinitionException(sprintf('The constraint "%s" can only be put on classes. Please use "Symfony\Component\Validator\Constraints\Valid" instead.', \get_class($constraint))); + } + + if ($constraint instanceof Valid) { + $this->cascadingStrategy = CascadingStrategy::CASCADE; + + if ($constraint->traverse) { + // 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 $this + */ + public function addConstraints(array $constraints) + { + foreach ($constraints as $constraint) { + $this->addConstraint($constraint); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getConstraints() + { + return $this->constraints; + } + + /** + * Returns whether this element has any constraints. + * + * @return bool + */ + public function hasConstraints() + { + return \count($this->constraints) > 0; + } + + /** + * {@inheritdoc} + * + * Aware of the global group (* group). + */ + public function findConstraints($group) + { + return isset($this->constraintsByGroup[$group]) + ? $this->constraintsByGroup[$group] + : array(); + } + + /** + * {@inheritdoc} + */ + public function getCascadingStrategy() + { + return $this->cascadingStrategy; + } + + /** + * {@inheritdoc} + */ + public function getTraversalStrategy() + { + return $this->traversalStrategy; + } + + /** + * 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.'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php new file mode 100644 index 0000000..5a72bd8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/GetterMetadata.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 +{ + /** + * @param string $class The class the getter is defined on + * @param string $property The property which the getter returns + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) + * + * @throws ValidatorException + */ + public function __construct($class, $property, $method = null) + { + if (null === $method) { + $getMethod = 'get'.ucfirst($property); + $isMethod = 'is'.ucfirst($property); + $hasMethod = 'has'.ucfirst($property); + + if (method_exists($class, $getMethod)) { + $method = $getMethod; + } elseif (method_exists($class, $isMethod)) { + $method = $isMethod; + } elseif (method_exists($class, $hasMethod)) { + $method = $hasMethod; + } else { + throw new ValidatorException(sprintf('Neither of these methods exist in class %s: %s, %s, %s', $class, $getMethod, $isMethod, $hasMethod)); + } + } elseif (!method_exists($class, $method)) { + throw new ValidatorException(sprintf('The %s() method does not exist in class %s.', $method, $class)); + } + + parent::__construct($class, $method, $property); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->newReflectionMember($object)->invoke($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + return new \ReflectionMethod($objectOrClassName, $this->getName()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php new file mode 100644 index 0000000..9d92de3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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\\'; + + 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 (false !== strpos($name, '\\') && class_exists($name)) { + $className = (string) $name; + } elseif (false !== strpos($name, ':')) { + list($prefix, $className) = explode(':', $name, 2); + + if (!isset($this->namespaces[$prefix])) { + throw new MappingException(sprintf('Undefined namespace prefix "%s"', $prefix)); + } + + $className = $this->namespaces[$prefix].$className; + } else { + $className = self::DEFAULT_NAMESPACE.$name; + } + + return new $className($options); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php new file mode 100644 index 0000000..c2d1bdf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + 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->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint); + } else { + throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name)); + } + } + + $success = true; + } + } + } + + return $success; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php new file mode 100644 index 0000000..b8f9490 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FileLoader.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + protected $file; + + /** + * Creates a new loader. + * + * @param string $file The mapping file to load + * + * @throws MappingException If the file does not exist or is not readable + */ + public function __construct($file) + { + if (!is_file($file)) { + throw new MappingException(sprintf('The mapping file "%s" does not exist', $file)); + } + + if (!is_readable($file)) { + throw new MappingException(sprintf('The mapping file "%s" is not readable', $file)); + } + + if (!stream_is_local($this->file)) { + throw new MappingException(sprintf('The mapping file "%s" is not a local file', $file)); + } + + $this->file = $file; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php new file mode 100644 index 0000000..571c7e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/FilesLoader.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Base loader for loading validation metadata from a list of files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see YamlFilesLoader + * @see XmlFilesLoader + */ +abstract class FilesLoader extends LoaderChain +{ + /** + * Creates a new loader. + * + * @param array $paths An array of file paths + */ + public function __construct(array $paths) + { + parent::__construct($this->getFileLoaders($paths)); + } + + /** + * Returns an array of file loaders for the given file paths. + * + * @param array $paths An array of file paths + * + * @return LoaderInterface[] The metadata loaders + */ + protected function getFileLoaders($paths) + { + $loaders = array(); + + foreach ($paths as $path) { + $loaders[] = $this->getFileLoaderInstance($path); + } + + return $loaders; + } + + /** + * Creates a loader for the given file path. + * + * @param string $path The file path + * + * @return LoaderInterface The created loader + */ + abstract protected function getFileLoaderInstance($path); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php new file mode 100644 index 0000000..2c5108f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderChain.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + protected $loaders; + + /** + * @param LoaderInterface[] $loaders The metadata loaders to use + * + * @throws MappingException If any of the loaders has an invalid type + */ + public function __construct(array $loaders) + { + foreach ($loaders as $loader) { + if (!$loader instanceof LoaderInterface) { + throw new MappingException(sprintf('Class %s is expected to implement LoaderInterface', \get_class($loader))); + } + } + + $this->loaders = $loaders; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + $success = false; + + foreach ($this->loaders as $loader) { + $success = $loader->loadClassMetadata($metadata) || $success; + } + + return $success; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php new file mode 100644 index 0000000..d988309 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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. + * + * @return bool Whether the loader succeeded + */ + public function loadClassMetadata(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php new file mode 100644 index 0000000..95fc578 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\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 +{ + protected $methodName; + + /** + * Creates a new loader. + * + * @param string $methodName The name of the static method to call + */ + public function __construct($methodName = 'loadValidatorMetadata') + { + $this->methodName = $methodName; + } + + /** + * {@inheritdoc} + */ + public function loadClassMetadata(ClassMetadata $metadata) + { + /** @var \ReflectionClass $reflClass */ + $reflClass = $metadata->getReflectionClass(); + + if (!$reflClass->isInterface() && $reflClass->hasMethod($this->methodName)) { + $reflMethod = $reflClass->getMethod($this->methodName); + + if ($reflMethod->isAbstract()) { + return false; + } + + if (!$reflMethod->isStatic()) { + throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->name, $this->methodName)); + } + + if ($reflMethod->getDeclaringClass()->name != $reflClass->name) { + return false; + } + + $reflMethod->invoke(null, $metadata); + + return true; + } + + return false; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php new file mode 100644 index 0000000..0c6c19b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php @@ -0,0 +1,213 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 = XmlUtils::phpize(trim($node)); + } else { + $options = null; + } + + $constraints[] = $this->newConstraint((string) $node['name'], $options); + } + + return $constraints; + } + + /** + * Parses a collection of "value" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The values + */ + protected function parseValues(\SimpleXMLElement $nodes) + { + $values = array(); + + foreach ($nodes as $node) { + if (\count($node) > 0) { + if (\count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (\count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = trim($node); + } + + if (isset($node['key'])) { + $values[(string) $node['key']] = $value; + } else { + $values[] = $value; + } + } + + return $values; + } + + /** + * Parses a collection of "option" XML nodes. + * + * @param \SimpleXMLElement $nodes The XML nodes + * + * @return array The options + */ + protected function parseOptions(\SimpleXMLElement $nodes) + { + $options = array(); + + foreach ($nodes as $node) { + if (\count($node) > 0) { + if (\count($node->value) > 0) { + $value = $this->parseValues($node->value); + } elseif (\count($node->constraint) > 0) { + $value = $this->parseConstraints($node->constraint); + } else { + $value = array(); + } + } else { + $value = XmlUtils::phpize($node); + if (\is_string($value)) { + $value = trim($value); + } + } + + $options[(string) $node['name']] = $value; + } + + return $options; + } + + /** + * Loads the XML class descriptions from the given file. + * + * @param string $path The path of the XML file + * + * @return \SimpleXMLElement The class descriptions + * + * @throws MappingException If the file could not be loaded + */ + protected function parseFile($path) + { + try { + $dom = XmlUtils::loadFile($path, __DIR__.'/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd'); + } catch (\Exception $e) { + throw new MappingException($e->getMessage(), $e->getCode(), $e); + } + + return simplexml_import_dom($dom); + } + + private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription) + { + if (\count($classDescription->{'group-sequence-provider'}) > 0) { + $metadata->setGroupSequenceProvider(true); + } + + foreach ($classDescription->{'group-sequence'} as $groupSequence) { + if (\count($groupSequence->value) > 0) { + $metadata->setGroupSequence($this->parseValues($groupSequence[0]->value)); + } + } + + foreach ($this->parseConstraints($classDescription->constraint) as $constraint) { + $metadata->addConstraint($constraint); + } + + foreach ($classDescription->property as $property) { + foreach ($this->parseConstraints($property->constraint) as $constraint) { + $metadata->addPropertyConstraint((string) $property['name'], $constraint); + } + } + + foreach ($classDescription->getter as $getter) { + foreach ($this->parseConstraints($getter->constraint) as $constraint) { + $metadata->addGetterConstraint((string) $getter['property'], $constraint); + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php new file mode 100644 index 0000000..6017c3f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of XML files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see FilesLoader + */ +class XmlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new XmlFileLoader($file); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php new file mode 100644 index 0000000..d1ec7f0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php @@ -0,0 +1,178 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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->classes = $this->parseFile($this->file); + + if (isset($this->classes['namespaces'])) { + foreach ($this->classes['namespaces'] as $alias => $namespace) { + $this->addNamespaceAlias($alias, $namespace); + } + + unset($this->classes['namespaces']); + } + } + + 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 The class descriptions + * + * @throws \InvalidArgumentException If the file could not be loaded or did + * not contain a YAML array + */ + private function parseFile($path) + { + try { + $classes = $this->yamlParser->parse(file_get_contents($path)); + } catch (ParseException $e) { + throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e); + } + + // empty file + if (null === $classes) { + return array(); + } + + // not an array + if (!\is_array($classes)) { + throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $this->file)); + } + + return $classes; + } + + /** + * 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); + } + } + } + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php new file mode 100644 index 0000000..235856f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Loader; + +/** + * Loads validation metadata from a list of YAML files. + * + * @author Bulat Shakirzyanov + * @author Bernhard Schussek + * + * @see FilesLoader + */ +class YamlFilesLoader extends FilesLoader +{ + /** + * {@inheritdoc} + */ + public function getFileLoaderInstance($file) + { + return new YamlFileLoader($file); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd b/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd new file mode 100644 index 0000000..1ca840b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php new file mode 100644 index 0000000..565f2f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/MemberMetadata.php @@ -0,0 +1,248 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + /** + * @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; + + /** + * @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; + + /** + * @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(); + + /** + * @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 Symfony 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 Symfony 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 Symfony 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 Symfony 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); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php new file mode 100644 index 0000000..1e9d3c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/MetadataInterface.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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. + * + * @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(); +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php new file mode 100644 index 0000000..b03a059 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadata.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + /** + * @param string $class The class this property is defined on + * @param string $name The name of this property + * + * @throws ValidatorException + */ + public function __construct($class, $name) + { + if (!property_exists($class, $name)) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s"', $name, $class)); + } + + parent::__construct($class, $name, $name); + } + + /** + * {@inheritdoc} + */ + public function getPropertyValue($object) + { + return $this->getReflectionMember($object)->getValue($object); + } + + /** + * {@inheritdoc} + */ + protected function newReflectionMember($objectOrClassName) + { + $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); + + while (!property_exists($objectOrClassName, $this->getName())) { + $objectOrClassName = get_parent_class($objectOrClassName); + + if (false === $objectOrClassName) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass)); + } + } + + $member = new \ReflectionProperty($objectOrClassName, $this->getName()); + $member->setAccessible(true); + + return $member; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php new file mode 100644 index 0000000..d7a4114 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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. + * + * @author Bernhard Schussek + * + * @see MetadataInterface + * @see CascadingStrategy + * @see TraversalStrategy + */ +interface PropertyMetadataInterface extends MetadataInterface, LegacyPropertyMetadataInterface, ClassBasedInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php b/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php new file mode 100644 index 0000000..164992b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Mapping/TraversalStrategy.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping; + +/** + * Specifies whether and how a traversable object should be traversed. + * + * If the node traverser traverses a node whose value is an instance of + * {@link \Traversable}, and if that node is either a class node or if + * cascading is enabled, then the node's traversal strategy will be checked. + * Depending on the requested traversal strategy, the node traverser will + * iterate over the object and cascade each object or collection returned by + * the iterator. + * + * The traversal strategy is ignored for arrays. Arrays are always iterated. + * + * @author Bernhard Schussek + * + * @see CascadingStrategy + */ +class TraversalStrategy +{ + /** + * Specifies that a node's value should be iterated only if it is an + * instance of {@link \Traversable}. + */ + const IMPLICIT = 1; + + /** + * Specifies that a node's value should never be iterated. + */ + const NONE = 2; + + /** + * Specifies that a node's value should always be iterated. If the value is + * not an instance of {@link \Traversable}, an exception should be thrown. + */ + const TRAVERSE = 4; + + /** + * 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() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php b/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php new file mode 100644 index 0000000..555bea9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/MetadataFactoryInterface.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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); +} diff --git a/public/system/storage/vendor/symfony/validator/MetadataInterface.php b/public/system/storage/vendor/symfony/validator/MetadataInterface.php new file mode 100644 index 0000000..2c89449 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/MetadataInterface.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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); +} diff --git a/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php b/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php new file mode 100644 index 0000000..5f9cdad --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ObjectInitializerInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * Prepares an object for validation. + * + * Concrete implementations of this interface are used by {@link ValidationVisitorInterface} + * and {@link Validator\ContextualValidatorInterface} to initialize objects just before validating them. + * + * @author Fabien Potencier + * @author Bernhard Schussek + */ +interface ObjectInitializerInterface +{ + /** + * Initializes an object just before validation. + * + * @param object $object The object to validate + */ + public function initialize($object); +} diff --git a/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php b/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php new file mode 100644 index 0000000..b5c9cf4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/PropertyMetadataContainerInterface.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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); +} diff --git a/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php b/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php new file mode 100644 index 0000000..64ae881 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/PropertyMetadataInterface.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); +} diff --git a/public/system/storage/vendor/symfony/validator/README.md b/public/system/storage/vendor/symfony/validator/README.md new file mode 100644 index 0000000..3ccb290 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/README.md @@ -0,0 +1,16 @@ +Validator Component +=================== + +The Validator component provides tools to validate values following the +[JSR-303 Bean Validation specification][1]. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/validator.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) + +[1]: http://jcp.org/en/jsr/detail?id=303 diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf new file mode 100644 index 0000000..177bb00 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.af.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Hierdie waarde moet vals wees. + + + This value should be true. + Hierdie waarde moet waar wees. + + + This value should be of type {{ type }}. + Hierdie waarde moet van die soort {{type}} wees. + + + This value should be blank. + Hierdie waarde moet leeg wees. + + + The value you selected is not a valid choice. + Die waarde wat jy gekies het is nie 'n geldige keuse nie. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Jy moet ten minste {{ limit }} kies.|Jy moet ten minste {{ limit }} keuses kies. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Jy moet by die meeste {{ limit }} keuse kies.|Jy moet by die meeste {{ limit }} keuses kies. + + + One or more of the given values is invalid. + Een of meer van die gegewe waardes is ongeldig. + + + This field was not expected. + Die veld is nie verwag nie. + + + This field is missing. + Hierdie veld ontbreek. + + + This value is not a valid date. + Hierdie waarde is nie 'n geldige datum nie. + + + This value is not a valid datetime. + Hierdie waarde is nie 'n geldige datum en tyd nie. + + + This value is not a valid email address. + Hierdie waarde is nie 'n geldige e-pos adres nie. + + + The file could not be found. + Die lêer kon nie gevind word nie. + + + The file is not readable. + Die lêer kan nie gelees word nie. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Die lêer is te groot ({{ size }} {{ suffix }}). Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Die MIME-tipe van die lêer is ongeldig ({{ type }}). Toegelaat MIME-tipes is {{ types }}. + + + This value should be {{ limit }} or less. + Hierdie waarde moet {{ limit }} of minder wees. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Hierdie waarde is te lank. Dit moet {{ limit }} karakter of minder wees.|Hierdie waarde is te lank. Dit moet {{ limit }} karakters of minder wees. + + + This value should be {{ limit }} or more. + Hierdie waarde moet {{ limit }} of meer wees. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Hierdie waarde is te kort. Dit moet {{ limit }} karakter of meer wees.|Hierdie waarde is te kort. Dit moet {{ limit }} karakters of meer wees. + + + This value should not be blank. + Hierdie waarde moet nie leeg wees nie. + + + This value should not be null. + Hierdie waarde moet nie nul wees nie. + + + This value should be null. + Hierdie waarde moet nul wees. + + + This value is not valid. + Hierdie waarde is nie geldig nie. + + + This value is not a valid time. + Hierdie waarde is nie 'n geldige tyd nie. + + + This value is not a valid URL. + Hierdie waarde is nie 'n geldige URL nie. + + + The two values should be equal. + Die twee waardes moet gelyk wees. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Die lêer is te groot. Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. + + + The file is too large. + Die lêer is te groot. + + + The file could not be uploaded. + Die lêer kan nie opgelaai word nie. + + + This value should be a valid number. + Hierdie waarde moet 'n geldige nommer wees. + + + This file is not a valid image. + Hierdie lêer is nie 'n geldige beeld nie. + + + This is not a valid IP address. + Hierdie is nie 'n geldige IP-adres nie. + + + This value is not a valid language. + Hierdie waarde is nie 'n geldige taal nie. + + + This value is not a valid locale. + Hierdie waarde is nie 'n geldige land instelling nie. + + + This value is not a valid country. + Hierdie waarde is nie 'n geldige land nie. + + + This value is already used. + Hierdie waarde word reeds gebruik. + + + The size of the image could not be detected. + Die grootte van die beeld kon nie opgespoor word nie. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Die beeld breedte is te groot ({{ width }}px). Toegelaat maksimum breedte is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Die beeld breedte is te klein ({{ width }}px). Minimum breedte verwag is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Die beeld hoogte is te groot ({{ height }}px). Toegelaat maksimum hoogte is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Die beeld hoogte is te klein ({{ height }}px). Minimum hoogte verwag is {{ min_height }}px. + + + This value should be the user's current password. + Hierdie waarde moet die huidige wagwoord van die gebruiker wees. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Hierdie waarde moet presies {{ limit }} karakter wees.|Hierdie waarde moet presies {{ limit }} karakters wees. + + + The file was only partially uploaded. + Die lêer is slegs gedeeltelik opgelaai. + + + No file was uploaded. + Geen lêer is opgelaai nie. + + + No temporary folder was configured in php.ini. + Geen tydelike lêer is ingestel in php.ini nie. + + + Cannot write temporary file to disk. + Kan nie tydelike lêer skryf op skyf nie. + + + A PHP extension caused the upload to fail. + 'n PHP-uitbreiding veroorsaak die oplaai van die lêer om te misluk. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Hierdie versameling moet {{ limit }} element of meer bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Hierdie versameling moet {{ limit }} element of minder bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Hierdie versameling moet presies {{ limit }} element bevat.|Hierdie versameling moet presies {{ limit }} elemente bevat. + + + Invalid card number. + Ongeldige kredietkaart nommer. + + + Unsupported card type or invalid card number. + Nie-ondersteunde tipe kaart of ongeldige kredietkaart nommer. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf new file mode 100644 index 0000000..4950e0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ar.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + هذه القيمة يجب أن تكون خاطئة. + + + This value should be true. + هذه القيمة يجب أن تكون حقيقية. + + + This value should be of type {{ type }}. + هذه القيمة يجب ان تكون من نوع {{ type }}. + + + This value should be blank. + هذه القيمة يجب ان تكون ÙØ§Ø±ØºØ©. + + + The value you selected is not a valid choice. + القيمة المختارة ليست خيارا صحيحا. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيارات على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيارات على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر. + + + One or more of the given values is invalid. + واحد أو أكثر من القيم المعطاه خاطئ. + + + This field was not expected. + لم يكن من المتوقع هذا المجال. + + + This field is missing. + هذا المجال Ù…Ùقود. + + + This value is not a valid date. + هذه القيمة ليست تاريخا صالحا. + + + This value is not a valid datetime. + هذه القيمة ليست تاريخا Ùˆ وقتا صالحا. + + + This value is not a valid email address. + هذه القيمة ليست عنوان بريد إلكتروني صحيح. + + + The file could not be found. + لا يمكن العثور على الملÙ. + + + The file is not readable. + المل٠غير قابل للقراءة. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + المل٠كبير جدا ({{ size }} {{ suffix }}).اقصى مساحه مسموح بها ({{ limit }} {{ suffix }}). + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + نوع المل٠غير صحيح ({{ type }}). الانواع المسموح بها هى {{ types }}. + + + This value should be {{ limit }} or less. + هذه القيمة يجب ان تكون {{ limit }} او اقل. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرو٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حر٠او اقل. + + + This value should be {{ limit }} or more. + هذه القيمة يجب ان تكون {{ limit }} او اكثر. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرو٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حر٠او اكثر. + + + This value should not be blank. + هذه القيمة يجب الا تكون ÙØ§Ø±ØºØ©. + + + This value should not be null. + هذه القيمة يجب الا تكون ÙØ§Ø±ØºØ©. + + + This value should be null. + هذه القيمة يجب ان تكون ÙØ§Ø±ØºØ©. + + + This value is not valid. + هذه القيمة غير صحيحة. + + + This value is not a valid time. + هذه القيمة ليست وقت صحيح. + + + This value is not a valid URL. + هذه القيمة ليست رابط الكترونى صحيح. + + + The two values should be equal. + القيمتان يجب ان تكونا متساويتان. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + المل٠كبير جدا. اقصى مساحه مسموح بها {{ limit }} {{ suffix }}. + + + The file is too large. + المل٠كبير جدا. + + + The file could not be uploaded. + لم استطع استقبال الملÙ. + + + This value should be a valid number. + هذه القيمة يجب ان تكون رقم. + + + This file is not a valid image. + هذا المل٠ليس صورة صحيحة. + + + This is not a valid IP address. + هذه القيمة ليست عنوان رقمى صحيح. + + + This value is not a valid language. + هذه القيمة ليست لغة صحيحة. + + + This value is not a valid locale. + هذه القيمة ليست موقع صحيح. + + + This value is not a valid country. + هذه القيمة ليست بلدا صالحا. + + + This value is already used. + هذه القيمة مستخدمة Ø¨Ø§Ù„ÙØ¹Ù„. + + + The size of the image could not be detected. + لم استطع Ù…Ø¹Ø±ÙØ© حجم الصورة. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + عرض الصورة كبير جدا ({{ width }}px). اقصى عرض مسموح به هو{{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + عرض الصورة صغير جدا ({{ width }}px). اقل عرض مسموح به هو{{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + طول الصورة كبير جدا ({{ height }}px). اقصى طول مسموح به هو{{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + طول الصورة صغير جدا ({{ height }}px). اقل طول مسموح به هو{{ min_height }}px. + + + This value should be the user's current password. + هذه القيمة يجب ان تكون كلمة سر المستخدم الحالية. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرو٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حر٠Ùقط. + + + The file was only partially uploaded. + تم استقبال جزء من المل٠Ùقط. + + + No file was uploaded. + لم يتم ارسال اى ملÙ. + + + No temporary folder was configured in php.ini. + لم يتم تهيئة Ø­Ø§ÙØ¸Ø© مؤقتة ÙÙ‰ مل٠php.ini. + + + Cannot write temporary file to disk. + لم استطع كتابة المل٠المؤقت. + + + A PHP extension caused the upload to fail. + احد Ø§Ø¶Ø§ÙØ§Øª PHP تسببت ÙÙ‰ ÙØ´Ù„ استقبال الملÙ. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر Ùقط. + + + Invalid card number. + رقم البطاقه غير صحيح. + + + Unsupported card type or invalid card number. + نوع البطاقه غير مدعوم او الرقم غير صحيح. + + + This is not a valid International Bank Account Number (IBAN). + الرقم IBAN (رقم الحساب المصرÙÙŠ الدولي) الذي تم إدخاله غير صالح. + + + This value is not a valid ISBN-10. + هذه القيمة ليست ISBN-10 صالحة. + + + This value is not a valid ISBN-13. + هذه القيمة ليست ISBN-13 صالحة. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + هذه القيمة ليست ISBN-10 صالحة ولا ISBN-13 صالحة. + + + This value is not a valid ISSN. + هذه القيمة ليست ISSN صالحة. + + + This value is not a valid currency. + العÙملة غير صحيحة. + + + This value should be equal to {{ compared_value }}. + القيمة يجب ان تساوي {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + القيمة يجب ان تكون اعلي من {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + القيمة يجب ان تكون مساوية او اعلي من {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + القيمة يجب ان تطابق {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + القيمة يجب ان تكون اقل من {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + القيمة يجب ان تساوي او تقل عن {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + القيمة يجب ان لا تساوي {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + القيمة يجب ان لا تطابق {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + نسبة العرض على Ø§Ù„Ø§Ø±ØªÙØ§Ø¹ للصورة كبيرة جدا ({{ ratio }}). الحد الأقصى للنسبة المسموح به هو {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + نسبة العرض على Ø§Ù„Ø§Ø±ØªÙØ§Ø¹ للصورة صغيرة جدا ({{ ratio }}). الحد الأدنى للنسبة المسموح به هو {{ max_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + الصورة مربعة ({{ width }}x{{ height }}px). الصور المربعة غير مسموح بها. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + الصورة ÙÙŠ وضع Ø£Ùقي ({{ width }}x{{ height }}px). الصور ÙÙŠ وضع Ø£Ùقي غير مسموح بها. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + الصورة ÙÙŠ وضع عمودي ({{ width }}x{{ height }}px). الصور ÙÙŠ وضع عمودي غير مسموح بها. + + + An empty file is not allowed. + Ù…Ù„Ù ÙØ§Ø±Øº غير مسموح به. + + + The host could not be resolved. + يتعذر الإتصال بالنطاق. + + + This value does not match the expected {{ charset }} charset. + هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf new file mode 100644 index 0000000..add868c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.az.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Bu dÉ™yÉ™r false olmalıdır. + + + This value should be true. + Bu dÉ™yÉ™r true olmalıdır. + + + This value should be of type {{ type }}. + Bu dÉ™yÉ™rin tipi {{ type }} olmalıdır. + + + This value should be blank. + Bu dÉ™yÉ™r boÅŸ olmalıdır. + + + The value you selected is not a valid choice. + Seçdiyiniz dÉ™yÉ™r düzgün bir seçim deÄŸil. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Æn az {{ limit }} seçim qeyd edilmÉ™lidir. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Æn çox {{ limit }} seçim qeyd edilmÉ™lidir. + + + One or more of the given values is invalid. + TÉ™qdim edilÉ™n dÉ™yÉ™rlÉ™rdÉ™n bir vÉ™ ya bir neçəsi yanlışdır. + + + This field was not expected. + Bu sahÉ™ gözlÉ™nilmirdi. + + + This field is missing. + Bu sahÉ™ É™ksikdir. + + + This value is not a valid date. + Bu dÉ™yÉ™r düzgün bir tarix deyil. + + + This value is not a valid datetime. + Bu dÉ™yÉ™r düzgün bir tarixsaat deyil. + + + This value is not a valid email address. + Bu dÉ™yÉ™r düzgün bir e-poçt adresi deyil. + + + The file could not be found. + Fayl tapılmadı. + + + The file is not readable. + Fayl oxunabilÉ™n deyil. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fayl çox böyükdür ({{ size }} {{ suffix }}). İcazÉ™ verilÉ™n maksimum fayl ölçüsü {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faylın mime tipi yanlışdr ({{ type }}). İcazÉ™ verilÉ™n mime tiplÉ™ri {{ types }}. + + + This value should be {{ limit }} or less. + Bu dÉ™yÉ™r {{ limit }} vÉ™ ya altında olmalıdır. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Bu dÉ™yÉ™r çox uzundur. {{ limit }} vÉ™ ya daha az simvol olmalıdır. + + + This value should be {{ limit }} or more. + Bu dÉ™yÉ™r {{ limit }} veya daha fazla olmalıdır. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Bu dÉ™yÉ™r çox qısadır. {{ limit }} vÉ™ ya daha çox simvol olmalıdır. + + + This value should not be blank. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value should not be null. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value should be null. + Bu dÉ™yÉ™r boÅŸ olmamalıdır. + + + This value is not valid. + Bu dÉ™yÉ™r doÄŸru deyil. + + + This value is not a valid time. + Bu dÉ™yÉ™r doÄŸru bir saat deyil. + + + This value is not a valid URL. + Bu dÉ™yÉ™r doÄŸru bir URL deÄŸil. + + + The two values should be equal. + İki dÉ™yÉ™r eyni olmalıdır. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fayl çox böyükdür. İcazÉ™ verilÉ™n É™n böyük fayl ölçüsü {{ limit }} {{ suffix }}. + + + The file is too large. + Fayl çox böyükdür. + + + The file could not be uploaded. + Fayl yüklÉ™nÉ™bilmir. + + + This value should be a valid number. + Bu dÉ™yÉ™r rÉ™qÉ™m olmalıdır. + + + This file is not a valid image. + Bu fayl düzgün bir ÅŸÉ™kil deyil. + + + This is not a valid IP address. + Bu düzgün bir IP adresi deyil. + + + This value is not a valid language. + Bu dÉ™yÉ™r düzgün bir dil deyil. + + + This value is not a valid locale. + Bu dÉ™yÉ™r düzgün bir dil deyil. + + + This value is not a valid country. + Bu dÉ™yÉ™r düzgün bir ölkÉ™ deyil. + + + This value is already used. + Bu dÉ™yÉ™r hal-hazırda istifadÉ™dÉ™dir. + + + The size of the image could not be detected. + Şəklin ölçüsü hesablana bilmir. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Şəklin geniÅŸliyi çox böyükdür ({{ width }}px). İcazÉ™ verilÉ™n É™n böyük geniÅŸlik {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Şəklin geniÅŸliyi çox kiçikdir ({{ width }}px). Æn az {{ min_width }}px olmalıdır. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Şəklin yüksÉ™kliyi çox böyükdür ({{ height }}px). İcazÉ™ verilÉ™n É™n böyük yüksÉ™klik {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Şəklin yüksÉ™kliyi çox kiçikdir ({{ height }}px). Æn az {{ min_height }}px olmalıdır. + + + This value should be the user's current password. + Bu dÉ™yÉ™r istifadəçinin hazırkı parolu olmalıdır. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Bu dÉ™yÉ™r tam olaraq {{ limit }} simvol olmaldır. + + + The file was only partially uploaded. + Fayl qismÉ™n yüklÉ™ndi. + + + No file was uploaded. + Fayl yüklÉ™nmÉ™di. + + + No temporary folder was configured in php.ini. + php.ini'dÉ™ müvÉ™qqÉ™ti qovluq quraÅŸdırılmayıb. + + + Cannot write temporary file to disk. + MüvÉ™qqÉ™ti fayl diskÉ™ yazıla bilmir. + + + A PHP extension caused the upload to fail. + Bir PHP É™lavÉ™si faylın yüklÉ™nmÉ™sinÉ™ mane oldu. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Bu kolleksiyada {{ limit }} vÉ™ ya daha çox element olmalıdır. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Bu kolleksiyada {{ limit }} vÉ™ ya daha az element olmalıdır. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Bu kolleksiyada tam olaraq {{ limit }} element olmalıdır. + + + Invalid card number. + Yanlış kart nömrÉ™si. + + + Unsupported card type or invalid card number. + DÉ™stÉ™klÉ™nmÉ™yÉ™n kart tipi vÉ™ ya yanlış kart nömrÉ™si. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf new file mode 100644 index 0000000..dc6f95f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.bg.xlf @@ -0,0 +1,323 @@ + + + + + + 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). + + + Error + Грешка + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf new file mode 100644 index 0000000..078a25d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ca.xlf @@ -0,0 +1,311 @@ + + + + + + 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. + + + This is not a valid UUID. + Aquest valor no és un UUID vàlid. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf new file mode 100644 index 0000000..4b96669 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cs.xlf @@ -0,0 +1,323 @@ + + + + + + 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 nebylo oÄekáváno. + + + This field is missing. + Toto pole chybí. + + + This value is not a valid date. + Tato hodnota není platné datum. + + + This value is not a valid datetime. + Tato hodnota není platné datum s Äasovým údajem. + + + This value is not a valid email address. + Tato hodnota není platná e-mailová adresa. + + + The file could not be found. + Soubor nebyl nalezen. + + + The file is not readable. + Soubor je neÄitelný. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Soubor je příliÅ¡ velký ({{ size }} {{ suffix }}). Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Neplatný mime typ souboru ({{ type }}). Povolené mime typy souborů jsou {{ types }}. + + + This value should be {{ limit }} or less. + Tato hodnota musí být {{ limit }} nebo ménÄ›. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znak.|Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znaky.|Tato hodnota je příliÅ¡ dlouhá. Musí obsahovat maximálnÄ› {{ limit }} znaků. + + + This value should be {{ limit }} or more. + Tato hodnota musí být {{ limit }} nebo více. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znak.|Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znaky.|Tato hodnota je příliÅ¡ krátká. Musí obsahovat minimálnÄ› {{ limit }} znaků. + + + This value should not be blank. + Tato hodnota nesmí být prázdná. + + + This value should not be null. + Tato hodnota nesmí být null. + + + This value should be null. + Tato hodnota musí být null. + + + This value is not valid. + Tato hodnota není platná. + + + This value is not a valid time. + Tato hodnota není platný Äasový údaj. + + + This value is not a valid URL. + Tato hodnota není platná URL adresa. + + + The two values should be equal. + Tyto dvÄ› hodnoty musí být stejné. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Soubor je příliÅ¡ velký. Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. + + + The file is too large. + Soubor je příliÅ¡ velký. + + + The file could not be uploaded. + Soubor se nepodaÅ™ilo nahrát. + + + This value should be a valid number. + Tato hodnota musí být Äíslo. + + + This file is not a valid image. + Tento soubor není obrázek. + + + This is not a valid IP address. + Toto není platná IP adresa. + + + This value is not a valid language. + Tento jazyk neexistuje. + + + This value is not a valid locale. + Tato lokalizace neexistuje. + + + This value is not a valid country. + Tato zemÄ› neexistuje. + + + This value is already used. + Tato hodnota je již používána. + + + The size of the image could not be detected. + NepodaÅ™ily se zjistit rozmÄ›ry obrázku. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Obrázek je příliÅ¡ Å¡iroký ({{ width }}px). Maximální povolená šířka obrázku je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Obrázek je příliÅ¡ úzký ({{ width }}px). Minimální šířka musí být {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Obrázek je příliÅ¡ vysoký ({{ height }}px). Maximální povolená výška obrázku je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Obrázek je příliÅ¡ nízký ({{ height }}px). Minimální výška obrázku musí být {{ min_height }}px. + + + This value should be the user's current password. + Tato hodnota musí být aktuální heslo uživatele. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znak.|Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znaky.|Tato hodnota musí mít pÅ™esnÄ› {{ limit }} znaků. + + + The file was only partially uploaded. + Byla nahrána jen Äást souboru. + + + No file was uploaded. + Žádný soubor nebyl nahrán. + + + No temporary folder was configured in php.ini. + V php.ini není nastavena cesta k adresáři pro doÄasné soubory. + + + Cannot write temporary file to disk. + DoÄasný soubor se nepodaÅ™ilo zapsat na disk. + + + A PHP extension caused the upload to fail. + Rozšíření PHP zabránilo nahrání souboru. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat minimálnÄ› {{ limit }} prvků. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat maximálnÄ› {{ limit }} prvků. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvek.|Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvky.|Tato kolekce musí obsahovat pÅ™esnÄ› {{ limit }} prvků. + + + Invalid card number. + Neplatné Äíslo karty. + + + Unsupported card type or invalid card number. + Nepodporovaný typ karty nebo neplatné Äíslo karty. + + + This is not a valid International Bank Account Number (IBAN). + Toto je neplatný IBAN. + + + This value is not a valid ISBN-10. + Tato hodnota není platné ISBN-10. + + + This value is not a valid ISBN-13. + Tato hodnota není platné ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Tato hodnota není platné ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Tato hodnota není platné ISSN. + + + This value is not a valid currency. + Tato mÄ›na neexistuje. + + + This value should be equal to {{ compared_value }}. + Tato hodnota musí být rovna {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Tato hodnota musí být vÄ›tší než {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Tato hodnota musí být vÄ›tší nebo rovna {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Tato hodnota musí být typu {{ compared_value_type }} a zároveň musí být rovna {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Tato hodnota musí být menší než {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Tato hodnota musí být menší nebo rovna {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Tato hodnota nesmí být rovna {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Tato hodnota nesmí být typu {{ compared_value_type }} a zároveň nesmí být rovna {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + PomÄ›r stran obrázku je příliÅ¡ velký ({{ ratio }}). Maximální povolený pomÄ›r stran obrázku je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + PomÄ›r stran obrázku je příliÅ¡ malý ({{ ratio }}). Minimální povolený pomÄ›r stran obrázku je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Strany obrázku jsou Ätvercové ({{ width }}x{{ height }}px). ÄŒtvercové obrázky nejsou povolené. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obrázek je orientovaný na šířku ({{ width }}x{{ height }}px). Obrázky orientované na šířku nejsou povolené. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obrázek je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nejsou povolené. + + + An empty file is not allowed. + Soubor nesmí být prázdný. + + + The host could not be resolved. + Hostitele nebylo možné rozpoznat. + + + This value does not match the expected {{ charset }} charset. + Tato hodnota neodpovídá oÄekávané znakové sadÄ› {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Tato hodnota není platný identifikaÄní kód podniku (BIC). + + + Error + Chyba + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf new file mode 100644 index 0000000..da7cb9a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.cy.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Dylid bod y gwerth hwn yn ffug. + + + This value should be true. + Dylid bod y gwerth hwn yn wir. + + + This value should be of type {{ type }}. + Dylid bod y gwerth hwn bod o fath {{ type }}. + + + This value should be blank. + Dylid bod y gwerth hwn yn wag. + + + The value you selected is not a valid choice. + Nid yw'r gwerth â ddewiswyd yn ddilys. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Rhaid dewis o leiaf {{ limit }} opsiwn. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Rhaid dewis dim mwy na {{ limit }} opsiwn. + + + One or more of the given values is invalid. + Mae un neu fwy o'r gwerthoedd a roddwyd yn annilys. + + + This field was not expected. + Nid oedd disgwyl y maes hwn. + + + This field is missing. + Mae'r maes hwn ar goll. + + + This value is not a valid date. + Nid yw'r gwerth yn ddyddiad dilys. + + + This value is not a valid datetime. + Nid yw'r gwerth yn datetime dilys. + + + This value is not a valid email address. + Nid yw'r gwerth yn gyfeiriad ebost dilys. + + + The file could not be found. + Ni ddarganfyddwyd y ffeil. + + + The file is not readable. + Ni ellir darllen y ffeil. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Mae'r ffeil yn rhy fawr ({{ size }} {{ suffix }}). Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Nid yw math mime y ffeil yn ddilys ({{ type }}). Dyma'r mathau â ganiateir {{ types }}. + + + This value should be {{ limit }} or less. + Dylai'r gwerth hwn fod yn {{ limit }} neu lai. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Mae'r gwerth hwn rhy hir. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu lai. + + + This value should be {{ limit }} or more. + Dylai'r gwerth hwn fod yn {{ limit }} neu fwy. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Mae'r gwerth hwn yn rhy fyr. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu fwy. + + + This value should not be blank. + Ni ddylai'r gwerth hwn fod yn wag. + + + This value should not be null. + Ni ddylai'r gwerth hwn fod yn null. + + + This value should be null. + Dylai'r gwerth fod yn null. + + + This value is not valid. + Nid yw'r gwerth hwn yn ddilys. + + + This value is not a valid time. + Nid yw'r gwerth hwn yn amser dilys. + + + This value is not a valid URL. + Nid yw'r gwerth hwn yn URL dilys. + + + The two values should be equal. + Rhaid i'r ddau werth fod yn gyfystyr a'u gilydd. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Mae'r ffeil yn rhy fawr. Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. + + + The file is too large. + Mae'r ffeil yn rhy fawr. + + + The file could not be uploaded. + Methwyd ag uwchlwytho'r ffeil. + + + This value should be a valid number. + Dylai'r gwerth hwn fod yn rif dilys. + + + This file is not a valid image. + Nid yw'r ffeil hon yn ddelwedd dilys. + + + This is not a valid IP address. + Nid yw hwn yn gyfeiriad IP dilys. + + + This value is not a valid language. + Nid yw'r gwerth hwn yn iaith ddilys. + + + This value is not a valid locale. + Nid yw'r gwerth hwn yn locale dilys. + + + This value is not a valid country. + Nid yw'r gwerth hwn yn wlad dilys. + + + This value is already used. + Mae'r gwerth hwn eisoes yn cael ei ddefnyddio. + + + The size of the image could not be detected. + Methwyd â darganfod maint y ddelwedd. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Mae lled y ddelwedd yn rhy fawr ({{ width }}px). Y lled mwyaf â ganiateir yw {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Mae lled y ddelwedd yn rhy fach ({{ width }}px). Y lled lleiaf â ganiateir yw {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Mae uchder y ddelwedd yn rhy fawr ({{ width }}px). Yr uchder mwyaf â ganiateir yw {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Mae uchder y ddelwedd yn rhy fach ({{ width }}px). Yr uchder lleiaf â ganiateir yw {{ min_height }}px. + + + This value should be the user's current password. + Dylaid bod y gwerth hwn yn gyfrinair presenol y defnyddiwr. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Dylai'r gwerth hwn fod yn union {{ limit }} nodyn cyfrifiadurol o hyd. + + + The file was only partially uploaded. + Dim ond rhan o'r ffeil ag uwchlwythwyd. + + + No file was uploaded. + Ni uwchlwythwyd unrhyw ffeil. + + + No temporary folder was configured in php.ini. + Nid oes ffolder dros-dro wedi'i gosod yn php.ini. + + + Cannot write temporary file to disk. + Methwyd ag ysgrifennu'r ffeil dros-dro ar ddisg. + + + A PHP extension caused the upload to fail. + Methwyd ag uwchlwytho oherwydd ategyn PHP. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu fwy. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu lai. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Dylai'r casgliad hwn gynnwys union {{ limit }} elfen. + + + Invalid card number. + Nid oedd rhif y cerdyn yn ddilys. + + + Unsupported card type or invalid card number. + Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf new file mode 100644 index 0000000..3a545c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.da.xlf @@ -0,0 +1,251 @@ + + + + + + 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. + Den valgte værdi er ikke gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du skal vælge mindst én mulighed.|Du skal vælge mindst {{ limit }} muligheder. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan højst vælge én mulighed.|Du kan højst vælge {{ limit }} muligheder. + + + One or more of the given values is invalid. + En eller flere af de angivne værdier er ugyldige. + + + This field was not expected. + Feltet blev ikke forventet. + + + This field is missing. + Dette felt 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 et gyldigt tidspunkt. + + + This value is not a valid email address. + Værdien er ikke en gyldig e-mailadresse. + + + 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 }}). Maksimale tilladte størrelse er {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Filens MIME-type er ugyldig ({{ type }}). Tilladte MIME-typer 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 mÃ¥ højst indeholde {{ limit }} tegn. + + + 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 indeholde mindst {{ limit }} tegn. + + + 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 et gyldigt klokkeslæt. + + + 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. + Billedet er for bredt ({{ width }}px). Største tilladte bredde er {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Billedet er for smalt ({{ width }}px). Mindste forventede bredde er {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Billedet er for højt ({{ height }}px). Største tilladte højde er {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Billedet er for lavt ({{ height }}px). Mindste forventede højde er {{ min_height }}px. + + + This value should be the user's current password. + Værdien skal være brugerens nuværende adgangskode. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Værdien skal være pÃ¥ præcis {{ limit }} tegn. + + + The file was only partially uploaded. + Filen blev kun delvist 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 mindst ét element.|Denne samling skal indeholde mindst {{ limit }} elementer. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samling skal indeholde højst ét element.|Denne samling skal indeholde højst {{ limit }} elementer. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samling skal indeholde præcis ét 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 et gyldigt 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. + + + Error + Fejl + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf new file mode 100644 index 0000000..3e44e1e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.de.xlf @@ -0,0 +1,327 @@ + + + + + + This value should be false. + Dieser Wert sollte false sein. + + + This value should be true. + Dieser Wert sollte true sein. + + + This value should be of type {{ type }}. + Dieser Wert sollte vom Typ {{ type }} sein. + + + This value should be blank. + Dieser Wert sollte leer sein. + + + The value you selected is not a valid choice. + Sie haben einen ungültigen Wert ausgewählt. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Sie müssen mindestens {{ limit }} Möglichkeit wählen.|Sie müssen mindestens {{ limit }} Möglichkeiten wählen. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Sie dürfen höchstens {{ limit }} Möglichkeit wählen.|Sie dürfen höchstens {{ limit }} Möglichkeiten wählen. + + + One or more of the given values is invalid. + Einer oder mehrere der angegebenen Werte sind ungültig. + + + This field was not expected. + Dieses Feld wurde nicht erwartet. + + + This field is missing. + Dieses Feld fehlt. + + + This value is not a valid date. + Dieser Wert entspricht keiner gültigen Datumsangabe. + + + This value is not a valid datetime. + Dieser Wert entspricht keiner gültigen Datums- und Zeitangabe. + + + This value is not a valid email address. + Dieser Wert ist keine gültige E-Mail-Adresse. + + + The file could not be found. + Die Datei wurde nicht gefunden. + + + The file is not readable. + Die Datei ist nicht lesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Die Datei ist zu groß ({{ size }} {{ suffix }}). Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Der Dateityp ist ungültig ({{ type }}). Erlaubte Dateitypen sind {{ types }}. + + + This value should be {{ limit }} or less. + Dieser Wert sollte kleiner oder gleich {{ limit }} sein. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben. + + + This value should be {{ limit }} or more. + Dieser Wert sollte größer oder gleich {{ limit }} sein. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben. + + + This value should not be blank. + Dieser Wert sollte nicht leer sein. + + + This value should not be null. + Dieser Wert sollte nicht null sein. + + + This value should be null. + Dieser Wert sollte null sein. + + + This value is not valid. + Dieser Wert ist nicht gültig. + + + This value is not a valid time. + Dieser Wert entspricht keiner gültigen Zeitangabe. + + + This value is not a valid URL. + Dieser Wert ist keine gültige URL. + + + The two values should be equal. + Die beiden Werte sollten identisch sein. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. + + + The file is too large. + Die Datei ist zu groß. + + + The file could not be uploaded. + Die Datei konnte nicht hochgeladen werden. + + + This value should be a valid number. + Dieser Wert sollte eine gültige Zahl sein. + + + This file is not a valid image. + Diese Datei ist kein gültiges Bild. + + + This is not a valid IP address. + Dies ist keine gültige IP-Adresse. + + + This value is not a valid language. + Dieser Wert entspricht keiner gültigen Sprache. + + + This value is not a valid locale. + Dieser Wert entspricht keinem gültigen Gebietsschema. + + + This value is not a valid country. + Dieser Wert entspricht keinem gültigen Land. + + + This value is already used. + Dieser Wert wird bereits verwendet. + + + The size of the image could not be detected. + Die Größe des Bildes konnte nicht ermittelt werden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Die Bildbreite ist zu groß ({{ width }}px). Die maximal zulässige Breite beträgt {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Die Bildbreite ist zu gering ({{ width }}px). Die erwartete Mindestbreite beträgt {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Die Bildhöhe ist zu groß ({{ height }}px). Die maximal zulässige Höhe beträgt {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Die Bildhöhe ist zu gering ({{ height }}px). Die erwartete Mindesthöhe beträgt {{ min_height }}px. + + + This value should be the user's current password. + Dieser Wert sollte dem aktuellen Benutzerpasswort entsprechen. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Dieser Wert sollte genau {{ limit }} Zeichen lang sein.|Dieser Wert sollte genau {{ limit }} Zeichen lang sein. + + + The file was only partially uploaded. + Die Datei wurde nur teilweise hochgeladen. + + + No file was uploaded. + Es wurde keine Datei hochgeladen. + + + No temporary folder was configured in php.ini. + Es wurde kein temporärer Ordner in der php.ini konfiguriert oder der temporäre Ordner existiert nicht. + + + Cannot write temporary file to disk. + Kann die temporäre Datei nicht speichern. + + + A PHP extension caused the upload to fail. + Eine PHP-Erweiterung verhinderte den Upload. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Diese Sammlung sollte genau {{ limit }} Element beinhalten.|Diese Sammlung sollte genau {{ limit }} Elemente beinhalten. + + + Invalid card number. + Ungültige Kartennummer. + + + Unsupported card type or invalid card number. + Nicht unterstützer Kartentyp oder ungültige Kartennummer. + + + This is not a valid International Bank Account Number (IBAN). + Dieser Wert ist keine gültige internationale Bankkontonummer (IBAN). + + + This value is not a valid ISBN-10. + Dieser Wert entspricht keiner gültigen ISBN-10. + + + This value is not a valid ISBN-13. + Dieser Wert entspricht keiner gültigen ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Dieser Wert ist weder eine gültige ISBN-10 noch eine gültige ISBN-13. + + + This value is not a valid ISSN. + Dieser Wert ist keine gültige ISSN. + + + This value is not a valid currency. + Dieser Wert ist keine gültige Währung. + + + This value should be equal to {{ compared_value }}. + Dieser Wert sollte gleich {{ compared_value }} sein. + + + This value should be greater than {{ compared_value }}. + Dieser Wert sollte größer als {{ compared_value }} sein. + + + This value should be greater than or equal to {{ compared_value }}. + Dieser Wert sollte größer oder gleich {{ compared_value }} sein. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Dieser Wert sollte identisch sein mit {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Dieser Wert sollte kleiner als {{ compared_value }} sein. + + + This value should be less than or equal to {{ compared_value }}. + Dieser Wert sollte kleiner oder gleich {{ compared_value }} sein. + + + This value should not be equal to {{ compared_value }}. + Dieser Wert sollte nicht {{ compared_value }} sein. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Dieser Wert sollte nicht identisch sein mit {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Das Seitenverhältnis des Bildes ist zu groß ({{ ratio }}). Der erlaubte Maximalwert ist {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Das Seitenverhältnis des Bildes ist zu klein ({{ ratio }}). Der erwartete Minimalwert ist {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Das Bild ist quadratisch ({{ width }}x{{ height }}px). Quadratische Bilder sind nicht erlaubt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Das Bild ist im Querformat ({{ width }}x{{ height }}px). Bilder im Querformat sind nicht erlaubt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Das Bild ist im Hochformat ({{ width }}x{{ height }}px). Bilder im Hochformat sind nicht erlaubt. + + + An empty file is not allowed. + Eine leere Datei ist nicht erlaubt. + + + The host could not be resolved. + Der Hostname konnte nicht aufgelöst werden. + + + This value does not match the expected {{ charset }} charset. + Dieser Wert entspricht nicht dem erwarteten Zeichensatz {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dieser Wert ist kein gültiger BIC. + + + Error + Fehler + + + This is not a valid UUID. + Dies ist keine gültige UUID. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf new file mode 100644 index 0000000..a3199bc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.el.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Αυτή η τιμή Ï€Ïέπει να είναι ψευδής. + + + This value should be true. + Αυτή η τιμή Ï€Ïέπει να είναι αληθής. + + + This value should be of type {{ type }}. + Αυτή η τιμή Ï€Ïέπει να είναι Ï„Ïπου {{ type }}. + + + This value should be blank. + Αυτή η τιμή Ï€Ïέπει να είναι κενή. + + + The value you selected is not a valid choice. + Η τιμή που επιλέχθηκε δεν αντιστοιχεί σε έγκυÏη επιλογή. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + ΠÏέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογή.|ΠÏέπει να επιλέξετε τουλάχιστον {{ limit }} επιλογές. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + ΠÏέπει να επιλέξετε το Ï€Î¿Î»Ï {{ limit }} επιλογή.|ΠÏέπει να επιλέξετε το Ï€Î¿Î»Ï {{ limit }} επιλογές. + + + One or more of the given values is invalid. + Μια ή πεÏισσότεÏες τιμές δεν είναι έγκυÏες. + + + This field was not expected. + Αυτό το πεδίο δεν ήταν αναμενόμενο. + + + This field is missing. + Λείπει αυτό το πεδίο. + + + This value is not a valid date. + Η τιμή δεν αντιστοιχεί σε έγκυÏη ημεÏομηνία. + + + This value is not a valid datetime. + Η τιμή δεν αντιστοιχεί σε έγκυÏη ημεÏομηνία και ÏŽÏα. + + + This value is not a valid email address. + Η τιμή δεν αντιστοιχεί σε έγκυÏο email. + + + The file could not be found. + Το αÏχείο δε μποÏεί να βÏεθεί. + + + The file is not readable. + Το αÏχείο δεν είναι αναγνώσιμο. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ size }} {{ suffix }}). Το μέγιστο επιτÏεπτό μέγεθος είναι {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Ο Ï„Ïπος mime του αÏχείου δεν είναι έγκυÏος ({{ type }}). Οι έγκÏυοι Ï„Ïποι mime είναι {{ types }}. + + + This value should be {{ limit }} or less. + Αυτή η τιμή θα έπÏεπε να είναι {{ limit }} ή λιγότεÏο. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏα ή λιγότεÏο.|Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏες ή λιγότεÏο. + + + This value should be {{ limit }} or more. + Αυτή η τιμή θα έπÏεπε να είναι {{ limit }} ή πεÏισσότεÏο. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏή. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏα ή πεÏισσότεÏο.|Αυτή η τιμή είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏή. Θα έπÏεπε να έχει {{ limit }} χαÏακτήÏες ή πεÏισσότεÏο. + + + This value should not be blank. + Αυτή η τιμή δεν Ï€Ïέπει να είναι κενή. + + + This value should not be null. + Αυτή η τιμή δεν Ï€Ïέπει να είναι μηδενική. + + + This value should be null. + Αυτή η τιμή Ï€Ïέπει να είναι μηδενική. + + + This value is not valid. + Αυτή η τιμή δεν είναι έγκυÏη. + + + This value is not a valid time. + Αυτή η τιμή δεν αντιστοιχεί σε έγκυÏη ÏŽÏα. + + + This value is not a valid URL. + Αυτή η τιμή δεν αντιστοιχεί σε έγκυÏο URL. + + + The two values should be equal. + Οι δÏο τιμές θα Ï€Ïέπει να είναι ίδιες. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿. Το μέγιστο επιτÏεπτό μέγεθος είναι {{ limit }} {{ suffix }}. + + + The file is too large. + Το αÏχείο είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿. + + + The file could not be uploaded. + Το αÏχείο δε μποÏεί να ανέβει. + + + This value should be a valid number. + Αυτή η τιμή θα Ï€Ïέπει να είναι ένας έγκυÏος αÏιθμός. + + + This file is not a valid image. + Το αÏχείο δεν αποτελεί έγκυÏη εικόνα. + + + This is not a valid IP address. + Αυτό δεν είναι μια έγκυÏη διεÏθυνση IP. + + + This value is not a valid language. + Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυÏη γλώσσα. + + + This value is not a valid locale. + Αυτή η τιμή δεν αντιστοιχεί σε έκγυÏο κωδικό τοποθεσίας. + + + This value is not a valid country. + Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυÏη χώÏα. + + + This value is already used. + Αυτή η τιμή χÏησιμοποιείται ήδη. + + + The size of the image could not be detected. + Το μέγεθος της εικόνας δεν ήταν δυνατό να ανιχνευθεί. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Το πλάτος της εικόνας είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ width }}px). Το μέγιστο επιτÏεπτό πλάτος είναι {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Το πλάτος της εικόνας είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ ({{ width }}px). Το ελάχιστο επιτÏεπτό πλάτος είναι {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Το Ïψος της εικόνας είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ ({{ height }}px). Το μέγιστο επιτÏεπτό Ïψος είναι {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Το Ïψος της εικόνας είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ ({{ height }}px). Το ελάχιστο επιτÏεπτό Ïψος είναι {{ min_height }}px. + + + This value should be the user's current password. + Αυτή η τιμή θα έπÏεπε να είναι ο Ï„Ïέχων κωδικός. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Αυτή η τιμή θα έπÏεπε να έχει ακÏιβώς {{ limit }} χαÏακτήÏα.|Αυτή η τιμή θα έπÏεπε να έχει ακÏιβώς {{ limit }} χαÏακτήÏες. + + + The file was only partially uploaded. + Το αÏχείο δεν ανέβηκε ολόκληÏο. + + + No file was uploaded. + Δεν ανέβηκε κανένα αÏχείο. + + + No temporary folder was configured in php.ini. + Κανένας Ï€ÏοσωÏινός φάκελος δεν έχει Ïυθμιστεί στο php.ini. + + + Cannot write temporary file to disk. + Αδυναμία εγγÏαφής Ï€ÏοσωÏÎ¹Î½Î¿Ï Î±Ïχείου στο δίσκο. + + + A PHP extension caused the upload to fail. + Μια επέκταση PHP Ï€Ïοκάλεσε αδυναμία ανεβάσματος. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχείο ή πεÏισσότεÏα.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχεία ή πεÏισσότεÏα. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχείo ή λιγότεÏα.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει {{ limit }} στοιχεία ή λιγότεÏα. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει ακÏιβώς {{ limit }} στοιχείo.|Αυτή η συλλογή θα Ï€Ïέπει να πεÏιέχει ακÏιβώς {{ limit }} στοιχεία. + + + Invalid card number. + Μη έγκυÏος αÏιθμός κάÏτας. + + + Unsupported card type or invalid card number. + Μη υποστηÏιζόμενος Ï„Ïπος κάÏτας ή μη έγκυÏος αÏιθμός κάÏτας. + + + This is not a valid International Bank Account Number (IBAN). + Αυτό δεν αντιστοιχεί σε έκγυÏο διεθνή αÏιθμό Ï„ÏÎ±Ï€ÎµÎ¶Î¹ÎºÎ¿Ï Î»Î¿Î³Î±ÏÎ¹Î±ÏƒÎ¼Î¿Ï (IBAN). + + + This value is not a valid ISBN-10. + Αυτό δεν είναι έγκυÏος κωδικός ISBN-10. + + + This value is not a valid ISBN-13. + Αυτό δεν είναι έγκυÏος κωδικός ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Αυτό δεν είναι οÏτε έγκυÏος κωδικός ISBN-10 οÏτε έγκυÏος κωδικός ISBN-13. + + + This value is not a valid ISSN. + Αυτό δεν είναι έγκυÏος κωδικός ISSN. + + + This value is not a valid currency. + Αυτό δεν αντιστοιχεί σε έγκυÏο νόμισμα. + + + This value should be equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι ίση με {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μεγαλÏτεÏη από {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μεγαλÏτεÏη ή ίση με {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μικÏότεÏη από {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Αυτή η τιμή θα Ï€Ïέπει να είναι μικÏότεÏη ή ίση με {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Αυτή η τιμή δεν θα Ï€Ïέπει να είναι ίση με {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Αυτή η τιμή δεν Ï€Ïέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf new file mode 100644 index 0000000..4bb2760 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.en.xlf @@ -0,0 +1,331 @@ + + + + + + This value should be false. + This value should be false. + + + This value should be true. + This value should be true. + + + This value should be of type {{ type }}. + This value should be of type {{ type }}. + + + This value should be blank. + This value should be blank. + + + The value you selected is not a valid choice. + The value you selected is not a valid choice. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + + + One or more of the given values is invalid. + One or more of the given values is invalid. + + + This field was not expected. + This field was not expected. + + + This field is missing. + This field is missing. + + + This value is not a valid date. + This value is not a valid date. + + + This value is not a valid datetime. + This value is not a valid datetime. + + + This value is not a valid email address. + This value is not a valid email address. + + + The file could not be found. + The file could not be found. + + + The file is not readable. + The file is not readable. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + + + This value should be {{ limit }} or less. + This value should be {{ limit }} or less. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + + + This value should be {{ limit }} or more. + This value should be {{ limit }} or more. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + + + This value should not be blank. + This value should not be blank. + + + This value should not be null. + This value should not be null. + + + This value should be null. + This value should be null. + + + This value is not valid. + This value is not valid. + + + This value is not a valid time. + This value is not a valid time. + + + This value is not a valid URL. + This value is not a valid URL. + + + The two values should be equal. + The two values should be equal. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + + + The file is too large. + The file is too large. + + + The file could not be uploaded. + The file could not be uploaded. + + + This value should be a valid number. + This value should be a valid number. + + + This file is not a valid image. + This file is not a valid image. + + + This is not a valid IP address. + This is not a valid IP address. + + + This value is not a valid language. + This value is not a valid language. + + + This value is not a valid locale. + This value is not a valid locale. + + + This value is not a valid country. + This value is not a valid country. + + + This value is already used. + This value is already used. + + + The size of the image could not be detected. + The size of the image could not be detected. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + + + This value should be the user's current password. + This value should be the user's current password. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + + + The file was only partially uploaded. + The file was only partially uploaded. + + + No file was uploaded. + No file was uploaded. + + + No temporary folder was configured in php.ini. + No temporary folder was configured in php.ini, or the configured folder does not exist. + + + Cannot write temporary file to disk. + Cannot write temporary file to disk. + + + A PHP extension caused the upload to fail. + A PHP extension caused the upload to fail. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + + + Invalid card number. + Invalid card number. + + + Unsupported card type or invalid card number. + Unsupported card type or invalid card number. + + + This is not a valid International Bank Account Number (IBAN). + This is not a valid International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + This value is not a valid ISBN-10. + + + This value is not a valid ISBN-13. + This value is not a valid ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + This value is neither a valid ISBN-10 nor a valid ISBN-13. + + + This value is not a valid ISSN. + This value is not a valid ISSN. + + + This value is not a valid currency. + This value is not a valid currency. + + + This value should be equal to {{ compared_value }}. + This value should be equal to {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + This value should be greater than {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + This value should be greater than or equal to {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + This value should be less than {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + This value should be less than or equal to {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + This value should not be equal to {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + + + An empty file is not allowed. + An empty file is not allowed. + + + The host could not be resolved. + The host could not be resolved. + + + This value does not match the expected {{ charset }} charset. + This value does not match the expected {{ charset }} charset. + + + This is not a valid Business Identifier Code (BIC). + This is not a valid Business Identifier Code (BIC). + + + Error + Error + + + This is not a valid UUID. + This is not a valid UUID. + + + This value should be a multiple of {{ compared_value }}. + This value should be a multiple of {{ compared_value }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf new file mode 100644 index 0000000..25d5b8a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.es.xlf @@ -0,0 +1,327 @@ + + + + + + This value should be false. + Este valor debería ser falso. + + + This value should be true. + Este valor debería ser verdadero. + + + This value should be of type {{ type }}. + Este valor debería ser de tipo {{ type }}. + + + This value should be blank. + Este valor debería estar vacío. + + + The value you selected is not a valid choice. + El valor seleccionado no es una opción válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Debe seleccionar al menos {{ limit }} opción.|Debe seleccionar al menos {{ limit }} opciones. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opciones. + + + One or more of the given values is invalid. + Uno o más de los valores indicados no son válidos. + + + This field was not expected. + Este campo no se esperaba. + + + This field is missing. + Este campo está desaparecido. + + + This value is not a valid date. + Este valor no es una fecha válida. + + + This value is not a valid datetime. + Este valor no es una fecha y hora válidas. + + + This value is not a valid email address. + Este valor no es una dirección de email válida. + + + The file could not be found. + No se pudo encontrar el archivo. + + + The file is not readable. + No se puede leer el archivo. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + El archivo es demasiado grande ({{ size }} {{ suffix }}). El tamaño máximo permitido es {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + El tipo mime del archivo no es válido ({{ type }}). Los tipos mime válidos son {{ types }}. + + + This value should be {{ limit }} or less. + Este valor debería ser {{ limit }} o menos. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Este valor es demasiado largo. Debería tener {{ limit }} carácter o menos.|Este valor es demasiado largo. Debería tener {{ limit }} caracteres o menos. + + + This value should be {{ limit }} or more. + Este valor debería ser {{ limit }} o más. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Este valor es demasiado corto. Debería tener {{ limit }} carácter o más.|Este valor es demasiado corto. Debería tener {{ limit }} caracteres o más. + + + This value should not be blank. + Este valor no debería estar vacío. + + + This value should not be null. + Este valor no debería ser nulo. + + + This value should be null. + Este valor debería ser nulo. + + + This value is not valid. + Este valor no es válido. + + + This value is not a valid time. + Este valor no es una hora válida. + + + This value is not a valid URL. + Este valor no es una URL válida. + + + The two values should be equal. + Los dos valores deberían ser iguales. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }} {{ suffix }}. + + + The file is too large. + El archivo es demasiado grande. + + + The file could not be uploaded. + No se pudo subir el archivo. + + + This value should be a valid number. + Este valor debería ser un número válido. + + + This file is not a valid image. + El archivo no es una imagen válida. + + + This is not a valid IP address. + Esto no es una dirección IP válida. + + + This value is not a valid language. + Este valor no es un idioma válido. + + + This value is not a valid locale. + Este valor no es una localización válida. + + + This value is not a valid country. + Este valor no es un país válido. + + + This value is already used. + Este valor ya se ha utilizado. + + + The size of the image could not be detected. + No se pudo determinar el tamaño de la imagen. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + El ancho de la imagen es demasiado grande ({{ width }}px). El ancho máximo permitido es de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + El ancho de la imagen es demasiado pequeño ({{ width }}px). El ancho mínimo requerido es {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + La altura de la imagen es demasiado grande ({{ height }}px). La altura máxima permitida es de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + La altura de la imagen es demasiado pequeña ({{ height }}px). La altura mínima requerida es de {{ min_height }}px. + + + This value should be the user's current password. + Este valor debería ser la contraseña actual del usuario. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor debería tener exactamente {{ limit }} carácter.|Este valor debería tener exactamente {{ limit }} caracteres. + + + The file was only partially uploaded. + El archivo fue sólo subido parcialmente. + + + No file was uploaded. + Ningún archivo fue subido. + + + No temporary folder was configured in php.ini. + Ninguna carpeta temporal fue configurada en php.ini. + + + Cannot write temporary file to disk. + No se pudo escribir el archivo temporal en el disco. + + + A PHP extension caused the upload to fail. + Una extensión de PHP hizo que la subida fallara. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta colección debe contener {{ limit }} elemento o más.|Esta colección debe contener {{ limit }} elementos o más. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta colección debe contener {{ limit }} elemento o menos.|Esta colección debe contener {{ limit }} elementos o menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta colección debe contener exactamente {{ limit }} elemento.|Esta colección debe contener exactamente {{ limit }} elementos. + + + Invalid card number. + Número de tarjeta inválido. + + + Unsupported card type or invalid card number. + Tipo de tarjeta no soportado o número de tarjeta inválido. + + + This is not a valid International Bank Account Number (IBAN). + Esto no es un International Bank Account Number (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor no es un ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor no es un ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor no es ni un ISBN-10 válido ni un ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor no es un ISSN válido. + + + This value is not a valid currency. + Este valor no es una divisa válida. + + + This value should be equal to {{ compared_value }}. + Este valor debería ser igual que {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor debería ser mayor que {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor debería ser mayor o igual que {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor debería ser menor que {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor debería ser menor o igual que {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor debería ser distinto de {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor no debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + La proporción de la imagen es demasiado grande ({{ ratio }}). La máxima proporción permitida es {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + La proporción de la imagen es demasiado pequeña ({{ ratio }}). La mínima proporción permitida es {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + La imagen es cuadrada ({{ width }}x{{ height }}px). Las imágenes cuadradas no están permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + La imagen está orientada horizontalmente ({{ width }}x{{ height }}px). Las imágenes orientadas horizontalmente no están permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + La imagen está orientada verticalmente ({{ width }}x{{ height }}px). Las imágenes orientadas verticalmente no están permitidas. + + + An empty file is not allowed. + No está permitido un archivo vacío. + + + The host could not be resolved. + No se puede resolver el host. + + + This value does not match the expected {{ charset }} charset. + La codificación de caracteres para este valor debería ser {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + No es un Código de Identificación Bancaria (BIC) válido. + + + Error + Error + + + This is not a valid UUID. + Este valor no es un UUID válido. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf new file mode 100644 index 0000000..d047c8b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.et.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Väärtus peaks olema väär. + + + This value should be true. + Väärtus peaks oleme tõene. + + + This value should be of type {{ type }}. + Väärtus peaks olema {{ type }}-tüüpi. + + + This value should be blank. + Väärtus peaks olema tühi. + + + The value you selected is not a valid choice. + Väärtus peaks olema üks etteantud valikutest. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Valima peaks vähemalt {{ limit }} valikut. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Valima peaks mitte rohkem kui {{ limit }} valikut. + + + One or more of the given values is invalid. + One or more of the given values is invalid. + + + This field was not expected. + See väli ei oodatud. + + + This field is missing. + See väli on puudu. + + + This value is not a valid date. + Väärtus pole korrektne kuupäev. + + + This value is not a valid datetime. + Väärtus pole korrektne kuupäev ja kellaeg. + + + This value is not a valid email address. + Väärtus pole korrektne e-maili aadress. + + + The file could not be found. + Faili ei leita. + + + The file is not readable. + Fail ei ole loetav. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fail on liiga suur ({{ size }} {{ suffix }}). Suurim lubatud suurus on {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faili sisutüüp on vigane ({{ type }}). Lubatud sisutüübid on {{ types }}. + + + This value should be {{ limit }} or less. + Väärtus peaks olema {{ limit }} või vähem. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Väärtus on liiga pikk. Pikkus peaks olema {{ limit }} tähemärki või vähem. + + + This value should be {{ limit }} or more. + Väärtus peaks olema {{ limit }} või rohkem. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Väärtus on liiga lühike. Pikkus peaks olema {{ limit }} tähemärki või rohkem. + + + This value should not be blank. + Väärtus ei tohiks olla tühi. + + + This value should not be null. + Väärtus ei tohiks olla 'null'. + + + This value should be null. + Väärtus peaks olema 'null'. + + + This value is not valid. + Väärtus on vigane. + + + This value is not a valid time. + Väärtus pole korrektne aeg. + + + This value is not a valid URL. + Väärtus pole korrektne URL. + + + The two values should be equal. + Väärtused peaksid olema võrdsed. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }} {{ suffix }}. + + + The file is too large. + Fail on liiga suur. + + + The file could not be uploaded. + Faili ei saa üles laadida. + + + This value should be a valid number. + Väärtus peaks olema korrektne number. + + + This file is not a valid image. + Fail ei ole korrektne pilt. + + + This is not a valid IP address. + IP aadress pole korrektne. + + + This value is not a valid language. + Väärtus pole korrektne keel. + + + This value is not a valid locale. + Väärtus pole korrektne asukohakeel. + + + This value is not a valid country. + Väärtus pole olemasolev riik. + + + This value is already used. + Väärtust on juba kasutatud. + + + The size of the image could not be detected. + Pildi suurust polnud võimalik tuvastada. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Pilt on liiga lai ({{ width }}px). Suurim lubatud laius on {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Pilt on liiga kitsas ({{ width }}px). Vähim lubatud laius on {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Pilt on liiga pikk ({{ height }}px). Lubatud suurim pikkus on {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Pilt pole piisavalt pikk ({{ height }}px). Lubatud vähim pikkus on {{ min_height }}px. + + + This value should be the user's current password. + Väärtus peaks olema kasutaja kehtiv salasõna. + + + This value should have exactly {{ limit }} characters. + Väärtus peaks olema täpselt {{ limit }} tähemärk pikk.|Väärtus peaks olema täpselt {{ limit }} tähemärki pikk. + + + The file was only partially uploaded. + Fail ei laetud täielikult üles. + + + No file was uploaded. + Ühtegi faili ei laetud üles. + + + No temporary folder was configured in php.ini. + Ühtegi ajutist kausta polnud php.ini-s seadistatud. + + + Cannot write temporary file to disk. + Ajutist faili ei saa kettale kirjutada. + + + A PHP extension caused the upload to fail. + PHP laiendi tõttu ebaõnnestus faili üleslaadimine. + + + This collection should contain {{ limit }} elements or more. + Kogumikus peaks olema vähemalt {{ limit }} element.|Kogumikus peaks olema vähemalt {{ limit }} elementi. + + + This collection should contain {{ limit }} elements or less. + Kogumikus peaks olema ülimalt {{ limit }} element.|Kogumikus peaks olema ülimalt {{ limit }} elementi. + + + This collection should contain exactly {{ limit }} elements. + Kogumikus peaks olema täpselt {{ limit }} element.|Kogumikus peaks olema täpselt {{ limit }}|elementi. + + + Invalid card number. + Vigane kaardi number. + + + Unsupported card type or invalid card number. + Kaardi tüüpi ei toetata või kaardi number on vigane. + + + This is not a valid International Bank Account Number (IBAN). + Väärtus pole korrektne IBAN-number. + + + This value is not a valid ISBN-10. + Väärtus pole korrektne ISBN-10. + + + This value is not a valid ISBN-13. + Väärtus pole korrektne ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Väärtus pole korrektne ISBN-10 ega ISBN-13. + + + This value is not a valid ISSN. + Väärtus pole korrektne ISSN. + + + This value is not a valid currency. + Väärtus pole korrektne valuuta. + + + This value should be equal to {{ compared_value }}. + Väärtus peaks olema võrdne {{ compared_value }}-ga. + + + This value should be greater than {{ compared_value }}. + Väärtus peaks olema suurem kui {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Väärtus peaks olema suurem kui või võrduma {{ compared_value }}-ga. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Väärtus peaks olema identne väärtusega {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Väärtus peaks olema väiksem kui {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Väärtus peaks olema väiksem kui või võrduma {{ compared_value }}-ga. + + + This value should not be equal to {{ compared_value }}. + Väärtus ei tohiks võrduda {{ compared_value }}-ga. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Väärtus ei tohiks olla identne väärtusega {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf new file mode 100644 index 0000000..d311ded --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.eu.xlf @@ -0,0 +1,291 @@ + + + + + + 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. + + + Error + Errore + + + This is not a valid UUID. + Balio hau ez da onartutako UUID bat. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf new file mode 100644 index 0000000..98b4bd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fa.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + این مقدار باید نادرست(False) باشد. + + + This value should be true. + این مقدار باید درست(True) باشد. + + + This value should be of type {{ type }}. + این مقدار باید از نوع {{ type }} باشد. + + + This value should be blank. + این Ùیلد باید خالی باشد. + + + The value you selected is not a valid choice. + گزینه انتخابی معتبر نیست. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + باید حداقل {{ limit }} گزینه انتخاب کنید.|باید حداقل {{ limit }} گزینه انتخاب کنید. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + حداکثر {{ limit }} گزینه Ù…ÛŒ توانید انتخاب کنید.|حداکثر {{ limit }} گزینه Ù…ÛŒ توانید انتخاب کنید. + + + One or more of the given values is invalid. + یک یا چند مقدار نامعتبر وجود دارد. + + + The fields {{ fields }} were not expected. + Ùیلدهای {{ fields }} اضاÙÛŒ هستند. + + + The fields {{ fields }} are missing. + Ùیلدهای {{ fields }} Ú©Ù… هستند. + + + This value is not a valid date. + این مقدار یک تاریخ معتبر نیست. + + + This value is not a valid datetime. + این مقدار یک تاریخ Ùˆ زمان معتبر نیست. + + + This value is not a valid email address. + این یک رایانامه معتبر نیست. + + + The file could not be found. + ÙØ§ÛŒÙ„ پیدا نشد. + + + The file is not readable. + ÙØ§ÛŒÙ„ قابلیت خواندن ندارد. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + این نوع ÙØ§ÛŒÙ„ مجاز نیست({{ type }}). نوع های مجاز {{ types }} هستند. + + + This value should be {{ limit }} or less. + این مقدار باید کوچکتر یا مساوی {{ limit }} باشد. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + بسیار طولانی است.حداکثر تعداد حرو٠مجاز برابر {{ limit }} است.|بسیار طولانی است.حداکثر تعداد حرو٠مجاز برابر {{ limit }} است. + + + This value should be {{ limit }} or more. + این مقدار باید برابر Ùˆ یا بیشتر از {{ limit }} باشد. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + بسیار کوتاه است.تعداد حرو٠باید حداقل {{ limit }} باشد.|بسیار کوتاه است.تعداد حرو٠باید حداقل {{ limit }} باشد. + + + This value should not be blank. + این مقدار نباید تهی باشد. + + + This value should not be null. + باید مقداری داشته باشد.. + + + This value should be null. + نباید مقداری داشته باشد. + + + This value is not valid. + این مقدار معتبر نیست. + + + This value is not a valid time. + این مقدار یک زمان صحیح نیست. + + + This value is not a valid URL. + این یک URL معتبر نیست. + + + The two values should be equal. + دو مقدار باید برابر باشند. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است. + + + The file is too large. + ÙØ§ÛŒÙ„ بیش از اندازه بزرگ است. + + + The file could not be uploaded. + بارگذاری ÙØ§ÛŒÙ„ با شکست مواجه شد. + + + This value should be a valid number. + این مقدار باید یک عدد معتبر باشد. + + + This file is not a valid image. + این ÙØ§ÛŒÙ„ یک تصویر نیست. + + + This is not a valid IP address. + این مقدار یک IP معتبر نیست. + + + This value is not a valid language. + این مقدار یک زبان صحیح نیست. + + + This value is not a valid locale. + این مقدار یک محل صحیح نیست. + + + This value is not a valid country. + این مقدار یک کشور صحیح نیست. + + + This value is already used. + این مقدار قبلا مورد Ø§Ø³ØªÙØ§Ø¯Ù‡ قرار Ú¯Ø±ÙØªÙ‡ است. + + + The size of the image could not be detected. + اندازه تصویر قابل شناسایی نیست. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + طول تصویر بسیار بزرگ است ({{ width }}px). بشینه طول مجاز {{ max_width }}px است. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + طول تصویر بسیار Ú©ÙˆÚ†Ú© است ({{ width }}px). کمینه طول موردنظر {{ min_width }}px است. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Ø§Ø±ØªÙØ§Ø¹ تصویر بسیار بزرگ است ({{ height }}px). بشینه Ø§Ø±ØªÙØ§Ø¹ مجاز {{ max_height }}px است. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Ø§Ø±ØªÙØ§Ø¹ تصویر بسیار Ú©ÙˆÚ†Ú© است ({{ height }}px). کمینه Ø§Ø±ØªÙØ§Ø¹ موردنظر {{ min_height }}px است. + + + This value should be the user's current password. + این مقدار Ù…ÛŒ بایست کلمه عبور کنونی کاربر باشد. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + این مقدار Ù…ÛŒ بایست دقیقا {{ limit }} کاراکتر داشته باشد.| این مقدار Ù…ÛŒ بایست دقیقا {{ limit }} کاراکتر داشته باشد. + + + The file was only partially uploaded. + ÙØ§ÛŒÙ„ به صورت جزیی بارگذاری شده است. + + + No file was uploaded. + هیچ ÙØ§ÛŒÙ„ÛŒ بارگذاری نشد. + + + No temporary folder was configured in php.ini. + Ùولدر موقت در php.ini پیکربندی نشده است. + + + Cannot write temporary file to disk. + ÙØ§ÛŒÙ„ موقت را نمی توان در دیسک نوشت. + + + A PHP extension caused the upload to fail. + اکستنشن PHP موجب شد Ú©Ù‡ بارگذاری ÙØ§ÛŒÙ„ با شکست مواجه شود. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا بیشتر باشد.|این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا بیشتر باشد. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + این مجموعه Ù…ÛŒ بایست دارای حداقل {{ limit }} عنصر یا کمتر باشد.|این مجموعه Ù…ÛŒ بایست دارای {{ limit }} عنصر یا کمتر باشد. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + این مجموعه Ù…ÛŒ بایست به طور دقیق دارا {{ limit }} عنصر باشد.|این مجموعه Ù…ÛŒ بایست به طور دقیق دارای {{ limit }} قلم باشد. + + + Invalid card number. + شماره کارت نامعتبر است. + + + Unsupported card type or invalid card number. + نوع کارت پشتیبانی نمی شود یا شماره کارت نامعتبر است. + + + This is not a valid International Bank Account Number (IBAN). + این یک شماره حساب بین المللی بانک (IBAN) درست نیست. + + + This value is not a valid ISBN-10. + این مقدار یک ISBN-10 درست نیست. + + + This value is not a valid ISBN-13. + این مقدار یک ISBN-13 درست نیست. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + این مقدار یک ISBN-10 درست یا ISBN-13 درست نیست. + + + This value is not a valid ISSN. + این مقدار یک ISSN درست نیست. + + + This value is not a valid currency. + این مقدار یک یکای پول درست نیست. + + + This value should be equal to {{ compared_value }}. + این مقدار باید برابر با {{ compared_value }} باشد. + + + This value should be greater than {{ compared_value }}. + این مقدار باید از {{ compared_value }} بیشتر باشد. + + + This value should be greater than or equal to {{ compared_value }}. + این مقدار باید بزرگتر یا مساوی با {{ compared_value }} باشد. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + این مقدار باید با {{ compared_value_type }} {{ compared_value }} یکی باشد. + + + This value should be less than {{ compared_value }}. + این مقدار باید کمتر از {{ compared_value }} باشد. + + + This value should be less than or equal to {{ compared_value }}. + این مقدار باید کمتر یا مساوی با {{ compared_value }} باشد. + + + This value should not be equal to {{ compared_value }}. + این مقدار نباید با {{ compared_value }} برابر باشد. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + این مقدار نباید {{ compared_value_type }} {{ compared_value }} یکی باشد. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf new file mode 100644 index 0000000..e439098 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fi.xlf @@ -0,0 +1,231 @@ + + + + + + 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. + + + Error + Virhe + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf new file mode 100644 index 0000000..382acb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.fr.xlf @@ -0,0 +1,327 @@ + + + + + + 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 chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractère.|Cette chaîne 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 chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractère.|Cette chaîne 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 chaîne doit avoir exactement {{ limit }} caractère.|Cette chaîne doit avoir exactement {{ limit }} caractères. + + + The file was only partially uploaded. + Le fichier a été partiellement transféré. + + + No file was uploaded. + Aucun fichier n'a été transféré. + + + No temporary folder was configured in php.ini. + Aucun répertoire temporaire n'a été configuré dans le php.ini. + + + Cannot write temporary file to disk. + Impossible d'écrire le fichier temporaire sur le disque. + + + A PHP extension caused the upload to fail. + Une extension PHP a empêché le transfert du fichier. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Cette collection doit contenir {{ limit }} élément ou plus.|Cette collection doit contenir {{ limit }} éléments ou plus. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Cette collection doit contenir {{ limit }} élément ou moins.|Cette collection doit contenir {{ limit }} éléments ou moins. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Cette collection doit contenir exactement {{ limit }} élément.|Cette collection doit contenir exactement {{ limit }} éléments. + + + Invalid card number. + Numéro de carte invalide. + + + Unsupported card type or invalid card number. + Type de carte non supporté ou numéro invalide. + + + This is not a valid International Bank Account Number (IBAN). + Le numéro IBAN (International Bank Account Number) saisi n'est pas valide. + + + This value is not a valid ISBN-10. + Cette valeur n'est pas un code ISBN-10 valide. + + + This value is not a valid ISBN-13. + Cette valeur n'est pas un code ISBN-13 valide. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Cette valeur n'est ni un code ISBN-10, ni un code ISBN-13 valide. + + + This value is not a valid ISSN. + Cette valeur n'est pas un code ISSN valide. + + + This value is not a valid currency. + Cette valeur n'est pas une devise valide. + + + This value should be equal to {{ compared_value }}. + Cette valeur doit être égale à {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Cette valeur doit être supérieure à {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Cette valeur doit être supérieure ou égale à {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Cette valeur doit être inférieure à {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Cette valeur doit être inférieure ou égale à {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Cette valeur ne doit pas être égale à {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Le rapport largeur/hauteur de l'image est trop grand ({{ ratio }}). Le rapport maximal autorisé est {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Le rapport largeur/hauteur de l'image est trop petit ({{ ratio }}). Le rapport minimal attendu est {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + L'image est carrée ({{ width }}x{{ height }}px). Les images carrées ne sont pas autorisées. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + L'image est au format paysage ({{ width }}x{{ height }}px). Les images au format paysage ne sont pas autorisées. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + L'image est au format portrait ({{ width }}x{{ height }}px). Les images au format portrait ne sont pas autorisées. + + + An empty file is not allowed. + Un fichier vide n'est pas autorisé. + + + The host could not be resolved. + Le nom de domaine n'a pas pu être résolu. + + + This value does not match the expected {{ charset }} charset. + Cette valeur ne correspond pas au jeu de caractères {{ charset }} attendu. + + + This is not a valid Business Identifier Code (BIC). + Ce n'est pas un code universel d'identification des banques (BIC) valide. + + + Error + Erreur + + + This is not a valid UUID. + Ceci n'est pas un UUID valide. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf new file mode 100644 index 0000000..ecb7155 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.gl.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Este valor debería ser falso. + + + This value should be true. + Este valor debería ser 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 }}. + + + This is not a valid Business Identifier Code (BIC). + Non é un Código de Identificación Bancaria (BIC) válido. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf new file mode 100644 index 0000000..6510514 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.he.xlf @@ -0,0 +1,307 @@ + + + + + + This value should be false. + הערך צריך להיות שקר. + + + This value should be true. + הערך צריך להיות ×מת. + + + This value should be of type {{ type }}. + הערך צריך להיות מסוג {{ type }}. + + + This value should be blank. + הערך צריך להיות ריק. + + + The value you selected is not a valid choice. + הערך שבחרת ×ינו חוקי. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + ×תה צריך לבחור לפחות {{ limit }} ×פשרויות.|×תה צריך לבחור לפחות {{ limit }} ×פשרויות. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + ×תה צריך לבחור לכל היותר {{ limit }} ×פשרויות.|×תה צריך לבחור לכל היותר {{ limit }} ×פשרויות. + + + One or more of the given values is invalid. + ×חד ×ו יותר ×ž×”×¢×¨×›×™× ×ינו חוקי. + + + This field was not expected. + שדה ×–×” ×œ× ×”×™×” צפוי + + + This field is missing. + שדה ×–×” חסר. + + + This value is not a valid date. + הערך ×ינו ת×ריך חוקי. + + + This value is not a valid datetime. + הערך ×ינו ת×ריך ושעה חוקיי×. + + + This value is not a valid email address. + כתובת המייל ××™× ×” תקינה. + + + The file could not be found. + הקובץ ×œ× × ×ž×¦×. + + + The file is not readable. + ×œ× × ×™×ª×Ÿ ×œ×§×¨×•× ×ת הקובץ. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + הקובץ גדול מדי ({{ size }} {{ suffix }}). הגודל המרבי המותר ×”×•× {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + סוג MIME של הקובץ ×ינו חוקי ({{ type }}). ×ž×•×ª×¨×™× ×¡×•×’×™ MIME {{ types }}. + + + This value should be {{ limit }} or less. + הערך צריל להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + הערך ×רוך מידי. ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר.|הערך ×רוך מידי. ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×›×œ היותר. + + + This value should be {{ limit }} or more. + הערך צריך להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + הערך קצר מידיץ ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª.|הערך קצר מידיץ ×”×•× ×¦×¨×™×š להכיל {{ limit }} ×ª×•×•×™× ×œ×¤×—×•×ª. + + + This value should not be blank. + הערך ×œ× ×מור להיות ריק. + + + This value should not be null. + הערך ×œ× ×מור להיות ריק. + + + This value should be null. + הערך צריך להיות ריק. + + + This value is not valid. + הערך ×ינו חוקי. + + + This value is not a valid time. + הערך ×ינו זמן תקין. + + + This value is not a valid URL. + ×–×ת ××™× ×” כתובת ×תר תקינה. + + + The two values should be equal. + שני ×”×¢×¨×›×™× ×¦×¨×™×›×™× ×œ×”×™×•×ª שווי×. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + הקובץ גדול מדי. הגודל המרבי המותר ×”×•× {{ limit }} {{ suffix }}. + + + The file is too large. + הקובץ גדול מדי. + + + The file could not be uploaded. + ×œ× × ×™×ª×Ÿ לעלות ×ת הקובץ. + + + This value should be a valid number. + הערך צריך להיות מספר חוקי. + + + This file is not a valid image. + הקובץ ×”×–×” ×ינו תמונה תקינה. + + + This is not a valid IP address. + זו ××™× ×” כתובת IP חוקית. + + + This value is not a valid language. + הערך ×ינו שפה חוקית. + + + This value is not a valid locale. + הערך ×ינו ×זור תקף. + + + This value is not a valid country. + הערך ×ינו ×רץ חוקית. + + + This value is already used. + הערך כבר בשימוש. + + + The size of the image could not be detected. + ×œ× × ×™×ª×Ÿ לקבוע ×ת גודל התמונה. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + רוחב התמונה גדול מדי ({{ width }}px). הרוחב המקסימלי ×”×•× {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + רוחב התמונה קטן מדי ({{ width }}px). הרוחב המינימלי ×”×•× {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + גובה התמונה גדול מדי ({{ height }}px). הגובה המקסימלי ×”×•× {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + גובה התמונה קטן מדי ({{ height }}px). הגובה המינימלי ×”×•× {{ min_height }}px. + + + This value should be the user's current password. + הערך צריך להיות סיסמת המשתמש הנוכחי. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + הערך צריך להיות בדיוק {{ limit }} תווי×.|הערך צריך להיות בדיוק {{ limit }} תווי×. + + + The file was only partially uploaded. + הקובץ הועלה ב×ופן חלקי. + + + No file was uploaded. + הקובץ ×œ× ×”×•×¢×œ×”. + + + No temporary folder was configured in php.ini. + ×œ× ×”×•×’×“×¨×” תיקייה זמנית ב php.ini. + + + Cannot write temporary file to disk. + ×œ× × ×™×ª×Ÿ לכתוב קובץ זמני לדיסק. + + + A PHP extension caused the upload to fail. + סיומת PHP ×’×¨× ×œ×”×¢×œ××” להיכשל. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + ×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו יותר.|×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו יותר. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + ×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו פחות.|×”×וסף ×מור להכיל {{ limit }} ××œ×ž× ×˜×™× ×ו פחות. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + ×”×וסף צריך להכיל בדיוק {{ limit }} ×למנטי×.|×”×וסף צריך להכיל בדיוק {{ limit }} ×למנטי×. + + + Invalid card number. + מספר הכרטיס ×ינו חוקי. + + + Unsupported card type or invalid card number. + סוג הכרטיס ×ינו נתמך ×ו ×œ× ×—×•×§×™. + + + This is not a valid International Bank Account Number (IBAN). + This is not a valid International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + This value is not a valid ISBN-10. + + + This value is not a valid ISBN-13. + This value is not a valid ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + This value is neither a valid ISBN-10 nor a valid ISBN-13. + + + This value is not a valid ISSN. + This value is not a valid ISSN. + + + This value is not a valid currency. + This value is not a valid currency. + + + This value should be equal to {{ compared_value }}. + This value should be equal to {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + This value should be greater than {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + This value should be greater than or equal to {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + This value should be less than {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + This value should be less than or equal to {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + This value should not be equal to {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + + + An empty file is not allowed. + An empty file is not allowed. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf new file mode 100644 index 0000000..126ef90 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hr.xlf @@ -0,0 +1,323 @@ + + + + + + This value should be false. + Ova vrijednost treba biti netoÄna (false). + + + This value should be true. + Ova vrijednost treba biti toÄna (true). + + + This value should be of type {{ type }}. + Ova vrijednost treba biti tipa {{ type }}. + + + This value should be blank. + Ova vrijednost treba biti prazna. + + + The value you selected is not a valid choice. + Ova vrijednost treba biti jedna od ponuÄ‘enih. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izaberite barem {{ limit }} mogućnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izaberite najviÅ¡e {{ limit }} mogućnosti. + + + One or more of the given values is invalid. + Jedna ili viÅ¡e danih vrijednosti nije ispravna. + + + This field was not expected. + Ovo polje nije oÄekivalo. + + + This field is missing. + Ovo polje nedostaje. + + + This value is not a valid date. + Ova vrijednost nije ispravan datum. + + + This value is not a valid datetime. + Ova vrijednost nije ispravan datum-vrijeme. + + + This value is not a valid email address. + Ova vrijednost nije ispravna e-mail adresa. + + + The file could not be found. + Datoteka ne može biti pronaÄ‘ena. + + + The file is not readable. + Datoteka nije Äitljiva. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. + + + This value should be {{ limit }} or less. + Ova vrijednost treba biti {{ limit }} ili manje. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ova vrijednost je predugaÄka. Treba imati {{ limit }} znakova ili manje. + + + This value should be {{ limit }} or more. + Ova vrijednost treba biti {{ limit }} ili viÅ¡e. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili viÅ¡e. + + + This value should not be blank. + Ova vrijednost ne smije biti prazna. + + + This value should not be null. + Ova vrijednost ne smije biti null. + + + This value should be null. + Ova vrijednost treba biti null. + + + This value is not valid. + Ova vrijednost nije ispravna. + + + This value is not a valid time. + Ova vrijednost nije ispravno vrijeme. + + + This value is not a valid URL. + Ova vrijednost nije ispravan URL. + + + The two values should be equal. + Obje vrijednosti trebaju biti jednake. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ova datoteka je prevelika. Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The file is too large. + Ova datoteka je prevelika. + + + The file could not be uploaded. + Ova datoteka ne može biti prenesena. + + + This value should be a valid number. + Ova vrijednost treba biti ispravan broj. + + + This file is not a valid image. + Ova datoteka nije ispravna slika. + + + This is not a valid IP address. + Ovo nije ispravna IP adresa. + + + This value is not a valid language. + Ova vrijednost nije ispravan jezik. + + + This value is not a valid locale. + Ova vrijednost nije ispravana regionalna oznaka. + + + This value is not a valid country. + Ova vrijednost nije ispravna zemlja. + + + This value is already used. + Ova vrijednost je već iskoriÅ¡tena. + + + The size of the image could not be detected. + VeliÄina slike se ne može odrediti. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je prevelika ({{ width }}px). Najveća dozvoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premala ({{ width }}px). Najmanja dozvoljena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Visina slike je prevelika ({{ height }}px). Najveća dozvoljena visina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. + + + This value should be the user's current password. + Ova vrijednost treba biti trenutna korisniÄka lozinka. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ova vrijednost treba imati toÄno {{ limit }} znakova. + + + The file was only partially uploaded. + Datoteka je samo djelomiÄno prenesena. + + + No file was uploaded. + Niti jedna datoteka nije prenesena. + + + No temporary folder was configured in php.ini. + U php.ini datoteci nije konfiguriran privremeni folder. + + + Cannot write temporary file to disk. + Ne mogu zapisati privremenu datoteku na disk. + + + A PHP extension caused the upload to fail. + Prijenos datoteke nije uspio zbog PHP ekstenzije. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili viÅ¡e elemenata. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ova kolekcija treba sadržavati toÄno {{ limit }} element.|Ova kolekcija treba sadržavati toÄno {{ limit }} elementa.|Ova kolekcija treba sadržavati toÄno {{ limit }} elemenata. + + + Invalid card number. + Neispravan broj kartice. + + + Unsupported card type or invalid card number. + Neispravan broj kartice ili tip kartice nije podržan. + + + This is not a valid International Bank Account Number (IBAN). + Ova vrijednost nije ispravan meÄ‘unarodni broj bankovnog raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Ova vrijednost nije ispravan ISBN-10. + + + This value is not a valid ISBN-13. + Ova vrijednost nije ispravan ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ova vrijednost nije ispravan ISBN-10 niti ISBN-13. + + + This value is not a valid ISSN. + Ova vrijednost nije ispravan ISSN. + + + This value is not a valid currency. + Ova vrijednost nije ispravna valuta. + + + This value should be equal to {{ compared_value }}. + Ova vrijednost bi trebala biti jednaka {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ova vrijednost bi trebala biti veća od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ova vrijednost bi trebala biti veća ili jednaka od {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrijednost bi trebala biti {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ova vrijednost bi trebala biti manja od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ova vrijednost bi trebala biti manja ili jednaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ova vrijednost ne bi trebala biti {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrijednost ne bi trebala biti {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Omjer slike je prevelik ({{ ratio }}). Dozvoljeni maksimalni omjer je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Omjer slike je premali ({{ ratio }}). Minimalni oÄekivani omjer je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadratnog oblika ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je orijentirana horizontalno ({{ width }}x{{ height }}px). Horizontalno orijentirane slike nisu dozvoljene. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je orijentirana vertikalno ({{ width }}x{{ height }}px). Vertikalno orijentirane slike nisu dozvoljene. + + + An empty file is not allowed. + Prazna datoteka nije dozvoljena. + + + The host could not be resolved. + Poslužitelj nije mogao biti razrijeÅ¡en. + + + This value does not match the expected {{ charset }} charset. + Znakovne oznake vrijednosti ne odgovaraju oÄekivanom {{ charset }} skupu. + + + This is not a valid Business Identifier Code (BIC). + Ovo nije validan poslovni identifikacijski broj (BIC). + + + Error + GreÅ¡ka + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf new file mode 100644 index 0000000..1011d54 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hu.xlf @@ -0,0 +1,327 @@ + + + + + + This value should be false. + Ennek az értéknek hamisnak kell lennie. + + + This value should be true. + Ennek az értéknek igaznak kell lennie. + + + This value should be of type {{ type }}. + Ennek az értéknek {{ type }} típusúnak kell lennie. + + + This value should be blank. + Ennek az értéknek üresnek kell lennie. + + + The value you selected is not a valid choice. + A választott érték érvénytelen. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Legalább {{ limit }} értéket kell kiválasztani.|Legalább {{ limit }} értéket kell kiválasztani. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Legfeljebb {{ limit }} értéket lehet kiválasztani.|Legfeljebb {{ limit }} értéket lehet kiválasztani. + + + One or more of the given values is invalid. + A megadott értékek közül legalább egy érvénytelen. + + + This field was not expected. + Nem várt mezÅ‘. + + + This field is missing. + Ez a mezÅ‘ hiányzik. + + + This value is not a valid date. + Ez az érték nem egy érvényes dátum. + + + This value is not a valid datetime. + Ez az érték nem egy érvényes idÅ‘pont. + + + This value is not a valid email address. + Ez az érték nem egy érvényes e-mail cím. + + + The file could not be found. + A fájl nem található. + + + The file is not readable. + A fájl nem olvasható. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + A fájl túl nagy ({{ size }} {{ suffix }}). A legnagyobb megengedett méret {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + A fájl MIME típusa érvénytelen ({{ type }}). Az engedélyezett MIME típusok: {{ types }}. + + + This value should be {{ limit }} or less. + Ez az érték legfeljebb {{ limit }} lehet. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat.|Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat. + + + This value should be {{ limit }} or more. + Ez az érték legalább {{ limit }} kell, hogy legyen. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia.|Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia. + + + This value should not be blank. + Ez az érték nem lehet üres. + + + This value should not be null. + Ez az érték nem lehet null. + + + This value should be null. + Ennek az értéknek nullnak kell lennie. + + + This value is not valid. + Ez az érték nem érvényes. + + + This value is not a valid time. + Ez az érték nem egy érvényes idÅ‘pont. + + + This value is not a valid URL. + Ez az érték nem egy érvényes URL. + + + The two values should be equal. + A két értéknek azonosnak kell lennie. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + A fájl túl nagy. A megengedett maximális méret: {{ limit }} {{ suffix }}. + + + The file is too large. + A fájl túl nagy. + + + The file could not be uploaded. + A fájl nem tölthetÅ‘ fel. + + + This value should be a valid number. + Ennek az értéknek érvényes számnak kell lennie. + + + This file is not a valid image. + Ez a fájl nem egy érvényes kép. + + + This is not a valid IP address. + Ez az érték nem egy érvényes IP cím. + + + This value is not a valid language. + Ez az érték nem egy érvényes nyelv. + + + This value is not a valid locale. + Ez az érték nem egy érvényes területi beállítás. + + + This value is not a valid country. + Ez az érték nem egy érvényes ország. + + + This value is already used. + Ez az érték már használatban van. + + + The size of the image could not be detected. + A kép méretét nem lehet megállapítani. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A kép szélessége túl nagy ({{ width }}px). A megengedett legnagyobb szélesség {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A kép szélessége túl kicsi ({{ width }}px). Az elvárt legkisebb szélesség {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A kép magassága túl nagy ({{ height }}px). A megengedett legnagyobb magasság {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A kép magassága túl kicsi ({{ height }}px). Az elvárt legkisebb magasság {{ min_height }}px. + + + This value should be the user's current password. + Ez az érték a felhasználó jelenlegi jelszavával kell megegyezzen. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia.|Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia. + + + The file was only partially uploaded. + A fájl csak részben lett feltöltve. + + + No file was uploaded. + Nem lett fájl feltöltve. + + + No temporary folder was configured in php.ini. + Nincs ideiglenes könyvtár beállítva a php.ini-ben. + + + Cannot write temporary file to disk. + Az ideiglenes fájl nem írható a lemezre. + + + A PHP extension caused the upload to fail. + Egy PHP bÅ‘vítmény miatt a feltöltés nem sikerült. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat.|Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia. + + + Invalid card number. + Érvénytelen kártyaszám. + + + Unsupported card type or invalid card number. + Nem támogatott kártyatípus vagy érvénytelen kártyaszám. + + + This is not a valid International Bank Account Number (IBAN). + Érvénytelen nemzetközi bankszámlaszám (IBAN). + + + This value is not a valid ISBN-10. + Ez az érték nem egy érvényes ISBN-10. + + + This value is not a valid ISBN-13. + Ez az érték nem egy érvényes ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ez az érték nem egy érvényes ISBN-10 vagy ISBN-13. + + + This value is not a valid ISSN. + Ez az érték nem egy érvényes ISSN. + + + This value is not a valid currency. + Ez az érték nem egy érvényes pénznem. + + + This value should be equal to {{ compared_value }}. + Ez az érték legyen {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ez az érték nagyobb legyen, mint {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ez az érték nagyobb vagy egyenlÅ‘ legyen, mint {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ez az érték ugyanolyan legyen, mint {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ez az érték kisebb legyen, mint {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ez az érték kisebb vagy egyenlÅ‘ legyen, mint {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ez az érték ne legyen {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ez az érték ne legyen ugyanolyan, mint {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + A képarány túl nagy ({{ ratio }}). A megengedett legnagyobb képarány {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + A képarány túl kicsi ({{ ratio }}). A megengedett legkisebb képarány {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A kép négyzet alakú ({{ width }}x{{ height }}px). A négyzet alakú képek nem engedélyezettek. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A kép fekvÅ‘ tájolású ({{ width }}x{{ height }}px). A fekvÅ‘ tájolású képek nem engedélyezettek. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A kép álló tájolású ({{ width }}x{{ height }}px). Az álló tájolású képek nem engedélyezettek. + + + An empty file is not allowed. + Üres fájl nem megengedett. + + + The host could not be resolved. + Az állomásnevet nem lehet feloldani. + + + This value does not match the expected {{ charset }} charset. + Ez az érték nem az elvárt {{ charset }} karakterkódolást használja. + + + This is not a valid Business Identifier Code (BIC). + Érvénytelen nemzetközi bankazonosító kód (BIC/SWIFT). + + + Error + Hiba + + + This is not a valid UUID. + Érvénytelen egyedi azonosító (UUID). + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf new file mode 100644 index 0000000..bc0dace --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.hy.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ½Õ­Õ¡Õ¬Ö‰ + + + This value should be true. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ³Õ«Õ·Õ¿Ö‰ + + + This value should be of type {{ type }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ type }} Õ¿Õ¥Õ½Õ¡Õ¯Õ«Ö‰ + + + This value should be blank. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¤Õ¡Õ¿Õ¡Ö€Õ¯Ö‰ + + + The value you selected is not a valid choice. + ÕÕ¥Ö€ Õ¨Õ¶Õ¿Ö€Õ¡Õ® Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¨Õ¶Õ¿Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ§Ö‰ + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ô´Õ¸Ö‚Ö„ ÕºÕ¥Õ¿Ö„ Õ§ Õ¨Õ¶Õ¿Ö€Õ¥Ö„ Õ¡Õ´Õ¥Õ¶Õ¡Ö„Õ«Õ¹Õ¨ {{ limit }} Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Ö‰ + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Ô´Õ¸Ö‚Ö„ ÕºÕ¥Õ¿Ö„ Õ§ Õ¨Õ¶Õ¿Ö€Õ¥Ö„ Õ¸Õ¹ Õ¡Õ¾Õ¥Õ¬Õ« Ö„Õ¡Õ¶ {{ limit }} Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Ö‰ + + + One or more of the given values is invalid. + Õ„Õ¥Õ¯ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ¿Ö€Õ¾Õ¡Õ® Õ¡Ö€ÕªÕ¥Ö„Õ¶Õ¥Ö€Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¥Õ¶Ö‰ + + + This field was not expected. + Ô±ÕµÕ½ Õ¤Õ¡Õ·Õ¿Õ¨ Õ¹Õ« Õ½ÕºÕ¡Õ½Õ¾Õ¸Ö‚Õ´Ö‰ + + + This field is missing. + Ô±ÕµÕ½ Õ¤Õ¡Õ·Õ¿Õ¨ Õ¢Õ¡ÖÕ¡Õ¯Õ¡ÕµÕ¸Ö‚Õ´ Õ§Ö‰ + + + This value is not a valid date. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ½Õ­Õ¡Õ¬ Õ¡Õ´Õ½Õ¡Õ©Õ«Õ¾ Õ§Ö‰ + + + This value is not a valid datetime. + Ô±Õ´Õ½Õ¡Õ©Õ¾Õ« Ö‡ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Ö‰ + + + This value is not a valid email address. + Ô±Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Õ¬ÖŠÖƒÕ¸Õ½Õ¿Õ« Õ¡Ö€ÕªÕ¥Ö„Ö‰ + + + The file could not be found. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ£Õ¿Õ¶Õ¾Õ¥Õ¬Ö‰ + + + The file is not readable. + Õ†Õ«Õ·Ö„Õ¨ Õ¡Õ¶Õ¨Õ¶Õ©Õ¥Õ¼Õ¶Õ¥Õ¬Õ« Õ§Ö‰ + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§ ({{ size }} {{ suffix }}): Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« Õ¹Õ¡ÖƒÕ½Õ¨Õ {{ limit }} {{ suffix }}Ö‰ + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + MIME-Õ¿Õ¥Õ½Õ¡Õ¯Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§ Õ§({{ type }}): Õ†Õ«Õ·Ö„Õ¥Ö€Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« MIME-Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¶ Õ¥Õ¶: {{ types }}Ö‰ + + + This value should be {{ limit }} or less. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ ÖƒÕ¸Ö„Ö€Ö‰ + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ¥Ö€Õ¯Õ¡Ö€ Õ§: ÕŠÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬ Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + This value should be {{ limit }} or more. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ·Õ¡Õ¿Ö‰ + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ¯Õ¡Ö€Õ³ Õ§: ÕŠÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + This value should not be blank. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹ÕºÕ¥Õ¿Ö„ Õ§ Õ¤Õ¡Õ¿Õ¡Ö€Õ¯ Õ¬Õ«Õ¶Õ«Ö‰ + + + This value should not be null. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« nullÖ‰ + + + This value should be null. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« nullÖ‰ + + + This value is not valid. + Ô±Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ¡Ö€ÕªÕ¥Ö„Ö‰ + + + This value is not a valid time. + ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« Õ¡Ö€ÕªÕ¥Ö„Õ¨ Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ Õ§Ö‰ + + + This value is not a valid URL. + Ô±Ö€ÕªÕ¥Ö„Õ¨ URL Õ¹Õ§Ö‰ + + + The two values should be equal. + ÔµÖ€Õ¯Õ¸Ö‚ Õ¡Ö€ÕªÕ¥Ö„Õ¶Õ¥Ö€Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¶Õ¸Ö‚ÕµÕ¶Õ¨ Õ¬Õ«Õ¶Õ¥Õ¶Ö‰ + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§: Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬Õ« Õ¹Õ¡ÖƒÕ½Õ¨ {{ limit }} {{ suffix }} Õ§Ö‰ + + + The file is too large. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§Ö‰ + + + The file could not be uploaded. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ¯Õ¡Ö€Õ¸Õ² Õ¢Õ¥Õ¼Õ¶Õ¾Õ¥Õ¬Ö‰ + + + This value should be a valid number. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ©Õ«Õ¾Ö‰ + + + This value is not a valid country. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¥Ö€Õ¯Õ«Ö€Ö‰ + + + This file is not a valid image. + Õ†Õ«Õ·Ö„Õ¨ Õ¶Õ¯Õ¡Ö€Õ« Õ¾Õ¡Õ¾Õ¥Ö€ Ö†Õ¸Ö€Õ´Õ¡Õ¿ Õ¹Õ§Ö‰ + + + This is not a valid IP address. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ IP Õ°Õ¡Õ½ÖÕ¥ Õ¹Õ§Ö‰ + + + This value is not a valid language. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¬Õ¥Õ¦Õ¸Ö‚ Õ¹Õ§Ö‰ + + + This value is not a valid locale. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ¶Õ¤Õ«Õ½Õ¡Õ¶Õ¸Ö‚Õ´ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¿Õ¥Õ²Õ¡ÕµÕ¶Õ¡ÖÕ¸Ö‚Õ´Ö‰ + + + This value is already used. + Ô±ÕµÕ¤ Õ¡Ö€ÕªÕ¥Ö„Õ¶ Õ¡Ö€Õ¤Õ¥Õ¶ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¾Õ¸Ö‚Õ´ Õ§Ö‰ + + + The size of the image could not be detected. + Õ†Õ¯Õ¡Ö€Õ« Õ¹Õ¡ÖƒÕ½Õ¥Ö€Õ¨ Õ¹Õ½Õ¿Õ¡ÖÕ¾Õ¥Ö Õ¸Ö€Õ¸Õ·Õ¥Õ¬Ö‰ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¬Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§({{ width }}px). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ max_width }}pxÖ‰ + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¬Õ¡ÕµÕ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö ÖƒÕ¸Ö„Ö€ Õ§ ({{ width }}px). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ min_ width }}pxÖ‰ + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¢Õ¡Ö€Õ±Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö Õ´Õ¥Õ® Õ§ ({{ height }}px). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ max_height }}pxÖ‰ + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Õ†Õ¯Õ¡Ö€Õ« Õ¢Õ¡Ö€Õ±Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ¡ÖƒÕ¡Õ¦Õ¡Õ¶Ö ÖƒÕ¸Ö„Ö€ Õ§ ({{ height }}px). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ¹Õ¡ÖƒÕ¶ Õ§ {{ min_height }}pxÖ‰ + + + This value should be the user's current password. + Ô±ÕµÕ½ Õ¡Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¸Õ²Õ« Õ¶Õ¥Ö€Õ¯Õ¡ Õ®Õ¡Õ®Õ¯Õ¡Õ£Õ«Ö€Õ¨Ö‰ + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ô±ÕµÕ½ Õ¡Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¸Ö‚Õ¶Õ¥Õ¶Õ¡ Õ³Õ«Õ·Õ¿ {{ limit }} Õ½Õ«Õ´Õ¾Õ¸Õ¬Õ¶Õ¥Ö€Ö‰ + + + The file was only partially uploaded. + Õ†Õ«Õ·Ö„Õ« Õ´Õ¡Õ½Õ¶Õ¡Õ¯Õ« Õ¢Õ¥Õ¼Õ¶Õ´Õ¡Õ¶ Õ½Õ­Õ¡Õ¬Ö‰ + + + No file was uploaded. + Õ†Õ«Õ·Ö„Õ¨ Õ¹Õ« Õ¢Õ¥Õ¼Õ¶Õ¾Õ¥Õ¬Ö‰ + + + No temporary folder was configured in php.ini. + php.ini Õ¶Õ«Õ·Ö„Õ¸Ö‚Õ´ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¡Õ¾Õ¸Ö€ ÕºÕ¡Õ¶Õ¡Õ¯ Õ¶Õ·Õ¾Õ¡Õ® Õ¹Õ§Ö‰ + + + Cannot write temporary file to disk. + ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ¡Õ¾Õ¸Ö€ Õ¶Õ«Õ·Ö„Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ£Ö€Õ¥Õ¬ Õ½Õ¯Õ¡Õ¾Õ¡Õ¼Õ¡Õ¯Õ« Õ¾Ö€Õ¡Ö‰ + + + A PHP extension caused the upload to fail. + PHP Ö†Õ¸Ö€Õ´Õ¡Õ¿Õ¨ Õ¤Õ¡Ö€Õ±Õ¥Õ¬ Õ§ Õ¢Õ¥Õ¼Õ¶Õ´Õ¡Õ¶ Õ¹Õ°Õ¡Õ»Õ¸Õ²Õ´Õ¡Õ¶ ÕºÕ¡Õ¿Õ³Õ¡Õ¼Ö‰ + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ« Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¥Õ¬Õ¾Õ¡Õ®Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« limit }} Õ¿Õ¡Ö€Ö€ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ«Õ¶Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Õ«Õ¶ Õ¯Õ¡Õ´ Õ¡Õ¾Õ¥Õ¬Õ«Ö‰ + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€ Õ¯Õ¡Õ´ Ö„Õ«Õ¹Ö‰ + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« Õ¸Ö‚Õ²Õ«Õ² {{ limit }} Õ¿Õ¡Ö€Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« Õ¸Ö‚Õ²Õ«Õ² {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰|Ô±ÕµÕ½ Õ°Õ¡Õ¾Õ¡Ö„Õ¡Õ®Õ¸Ö‚Õ¶ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Õ¸Ö‚Ö€Õ¡Õ¯Õ« {{ limit }} Õ¿Õ¡Ö€Ö€Õ¥Ö€Ö‰ + + + Invalid card number. + Õ”Õ¡Ö€Õ¿Õ« Õ½Õ­Õ¡Õ¬ Õ°Õ¡Õ´Õ¡Ö€: + + + Unsupported card type or invalid card number. + Õ‰Õ½ÕºÕ¡Õ½Õ¡Ö€Õ¯Õ¾Õ¸Õ² Õ¯Õ¡Õ´ Õ½Õ­Õ¡Õ¬ Ö„Õ¡Ö€Õ¿Õ« Õ°Õ¡Õ´Õ¡Ö€: + + + This is not a valid International Bank Account Number (IBAN). + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ´Õ«Õ»Õ¡Õ¦Õ¡ÕµÕ«Õ¶ Õ¢Õ¡Õ¶Õ¯Õ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ¾Õ« Õ°Õ¡Õ´Õ¡Ö€ Õ¹Õ§ (IBAN)Ö‰ + + + This value is not a valid ISBN-10. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¸Ö‚Õ¶Õ« Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ ISBN-10 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÖ‰ + + + This value is not a valid ISBN-13. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¸Ö‚Õ¶Õ« Õ¡Õ¶Õ¾Õ¡Õ¾Õ¥Ö€ ISBN-13 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÖ‰ + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ¿Õ¡Õ½Õ­Õ¡Õ¶Õ¸Ö‚Õ´ ISBN-10 Ö‡ ISBN-13 Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ¥Ö€Õ«Õ¶Ö‰ + + + This value is not a valid ISSN. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ½Õ¿Õ¡Õ½Õ­Õ¡Õ¶Õ¸Ö‚Õ´ ISSN Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ«Õ¶Ö‰ + + + This value is not a valid currency. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¾Õ¡Õ¾Õ¥Ö€ Õ¿Õ¡Ö€Õ¡Õ¤Ö€Õ¡Õ´ Õ¹Õ§Ö‰ + + + This value should be equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« {{ compared_value }}Ö‰ + + + This value should be greater than {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ´Õ¥Õ® Õ¬Õ«Õ¶Õ«, Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be greater than or equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ Õ¯Õ¡Õ´ Õ´Õ¥Õ® Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ«Õ¶Õ¹ÕºÕ¥Õ½ {{ compared_value_type }} {{ compared_value }}Ö‰ + + + This value should be less than {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« ÖƒÕ¸Ö„Ö€ Ö„Õ¡Õ¶ {{ compared_value }}Ö‰ + + + This value should be less than or equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« ÖƒÕ¸Ö„Ö€ Õ¯Õ¡Õ´ Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ {{ compared_value }}Ö‰ + + + This value should not be equal to {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ°Õ¡Õ¾Õ¡Õ½Õ¡Ö€ {{ compared_value }}Ö‰ + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ô±Ö€ÕªÕ¥Ö„Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ Õ¬Õ«Õ¶Õ« Õ¶Õ¸Ö‚Õ¶Õ¨ {{ compared_value_type }} {{ compared_value }}: + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ« Õ¯Õ¸Õ²Õ´Õ¥Ö€Õ« Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ­Õ«Õ½Õ¿ Õ´Õ¥Õ® Õ§ ({{ ratio }}). Õ„Õ¡Ö„Õ½Õ«Õ´Õ¡Õ¬ Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨Õ {{ max_ratio }}Ö‰ + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ« Õ¯Õ¸Õ²Õ´Õ¥Ö€Õ« Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ­Õ«Õ½Õ¿ ÖƒÕ¸Ö„Ö€ Õ§ ({{ ratio }}). Õ„Õ«Õ¶Õ«Õ´Õ¡Õ¬ Õ°Õ¡Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯ÖÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨Õ {{ min_ratio }}Ö‰ + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Ö„Õ¡Õ¼Õ¡Õ¯Õ¸Ö‚Õ½Õ« Õ§({{ width }}x{{ height }}px)Ö‰ Õ”Õ¡Õ¼Õ¡Õ¯Õ¸Ö‚Õ½Õ« Õ¶Õ¯Õ¡Ö€Õ¶Õ¥Ö€ Õ¹Õ¥Õ¶ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Õ¡Õ¬Õ¢Õ¸Õ´Õ¡ÕµÕ«Õ¶ Õ¸Ö‚Õ²Õ²Õ¾Õ¡Õ®Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ§({{ width }}x{{ height }}px)․ Õ¤Õ¡ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ ÕºÕ¸Ö€Õ¿Ö€Õ¥Õ¿Õ¡ÕµÕ«Õ¶ Õ¸Ö‚Õ²Õ²Õ¾Õ¡Õ®Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ§ ({{ width }}x{{ height }}px)․ Õ¤Õ¡ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + An empty file is not allowed. + Ô´Õ¡Õ¿Õ¡Ö€Õ¯ Õ¶Õ«Õ·Ö„ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰ + + + The host could not be resolved. + Õ€Õ¸Õ½Õ©Õ« Õ¡Õ¶Õ¸Ö‚Õ¶Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ« ÕºÕ¡Ö€Õ¦Õ¥Õ¬: + + + This value does not match the expected {{ charset }} charset. + Ô±Ö€ÕªÕ¥Ö„Õ¨ Õ¹Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´ {{ charset }} Õ¯Õ¸Õ¤Õ¡Õ¾Õ¸Ö€Õ´Õ¡Õ¶ Õ°Õ¥Õ¿: + + + This is not a valid Business Identifier Code (BIC). + ÕÕ¡ Õ¾Õ¡Õ¾Õ¥Ö€ Business Identifier Code (BIC) Õ¹Õ§Ö‰ + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf new file mode 100644 index 0000000..535bdac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.id.xlf @@ -0,0 +1,323 @@ + + + + + + This value should be false. + Nilai ini harus bernilai salah. + + + This value should be true. + Nilai ini harus bernilai benar. + + + This value should be of type {{ type }}. + Nilai ini harus bertipe {{ type }}. + + + This value should be blank. + Nilai ini harus kosong. + + + The value you selected is not a valid choice. + Nilai yang dipilih tidak tepat. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Anda harus memilih paling tidak {{ limit }} pilihan. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Anda harus memilih paling banyak {{ limit }} pilihan. + + + One or more of the given values is invalid. + Satu atau lebih nilai yang diberikan tidak sah. + + + This field was not expected. + Ruas ini tidak diharapkan. + + + This field is missing. + Ruas ini hilang. + + + This value is not a valid date. + Nilai ini bukan merupakan tanggal yang sah. + + + This value is not a valid datetime. + Nilai ini bukan merupakan tanggal dan waktu yang sah. + + + This value is not a valid email address. + Nilai ini bukan alamat surel yang sah. + + + The file could not be found. + Berkas tidak dapat ditemukan. + + + The file is not readable. + Berkas tidak dapat dibaca. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Ukuran berkas terlalu besar ({{ size }} {{ suffix }}). Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Jenis berkas ({{ type }}) tidak sah. Jenis berkas yang diizinkan adalah {{ types }}. + + + This value should be {{ limit }} or less. + Nilai ini harus {{ limit }} atau kurang. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Nilai ini terlalu panjang. Seharusnya {{ limit }} karakter atau kurang. + + + This value should be {{ limit }} or more. + Nilai ini harus {{ limit }} atau lebih. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Nilai ini terlalu pendek. Seharusnya {{ limit }} karakter atau lebih. + + + This value should not be blank. + Nilai ini tidak boleh kosong. + + + This value should not be null. + Nilai ini tidak boleh 'null'. + + + This value should be null. + Nilai ini harus 'null'. + + + This value is not valid. + Nilai ini tidak sah. + + + This value is not a valid time. + Nilai ini bukan merupakan waktu yang sah. + + + This value is not a valid URL. + Nilai ini bukan URL yang sah. + + + The two values should be equal. + Isi keduanya harus sama. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ukuran berkas terlalu besar. Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. + + + The file is too large. + Ukuran berkas terlalu besar. + + + The file could not be uploaded. + Berkas tidak dapat diunggah. + + + This value should be a valid number. + Nilai ini harus angka yang sah. + + + This file is not a valid image. + Berkas ini tidak termasuk citra. + + + This is not a valid IP address. + Ini bukan alamat IP yang sah. + + + This value is not a valid language. + Nilai ini bukan bahasa yang sah. + + + This value is not a valid locale. + Nilai ini bukan lokal yang sah. + + + This value is not a valid country. + Nilai ini bukan negara yang sah. + + + This value is already used. + Nilai ini sudah digunakan. + + + The size of the image could not be detected. + Ukuran dari citra tidak bisa dideteksi. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Lebar citra terlalu besar ({{ width }}px). Ukuran lebar maksimum adalah {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Lebar citra terlalu kecil ({{ width }}px). Ukuran lebar minimum yang diharapkan adalah {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Tinggi citra terlalu besar ({{ height }}px). Ukuran tinggi maksimum adalah {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Tinggi citra terlalu kecil ({{ height }}px). Ukuran tinggi minimum yang diharapkan adalah {{ min_height }}px. + + + This value should be the user's current password. + Nilai ini harus kata sandi pengguna saat ini. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Nilai ini harus memiliki tepat {{ limit }} karakter. + + + The file was only partially uploaded. + Berkas hanya terunggah sebagian. + + + No file was uploaded. + Tidak ada berkas terunggah. + + + No temporary folder was configured in php.ini. + Direktori sementara tidak dikonfiguasi pada php.ini. + + + Cannot write temporary file to disk. + Tidak dapat menuliskan berkas sementara ke dalam media penyimpanan. + + + A PHP extension caused the upload to fail. + Sebuah ekstensi PHP menyebabkan kegagalan unggah. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Kumpulan ini harus memiliki {{ limit }} elemen atau lebih. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Kumpulan ini harus memiliki kurang dari {{ limit }} elemen. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Kumpulan ini harus memiliki tepat {{ limit }} elemen. + + + Invalid card number. + Nomor kartu tidak sah. + + + Unsupported card type or invalid card number. + Jenis kartu tidak didukung atau nomor kartu tidak sah. + + + This is not a valid International Bank Account Number (IBAN). + Ini bukan Nomor Rekening Bank Internasional (IBAN) yang sah. + + + This value is not a valid ISBN-10. + Nilai ini bukan ISBN-10 yang sah. + + + This value is not a valid ISBN-13. + Nilai ini bukan ISBN-13 yang sah. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Nilai ini bukan ISBN-10 maupun ISBN-13 yang sah. + + + This value is not a valid ISSN. + Nilai ini bukan ISSN yang sah. + + + This value is not a valid currency. + Nilai ini bukan mata uang yang sah. + + + This value should be equal to {{ compared_value }}. + Nilai ini seharusnya sama dengan {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Nilai ini seharusnya lebih dari {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Nilai ini seharusnya lebih dari atau sama dengan {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Nilai ini seharusnya identik dengan {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Nilai ini seharusnya kurang dari {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Nilai ini seharusnya kurang dari atau sama dengan {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Nilai ini seharusnya tidak sama dengan {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Nilai ini seharusnya tidak identik dengan {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Rasio citra terlalu besar ({{ ratio }}). Rasio maksimum yang diizinkan adalah {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Rasio citra terlalu kecil ({{ ratio }}). Rasio minimum yang diharapkan adalah {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Citra persegi ({{ width }}x{{ height }}px). Citra persegi tidak diizinkan. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Citra berorientasi lanskap ({{ width }}x{{ height }}px). Citra berorientasi lanskap tidak diizinkan. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Citra berorientasi potret ({{ width }}x{{ height }}px). Citra berorientasi potret tidak diizinkan. + + + An empty file is not allowed. + Berkas kosong tidak diizinkan. + + + The host could not be resolved. + Host tidak dapat diselesaikan. + + + This value does not match the expected {{ charset }} charset. + Nilai ini tidak memenuhi set karakter {{ charset }} yang diharapkan. + + + This is not a valid Business Identifier Code (BIC). + Ini bukan Business Identifier Code (BIC) yang sah. + + + Error + Galat + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf new file mode 100644 index 0000000..f195447 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.it.xlf @@ -0,0 +1,327 @@ + + + + + + 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. + + + Error + Errore + + + This is not a valid UUID. + Questo non è un UUID valido. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf new file mode 100644 index 0000000..0c61d15 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ja.xlf @@ -0,0 +1,331 @@ + + + + + + This value should be false. + falseã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be true. + trueã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be of type {{ type }}. + åž‹ã¯{{ type }}ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be blank. + 空ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The value you selected is not a valid choice. + 有効ãªé¸æŠžè‚¢ã§ã¯ã‚りã¾ã›ã‚“。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + {{ limit }}å€‹ä»¥ä¸Šé¸æŠžã—ã¦ãã ã•ã„。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + {{ limit }}個以内ã§é¸æŠžã—ã¦ãã ã•ã„。 + + + One or more of the given values is invalid. + 無効ãªé¸æŠžè‚¢ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + + + This field was not expected. + ã“ã®ãƒ•ィールドã¯äºˆæœŸã•れã¦ã„ã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This field is missing. + ã“ã®ãƒ•ィールドã¯ã€æ¬ è½ã—ã¦ã„ã¾ã™ã€‚ + + + This value is not a valid date. + æœ‰åŠ¹ãªæ—¥ä»˜ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid datetime. + æœ‰åŠ¹ãªæ—¥æ™‚ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid email address. + 有効ãªãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã¯ã‚りã¾ã›ã‚“。 + + + The file could not be found. + ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 + + + The file is not readable. + ファイルを読ã¿è¾¼ã‚ã¾ã›ã‚“。 + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™({{ size }} {{ suffix }})ã€‚æœ‰åŠ¹ãªæœ€å¤§ã‚µã‚¤ã‚ºã¯{{ limit }} {{ suffix }}ã§ã™ã€‚ + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + ファイルã®MIMEタイプãŒç„¡åйã§ã™({{ type }})。有効ãªMIMEタイプã¯{{ types }}ã§ã™ã€‚ + + + This value should be {{ limit }} or less. + {{ limit }}以下ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + 値ãŒé•·ã™ãŽã¾ã™ã€‚{{ limit }}文字以内ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be {{ limit }} or more. + {{ limit }}以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + 値ãŒçŸ­ã™ãŽã¾ã™ã€‚{{ limit }}文字以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should not be blank. + 空ã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + This value should not be null. + nullã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + This value should be null. + nullã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value is not valid. + 有効ãªå€¤ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid time. + æœ‰åŠ¹ãªæ™‚刻ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid URL. + 有効ãªURLã§ã¯ã‚りã¾ã›ã‚“。 + + + The two values should be equal. + 2ã¤ã®å€¤ãŒåŒã˜ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™ã€‚æœ‰åŠ¹ãªæœ€å¤§ã‚µã‚¤ã‚ºã¯{{ limit }} {{ suffix }}ã§ã™ã€‚ + + + The file is too large. + ファイルã®ã‚µã‚¤ã‚ºãŒå¤§ãã™ãŽã¾ã™ã€‚ + + + The file could not be uploaded. + ファイルをアップロードã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This value should be a valid number. + æœ‰åŠ¹ãªæ•°å­—ã§ã¯ã‚りã¾ã›ã‚“。 + + + This file is not a valid image. + ファイルãŒç”»åƒã§ã¯ã‚りã¾ã›ã‚“。 + + + This is not a valid IP address. + 有効ãªIPアドレスã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid language. + 有効ãªè¨€èªžåã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid locale. + 有効ãªãƒ­ã‚±ãƒ¼ãƒ«ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid country. + 有効ãªå›½åã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is already used. + æ—¢ã«ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ + + + The size of the image could not be detected. + ç”»åƒã®ã‚µã‚¤ã‚ºãŒæ¤œå‡ºã§ãã¾ã›ã‚“。 + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + ç”»åƒã®å¹…ãŒå¤§ãã™ãŽã¾ã™({{ width }}ピクセル)。{{ max_width }}ピクセルã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + ç”»åƒã®å¹…ãŒå°ã•ã™ãŽã¾ã™({{ width }}ピクセル)。{{ min_width }}ピクセル以上ã«ã—ã¦ãã ã•ã„。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ç”»åƒã®é«˜ã•ãŒå¤§ãã™ãŽã¾ã™({{ height }}ピクセル)。{{ max_height }}ピクセルã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ç”»åƒã®é«˜ã•ãŒå°ã•ã™ãŽã¾ã™({{ height }}ピクセル)。{{ min_height }}ピクセル以上ã«ã—ã¦ãã ã•ã„。 + + + This value should be the user's current password. + ユーザーã®ç¾åœ¨ã®ãƒ‘スワードã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ã¡ã‚‡ã†ã©{{ limit }}文字ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + The file was only partially uploaded. + ファイルã®ã‚¢ãƒƒãƒ—ロードã¯å®Œå…¨ã§ã¯ã‚りã¾ã›ã‚“。 + + + No file was uploaded. + ファイルãŒã‚¢ãƒƒãƒ—ロードã•れã¦ã„ã¾ã›ã‚“。 + + + No temporary folder was configured in php.ini. + php.iniã§ä¸€æ™‚フォルダãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“。 + + + Cannot write temporary file to disk. + ä¸€æ™‚ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ã込むã“ã¨ãŒã§ãã¾ã›ã‚“。 + + + A PHP extension caused the upload to fail. + PHPæ‹¡å¼µã«ã‚ˆã£ã¦ã‚¢ãƒƒãƒ—ロードã«å¤±æ•—ã—ã¾ã—ãŸã€‚ + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + {{ limit }}個以上ã®è¦ç´ ã‚’å«ã‚“ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + è¦ç´ ã¯{{ limit }}個ã¾ã§ã§ã™ã€‚ + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + è¦ç´ ã¯ã¡ã‚‡ã†ã©{{ limit }}個ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + Invalid card number. + 無効ãªã‚«ãƒ¼ãƒ‰ç•ªå·ã§ã™ã€‚ + + + Unsupported card type or invalid card number. + 未対応ã®ã‚«ãƒ¼ãƒ‰ç¨®é¡žåˆã¯ç„¡åйãªã‚«ãƒ¼ãƒ‰ç•ªå·ã§ã™ã€‚ + + + This is not a valid International Bank Account Number (IBAN). + 有効ãªIBANコードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISBN-10. + 有効ãªISBN-10コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISBN-13. + 有効ãªISBN-13コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + 有効ãªISBN-10コードåˆã¯ISBN-13コードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid ISSN. + 有効ãªISSNコードã§ã¯ã‚りã¾ã›ã‚“。 + + + This value is not a valid currency. + 有効ãªè²¨å¹£ã§ã¯ã‚りã¾ã›ã‚“。 + + + This value should be equal to {{ compared_value }}. + {{ compared_value }}ã¨ç­‰ã—ããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be greater than {{ compared_value }}. + {{ compared_value }}より大ãããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be greater than or equal to {{ compared_value }}. + {{ compared_value }}以上ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + {{ compared_value_type }}ã¨ã—ã¦ã®{{ compared_value }}ã¨ç­‰ã—ããªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be less than {{ compared_value }}. + {{ compared_value }}未満ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should be less than or equal to {{ compared_value }}. + {{ compared_value }}以下ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + This value should not be equal to {{ compared_value }}. + {{ compared_value }}ã¨ç­‰ã—ãã¦ã¯ã„ã‘ã¾ã›ã‚“。 + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + {{ compared_value_type }}ã¨ã—ã¦ã®{{ compared_value }}ã¨ç­‰ã—ãã¦ã¯ã„ã‘ã¾ã›ã‚“。 + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + ç”»åƒã®ã‚¢ã‚¹ãƒšã‚¯ãƒˆæ¯”ãŒå¤§ãã™ãŽã¾ã™({{ ratio }})。{{ max_ratio }}ã¾ã§ã«ã—ã¦ãã ã•ã„。 + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ç”»åƒã®ã‚¢ã‚¹ãƒšã‚¯ãƒˆæ¯”ãŒå°ã•ã™ãŽã¾ã™({{ ratio }})。{{ min_ratio }}以上ã«ã—ã¦ãã ã•ã„。 + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + ç”»åƒãŒæ­£æ–¹å½¢ã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。正方形ã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ç”»åƒãŒæ¨ªå‘ãã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。横å‘ãã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ç”»åƒãŒç¸¦å‘ãã«ãªã£ã¦ã„ã¾ã™({{ width }}x{{ height }}ピクセル)。縦å‘ãã®ç”»åƒã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + An empty file is not allowed. + 空ã®ãƒ•ァイルã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 + + + The host could not be resolved. + ホストを解決ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ + + + This value does not match the expected {{ charset }} charset. + ã“ã®å€¤ã¯äºˆæœŸã•れる文字コード({{ charset }})ã¨ç•°ãªã‚Šã¾ã™ã€‚ + + + This is not a valid Business Identifier Code (BIC). + 有効ãªSWIFTコードã§ã¯ã‚りã¾ã›ã‚“。 + + + Error + エラー + + + This is not a valid UUID. + 有効ãªUUIDã§ã¯ã‚りã¾ã›ã‚“。 + + + This value should be a multiple of {{ compared_value }}. + {{ compared_value }}ã®å€æ•°ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf new file mode 100644 index 0000000..bdbc9da --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lb.xlf @@ -0,0 +1,327 @@ + + + + + + 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 entspré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 exakt {{ 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 oder den temporären Dossier existéiert net. + + + 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 Host-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). + + + Error + Feeler + + + This is not a valid UUID. + Dëst ass keng gëlteg UUID. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf new file mode 100644 index 0000000..60641b5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lt.xlf @@ -0,0 +1,311 @@ + + + + + + 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. + + + Error + Klaida + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf new file mode 100644 index 0000000..2ad19cd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.lv.xlf @@ -0,0 +1,315 @@ + + + + + + This value should be false. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t nepatiesai. + + + This value should be true. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t patiesai. + + + This value should be of type {{ type }}. + Å Ä«s vÄ“rtÄ«bas tipam ir jÄbÅ«t {{ type }}. + + + This value should be blank. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t tukÅ¡ai. + + + The value you selected is not a valid choice. + VÄ“rtÄ«ba, kuru jÅ«s izvÄ“lÄ“jÄties nav derÄ«ga izvÄ“le. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Jums nav jÄveic izvÄ“le.|Jums ir jÄveic vismaz {{ limit }} izvÄ“le.|Jums ir jÄveic vismaz {{ limit }} izvÄ“les. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Jums nav jÄveic izvÄ“le.|Jums ir jÄveic ne vairÄk kÄ {{ limit }} izvÄ“le.|Jums ir jÄveic ne vairÄk kÄ {{ limit }} izvÄ“les. + + + One or more of the given values is invalid. + Viena vai vairÄkas no dotajÄm vÄ“rtÄ«bÄm ir nederÄ«gas. + + + This field was not expected. + Å is lauks netika gaidÄ«ts. + + + This field is missing. + Å is lauks ir pazudis. + + + This value is not a valid date. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs datums. + + + This value is not a valid datetime. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs datums un laiks + + + This value is not a valid email address. + Å Ä« vÄ“rtÄ«ba ir nederÄ«ga e-pasta adrese. + + + The file could not be found. + Fails nav atrasts. + + + The file is not readable. + Fails nav lasÄms. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Fails ir pÄrÄk liels ({{ size }} {{ suffix }}). Atļautais maksimÄlais izmÄ“rs ir {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Faila mime tips nav derÄ«gs ({{ type }}). Atļautie mime tipi ir {{ types }}. + + + This value should be {{ limit }} or less. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t ne vairÄk kÄ {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk gara. Tai bÅ«tu jÄbÅ«t ne vairÄk kÄ {{ limit }} rakstzÄ«mei.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk gara. Tai bÅ«tu jÄbÅ«t ne vairÄk kÄ {{ limit }} rakstzÄ«mÄ“m. + + + This value should be {{ limit }} or more. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t ne mazÄk kÄ {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk Ä«sa. Tai bÅ«tu jÄbÅ«t ne mazÄk kÄ {{ limit }} rakstzÄ«mei.|Å Ä« vÄ“rtÄ«ba ir pÄrÄk Ä«sa. Tai bÅ«tu jÄbÅ«t ne mazÄk kÄ {{ limit }} rakstzÄ«mÄ“m. + + + This value should not be blank. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t tukÅ¡ai. + + + This value should not be null. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t null. + + + This value should be null. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t null. + + + This value is not valid. + Å Ä« vÄ“rtÄ«ba ir nederÄ«ga. + + + This value is not a valid time. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs laiks. + + + This value is not a valid URL. + Å Ä« vÄ“rtÄ«ba ir nederÄ«gs URL. + + + The two values should be equal. + AbÄm vÄ“rtÄ«bÄm jÄbÅ«t vienÄdam. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Fails ir pÄrÄk liels. Atļautais maksimÄlais izmÄ“rs ir {{ limit }} {{ suffix }}. + + + The file is too large. + Fails ir pÄrÄk liels. + + + The file could not be uploaded. + Failu nevarÄ“ja augÅ¡upielÄdÄ“t. + + + This value should be a valid number. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t derÄ«gam skaitlim. + + + This file is not a valid image. + Å is fails nav derÄ«gs attÄ“ls. + + + This is not a valid IP address. + Å Ä« nav derÄ«ga IP adrese. + + + This value is not a valid language. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valoda. + + + This value is not a valid locale. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga lokalizÄcija. + + + This value is not a valid country. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valsts. + + + This value is already used. + Å Ä« vÄ“rtÄ«ba jau tiek izmantota. + + + The size of the image could not be detected. + Nevar noteikt attÄ“la izmÄ“ru. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + AttÄ“la platums ir pÄrÄk liels ({{ width }}px). Atļautais maksimÄlais platums ir {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + AttÄ“la platums ir pÄrÄk mazs ({{ width }}px). MinimÄlais sagaidÄmais platums ir {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + AttÄ“la augstums ir pÄrÄk liels ({{ height }}px). Atļautais maksimÄlais augstums ir {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + AttÄ“la augstums ir pÄrÄk mazs ({{ height }}px). MinimÄlais sagaidÄmais augstums ir {{ min_height }}px. + + + This value should be the user's current password. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lietotÄja paÅ¡reizÄ“jai parolei. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Å Ä«s vÄ“rtÄ«bas garums ir 0 rakstzÄ«mju.|Å ai vÄ“rtÄ«bai ir jÄbÅ«t tieÅ¡i {{ limit }} rakstzÄ«mei.|Å ai vÄ“rtÄ«bai ir jÄbÅ«t tieÅ¡i {{ limit }} rakstzÄ«mÄ“m. + + + The file was only partially uploaded. + Fails bija tikai daļēji augÅ¡upielÄdÄ“ts. + + + No file was uploaded. + Fails netika augÅ¡upielÄdÄ“ts. + + + No temporary folder was configured in php.ini. + Pagaidu mape php.ini failÄ nav nokonfigurÄ“ta. + + + Cannot write temporary file to disk. + Nevar ierakstÄ«t pagaidu failu uz diska. + + + A PHP extension caused the upload to fail. + PHP paplaÅ¡inÄjums izraisÄ«ja augÅ¡upielÄdes neizdoÅ¡anos. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur vismaz {{ limit }} elementu.|Å im krÄjumam jÄsatur vismaz {{ limit }} elementus. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur ne vairÄk kÄ {{ limit }} elementu.|Å im krÄjumam jÄsatur ne vairÄk kÄ {{ limit }} elementus. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Å is krÄjums satur 0 elementu.|Å im krÄjumam jÄsatur tieÅ¡i {{ limit }} elementu.|Å im krÄjumam jÄsatur tieÅ¡i {{ limit }} elementus. + + + Invalid card number. + NederÄ«gs kartes numurs. + + + Unsupported card type or invalid card number. + NeatbalstÄ«ts kartes tips vai nederÄ«gs kartes numurs. + + + This is not a valid International Bank Account Number (IBAN). + Å is nav derÄ«gs starptautisks banku konta numurs (IBAN). + + + This value is not a valid ISBN-10. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISBN-10 numurs. + + + This value is not a valid ISBN-13. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISBN-13 numurs + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Å Ä« vÄ“rtÄ«ba neatbilst ne derÄ«gam ISBN-10 numuram, ne derÄ«gm ISBN-13 numuram. + + + This value is not a valid ISSN. + Å Ä« vÄ“rtÄ«ba nav derÄ«gs ISSN numurs + + + This value is not a valid currency. + Å Ä« vÄ“rtÄ«ba nav derÄ«ga valÅ«ta + + + This value should be equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t vienÄdai ar {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lielÄkai par {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t lielÄkai vai vienÄdai ar {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t identiskai ar {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t mazÄkai par {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + TÅ ai vÄ“rtÄ«bai ir jÄbÅ«t mazÄkai vai vienÄdai ar {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Å ai vÄ“rtÄ«bai ir jÄbÅ«t vienÄdai ar {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Å ai vÄ“rtÄ«bai nav jÄbÅ«t identiskai ar {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + AttÄ“la attiecÄ«ba ir pÄrÄk liela ({{ ratio }}). AtļautÄ maksimÄlÄ attiecÄ«ba ir {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + AttÄ“la attiecÄ«ba ir pÄrÄk maza ({{ ratio }}). MinimÄlÄ sagaidÄmÄ attiecÄ«ba ir {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Å is attÄ“ls ir kvadrÄts ({{ width }}x{{ height }}px). KvadrÄtveida attÄ“li nav atļauti. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + AttÄ“ls ir orientÄ“ts kÄ ainava ({{ width }}x{{ height }}px). AttÄ“li, kas ir orientÄ“ti kÄ ainavas nav atļauti. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + AttÄ“ls ir orientÄ“ts kÄ portrets ({{ width }}x{{ height }}px). AttÄ“li, kas ir orientÄ“ti kÄ portreti nav atļauti. + + + An empty file is not allowed. + TukÅ¡s fails nav atļauts. + + + The host could not be resolved. + Resursdatora nosaukumu nevar atrisinÄt. + + + This value does not match the expected {{ charset }} charset. + Å Ä« vÄ“rtÄ«ba neatbilst sagaidÄmajai rakstzÄ«mju kopai {{ charset }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf new file mode 100644 index 0000000..4be2198 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.mn.xlf @@ -0,0 +1,151 @@ + + + + + + This value should be false. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу байх Ñ‘Ñтой. + + + This value should be true. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн байх Ñ‘Ñтой. + + + This value should be of type {{ type }}. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ type }} -н төрөл байх Ñ‘Ñтой. + + + This value should be blank. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° хооÑон байх Ñ‘Ñтой. + + + The value you selected is not a valid choice. + СонгоÑон утга буруу байна. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Хамгийн багадаа {{ limit }} утга ÑонгогдÑон байх Ñ‘Ñтой. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Хамгийн ихдÑÑ {{ limit }} утга Ñонгогдох боломжтой. + + + One or more of the given values is invalid. + ӨгөгдÑөн нÑг ÑÑвÑл нÑгÑÑÑ Ð¾Ð»Ð¾Ð½ утга буруу байна. + + + This field was not expected. + Ð­Ð½Ñ Ñ‚Ð°Ð»Ð±Ð°Ñ€ нь хүлÑÑгдÑж байÑан юм. + + + This field is missing. + Ð­Ð½Ñ Ñ‚Ð°Ð»Ð±Ð°Ñ€ нь алга болÑон байна. + + + This value is not a valid date. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу date төрөл байна . + + + This value is not a valid datetime. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу цаг төрөл байна. + + + This value is not a valid email address. + И-майл хаÑг буруу байна. + + + The file could not be found. + Файл олдÑонгүй. + + + The file is not readable. + Файл уншигдахуйц биш байна. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñ…ÑÑ‚Ñрхий том байна ({{ size }} {{ suffix }}). Зөвшөөрөгдөх дÑÑд Ñ…ÑмжÑÑ {{ limit }} {{ suffix }} байна. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Файлын MIME-төрөл нь буруу байна ({{ type }}). Зөвшөөрөгдөх MIME-төрлүүд {{ types }}. + + + This value should be {{ limit }} or less. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ limit }} юмуу ÑÑвÑл бага байна. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° Ñ…ÑÑ‚Ñрхий урт байна. {{ limit }} Ñ‚ÑмдÑгтийн урттай юмуу ÑÑвÑл бага байна. + + + This value should be {{ limit }} or more. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° {{ limit }} юмуу ÑÑвÑл их байна. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° Ñ…ÑÑ‚Ñрхий богино байна. {{ limit }} Ñ‚ÑмдÑгт ÑÑвÑл их байна. + + + This value should not be blank. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° хооÑон байж болохгүй. + + + This value should not be null. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° null байж болохгүй. + + + This value should be null. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° null байна. + + + This value is not valid. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу байна. + + + This value is not a valid time. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу цаг төрөл байна. + + + This value is not a valid URL. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° буруу URL байна . + + + The two values should be equal. + Хоёр утгууд ижил байх Ñ‘Ñтой. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файл Ñ…ÑÑ‚Ñрхий том байна. Зөвшөөрөгдөх дÑÑд Ñ…ÑмжÑÑ Ð½ÑŒ {{ limit }} {{ suffix }} байна. + + + The file is too large. + Файл Ñ…ÑÑ‚Ñрхий том байна. + + + The file could not be uploaded. + Файл upload хийгдÑÑнгүй. + + + This value should be a valid number. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° зөвхөн тоо байна. + + + This value is not a valid country. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн бодит ÑƒÐ»Ñ Ð±Ð¸Ñˆ байна. + + + This file is not a valid image. + Файл зураг биш байна. + + + This is not a valid IP address. + IP хаÑг зөв биш байна. + + + This value is not a valid language. + Ð­Ð½Ñ ÑƒÑ‚Ð³Ð° үнÑн зөв Ñ…Ñл биш байна . + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf new file mode 100644 index 0000000..2505765 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nb.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Verdien mÃ¥ være usann. + + + This value should be true. + Verdien mÃ¥ være sann. + + + This value should be of type {{ type }}. + Verdien skal ha typen {{ type }}. + + + This value should be blank. + Verdien skal være blank. + + + The value you selected is not a valid choice. + Den valgte verdien er ikke gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ velge minst {{ limit }} valg. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan maks velge {{ limit }} valg. + + + One or more of the given values is invalid. + En eller flere av de oppgitte verdiene er ugyldige. + + + This field was not expected. + Dette feltet var ikke forventet. + + + This field is missing. + Dette feltet mangler. + + + This value is not a valid date. + Verdien er ikke en gyldig dato. + + + This value is not a valid datetime. + Verdien er ikke en gyldig dato/tid. + + + This value is not a valid email address. + Verdien er ikke en gyldig e-postadresse. + + + The file could not be found. + Filen kunne ikke finnes. + + + The file is not readable. + Filen er ikke lesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}. + + + This value should be {{ limit }} or less. + Verdien mÃ¥ være {{ limit }} tegn lang eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Verdien er for lang. Den mÃ¥ ha {{ limit }} tegn eller mindre. + + + This value should be {{ limit }} or more. + Verdien mÃ¥ være {{ limit }} eller mer. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Verdien er for kort. Den mÃ¥ ha {{ limit }} tegn eller flere. + + + This value should not be blank. + Verdien kan ikke være blank. + + + This value should not be null. + Verdien kan ikke være tom (null). + + + This value should be null. + Verdien skal være tom (null). + + + This value is not valid. + Verdien er ugyldig. + + + This value is not a valid time. + Verdien er ikke en gyldig tid. + + + This value is not a valid URL. + Verdien er ikke en gyldig URL. + + + The two values should be equal. + Verdiene skal være identiske. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}. + + + The file is too large. + Filen er for stor. + + + The file could not be uploaded. + Filen kunne ikke lastes opp. + + + This value should be a valid number. + Verdien skal være et gyldig tall. + + + This file is not a valid image. + Denne filen er ikke et gyldig bilde. + + + This is not a valid IP address. + Dette er ikke en gyldig IP adresse. + + + This value is not a valid language. + Verdien er ikke et gyldig sprÃ¥k. + + + This value is not a valid locale. + Verdien er ikke en gyldig lokalitet. + + + This value is not a valid country. + Verdien er ikke et gyldig navn pÃ¥ land. + + + This value is already used. + Verdien er allerede brukt. + + + The size of the image could not be detected. + Bildestørrelsen kunne ikke oppdages. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler. + + + This value should be the user's current password. + Verdien skal være brukerens sitt nÃ¥værende passord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Verdien skal være nøyaktig {{ limit }} tegn. + + + The file was only partially uploaded. + Filen var kun delvis opplastet. + + + No file was uploaded. + Ingen fil var lastet opp. + + + No temporary folder was configured in php.ini. + Den midlertidige mappen (tmp) er ikke konfigurert i php.ini. + + + Cannot write temporary file to disk. + Kan ikke skrive midlertidig fil til disk. + + + A PHP extension caused the upload to fail. + En PHP-utvidelse forÃ¥rsaket en feil under opplasting. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller flere.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller flere. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller færre.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller færre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} element.|Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} elementer. + + + Invalid card number. + Ugyldig kortnummer. + + + Unsupported card type or invalid card number. + Korttypen er ikke støttet eller kortnummeret er ugyldig. + + + This is not a valid International Bank Account Number (IBAN). + Dette er ikke et gyldig IBAN-nummer. + + + This value is not a valid ISBN-10. + Verdien er ikke en gyldig ISBN-10. + + + This value is not a valid ISBN-13. + Verdien er ikke en gyldig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Verdien er hverken en gyldig ISBN-10 eller ISBN-13. + + + This value is not a valid ISSN. + Verdien er ikke en gyldig ISSN. + + + This value is not a valid currency. + Verdien er ikke gyldig valuta. + + + This value should be equal to {{ compared_value }}. + Verdien skal være lik {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Verdien skal være større enn {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Verdien skal være større enn eller lik {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Verdien skal være mindre enn {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Verdien skal være mindre enn eller lik {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Verdien skal ikke være lik {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Bildet er i stÃ¥ende retning ({{ width }}x{{ height }}px). Bilder i stÃ¥ende retning er ikke tillatt. + + + An empty file is not allowed. + Tomme filer er ikke tilatt. + + + The host could not be resolved. + Vertsnavn kunne ikke løses. + + + This value does not match the expected {{ charset }} charset. + Verdien samsvarer ikke med forventet tegnsett {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dette er ikke en gyldig BIC. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf new file mode 100644 index 0000000..bee0ab3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nl.xlf @@ -0,0 +1,323 @@ + + + + + + This value should be false. + Deze waarde moet onwaar zijn. + + + This value should be true. + Deze waarde moet waar zijn. + + + This value should be of type {{ type }}. + Deze waarde moet van het type {{ type }} zijn. + + + This value should be blank. + Deze waarde moet leeg zijn. + + + The value you selected is not a valid choice. + De geselecteerde waarde is geen geldige optie. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Selecteer ten minste {{ limit }} optie.|Selecteer ten minste {{ limit }} opties. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Selecteer maximaal {{ limit }} optie.|Selecteer maximaal {{ limit }} opties. + + + One or more of the given values is invalid. + Eén of meer van de ingegeven waarden zijn ongeldig. + + + This field was not expected. + Dit veld werd niet verwacht. + + + This field is missing. + Dit veld ontbreekt. + + + This value is not a valid date. + Deze waarde is geen geldige datum. + + + This value is not a valid datetime. + Deze waarde is geen geldige datum en tijd. + + + This value is not a valid email address. + Deze waarde is geen geldig e-mailadres. + + + The file could not be found. + Het bestand kon niet gevonden worden. + + + The file is not readable. + Het bestand is niet leesbaar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}. + + + This value should be {{ limit }} or less. + Deze waarde moet {{ limit }} of minder zijn. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Deze waarde is te lang. Hij mag maximaal {{ limit }} teken bevatten.|Deze waarde is te lang. Hij mag maximaal {{ limit }} tekens bevatten. + + + This value should be {{ limit }} or more. + Deze waarde moet {{ limit }} of meer zijn. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Deze waarde is te kort. Hij moet tenminste {{ limit }} teken bevatten.|Deze waarde is te kort. Hij moet tenminste {{ limit }} tekens bevatten. + + + This value should not be blank. + Deze waarde mag niet leeg zijn. + + + This value should not be null. + Deze waarde mag niet null zijn. + + + This value should be null. + Deze waarde moet null zijn. + + + This value is not valid. + Deze waarde is niet geldig. + + + This value is not a valid time. + Deze waarde is geen geldige tijd. + + + This value is not a valid URL. + Deze waarde is geen geldige URL. + + + The two values should be equal. + De twee waarden moeten gelijk zijn. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}. + + + The file is too large. + Het bestand is te groot. + + + The file could not be uploaded. + Het bestand kon niet worden geüpload. + + + This value should be a valid number. + Deze waarde moet een geldig getal zijn. + + + This file is not a valid image. + Dit bestand is geen geldige afbeelding. + + + This is not a valid IP address. + Dit is geen geldig IP-adres. + + + This value is not a valid language. + Deze waarde is geen geldige taal. + + + This value is not a valid locale. + Deze waarde is geen geldige locale. + + + This value is not a valid country. + Deze waarde is geen geldig land. + + + This value is already used. + Deze waarde wordt al gebruikt. + + + The size of the image could not be detected. + De grootte van de afbeelding kon niet bepaald worden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + De afbeelding is niet breed genoeg ({{ width }}px). De minimaal verwachte breedte is {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + De afbeelding is niet hoog genoeg ({{ height }}px). De minimaal verwachte hoogte is {{ min_height }}px. + + + This value should be the user's current password. + Deze waarde moet het huidige wachtwoord van de gebruiker zijn. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Deze waarde moet exact {{ limit }} teken lang zijn.|Deze waarde moet exact {{ limit }} tekens lang zijn. + + + The file was only partially uploaded. + Het bestand is slechts gedeeltelijk geüpload. + + + No file was uploaded. + Er is geen bestand geüpload. + + + No temporary folder was configured in php.ini. + Er is geen tijdelijke map geconfigureerd in php.ini, of de gespecificeerde map bestaat niet. + + + Cannot write temporary file to disk. + Kan het tijdelijke bestand niet wegschrijven op disk. + + + A PHP extension caused the upload to fail. + De upload is mislukt vanwege een PHP-extensie. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Deze collectie moet {{ limit }} element of meer bevatten.|Deze collectie moet {{ limit }} elementen of meer bevatten. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Deze collectie moet {{ limit }} element of minder bevatten.|Deze collectie moet {{ limit }} elementen of minder bevatten. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Deze collectie moet exact {{ limit }} element bevatten.|Deze collectie moet exact {{ limit }} elementen bevatten. + + + Invalid card number. + Ongeldig creditcardnummer. + + + Unsupported card type or invalid card number. + Niet-ondersteund type creditcard of ongeldig nummer. + + + This is not a valid International Bank Account Number (IBAN). + Dit is geen geldig internationaal bankrekeningnummer (IBAN). + + + This value is not a valid ISBN-10. + Deze waarde is geen geldige ISBN-10. + + + This value is not a valid ISBN-13. + Deze waarde is geen geldige ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Deze waarde is geen geldige ISBN-10 of ISBN-13 waarde. + + + This value is not a valid ISSN. + Deze waarde is geen geldige ISSN waarde. + + + This value is not a valid currency. + Deze waarde is geen geldige valuta. + + + This value should be equal to {{ compared_value }}. + Deze waarde moet gelijk zijn aan {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Deze waarde moet groter zijn dan {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Deze waarde moet groter dan of gelijk aan {{ compared_value }} zijn. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Deze waarde moet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Deze waarde moet minder zijn dan {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Deze waarde moet minder dan of gelijk aan {{ compared_value }} zijn. + + + This value should not be equal to {{ compared_value }}. + Deze waarde mag niet gelijk zijn aan {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Deze waarde mag niet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + De afbeelding is vierkant ({{ width }}x{{ height }}px). Vierkante afbeeldingen zijn niet toegestaan. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + De afbeelding is liggend ({{ width }}x{{ height }}px). Liggende afbeeldingen zijn niet toegestaan. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + De afbeelding is staand ({{ width }}x{{ height }}px). Staande afbeeldingen zijn niet toegestaan. + + + An empty file is not allowed. + Lege bestanden zijn niet toegestaan. + + + This value does not match the expected {{ charset }} charset. + Deze waarde is niet in de verwachte tekencodering {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dit is geen geldige bedrijfsidentificatiecode (BIC/SWIFT). + + + Error + Fout + + + This is not a valid UUID. + Dit is geen geldige UUID. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf new file mode 100644 index 0000000..e588133 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.nn.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Verdien skulle ha vore tom/nei. + + + This value should be true. + Verdien skulla ha vore satt/ja. + + + This value should be of type {{ type }}. + Verdien mÃ¥ vere av typen {{ type }}. + + + This value should be blank. + Verdien skal vere blank. + + + The value you selected is not a valid choice. + Verdien du valde er ikkje gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ gjere minst {{ limit }} val. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan maksimalt gjere {{ limit }} val. + + + 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 forventa. + + + 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 er ikkje funnen. + + + 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 }}). Maksimal storleik er {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime-typen av fila er ugyldig ({{ type }}). Tillatne 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 kan ikkje vere blank. + + + This value should not be null. + Verdien kan 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 ei 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 storleiken 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). Tillaten 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). Tillaten 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 berre delvis lasta opp. + + + 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 kortnummeret er ugyldig. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf new file mode 100644 index 0000000..2505765 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.no.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Verdien mÃ¥ være usann. + + + This value should be true. + Verdien mÃ¥ være sann. + + + This value should be of type {{ type }}. + Verdien skal ha typen {{ type }}. + + + This value should be blank. + Verdien skal være blank. + + + The value you selected is not a valid choice. + Den valgte verdien er ikke gyldig. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Du mÃ¥ velge minst {{ limit }} valg. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Du kan maks velge {{ limit }} valg. + + + One or more of the given values is invalid. + En eller flere av de oppgitte verdiene er ugyldige. + + + This field was not expected. + Dette feltet var ikke forventet. + + + This field is missing. + Dette feltet mangler. + + + This value is not a valid date. + Verdien er ikke en gyldig dato. + + + This value is not a valid datetime. + Verdien er ikke en gyldig dato/tid. + + + This value is not a valid email address. + Verdien er ikke en gyldig e-postadresse. + + + The file could not be found. + Filen kunne ikke finnes. + + + The file is not readable. + Filen er ikke lesbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}. + + + This value should be {{ limit }} or less. + Verdien mÃ¥ være {{ limit }} tegn lang eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Verdien er for lang. Den mÃ¥ ha {{ limit }} tegn eller mindre. + + + This value should be {{ limit }} or more. + Verdien mÃ¥ være {{ limit }} eller mer. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Verdien er for kort. Den mÃ¥ ha {{ limit }} tegn eller flere. + + + This value should not be blank. + Verdien kan ikke være blank. + + + This value should not be null. + Verdien kan ikke være tom (null). + + + This value should be null. + Verdien skal være tom (null). + + + This value is not valid. + Verdien er ugyldig. + + + This value is not a valid time. + Verdien er ikke en gyldig tid. + + + This value is not a valid URL. + Verdien er ikke en gyldig URL. + + + The two values should be equal. + Verdiene skal være identiske. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}. + + + The file is too large. + Filen er for stor. + + + The file could not be uploaded. + Filen kunne ikke lastes opp. + + + This value should be a valid number. + Verdien skal være et gyldig tall. + + + This file is not a valid image. + Denne filen er ikke et gyldig bilde. + + + This is not a valid IP address. + Dette er ikke en gyldig IP adresse. + + + This value is not a valid language. + Verdien er ikke et gyldig sprÃ¥k. + + + This value is not a valid locale. + Verdien er ikke en gyldig lokalitet. + + + This value is not a valid country. + Verdien er ikke et gyldig navn pÃ¥ land. + + + This value is already used. + Verdien er allerede brukt. + + + The size of the image could not be detected. + Bildestørrelsen kunne ikke oppdages. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler. + + + This value should be the user's current password. + Verdien skal være brukerens sitt nÃ¥værende passord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Verdien skal være nøyaktig {{ limit }} tegn. + + + The file was only partially uploaded. + Filen var kun delvis opplastet. + + + No file was uploaded. + Ingen fil var lastet opp. + + + No temporary folder was configured in php.ini. + Den midlertidige mappen (tmp) er ikke konfigurert i php.ini. + + + Cannot write temporary file to disk. + Kan ikke skrive midlertidig fil til disk. + + + A PHP extension caused the upload to fail. + En PHP-utvidelse forÃ¥rsaket en feil under opplasting. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller flere.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller flere. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Denne samlingen mÃ¥ inneholde {{ limit }} element eller færre.|Denne samlingen mÃ¥ inneholde {{ limit }} elementer eller færre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} element.|Denne samlingen mÃ¥ inneholde nøyaktig {{ limit }} elementer. + + + Invalid card number. + Ugyldig kortnummer. + + + Unsupported card type or invalid card number. + Korttypen er ikke støttet eller kortnummeret er ugyldig. + + + This is not a valid International Bank Account Number (IBAN). + Dette er ikke et gyldig IBAN-nummer. + + + This value is not a valid ISBN-10. + Verdien er ikke en gyldig ISBN-10. + + + This value is not a valid ISBN-13. + Verdien er ikke en gyldig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Verdien er hverken en gyldig ISBN-10 eller ISBN-13. + + + This value is not a valid ISSN. + Verdien er ikke en gyldig ISSN. + + + This value is not a valid currency. + Verdien er ikke gyldig valuta. + + + This value should be equal to {{ compared_value }}. + Verdien skal være lik {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Verdien skal være større enn {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Verdien skal være større enn eller lik {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Verdien skal være mindre enn {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Verdien skal være mindre enn eller lik {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Verdien skal ikke være lik {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Bildet er i stÃ¥ende retning ({{ width }}x{{ height }}px). Bilder i stÃ¥ende retning er ikke tillatt. + + + An empty file is not allowed. + Tomme filer er ikke tilatt. + + + The host could not be resolved. + Vertsnavn kunne ikke løses. + + + This value does not match the expected {{ charset }} charset. + Verdien samsvarer ikke med forventet tegnsett {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Dette er ikke en gyldig BIC. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf new file mode 100644 index 0000000..e7ad1ec --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pl.xlf @@ -0,0 +1,331 @@ + + + + + + This value should be false. + Ta wartość powinna być faÅ‚szem. + + + This value should be true. + Ta wartość powinna być prawdÄ…. + + + This value should be of type {{ type }}. + Ta wartość powinna być typu {{ type }}. + + + This value should be blank. + Ta wartość powinna być pusta. + + + The value you selected is not a valid choice. + Ta wartość powinna być jednÄ… z podanych opcji. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + PowinieneÅ› wybrać co najmniej {{ limit }} opcjÄ™.|PowinieneÅ› wybrać co najmniej {{ limit }} opcje.|PowinieneÅ› wybrać co najmniej {{ limit }} opcji. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + PowinieneÅ› wybrać maksymalnie {{ limit }} opcjÄ™.|PowinieneÅ› wybrać maksymalnie {{ limit }} opcje.|PowinieneÅ› wybrać maksymalnie {{ limit }} opcji. + + + One or more of the given values is invalid. + Jedna lub wiÄ™cej z podanych wartoÅ›ci jest nieprawidÅ‚owa. + + + This field was not expected. + Tego pola siÄ™ nie spodziewano. + + + This field is missing. + Tego pola brakuje. + + + This value is not a valid date. + Ta wartość nie jest prawidÅ‚owÄ… datÄ…. + + + This value is not a valid datetime. + Ta wartość nie jest prawidÅ‚owÄ… datÄ… i czasem. + + + This value is not a valid email address. + Ta wartość nie jest prawidÅ‚owym adresem email. + + + The file could not be found. + Plik nie mógÅ‚ zostać odnaleziony. + + + The file is not readable. + Nie można odczytać pliku. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Plik jest za duży ({{ size }} {{ suffix }}). Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + NieprawidÅ‚owy typ mime pliku ({{ type }}). Dozwolone typy mime to {{ types }}. + + + This value should be {{ limit }} or less. + Ta wartość powinna wynosić {{ limit }} lub mniej. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt dÅ‚uga. Powinna mieć {{ limit }} lub mniej znaków. + + + This value should be {{ limit }} or more. + Ta wartość powinna wynosić {{ limit }} lub wiÄ™cej. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub wiÄ™cej znaków. + + + This value should not be blank. + Ta wartość nie powinna być pusta. + + + This value should not be null. + Ta wartość nie powinna być nullem. + + + This value should be null. + Ta wartość powinna być nullem. + + + This value is not valid. + Ta wartość jest nieprawidÅ‚owa. + + + This value is not a valid time. + Ta wartość nie jest prawidÅ‚owym czasem. + + + This value is not a valid URL. + Ta wartość nie jest prawidÅ‚owym adresem URL. + + + The two values should be equal. + Obie wartoÅ›ci powinny być równe. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Plik jest za duży. Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. + + + The file is too large. + Plik jest za duży. + + + The file could not be uploaded. + Plik nie mógÅ‚ być wgrany. + + + This value should be a valid number. + Ta wartość powinna być prawidÅ‚owÄ… liczbÄ…. + + + This file is not a valid image. + Ten plik nie jest obrazem. + + + This is not a valid IP address. + To nie jest prawidÅ‚owy adres IP. + + + This value is not a valid language. + Ta wartość nie jest prawidÅ‚owym jÄ™zykiem. + + + This value is not a valid locale. + Ta wartość nie jest prawidÅ‚owÄ… lokalizacjÄ…. + + + This value is not a valid country. + Ta wartość nie jest prawidÅ‚owÄ… nazwÄ… kraju. + + + This value is already used. + Ta wartość jest już wykorzystywana. + + + The size of the image could not be detected. + Nie można wykryć rozmiaru obrazka. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Szerokość obrazka jest zbyt duża ({{ width }}px). Maksymalna dopuszczalna szerokość to {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Szerokość obrazka jest zbyt maÅ‚a ({{ width }}px). Oczekiwana minimalna szerokość to {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Wysokość obrazka jest zbyt duża ({{ height }}px). Maksymalna dopuszczalna wysokość to {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Wysokość obrazka jest zbyt maÅ‚a ({{ height }}px). Oczekiwana minimalna wysokość to {{ min_height }}px. + + + This value should be the user's current password. + Ta wartość powinna być aktualnym hasÅ‚em użytkownika. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znak.|Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znaki.|Ta wartość powinna mieć dokÅ‚adnie {{ limit }} znaków. + + + The file was only partially uploaded. + Plik zostaÅ‚ wgrany tylko częściowo. + + + No file was uploaded. + Å»aden plik nie zostaÅ‚ wgrany. + + + No temporary folder was configured in php.ini. + Nie skonfigurowano folderu tymczasowego w php.ini, lub skonfigurowany folder nie istnieje. + + + Cannot write temporary file to disk. + Nie można zapisać pliku tymczasowego na dysku. + + + A PHP extension caused the upload to fail. + Rozszerzenie PHP spowodowaÅ‚o błąd podczas wgrywania. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ten zbiór powinien zawierać {{ limit }} lub wiÄ™cej elementów. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ten zbiór powinien zawierać {{ limit }} lub mniej elementów. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} element.|Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} elementy.|Ten zbiór powinien zawierać dokÅ‚adnie {{ limit }} elementów. + + + Invalid card number. + NieprawidÅ‚owy numer karty. + + + Unsupported card type or invalid card number. + NieobsÅ‚ugiwany rodzaj karty lub nieprawidÅ‚owy numer karty. + + + This is not a valid International Bank Account Number (IBAN). + NieprawidÅ‚owy miÄ™dzynarodowy numer rachunku bankowego (IBAN). + + + This value is not a valid ISBN-10. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-10. + + + This value is not a valid ISBN-13. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ta wartość nie jest prawidÅ‚owym numerem ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Ta wartość nie jest prawidÅ‚owym numerem ISSN. + + + This value is not a valid currency. + Ta wartość nie jest prawidÅ‚owÄ… walutÄ…. + + + This value should be equal to {{ compared_value }}. + Ta wartość powinna być równa {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ta wartość powinna być wiÄ™ksza niż {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ta wartość powinna być wiÄ™ksza bÄ…dź równa {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ta wartość powinna być identycznego typu {{ compared_value_type }} oraz wartoÅ›ci {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ta wartość powinna być mniejsza niż {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ta wartość powinna być mniejsza bÄ…dź równa {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ta wartość nie powinna być równa {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ta wartość nie powinna być identycznego typu {{ compared_value_type }} oraz wartoÅ›ci {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Proporcje obrazu sÄ… zbyt duże ({{ ratio }}). Maksymalne proporcje to {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Proporcje obrazu sÄ… zbyt maÅ‚e ({{ ratio }}). Minimalne proporcje to {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Obraz jest kwadratem ({{ width }}x{{ height }}px). Kwadratowe obrazy nie sÄ… akceptowane. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obraz jest panoramiczny ({{ width }}x{{ height }}px). Panoramiczne zdjÄ™cia nie sÄ… akceptowane. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obraz jest portretowy ({{ width }}x{{ height }}px). Portretowe zdjÄ™cia nie sÄ… akceptowane. + + + An empty file is not allowed. + Plik nie może być pusty. + + + The host could not be resolved. + Nazwa hosta nie zostaÅ‚a rozpoznana. + + + This value does not match the expected {{ charset }} charset. + Ta wartość nie pasuje do oczekiwanego zestawu znaków {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Ta wartość nie jest poprawnym kodem BIC (Business Identifier Code). + + + Error + Błąd + + + This is not a valid UUID. + To nie jest poprawne UUID. + + + This value should be a multiple of {{ compared_value }}. + Ta wartość powinna być wielokrotnoÅ›ciÄ… {{ compared_value }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf new file mode 100644 index 0000000..0561c04 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt.xlf @@ -0,0 +1,311 @@ + + + + + + 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. + + + Error + Erro + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf new file mode 100644 index 0000000..b617062 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Este valor deve ser falso. + + + This value should be true. + Este valor deve ser verdadeiro. + + + This value should be of type {{ type }}. + Este valor deve ser do tipo {{ type }}. + + + This value should be blank. + Este valor deve ser vazio. + + + The value you selected is not a valid choice. + O valor selecionado não é uma opção válida. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Você deve selecionar, no mínimo, {{ limit }} opção.|Você deve selecionar, no mínimo, {{ limit }} opções. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Você deve selecionar, no máximo, {{ limit }} opção.|Você deve selecionar, no máximo, {{ limit }} opções. + + + One or more of the given values is invalid. + Um ou mais valores informados são inválidos. + + + This field was not expected. + Este campo não era esperado. + + + This field is missing. + Este campo está ausente. + + + This value is not a valid date. + Este valor não é uma data válida. + + + This value is not a valid datetime. + Este valor não é uma data e hora válida. + + + This value is not a valid email address. + Este valor não é um endereço de e-mail válido. + + + The file could not be found. + O arquivo não foi encontrado. + + + The file is not readable. + O arquivo não pode ser lido. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}. + + + This value should be {{ limit }} or less. + Este valor deve ser {{ limit }} ou menos. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Este valor é muito longo. Deve ter {{ limit }} caractere ou menos.|Este valor é muito longo. Deve ter {{ limit }} caracteres ou menos. + + + This value should be {{ limit }} or more. + Este valor deve ser {{ limit }} ou mais. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Este valor é muito curto. Deve ter {{ limit }} caractere ou mais.|Este valor é muito curto. Deve ter {{ limit }} caracteres ou mais. + + + This value should not be blank. + Este valor não deve ser vazio. + + + This value should not be null. + Este valor não deve ser nulo. + + + This value should be null. + Este valor deve ser nulo. + + + This value is not valid. + Este valor não é válido. + + + This value is not a valid time. + Este valor não é uma hora válida. + + + This value is not a valid URL. + Este valor não é uma URL válida. + + + The two values should be equal. + Os dois valores devem ser iguais. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}. + + + The file is too large. + O arquivo é muito grande. + + + The file could not be uploaded. + O arquivo não pode ser enviado. + + + This value should be a valid number. + Este valor deve ser um número válido. + + + This file is not a valid image. + Este arquivo não é uma imagem válida. + + + This is not a valid IP address. + Este não é um endereço de IP válido. + + + This value is not a valid language. + Este valor não é um idioma válido. + + + This value is not a valid locale. + Este valor não é uma localidade válida. + + + This value is not a valid country. + Este valor não é um país válido. + + + This value is already used. + Este valor já está sendo usado. + + + The size of the image could not be detected. + O tamanho da imagem não pode ser detectado. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + A largura da imagem é muito grande ({{ width }}px). A largura máxima permitida é de {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + A largura da imagem é muito pequena ({{ width }}px). A largura mínima esperada é de {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + A altura da imagem é muito grande ({{ height }}px). A altura máxima permitida é de {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + A altura da imagem é muito pequena ({{ height }}px). A altura mínima esperada é de {{ min_height }}px. + + + This value should be the user's current password. + Este valor deve ser a senha atual do usuário. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Este valor deve ter exatamente {{ limit }} caractere.|Este valor deve ter exatamente {{ limit }} caracteres. + + + The file was only partially uploaded. + O arquivo foi enviado apenas parcialmente. + + + No file was uploaded. + Nenhum arquivo foi enviado. + + + No temporary folder was configured in php.ini. + Nenhum diretório temporário foi configurado no php.ini. + + + Cannot write temporary file to disk. + Não foi possível escrever o arquivo temporário no disco. + + + A PHP extension caused the upload to fail. + Uma extensão PHP fez com que o envio falhasse. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos. + + + Invalid card number. + Número de cartão inválido. + + + Unsupported card type or invalid card number. + Tipo de cartão não suportado ou número de cartão inválido. + + + This is not a valid International Bank Account Number (IBAN). + Este não é um Número Internacional de Conta Bancária (IBAN) válido. + + + This value is not a valid ISBN-10. + Este valor não é um ISBN-10 válido. + + + This value is not a valid ISBN-13. + Este valor não é um ISBN-13 válido. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Este valor não é um ISBN-10 e nem um ISBN-13 válido. + + + This value is not a valid ISSN. + Este valor não é um ISSN válido. + + + This value is not a valid currency. + Este não é um valor monetário válido. + + + This value should be equal to {{ compared_value }}. + Este valor deve ser igual a {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Este valor deve ser maior que {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Este valor deve ser maior ou igual a {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Este valor deve ser menor que {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Este valor deve ser menor ou igual a {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Este valor não deve ser igual a {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + A proporção da imagem é muito grande ({{ ratio }}). A proporção máxima permitida é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + A proporção da imagem é muito pequena ({{ ratio }}). A proporção mínima esperada é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imagem está num formato quadrado ({{ width }}x{{ height }}px). Imagens com formato quadrado não são permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. + + + An empty file is not allowed. + Arquivo vazio não é permitido. + + + The host could not be resolved. + O host não pôde ser resolvido. + + + This value does not match the expected {{ charset }} charset. + Este valor não corresponde ao charset {{ charset }} esperado. + + + This is not a valid Business Identifier Code (BIC). + Este não é um Código Identificador Bancário (BIC) válido. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf new file mode 100644 index 0000000..63af470 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ro.xlf @@ -0,0 +1,287 @@ + + + + + + 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 }}. + + + Error + Eroare + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf new file mode 100644 index 0000000..11bfead --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.ru.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Значение должно быть ложным. + + + This value should be true. + Значение должно быть иÑтинным. + + + This value should be of type {{ type }}. + Тип Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ быть {{ type }}. + + + This value should be blank. + Значение должно быть пуÑтым. + + + The value you selected is not a valid choice. + Выбранное Вами значение недопуÑтимо. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ {{ limit }} вариант.|Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ {{ 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 }} кодировкой. + + + Error + Ошибка + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf new file mode 100644 index 0000000..8ddb66d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sk.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Táto hodnota by mala byÅ¥ nastavená na false. + + + This value should be true. + Táto hodnota by mala byÅ¥ nastavená na true. + + + This value should be of type {{ type }}. + Táto hodnota by mala byÅ¥ typu {{ type }}. + + + This value should be blank. + Táto hodnota by mala byÅ¥ prázdna. + + + The value you selected is not a valid choice. + Táto hodnota by mala byÅ¥ jednou z poskytnutých možností. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Mali by ste vybraÅ¥ minimálne {{ limit }} možnosÅ¥.|Mali by ste vybraÅ¥ minimálne {{ limit }} možnosti.|Mali by ste vybraÅ¥ minimálne {{ limit }} možností. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Mali by ste vybraÅ¥ najviac {{ limit }} možnosÅ¥.|Mali by ste vybraÅ¥ najviac {{ limit }} možnosti.|Mali by ste vybraÅ¥ najviac {{ limit }} možností. + + + One or more of the given values is invalid. + Niektoré z uvedených hodnôt sú neplatné. + + + This field was not expected. + Toto pole sa neoÄakáva. + + + This field is missing. + Toto pole chýba. + + + This value is not a valid date. + Tato hodnota nemá platný formát dátumu. + + + This value is not a valid datetime. + Táto hodnota nemá platný formát dátumu a Äasu. + + + This value is not a valid email address. + Táto hodnota nie je platná emailová adresa. + + + The file could not be found. + Súbor sa nenaÅ¡iel. + + + The file is not readable. + Súbor nie je Äitateľný. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Súbor je príliÅ¡ veľký ({{ size }} {{ suffix }}). Maximálna povolená veľkosÅ¥ je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Súbor typu ({{ type }}) nie je podporovaný. Podporované typy sú {{ types }}. + + + This value should be {{ limit }} or less. + Táto hodnota by mala byÅ¥ {{ limit }} alebo menej. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znak.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znaky.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovaÅ¥ najviac {{ limit }} znakov. + + + This value should be {{ limit }} or more. + Táto hodnota by mala byÅ¥ viac ako {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Táto hodnota je príliÅ¡ krátka. Musí obsahovaÅ¥ minimálne {{ limit }} znak.|Táto hodnota je príliÅ¡ krátka. Musí obsahovaÅ¥ minimálne {{ limit }} znaky.|Táto hodnota je príliÅ¡ krátka. Minimálny poÄet znakov je {{ limit }}. + + + This value should not be blank. + Táto hodnota by mala byÅ¥ vyplnená. + + + This value should not be null. + Táto hodnota by nemala byÅ¥ null. + + + This value should be null. + Táto hodnota by mala byÅ¥ null. + + + This value is not valid. + Táto hodnota nie je platná. + + + This value is not a valid time. + Tato hodnota nemá správny formát Äasu. + + + This value is not a valid URL. + Táto hodnota nie je platnou URL adresou. + + + The two values should be equal. + Tieto dve hodnoty by mali byÅ¥ rovnaké. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Súbor je príliÅ¡ veľký. Maximálna povolená veľkosÅ¥ je {{ limit }} {{ suffix }}. + + + The file is too large. + Súbor je príliÅ¡ veľký. + + + The file could not be uploaded. + Súbor sa nepodarilo nahraÅ¥. + + + This value should be a valid number. + Táto hodnota by mala byÅ¥ Äíslo. + + + This file is not a valid image. + Tento súbor nie je obrázok. + + + This is not a valid IP address. + Toto nie je platná IP adresa. + + + This value is not a valid language. + Tento jazyk neexistuje. + + + This value is not a valid locale. + Táto lokalizácia neexistuje. + + + This value is not a valid country. + Táto krajina neexistuje. + + + This value is already used. + Táto hodnota sa už používa. + + + The size of the image could not be detected. + Nepodarilo sa zistiÅ¥ rozmery obrázku. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Obrázok je príliÅ¡ Å¡iroký ({{ width }}px). Maximálna povolená šírka obrázku je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Obrázok je príliÅ¡ úzky ({{ width }}px). Minimálna šírka obrázku by mala byÅ¥ {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + >Obrázok je príliÅ¡ vysoký ({{ height }}px). Maximálna povolená výška obrázku je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Obrázok je príliÅ¡ nízky ({{ height }}px). Minimálna výška obrázku by mala byÅ¥ {{ min_height }}px. + + + This value should be the user's current password. + Táto hodnota by mala byÅ¥ aktuálne heslo používateľa. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Táto hodnota by mala maÅ¥ presne {{ limit }} znak.|Táto hodnota by mala maÅ¥ presne {{ limit }} znaky.|Táto hodnota by mala maÅ¥ presne {{ limit }} znakov. + + + The file was only partially uploaded. + Bola nahraná len ÄasÅ¥ súboru. + + + No file was uploaded. + Žiadny súbor nebol nahraný. + + + No temporary folder was configured in php.ini. + V php.ini nie je nastavená cesta k adresáru pre doÄasné súbory. + + + Cannot write temporary file to disk. + DoÄasný súbor sa nepodarilo zapísaÅ¥ na disk. + + + A PHP extension caused the upload to fail. + Rozšírenie PHP zabránilo nahraniu súboru. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvok alebo viac.|Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvky alebo viac.|Táto kolekcia by mala obsahovaÅ¥ aspoň {{ limit }} prvkov alebo viac. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Táto kolekcia by mala maximálne {{ limit }} prvok.|Táto kolekcia by mala obsahovaÅ¥ maximálne {{ limit }} prvky.|Táto kolekcia by mala obsahovaÅ¥ maximálne {{ limit }} prvkov. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvok.|Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvky.|Táto kolekcia by mala obsahovaÅ¥ presne {{ limit }} prvkov. + + + Invalid card number. + Neplatné Äíslo karty. + + + Unsupported card type or invalid card number. + Nepodporovaný typ karty alebo neplatné Äíslo karty. + + + This is not a valid International Bank Account Number (IBAN). + Toto je neplatný IBAN. + + + This value is not a valid ISBN-10. + Táto hodnota je neplatné ISBN-10. + + + This value is not a valid ISBN-13. + Táto hodnota je neplatné ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Táto hodnota nie je platné ISBN-10 ani ISBN-13. + + + This value is not a valid ISSN. + Táto hodnota nie je platné ISSN. + + + This value is not a valid currency. + Táto hodnota nie je platná mena. + + + This value should be equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ rovná {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Táto hodnota by mala byÅ¥ väÄÅ¡ia ako {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ väÄÅ¡ia alebo rovná {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Táto hodnota by mala byÅ¥ typu {{ compared_value_type }} a zároveň by mala byÅ¥ rovná {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Táto hodnota by mala byÅ¥ menÅ¡ia ako {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Táto hodnota by mala byÅ¥ menÅ¡ia alebo rovná {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Táto hodnota by nemala byÅ¥ rovná {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Táto hodnota by nemala byÅ¥ typu {{ compared_value_type }} a zároveň by nemala byÅ¥ rovná {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Pomer strán obrázku je príliÅ¡ veľký ({{ ratio }}). Maximálny povolený pomer strán obrázku je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Pomer strán obrázku je príliÅ¡ malý ({{ ratio }}). Minimálny povolený pomer strán obrázku je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Strany obrázku sú Å¡tvorcové ({{ width }}x{{ height }}px). Å tvorcové obrázky nie sú povolené. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Obrázok je orientovaný na šírku ({{ width }}x{{ height }}px). Obrázky orientované na šírku nie sú povolené. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Obrázok je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nie sú povolené. + + + An empty file is not allowed. + Súbor nesmie byÅ¥ prázdny. + + + The host could not be resolved. + Hostiteľa nebolo možné rozpoznaÅ¥. + + + This value does not match the expected {{ charset }} charset. + Táto hodnota nezodpovedá oÄakávanej znakovej sade {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Táto hodnota nie je platný identifikaÄný kód podniku (BIC). + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf new file mode 100644 index 0000000..6f5fd98 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sl.xlf @@ -0,0 +1,323 @@ + + + + + + This value should be false. + Vrednost bi morala biti nepravilna (false). + + + This value should be true. + Vrednost bi morala biti pravilna (true). + + + This value should be of type {{ type }}. + Vrednost mora biti naslednjega tipa {{ type }}. + + + This value should be blank. + Vrednost mora biti prazna. + + + The value you selected is not a valid choice. + Vrednost, ki ste jo izbrali, ni veljavna možnost. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izbrati morate vsaj {{ limit }} možnost.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izberete lahko najveÄ {{ limit }} možnost.|Izberete lahko najveÄ {{ limit }} možnosti.|Izberete lahko najveÄ {{ limit }} možnosti.|Izberete lahko najveÄ {{ limit }} možnosti. + + + One or more of the given values is invalid. + Ena ali veÄ podanih vrednosti ni veljavnih. + + + This field was not expected. + To polje ni bilo priÄakovati. + + + This field is missing. + To polje manjka. + + + This value is not a valid date. + Ta vrednost ni veljaven datum. + + + This value is not a valid datetime. + Ta vrednost ni veljaven datum in Äas. + + + This value is not a valid email address. + Ta vrednost ni veljaven e-poÅ¡tni naslov. + + + The file could not be found. + Datoteke ni mogoÄe najti. + + + The file is not readable. + Datoteke ni mogoÄe prebrati. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). NajveÄja dovoljena velikost je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke je neveljaven ({{ type }}). Dovoljeni mime tipi so {{ types }}. + + + This value should be {{ limit }} or less. + Ta vrednost bi morala biti {{ limit }} ali manj. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ta vrednost je predolga. Morala bi imeti {{ limit }} znak ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znaka ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znake ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znakov ali manj. + + + This value should be {{ limit }} or more. + Ta vrednost bi morala biti {{ limit }} ali veÄ. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ta vrednost je prekratka. Morala bi imeti {{ limit }} znak ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znaka ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znake ali veÄ.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znakov ali veÄ. + + + This value should not be blank. + Ta vrednost ne bi smela biti prazna. + + + This value should not be null. + Ta vrednost ne bi smela biti nedefinirana (null). + + + This value should be null. + Ta vrednost bi morala biti nedefinirana (null). + + + This value is not valid. + Ta vrednost ni veljavna. + + + This value is not a valid time. + Ta vrednost ni veljaven Äas. + + + This value is not a valid URL. + Ta vrednost ni veljaven URL. + + + The two values should be equal. + Ti dve vrednosti bi morali biti enaki. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika. NajveÄja dovoljena velikost je {{ limit }} {{ suffix }}. + + + The file is too large. + Datoteka je prevelika. + + + The file could not be uploaded. + Datoteke ni bilo mogoÄe naložiti. + + + This value should be a valid number. + Ta vrednost bi morala biti veljavna Å¡tevilka. + + + This file is not a valid image. + Ta datoteka ni veljavna slika. + + + This is not a valid IP address. + To ni veljaven IP naslov. + + + This value is not a valid language. + Ta vrednost ni veljaven jezik. + + + This value is not a valid locale. + Ta vrednost ni veljavna lokalnost. + + + This value is not a valid country. + Ta vrednost ni veljavna država. + + + This value is already used. + Ta vrednost je že uporabljena. + + + The size of the image could not be detected. + Velikosti slike ni bilo mogoÄe zaznati. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je preÅ¡iroka ({{ width }}px). NajveÄja dovoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premajhna ({{ width }}px). NajmanjÅ¡a predvidena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ViÅ¡ina slike je prevelika ({{ height }}px). NajveÄja dovoljena viÅ¡ina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ViÅ¡ina slike je premajhna ({{ height }}px). NajmanjÅ¡a predvidena viÅ¡ina je {{ min_height }}px. + + + This value should be the user's current password. + Ta vrednost bi morala biti trenutno uporabnikovo geslo. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ta vrednost bi morala imeti toÄno {{ limit }} znak.|Ta vrednost bi morala imeti toÄno {{ limit }} znaka.|Ta vrednost bi morala imeti toÄno {{ limit }} znake.|Ta vrednost bi morala imeti toÄno {{ limit }} znakov. + + + The file was only partially uploaded. + Datoteka je bila le delno naložena. + + + No file was uploaded. + Nobena datoteka ni bila naložena. + + + No temporary folder was configured in php.ini. + ZaÄasna mapa ni nastavljena v php.ini. + + + Cannot write temporary file to disk. + ZaÄasne datoteke ni bilo mogoÄe zapisati na disk. + + + A PHP extension caused the upload to fail. + PHP razÅ¡iritev je vzrok, da nalaganje ni uspelo. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ta zbirka bi morala vsebovati {{ limit }} element ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali veÄ.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali veÄ. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ta zbirka bi morala vsebovati {{ limit }} element ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali manj. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ta zbirka bi morala vsebovati toÄno {{ limit }} element.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elementa.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elemente.|Ta zbirka bi morala vsebovati toÄno {{ limit }} elementov. + + + Invalid card number. + Neveljavna Å¡tevilka kartice. + + + Unsupported card type or invalid card number. + Nepodprti tip kartice ali neveljavna Å¡tevilka kartice. + + + This is not a valid International Bank Account Number (IBAN). + To ni veljavna mednarodna Å¡tevilka banÄnega raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Neveljavna vrednost po ISBN-10. + + + This value is not a valid ISBN-13. + Neveljavna vrednost po ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Neveljavna vrednost po ISBN-10 ali po ISBN-13. + + + This value is not a valid ISSN. + Neveljavna vrednost ISSN. + + + This value is not a valid currency. + Ta vrednost ni veljavna valuta. + + + This value should be equal to {{ compared_value }}. + Ta vrednost bi morala biti enaka {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ta vrednost bi morala biti veÄja od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ta vrednost bi morala biti veÄja ali enaka {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ta vrednost bi morala biti identiÄna {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ta vrednost bi morala biti manjÅ¡a od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ta vrednost bi morala biti manjÅ¡a ali enaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ta vrednost ne bi smela biti enaka {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ta vrednost ne bi smela biti identiÄna {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Razmerje slike je preveliko ({{ ratio }}). NajveÄje dovoljeno razmerje je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Razmerje slike je premajhno ({{ ratio }}). NajmanjÅ¡e priÄakovano razmerje je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadrat ({{ width }}x{{ height }}px). Kvadratne slike niso dovoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je ležeÄe usmerjena ({{ width }}x{{ height }}px). LežeÄe usmerjene slike niso dovoljene. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je pokonÄno usmerjena ({{ width }}x{{ height }}px). PokonÄno usmerjene slike niso dovoljene. + + + An empty file is not allowed. + Prazna datoteka ni dovoljena. + + + The host could not be resolved. + Gostitelja ni bilo mogoÄe prepoznati. + + + This value does not match the expected {{ charset }} charset. + Ta vrednost se ne ujema s priÄakovanim naborom znakov {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + To ni veljavna identifikacijska koda podjetja (BIC). + + + Error + Napaka + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf new file mode 100644 index 0000000..ffc8ccf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sq.xlf @@ -0,0 +1,227 @@ + + + + + + This value should be false. + Kjo vlerë duhet të jetë e pavërtetë (false). + + + This value should be true. + Kjo vlerë duhet të jetë e vërtetë (true). + + + This value should be of type {{ type }}. + Kjo vlerë duhet të jetë e llojit {{ type }}. + + + This value should be blank. + Kjo vlerë duhet të jetë e zbrazët. + + + The value you selected is not a valid choice. + Vlera që keni zgjedhur nuk është alternativë e vlefshme. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Duhet të zgjedhni së paku {{ limit }} alternativa.|Duhet të zgjedhni së paku {{ limit }} alternativa. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Duhet të zgjedhni më së shumti {{ limit }} alternativa.|Duhet të zgjedhni më së shumti {{ limit }} alternativa. + + + One or more of the given values is invalid. + Një apo më shumë nga vlerat e dhëna nuk janë të sakta. + + + This field was not expected. + Kjo fushë nuk pritej. + + + This field is missing. + Kjo fushë është zhdukur. + + + This value is not a valid date. + Kjo vlerë nuk është datë e vlefshme. + + + This value is not a valid datetime. + Kjo vlerë nuk është datë-kohë e vlefshme. + + + This value is not a valid email address. + Kjo vlerë nuk është e-mail adresë e vlefshme. + + + The file could not be found. + File nuk mund të gjindej. + + + The file is not readable. + File nuk është i lexueshëm. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + File është shumë i madh ({{ size }} {{ suffix }}). Madhësia më e madhe e lejuar është {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Lloji mime i files nuk është i vlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}. + + + This value should be {{ limit }} or less. + Kjo vlerë duhet të jetë {{ limit }} ose më pak. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere.|Kjo vlerë është shumë e gjatë. Duhet t'i ketë {{ limit }} ose më pak karaktere. + + + This value should be {{ limit }} or more. + Kjo vlerë duhet të jetë {{ limit }} ose më shumë. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere.|Kjo vlerë është shumë e shkurtër. Duhet t'i ketë {{ limit }} ose më shumë karaktere. + + + This value should not be blank. + Kjo vlerë nuk duhet të jetë e zbrazët. + + + This value should not be null. + Kjo vlerë nuk duhet të jetë null. + + + This value should be null. + Kjo vlerë duhet të jetë null. + + + This value is not valid. + Kjo vlerë nuk është e vlefshme. + + + This value is not a valid time. + Kjo vlerë nuk është kohë e vlefshme. + + + This value is not a valid URL. + Kjo vlerë nuk është URL e vlefshme. + + + The two values should be equal. + Këto dy vlera duhet të jenë të barabarta. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ky file është shumë i madh. Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}. + + + The file is too large. + Ky file është shumë i madh. + + + The file could not be uploaded. + Ky file nuk mund të ngarkohet. + + + This value should be a valid number. + Kjo vlerë duhet të jetë numër i vlefshëm. + + + This file is not a valid image. + Ky file nuk është imazh i vlefshëm. + + + This is not a valid IP address. + Kjo vlerë nuk është IP adresë e vlefshme. + + + This value is not a valid language. + Kjo vlerë nuk është gjuhë e vlefshme. + + + This value is not a valid locale. + Kjo vlerë nuk është përcaktim rajonal i vlefshëm. + + + This value is not a valid country. + Kjo vlerë nuk është shtet i vlefshëm. + + + This value is already used. + Kjo vlerë është tashmë në përdorim. + + + The size of the image could not be detected. + Madhësia e këtij imazhi nuk mund të zbulohet. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Gjerësia e imazhit është shumë e madhe ({{ width }}px). Gjerësia maksimale e lejuar është {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Gjerësia e imazhit është shumë e vogël ({{ width }}px). Gjerësia minimale e pritur është {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Gjatësia e imazhit është shumë e madhe ({{ height }}px). Gjatësia maksimale e lejuar është {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Gjatësia e imazhit është shumë e vogël ({{ height }}px). Gjatësia minimale e pritur është {{ min_height }}px. + + + This value should be the user's current password. + Kjo vlerë duhet të jetë fjalëkalimi aktual i përdoruesit. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere. + + + The file was only partially uploaded. + Ky file është ngarkuar pjesërisht. + + + No file was uploaded. + Nuk është ngarkuar ndonjë file. + + + No temporary folder was configured in php.ini. + Asnjë folder i përkohshëm nuk është konfiguruar në php.ini. + + + Cannot write temporary file to disk. + Nuk mund të shkruhet file i përkohshëm në disk. + + + A PHP extension caused the upload to fail. + Një ekstenzion i PHP-së bëri të dështojë ngarkimi i files. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente.|Ky kolekcion duhet të përmbajë {{ limit }} ose më shumë elemente. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente.|Ky kolekcion duhet të përmbajë saktësisht {{ limit }} elemente. + + + Invalid card number. + Numër kartele i pavlefshëm. + + + Unsupported card type or invalid card number. + Lloj kartele i pambështetur ose numër kartele i pavlefshëm. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf new file mode 100644 index 0000000..81f5210 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + ВредноÑÑ‚ треба да буде нетачна. + + + This value should be true. + ВредноÑÑ‚ треба да буде тачна. + + + This value should be of type {{ type }}. + ВредноÑÑ‚ треба да буде типа {{ type }}. + + + This value should be blank. + ВредноÑÑ‚ треба да буде празна. + + + The value you selected is not a valid choice. + ВредноÑÑ‚ треба да буде једна од понуђених. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Изаберите бар {{ limit }} могућноÑÑ‚.|Изаберите бар {{ limit }} могућноÑти.|Изаберите бар {{ limit }} могућноÑти. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Изаберите највише {{ limit }} могућноÑÑ‚.|Изаберите највише {{ limit }} могућноÑти.|Изаберите највише {{ limit }} могућноÑти. + + + One or more of the given values is invalid. + Једна или више вредноÑти је невалидна. + + + This field was not expected. + Ово поље не очекује. + + + This field is missing. + Ово поље недоÑтаје. + + + This value is not a valid date. + ВредноÑÑ‚ није валидан датум. + + + This value is not a valid datetime. + ВредноÑÑ‚ није валидан датум-време. + + + This value is not a valid email address. + ВредноÑÑ‚ није валидна адреÑа електронÑке поште. + + + The file could not be found. + Датотека не може бити пронађена. + + + The file is not readable. + Датотека није читљива. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Датотека је превелика ({{ size }} {{ suffix }}). Ðајвећа дозвољена величина је {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Миме тип датотеке није валидан ({{ type }}). Дозвољени миме типови Ñу {{ types }}. + + + This value should be {{ limit }} or less. + ВредноÑÑ‚ треба да буде {{ limit }} или мање. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактер или мање.|ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактера или мање.|ВредноÑÑ‚ је предугачка. Треба да има {{ limit }} карактера или мање. + + + This value should be {{ limit }} or more. + ВредноÑÑ‚ треба да буде {{ limit }} или више. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактер или више.|ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактера или више.|ВредноÑÑ‚ је прекратка. Треба да има {{ limit }} карактера или више. + + + This value should not be blank. + ВредноÑÑ‚ не треба да буде празна. + + + This value should not be null. + ВредноÑÑ‚ не треба да буде null. + + + This value should be null. + ВредноÑÑ‚ треба да буде null. + + + This value is not valid. + ВредноÑÑ‚ је невалидна. + + + This value is not a valid time. + ВредноÑÑ‚ није валидно време. + + + This value is not a valid URL. + ВредноÑÑ‚ није валидан URL. + + + The two values should be equal. + Обе вредноÑти треба да буду једнаке. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Датотека је превелика. Ðајвећа дозвољена величина је {{ limit }} {{ suffix }}. + + + The file is too large. + Датотека је превелика. + + + The file could not be uploaded. + Датотека не може бити отпремљена. + + + This value should be a valid number. + ВредноÑÑ‚ треба да буде валидан број. + + + This file is not a valid image. + Ова датотека није валидна Ñлика. + + + This is not a valid IP address. + Ово није валидна ИП адреÑа. + + + This value is not a valid language. + ВредноÑÑ‚ није валидан језик. + + + This value is not a valid locale. + ВредноÑÑ‚ није валидан локал. + + + This value is not a valid country. + ВредноÑÑ‚ није валидна земља. + + + This value is already used. + ВредноÑÑ‚ је већ иÑкоришћена. + + + The size of the image could not be detected. + Величина Ñлике не може бити одређена. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Ширина Ñлике је превелика ({{ width }}px). Ðајећа дозвољена ширина је {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Ширина Ñлике је премала ({{ width }}px). Ðајмања дозвољена ширина је {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ВиÑина Ñлике је превелика ({{ height }}px). Ðајећа дозвољена виÑина је {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ВиÑина Ñлике је премала ({{ height }}px). Ðајмања дозвољена виÑина је {{ min_height }}px. + + + This value should be the user's current password. + ВредноÑÑ‚ треба да буде тренутна кориÑничка лозинка. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ВредноÑÑ‚ треба да има тачно {{ limit }} карактер.|ВредноÑÑ‚ треба да има тачно {{ limit }} карактера.|ВредноÑÑ‚ треба да има тачно {{ limit }} карактера. + + + The file was only partially uploaded. + Датотека је Ñамо парцијално отпремљена. + + + No file was uploaded. + Датотека није отпремљена. + + + No temporary folder was configured in php.ini. + Привремени директоријум није конфигуриÑан у php.ini. + + + Cannot write temporary file to disk. + Ðемогуће пиÑање привремене датотеке на диÑк. + + + A PHP extension caused the upload to fail. + PHP екÑтензија је проузроковала неуÑпех отпремања датотеке. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ова колекција треба да Ñадржи {{ limit }} или више елемената.|Ова колекција треба да Ñадржи {{ limit }} или више елемената.|Ова колекција треба да Ñадржи {{ limit }} или више елемената. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ова колекција треба да Ñадржи {{ limit }} или мање елемената.|Ова колекција треба да Ñадржи {{ limit }} или мање елемената.|Ова колекција треба да Ñадржи {{ limit }} или мање елемената. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ова колекција треба да Ñадржи тачно {{ limit }} елемент.|Ова колекција треба да Ñадржи тачно {{ limit }} елемента.|Ова колекција треба да Ñадржи тачно {{ limit }} елемената. + + + Invalid card number. + Ðевалидан број картице. + + + Unsupported card type or invalid card number. + Ðевалидан број картице или тип картице није подржан. + + + This is not a valid International Bank Account Number (IBAN). + Ово није валидан међународни број банковног рачуна (IBAN). + + + This value is not a valid ISBN-10. + Ово није валидан ISBN-10. + + + This value is not a valid ISBN-13. + Ово није валидан ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ово није валидан ISBN-10 или ISBN-13. + + + This value is not a valid ISSN. + Ово није валидан ISSN. + + + This value is not a valid currency. + Ово није валидна валута. + + + This value should be equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде већа од {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде већа или једнака {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде идентична Ñа {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде мања од {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ова вредноÑÑ‚ треба да буде мања или једнака {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ова вредноÑÑ‚ не треба да буде једнака {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ова вредноÑÑ‚ не треба да буде идентична Ñа {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Размера ове Ñлике је превелика ({{ ratio }}). МакÑимална дозвољена размера је {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Размера ове Ñлике је премала ({{ ratio }}). Минимална очекивана размера је {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Слика је квадратна ({{ width }}x{{ height }}px). Квадратне Ñлике ниÑу дозвољене. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Слика је оријентације пејзажа ({{ width }}x{{ height }}px). Пејзажна оријентација Ñлика није дозвољена. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Слика је оријантације портрета ({{ width }}x{{ height }}px). Портретна оријентација Ñлика није дозвољена. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf new file mode 100644 index 0000000..60c093a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + Vrednost treba da bude netaÄna. + + + This value should be true. + Vrednost treba da bude taÄna. + + + This value should be of type {{ type }}. + Vrednost treba da bude tipa {{ type }}. + + + This value should be blank. + Vrednost treba da bude prazna. + + + The value you selected is not a valid choice. + Vrednost treba da bude jedna od ponuÄ‘enih. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Izaberite bar {{ limit }} mogućnost.|Izaberite bar {{ limit }} mogućnosti.|Izaberite bar {{ limit }} mogućnosti. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Izaberite najviÅ¡e {{ limit }} mogućnost.|Izaberite najviÅ¡e {{ limit }} mogućnosti.|Izaberite najviÅ¡e {{ limit }} mogućnosti. + + + One or more of the given values is invalid. + Jedna ili viÅ¡e vrednosti je nevalidna. + + + This field was not expected. + Ovo polje ne oÄekuje. + + + This field is missing. + Ovo polje nedostaje. + + + This value is not a valid date. + Vrednost nije validan datum. + + + This value is not a valid datetime. + Vrednost nije validan datum-vreme. + + + This value is not a valid email address. + Vrednost nije validna adresa elektronske poÅ¡te. + + + The file could not be found. + Datoteka ne može biti pronaÄ‘ena. + + + The file is not readable. + Datoteka nije Äitljiva. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime tip datoteke nije validan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. + + + This value should be {{ limit }} or less. + Vrednost treba da bude {{ limit }} ili manje. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Vrednost je predugaÄka. Treba da ima {{ limit }} karakter ili manje.|Vrednost je predugaÄka. Treba da ima {{ limit }} karaktera ili manje.|Vrednost je predugaÄka. Treba da ima {{ limit }} karaktera ili manje. + + + This value should be {{ limit }} or more. + Vrednost treba da bude {{ limit }} ili viÅ¡e. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Vrednost je prekratka. Treba da ima {{ limit }} karakter ili viÅ¡e.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili viÅ¡e.|Vrednost je prekratka. Treba da ima {{ limit }} karaktera ili viÅ¡e. + + + This value should not be blank. + Vrednost ne treba da bude prazna. + + + This value should not be null. + Vrednost ne treba da bude null. + + + This value should be null. + Vrednost treba da bude null. + + + This value is not valid. + Vrednost je nevalidna. + + + This value is not a valid time. + Vrednost nije validno vreme. + + + This value is not a valid URL. + Vrednost nije validan URL. + + + The two values should be equal. + Obe vrednosti treba da budu jednake. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Datoteka je prevelika. Najveća dozvoljena veliÄina je {{ limit }} {{ suffix }}. + + + The file is too large. + Datoteka je prevelika. + + + The file could not be uploaded. + Datoteka ne može biti otpremljena. + + + This value should be a valid number. + Vrednost treba da bude validan broj. + + + This file is not a valid image. + Ova datoteka nije validna slika. + + + This is not a valid IP address. + Ovo nije validna IP adresa. + + + This value is not a valid language. + Vrednost nije validan jezik. + + + This value is not a valid locale. + Vrednost nije validan lokal. + + + This value is not a valid country. + Vrednost nije validna zemlja. + + + This value is already used. + Vrednost je već iskorišćena. + + + The size of the image could not be detected. + VeliÄina slike ne može biti odreÄ‘ena. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Å irina slike je prevelika ({{ width }}px). Najeća dozvoljena Å¡irina je {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Å irina slike je premala ({{ width }}px). Najmanja dozvoljena Å¡irina je {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Visina slike je prevelika ({{ height }}px). Najeća dozvoljena visina je {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. + + + This value should be the user's current password. + Vrednost treba da bude trenutna korisniÄka lozinka. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Vrednost treba da ima taÄno {{ limit }} karakter.|Vrednost treba da ima taÄno {{ limit }} karaktera.|Vrednost treba da ima taÄno {{ limit }} karaktera. + + + The file was only partially uploaded. + Datoteka je samo parcijalno otpremljena. + + + No file was uploaded. + Datoteka nije otpremljena. + + + No temporary folder was configured in php.ini. + Privremeni direktorijum nije konfigurisan u php.ini. + + + Cannot write temporary file to disk. + Nemoguće pisanje privremene datoteke na disk. + + + A PHP extension caused the upload to fail. + PHP ekstenzija je prouzrokovala neuspeh otpremanja datoteke. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili viÅ¡e elemenata. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija treba da sadrži {{ limit }} ili manje elemenata. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ova kolekcija treba da sadrži taÄno {{ limit }} element.|Ova kolekcija treba da sadrži taÄno {{ limit }} elementa.|Ova kolekcija treba da sadrži taÄno {{ limit }} elemenata. + + + Invalid card number. + Nevalidan broj kartice. + + + Unsupported card type or invalid card number. + Nevalidan broj kartice ili tip kartice nije podržan. + + + This is not a valid International Bank Account Number (IBAN). + Ovo nije validan meÄ‘unarodni broj bankovnog raÄuna (IBAN). + + + This value is not a valid ISBN-10. + Ovo nije validan ISBN-10. + + + This value is not a valid ISBN-13. + Ovo nije validan ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ovo nije validan ISBN-10 ili ISBN-13. + + + This value is not a valid ISSN. + Ovo nije validan ISSN. + + + This value is not a valid currency. + Ovo nije validna valuta. + + + This value should be equal to {{ compared_value }}. + Ova vrednost treba da bude {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ova vrednost treba da bude veća od {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ova vrednost treba da bude veća ili jednaka {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrednost treba da bude identiÄna sa {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ova vrednost treba da bude manja od {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ova vrednost treba da bude manja ili jednaka {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ova vrednost ne treba da bude jednaka {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ova vrednost ne treba da bude identiÄna sa {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Razmera ove slike je prevelika ({{ ratio }}). Maksimalna dozvoljena razmera je {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Razmera ove slike je premala ({{ ratio }}). Minimalna oÄekivana razmera je {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Slika je kvadratna ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Slika je orijentacije pejzaža ({{ width }}x{{ height }}px). Pejzažna orijentacija slika nije dozvoljena. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Slika je orijantacije portreta ({{ width }}x{{ height }}px). Portretna orijentacija slika nije dozvoljena. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf new file mode 100644 index 0000000..40dd63e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.sv.xlf @@ -0,0 +1,323 @@ + + + + + + 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 e-postadress. + + + The file could not be found. + Filen kunde inte hittas. + + + The file is not readable. + Filen är inte läsbar. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Filen är för stor ({{ size }} {{ suffix }}). Största tillÃ¥tna storlek är {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Filens MIME-typ ({{ type }}) är ogiltig. De tillÃ¥tna typerna är {{ types }}. + + + This value should be {{ limit }} or less. + Värdet ska vara {{ limit }} eller mindre. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Värdet är för lÃ¥ngt. Det ska ha {{ limit }} tecken eller färre.|Värdet är för lÃ¥ngt. Det ska ha {{ limit }} tecken eller färre. + + + This value should be {{ limit }} or more. + Värdet ska vara {{ limit }} eller mer. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Värdet är för kort. Det ska ha {{ limit }} tecken eller mer.|Värdet är för kort. Det ska ha {{ limit }} tecken eller mer. + + + This value should not be blank. + Värdet kan inte vara tomt. + + + This value should not be null. + Värdet kan inte vara null. + + + This value should be null. + Värdet ska vara null. + + + This value is not valid. + Värdet är inte giltigt. + + + This value is not a valid time. + Värdet är inte en giltig tid. + + + This value is not a valid URL. + Värdet är inte en giltig URL. + + + The two values should be equal. + De tvÃ¥ värdena mÃ¥ste vara lika. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Filen är för stor. TillÃ¥ten maximal storlek är {{ limit }} {{ suffix }}. + + + The file is too large. + Filen är för stor. + + + The file could not be uploaded. + Filen kunde inte laddas upp. + + + This value should be a valid number. + Värdet ska vara ett giltigt nummer. + + + This file is not a valid image. + Filen är ingen giltig bild. + + + This is not a valid IP address. + Det här är inte en giltig IP-adress. + + + This value is not a valid language. + Värdet är inte ett giltigt sprÃ¥k. + + + This value is not a valid locale. + Värdet är inte en giltig plats. + + + This value is not a valid country. + Värdet är inte ett giltigt land. + + + This value is already used. + Värdet används redan. + + + The size of the image could not be detected. + Det gick inte att fastställa storleken pÃ¥ bilden. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Bildens bredd är för stor ({{ width }}px). TillÃ¥ten maximal bredd är {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Bildens bredd är för liten ({{ width }}px). Minsta förväntade bredd är {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Bildens höjd är för stor ({{ height }}px). TillÃ¥ten maximal bredd är {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Bildens höjd är för liten ({{ height }}px). Minsta förväntade höjd är {{ min_height }}px. + + + This value should be the user's current password. + Värdet ska vara användarens nuvarande lösenord. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Värdet ska ha exakt {{ limit }} tecken.|Värdet ska ha exakt {{ limit }} tecken. + + + The file was only partially uploaded. + Filen laddades bara upp delvis. + + + No file was uploaded. + Ingen fil laddades upp. + + + No temporary folder was configured in php.ini. + Det finns ingen temporär mapp konfigurerad i php.ini. + + + Cannot write temporary file to disk. + Kan inte skriva temporär fil till disken. + + + A PHP extension caused the upload to fail. + En PHP extension gjorde att uppladdningen misslyckades. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Den här samlingen ska innehÃ¥lla {{ limit }} element eller mer.|Den här samlingen ska innehÃ¥lla {{ limit }} element eller mer. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Den här samlingen ska innehÃ¥lla {{ limit }} element eller mindre.|Den här samlingen ska innehÃ¥lla {{ limit }} element eller mindre. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Den här samlingen ska innehÃ¥lla exakt {{ limit }} element.|Den här samlingen ska innehÃ¥lla exakt {{ limit }} element. + + + Invalid card number. + Ogiltigt kortnummer. + + + Unsupported card type or invalid card number. + Okänd korttyp eller ogiltigt kortnummer. + + + This is not a valid International Bank Account Number (IBAN). + Det här är inte en giltig International Bank Account Number (IBANK). + + + This value is not a valid ISBN-10. + Värdet är inte en giltig ISBN-10. + + + This value is not a valid ISBN-13. + Värdet är inte en giltig ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Värdet är varken en giltig ISBN-10 eller en giltig ISBN-13. + + + This value is not a valid ISSN. + Värdet är inte en giltig ISSN. + + + This value is not a valid currency. + Värdet är inte en giltig valuta. + + + This value should be equal to {{ compared_value }}. + Värdet ska vara detsamma som {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Värdet ska vara större än {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Värdet ska bara större än eller detsamma som {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Värdet ska vara identiskt till {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Värdet ska vara mindre än {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Värdet ska vara mindre än eller detsamma som {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Värdet ska inte vara detsamma som {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Värdet ska inte vara identiskt med {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + FörhÃ¥llandet mellan bildens bredd och höjd är för stort ({{ ratio }}). Högsta tillÃ¥tna förhÃ¥llande är {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + FörhÃ¥llandet mellan bildens bredd och höjd är för litet ({{ ratio }}). Minsta tillÃ¥tna förhÃ¥llande är {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Bilden är kvadratisk ({{ width }}x{{ height }}px). Kvadratiska bilder tillÃ¥ts inte. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Bilden är landskapsorienterad ({{ width }}x{{ height }}px). Landskapsorienterade bilder tillÃ¥ts inte. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Bilden är porträttsorienterad ({{ width }}x{{ height }}px). Porträttsorienterade bilder tillÃ¥ts inte. + + + An empty file is not allowed. + En tom fil är inte tillÃ¥ten. + + + The host could not be resolved. + Värddatorn kunde inte hittas. + + + This value does not match the expected {{ charset }} charset. + Detta värde har inte den förväntade teckenkodningen {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + Detta är inte en giltig BIC-kod. + + + Error + Fel + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf new file mode 100644 index 0000000..d5b5703 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.th.xlf @@ -0,0 +1,303 @@ + + + + + + This value should be false. + ค่านี้ควรจะเป็น false + + + This value should be true. + ค่านี้ควรจะเป็น true + + + This value should be of type {{ type }}. + ค่านี้ควรจะเป็นชนิด {{ type }} + + + This value should be blank. + ควรจะเป็นค่าว่าง + + + The value you selected is not a valid choice. + คุณเลือà¸à¸„่าที่ไม่ตรงà¸à¸±à¸šà¸•ัวเลือภ+ + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + คุณต้องเลือà¸à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢ {{ limit }} ตัวเลือภ+ + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + คุณเลือà¸à¹„ด้มาà¸à¸—ี่สุด {{ limit }} ตัวเลือภ+ + + One or more of the given values is invalid. + มีบางค่าที่ส่งมาไม่ถูà¸à¸•้อง + + + This field was not expected. + ฟิลด์นี้ที่ไม่ได้คาดหวัง + + + This field is missing. + ฟิลด์นี้จะหายไป + + + This value is not a valid date. + ค่าของวันที่ไม่ถูà¸à¸•้อง + + + This value is not a valid datetime. + ค่าของวันที่à¹à¸¥à¸°à¹€à¸§à¸¥à¸²à¹„ม่ถูà¸à¸•้อง + + + This value is not a valid email address. + ค่าของอีเมล์ไม่ถูà¸à¸•้อง + + + The file could not be found. + ไม่พบไฟล์ + + + The file is not readable. + ไฟล์ไม่อยู่ในสถานะที่สามารถอ่านได้ + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + ไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™ ({{ size }} {{ suffix }}) อนุà¸à¸²à¸•ให้ใหà¸à¹ˆà¸—ี่สุดได้ไม่เà¸à¸´à¸™ {{ limit }} {{ suffix }} + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Mime type ของไฟล์ไม่ถูà¸à¸•้อง ({{ type }}) Mime types ที่อนุà¸à¸²à¸•คือ {{ types }} + + + This value should be {{ limit }} or less. + ค่านี้ควรจะเป็น {{ limit }} หรือน้อยà¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + ค่านี้ยาวเà¸à¸´à¸™à¹„ป ควรจะมีà¹à¸„่ {{ limit }} ตัวอัà¸à¸©à¸£à¸«à¸£à¸·à¸­à¸™à¹‰à¸­à¸¢à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value should be {{ limit }} or more. + ค่านี้ควรจะมี {{ limit }} หรือมาà¸à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + ค่านี้สั้นเà¸à¸´à¸™à¹„ป ควรจะมี {{ limit }} ตัวอัà¸à¸©à¸£à¸«à¸£à¸·à¸­à¸¡à¸²à¸à¸à¸§à¹ˆà¸²à¸™à¸±à¹‰à¸™ + + + This value should not be blank. + ค่านี้ไม่ควรเป็นค่าว่าง + + + This value should not be null. + ค่านี้ไม่ควรเป็นค่า null + + + This value should be null. + ค่านี้ควรเป็นค่า null + + + This value is not valid. + ค่านี้ไม่ถูà¸à¸•้อง + + + This value is not a valid time. + ค่าของเวลาไม่ถูà¸à¸•้อง + + + This value is not a valid URL. + ค่าของ URL ไม่ถูà¸à¸•้อง + + + The two values should be equal. + ค่าทั้งสองค่าควรจะเหมือนà¸à¸±à¸™ + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + ขนาดไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป อนุà¸à¸²à¸•ให้ไฟล์ขนาดใหà¸à¹ˆà¹„ด้ไม่เà¸à¸´à¸™ {{ limit }} {{ suffix }} + + + The file is too large. + ขนาดไฟล์ใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป + + + The file could not be uploaded. + ไม่สามารถอัปโหลดไฟล์ได้ + + + This value should be a valid number. + ค่าของตัวเลขไม่ถูà¸à¸•้อง + + + This file is not a valid image. + ไฟล์นี้ไม่ใช่ไฟล์รูปภาพ + + + This is not a valid IP address. + ค่าของ IP ไม่ถูà¸à¸•้อง + + + This value is not a valid language. + ค่าของภาษาไม่ถูà¸à¸•้อง + + + This value is not a valid locale. + ค่าของภูมิภาค (Locale) ไม่ถูà¸à¸•้อง + + + This value is not a valid country. + ค่าของประเทศไม่ถูà¸à¸•้อง + + + This value is already used. + Tค่านี้ถูà¸à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¹„ปà¹à¸¥à¹‰à¸§ + + + The size of the image could not be detected. + ไม่สามารถตรวจสอบขนาดไฟล์ของภาพได้ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + ความà¸à¸§à¹‰à¸²à¸‡à¸‚องภาพเà¸à¸´à¸™à¸‚นาด ({{ width }}px) อนุà¸à¸²à¸•ให้à¸à¸§à¹‰à¸²à¸‡à¹„ด้มาà¸à¸—ี่สุด {{ max_width }}px + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + ความà¸à¸§à¹‰à¸²à¸‡à¸‚องภาพไม่ได้ขนาด ({{ width }}px) อนุà¸à¸²à¸•ให้สั้นที่สุด {{ min_width }}px + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + ความสูงของภาพเà¸à¸´à¸™à¸‚นาด ({{ height }}px) อนุà¸à¸²à¸•ให้สูงได้มาà¸à¸—ี่สุด {{ max_height }}px + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + ความสูงของภาพไม่ได้ขนาด ({{ height }}px) อนุà¸à¸²à¸•ให้สูงอย่างน้อยที่สุด {{ min_height }}px + + + This value should be the user's current password. + ค่านี้ควรจะเป็นรหัสผ่านปัจจุบันของผู้ใช้ + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + ค่านี้ควรจะมีความยาว {{ limit }} ตัวอัà¸à¸©à¸£ + + + The file was only partially uploaded. + อัปโหลดไฟล์ได้เพียงบางส่วนเท่านั้น + + + No file was uploaded. + ไม่มีไฟล์ใดถูà¸à¸­à¸±à¸›à¹‚หลด + + + No temporary folder was configured in php.ini. + ไม่พบไฟล์ temp ควรจะà¸à¸³à¸«à¸™à¸”ใน php.ini + + + Cannot write temporary file to disk. + ไม่สามารถเขียน temp ไฟล์ลงดิสà¸à¹Œà¹„ด้ + + + A PHP extension caused the upload to fail. + PHP extension เà¸à¸µà¹ˆà¸¢à¸§à¸à¸±à¸šà¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดมีปัà¸à¸«à¸² + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¸„วรจะประà¸à¸­à¸šà¹„ปด้วยอ่างน้อย {{ limit }} สมาชิภ+ + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¹„ม่ควรมีสมาชิà¸à¹€à¸à¸´à¸™ {{ limit }} + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + คอเล็à¸à¸Šà¸±à¹ˆà¸™à¸™à¸µà¹‰à¸„วรจะมีสมาชิภ{{ limit }} เท่านั้น + + + Invalid card number. + หมายเลขบัตรไม่ถูà¸à¸•้อง + + + Unsupported card type or invalid card number. + ไม่รู้จัà¸à¸›à¸£à¸°à¹€à¸ à¸—ของบัตร หรือหมายเลขบัตรไม่ถูà¸à¸•้อง + + + This is not a valid International Bank Account Number (IBAN). + นี่ไม่ถูà¸à¸•้องตาม International Bank Account Number (IBAN) + + + This value is not a valid ISBN-10. + ค่านี้ไม่ถูà¸à¸•้องตาม ISBN-10 + + + This value is not a valid ISBN-13. + ค่านี้ไม่ถูà¸à¸•้องตาม ISBN-13 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + ค่านี้ไม่ถูà¸à¸•้องตามทั้ง ISBN-10 à¹à¸¥à¸° ISBN-13 + + + This value is not a valid ISSN. + ค่านี้ไม่ถุà¸à¸•้องตาม ISSN + + + This value is not a valid currency. + ค่านี้ไม่ถูà¸à¸•้องตามสà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™ + + + This value should be equal to {{ compared_value }}. + ค่านี้ไม่ตรงà¸à¸±à¸š {{ compared_value }} + + + This value should be greater than {{ compared_value }}. + ค่านี้ควรจะมาà¸à¸à¸§à¹ˆà¸² {{ compared_value }} + + + This value should be greater than or equal to {{ compared_value }}. + ค่านี้ควรจะมาà¸à¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¸•รงà¸à¸±à¸š {{ compared_value }} + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + ค่านี้ควรจะเหมือนà¸à¸±à¸™à¸à¸±à¸š {{ compared_value_type }} {{ compared_value }} + + + This value should be less than {{ compared_value }}. + ค่านี้ควรจะน้อยà¸à¸§à¹ˆà¸² {{ compared_value }} + + + This value should be less than or equal to {{ compared_value }}. + ค่านี้ควรจะน้อยà¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {{ compared_value }} + + + This value should not be equal to {{ compared_value }}. + ค่านี้ไม่ควรเท่าà¸à¸±à¸™à¸à¸±à¸š {{ compared_value }} + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + ค่านี้ไม่ควรเหมือนà¸à¸±à¸™à¸à¸±à¸š {{ compared_value_type }} {{ compared_value }} + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + สัดส่วนของภาพใหà¸à¹ˆà¹€à¸à¸´à¸™ ({{ ratio }}) สามารถมีขนาดใหà¸à¹ˆà¸—ี่สุดได้ {{ max_ratio }} + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + สัดส่วนของภาพเล็à¸à¹€à¸à¸´à¸™ ({{ ratio }}) สามารถมีขนาดเล็à¸à¸—ี่สุดได้ {{ min_ratio }} + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + รูปภาพเป็นจุตรัส ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นสี่เหลี่ยมจตุรัส + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + ภาพนี้เป็นà¹à¸™à¸§à¸™à¸­à¸™ ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นà¹à¸™à¸§à¸™à¸­à¸™ + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + ภาพนี้เป็นà¹à¸™à¸§à¸•ั้ง ({{ width }}x{{ height }}px) ไม่อนุà¸à¸²à¸•ภาพที่เป็นà¹à¸™à¸§à¸•ั้ง + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf new file mode 100644 index 0000000..75dc329 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tl.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + Ang halaga nito ay dapat na huwad. + + + This value should be true. + Ang halaga nito ay dapat totoo. + + + This value should be of type {{ type }}. + Ang halaga nito ay dapat sa uri {{ type }}. + + + This value should be blank. + Ang halaga nito ay dapat walang laman. + + + The value you selected is not a valid choice. + Ang halaga ng iyong pinili ay hindi balidong pagpili. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Kailangan mong pumili ng pinakamababang {{ limit }} ng pagpilian.|Kailangan mong pumili ng pinakamababang {{ limit }} ng mga pagpipilian. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Kailangan mong pumili ng pinakamataas {{ limit }} ng pagpipilian.|Kailangan mong pumili ng pinakamataas {{ limit }} ng mga pagpipilian. + + + One or more of the given values is invalid. + Isa o higit pang mga halaga na binigay ay hindi balido. + + + This field was not expected. + Ang larangang ito ay hindi inaasahan. + + + This field is missing. + Ang patlang na ito ay nawawala. + + + This value is not a valid date. + Ang halagang ito ay hindi balidong petsa. + + + This value is not a valid datetime. + Ang halagang ito ay hindi wastong petsa/oras. + + + This value is not a valid email address. + Ang halagang ito ay hindi balidong address ng email. + + + The file could not be found. + Ang file na ito ay hindi makita. + + + The file is not readable. + Ang file na ito ay hindi mabasa. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Ang file na ito ay masyadong malaki ({{ size }} {{ suffix }}). Ang pinakamalaking sukat {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Ang uri ng file ng mime ay hindi balido ({{ type }}).Ang mga pinapayagang uri ng mime ay ang {{ types }}. + + + This value should be {{ limit }} or less. + Ang halaga nito ay dapat na {{ limit }} or maliit pa. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Ang halaga nito ay masyadong mahaba.Ito ay dapat na {{ limit }} karakter o maliit pa.|Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} mga karakter o maliit pa. + + + This value should be {{ limit }} or more. + Ang halaga nito ay dapat na {{ limit }} o mas marami pa. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} karakter o marami pa.|Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} mga karakter o marami pa. + + + This value should not be blank. + Ang halaga na ito ay dapat na may laman. + + + This value should not be null. + Meron dapt itong halaga. + + + This value should be null. + Wala dapat itong halaga. + + + This value is not valid. + Hindi balido ang halagang ito. + + + This value is not a valid time. + Ang halagang ito ay hindi wastong oras. + + + This value is not a valid URL. + Hindi ito isang balidong URL. + + + The two values should be equal. + Ang dalwang halaga ay dapat magkapareha. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Ang file ay masyadong malaki. Ang pinapayagan halaga lamang ay {{ limit}} {{ suffix }}. + + + The file is too large. + Ang file na ito ay masyadong malaki. + + + The file could not be uploaded. + Ang file na ito ay hindi ma-upload. + + + This value should be a valid number. + Ang halaga nito ay dapat na wastong numero. + + + This file is not a valid image. + Ang file na ito ay hindi wastong imahe. + + + This is not a valid IP address. + Ito ay hindi wastong IP address. + + + This value is not a valid language. + Ang halaga na ito ay hindi balidong wika. + + + This value is not a valid locale. + Ito ay isang hindi wastong locale na halaga. + + + This value is not a valid country. + ng halaga na ito ay hindi wastong bansa. + + + This value is already used. + Ang halaga na ito ay ginamit na. + + + The size of the image could not be detected. + Ang sukat ng imahe ay hindi madetect. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Ang lapad ng imahe ay masyadong malaki ({{ width }}px). Ang pinapayagang lapay ay {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Ang lapad ng imahe ay masyadong maliit ({{ width }}px). Ang pinakamaliit na pinapayagang lapad ay {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Ang haba ng imahe ay masyadong mataas ({{ height }}px). Ang pinakmataas na haba ay {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Ang haba ng imahe ay masyadong maliit ({{ height }}px). Ang inaasahang haba ay {{ min_height }}px. + + + This value should be the user's current password. + Ang halagang ito ay dapat na password ng kasalukuyang gumagamit. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Ang halagang ito ay dapat na eksakto sa {{ limit}} karakter.|Ang halagang ito ay dapat na eksakto sa {{ limit }} mga karakter. + + + The file was only partially uploaded. + Ang file na ito ay kahalating na upload lamang. + + + No file was uploaded. + Walang na upload na file. + + + No temporary folder was configured in php.ini. + Walang temporaryong folder ang naayos sa php.ini. + + + Cannot write temporary file to disk. + Temporaryong hindi makasulat ng file sa disk. + + + A PHP extension caused the upload to fail. + Ang dahilan ng pagkabigo ng pagupload ng files ay isang extension ng PHP. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o marami pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o marami pa. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o maliit pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o maliit pa. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} elemento.|Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} mga elemento. + + + Invalid card number. + Hindi wastong numero ng kard. + + + Unsupported card type or invalid card number. + Hindi supportadong uri ng kard o hindi wastong numero ng kard. + + + This is not a valid International Bank Account Number (IBAN). + Ito ay hindi isang balidong International Bank Account Number (IBAN). + + + This value is not a valid ISBN-10. + Ang halagang ito ay hindi balidong SBN-10. + + + This value is not a valid ISBN-13. + Ang halagang ito ay hindi balidong ISBN-13. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Ang halagang ito ay pwdeng isang balidong ISBN-10 o isang balidong ISBN-13. + + + This value is not a valid ISSN. + Ang halangang ito ay hindi isang balidong ISSN. + + + This value is not a valid currency. + Ang halagang ito ay hindi balidong pera. + + + This value should be equal to {{ compared_value }}. + Ito ay hindi dapat magkapareho sa {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Ang halagang ito ay dapat tataas sa {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Ang halagang ito ay dapat mas mataas o magkapareha sa {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Ang halagang ito ay dapat kapareha ng {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Ang halagang ito ay dapat mas maliit sa {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Ang halagang ito ay dapat mas mmaliit o magkapareha sa {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value_type }} {{ compared_value }}. + + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Ang ratio ng imahe ay masyadong malaki ({{ ratio }}). Ang pinakamalaking ratio ay {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + ng ratio ng imahe ay masyadong maliit ({{ ratio }}). Ang pinamaliit na ratio ay {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Ang imahe ay kwadrado ({{ width }}x{{ height }}px). Ang mga kwadradong imahe ay hindi pwede. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Ang orientasyon ng imahe ay nakalandscape ({{ width }}x{{ height }}px). Ang mga imaheng nakalandscape ang orientasyon ay hindi pwede. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Ang orientasyon ng imahe ay nakaportrait ({{ width }}x{{ height }}px). PAng mga imaheng nakaportrait ang orientasyon ay hindi pwede. + + + An empty file is not allowed. + Ang file na walang laman ay hindi pwede. + + + The host could not be resolved. + Hindi maresolba ang host. + + + This value does not match the expected {{ charset }} charset. + Ang halaga ay hindi kapareha sa inaasahang {{ charset }} set ng karater. + + + This is not a valid Business Identifier Code (BIC). + Ito ay hindi isang balidong Business Identifier Code (BIC). + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf new file mode 100644 index 0000000..5e19e3e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.tr.xlf @@ -0,0 +1,231 @@ + + + + + + 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ı. + + + Error + Hata + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf new file mode 100644 index 0000000..6a92801 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.uk.xlf @@ -0,0 +1,323 @@ + + + + + + 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 }}. + + + 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). + + + Error + Помилка + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf new file mode 100644 index 0000000..e1833c7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.vi.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + Giá trị này phải là sai. + + + This value should be true. + Giá trị này phải là đúng. + + + This value should be of type {{ type }}. + Giá trị này phải là kiểu {{ type }}. + + + This value should be blank. + Giá trị này phải rá»—ng. + + + The value you selected is not a valid choice. + Giá trị bạn vừa chá»n không hợp lệ. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Bạn phải chá»n ít nhất {{ limit }} lá»±a chá»n.|Bạn phải chá»n ít nhất {{ limit }} lá»±a chá»n. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Bạn phải chá»n nhiá»u nhất {{ limit }} lá»±a chá»n.|Bạn phải chá»n nhiá»u nhất {{ limit }} lá»±a chá»n. + + + One or more of the given values is invalid. + Má»™t hoặc nhiá»u giá trị được chá»n không hợp lệ. + + + This field was not expected. + LÄ©nh vá»±c này không được dá»± kiến. + + + This field is missing. + LÄ©nh vá»±c này là mất tích. + + + This value is not a valid date. + Giá trị không phải là ngày hợp lệ. + + + This value is not a valid datetime. + Giá trị không phải là ngày tháng hợp lệ. + + + This value is not a valid email address. + Giá trị này không phải là email hợp lệ. + + + The file could not be found. + Tập tin không tìm thấy. + + + The file is not readable. + Tập tin không thể Ä‘á»c được. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Tập tin quá lá»›n ({{ size }} {{ suffix }}). Kích thước tối Ä‘a cho phép {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Kiểu mime cá»§a tập tin không hợp lệ ({{ type }}). Kiểu hợp lệ là {{ types }}. + + + This value should be {{ limit }} or less. + Giá trị phải bằng hoặc nhá» hÆ¡n {{ limit }}. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Giá trị quá dài. Phải bằng hoặc ít hÆ¡n {{ limit }} kí tá»±.|Giá trị quá dài. Phải bằng hoặc ít hÆ¡n {{ limit }} kí tá»±. + + + This value should be {{ limit }} or more. + Giá trị phải lá»›n hÆ¡n hoặc bằng {{ limit }}. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Giá trị quá ngắn. Phải hÆ¡n hoặc bằng {{ limit }} kí tá»±.|Giá trị quá ngắn. Phải hÆ¡n hoặc bằng {{ limit }} kí tá»±. + + + This value should not be blank. + Giá trị không được phép để trống. + + + This value should not be null. + Giá trị không được phép rá»—ng. + + + This value should be null. + Giá trị phải rá»—ng. + + + This value is not valid. + Giá trị không hợp lệ. + + + This value is not a valid time. + Giá trị không phải là thá»i gian hợp lệ. + + + This value is not a valid URL. + Giá trị không phải là địa chỉ URL hợp lệ. + + + The two values should be equal. + Hai giá trị phải bằng nhau. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Tập tin quá lá»›n. Kích thước tối Ä‘a cho phép là {{ limit }} {{ suffix }}. + + + The file is too large. + Tập tin quá lá»›n. + + + The file could not be uploaded. + Tập tin không thể tải lên. + + + This value should be a valid number. + Giá trị phải là con số. + + + This file is not a valid image. + Tập tin không phải là hình ảnh. + + + This is not a valid IP address. + Äịa chỉ IP không hợp lệ. + + + This value is not a valid language. + Giá trị không phải là ngôn ngữ hợp lệ. + + + This value is not a valid locale. + Giá trị không phải là má»™t bản địa địa phương hợp lệ. + + + This value is not a valid country. + Giá trị không phải là nước hợp lệ. + + + This value is already used. + Giá trị đã được sá»­ dụng. + + + The size of the image could not be detected. + Kích thước cá»§a hình ảnh không thể xác định. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Chiá»u rá»™ng cá»§a hình quá lá»›n ({{ width }}px). Chiá»u rá»™ng tối Ä‘a phải là {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Chiá»u rá»™ng cá»§a hình quá thấp ({{ width }}px). Chiá»u rá»™ng tối thiểu phải là {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Chiá»u cao cá»§a hình quá cao ({{ height }}px). Chiá»u cao tối Ä‘a phải là {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Chiá»u cao cá»§a hình quá thấp ({{ height }}px). Chiá»u cao tối thiểu phải là {{ min_height }}px. + + + This value should be the user's current password. + Giá trị này phải là mật khẩu hiện tại cá»§a ngưá»i dùng. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Giá trị phải có chính xác {{ limit }} kí tá»±.|Giá trị phải có chính xác {{ limit }} kí tá»±. + + + The file was only partially uploaded. + Tập tin chỉ được tải lên má»™t phần. + + + No file was uploaded. + Tập tin không được tải lên. + + + No temporary folder was configured in php.ini. + Thư mục tạm không được định nghÄ©a trong php.ini. + + + Cannot write temporary file to disk. + Không thể ghi tập tin tạm ra đĩa. + + + A PHP extension caused the upload to fail. + Má»™t PHP extension đã phá há»ng quá trình tải lên cá»§a tập tin. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Danh sách phải chứa {{ limit }} hoặc nhiá»u hÆ¡n thành phần.|Danh sách phải chứa {{ limit }} hoặc nhiá»u hÆ¡n thành phần. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Danh sách phải chứa {{ limit }} hoặc ít hÆ¡n thành phần.|Danh sách phải chứa {{ limit }} hoặc ít hÆ¡n thành phần. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Danh sách phải chứa chính xác {{ limit }} thành phần.|Danh sách phải chứa chính xác {{ limit }} thành phần. + + + Invalid card number. + Số thẻ không hợp lệ. + + + Unsupported card type or invalid card number. + Thẻ không được há»— trợ hoặc số thẻ không hợp lệ. + + + This is not a valid International Bank Account Number (IBAN). + Giá trị không phải là International Bank Account Number (IBAN) hợp lệ. + + + This value is not a valid ISBN-10. + Giá trị không phải là ISBN-10 hợp lệ. + + + This value is not a valid ISBN-13. + Giá trị không phải là ISBN-13 hợp lệ. + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + Giá trị không phải là ISBN-10 hoặc ISBN-13 hợp lệ. + + + This value is not a valid ISSN. + Giá trị không là ISSN hợp lệ. + + + This value is not a valid currency. + Giá trị không phải là đơn vi tiá»n tệ hợp lệ. + + + This value should be equal to {{ compared_value }}. + Giá trị phải bằng {{ compared_value }}. + + + This value should be greater than {{ compared_value }}. + Giá trị phải lá»›n hÆ¡n {{ compared_value }}. + + + This value should be greater than or equal to {{ compared_value }}. + Giá trị phải lá»›n hÆ¡n hoặc bằng {{ compared_value }}. + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + Giá trị phải giống {{ compared_value_type }} {{ compared_value }}. + + + This value should be less than {{ compared_value }}. + Giá trị phải bé hÆ¡n {{ compared_value }}. + + + This value should be less than or equal to {{ compared_value }}. + Giá trị không được phép nhá» hÆ¡n hoặc bằng {{ compared_value }}. + + + This value should not be equal to {{ compared_value }}. + Giá trị không được phép bằng {{ compared_value }}. + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + Giá trị không được phép giống như {{ compared_value_type }} {{ compared_value }}. + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf new file mode 100644 index 0000000..d4ed03d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf @@ -0,0 +1,319 @@ + + + + + + This value should be false. + 该å˜é‡çš„值应为 false 。 + + + This value should be true. + 该å˜é‡çš„值应为 true 。 + + + This value should be of type {{ type }}. + 该å˜é‡çš„类型应为 {{ type }} 。 + + + This value should be blank. + 该å˜é‡å€¼åº”为空。 + + + The value you selected is not a valid choice. + 选定å˜é‡çš„值䏿˜¯æœ‰æ•ˆçš„选项。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + 您至少è¦é€‰æ‹© {{ limit }} 个选项。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + 您最多能选择 {{ limit }} 个选项。 + + + One or more of the given values is invalid. + 一个或者多个给定的值无效。 + + + This field was not expected. + 此字段是多余的。 + + + This field is missing. + 此字段缺失。 + + + This value is not a valid date. + è¯¥å€¼ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„æ—¥æœŸï¼ˆ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 }} ç¼–ç ã€‚ + + + Error + 错误 + + + + diff --git a/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf new file mode 100644 index 0000000..d9d5f2f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf @@ -0,0 +1,283 @@ + + + + + + This value should be false. + 該變數的值應為 false 。 + + + This value should be true. + 該變數的值應為 true 。 + + + This value should be of type {{ type }}. + 該變數的類型應為 {{ type }} 。 + + + This value should be blank. + 該變數應為空。 + + + The value you selected is not a valid choice. + é¸å®šè®Šæ•¸çš„值䏿˜¯æœ‰æ•ˆçš„é¸é …。 + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + 您至少è¦é¸æ“‡ {{ limit }} 個é¸é …。 + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + æ‚¨æœ€å¤šèƒ½é¸æ“‡ {{ limit }} 個é¸é …。 + + + One or more of the given values is invalid. + 一個或者多個給定的值無效。 + + + This field was not expected. + æ­¤å­—æ®µæ˜¯æ²’æœ‰é æ–™åˆ°ã€‚ + + + This field is missing. + 此字段缺失。 + + + This value is not a valid date. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ—¥æœŸï¼ˆdate)。 + + + This value is not a valid datetime. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ—¥æœŸæ™‚間(datetime)。 + + + This value is not a valid email address. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„郵件地å€ã€‚ + + + The file could not be found. + 找ä¸åˆ°æª”案。 + + + The file is not readable. + ç„¡æ³•è®€å–æª”案。 + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + 檔案太大 ({{ size }} {{ suffix }})。檔案大å°ä¸å¯ä»¥è¶…éŽ {{ limit }} {{ suffix }} 。 + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + 無效的檔案類型 ({{ type }}) 。å…許的檔案類型有 {{ types }} 。 + + + This value should be {{ limit }} or less. + é€™å€‹è®Šæ•¸çš„å€¼æ‡‰è©²å°æ–¼æˆ–等於 {{ limit }}。 + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + 字串太長,長度ä¸å¯è¶…éŽ {{ limit }} 個字元。 + + + This value should be {{ limit }} or more. + 該變數的值應該大於或等於 {{ limit }}。 + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + 字串太短,長度ä¸å¯å°‘æ–¼ {{ limit }} 個字元。 + + + This value should not be blank. + è©²è®Šæ•¸ä¸æ‡‰ç‚ºç©ºç™½ã€‚ + + + This value should not be null. + è©²å€¼ä¸æ‡‰ç‚º null 。 + + + This value should be null. + 該值應為 null 。 + + + This value is not valid. + 無效的數值 。 + + + This value is not a valid time. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„æ™‚間。 + + + This value is not a valid URL. + è©²å€¼ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„ URL 。 + + + The two values should be equal. + 這兩個變數的值應該相等。 + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + 檔案太大,檔案大å°ä¸å¯ä»¥è¶…éŽ {{ limit }} {{ suffix }}。 + + + The file is too large. + 檔案太大。 + + + The file could not be uploaded. + 無法上傳此檔案。 + + + This value should be a valid number. + 該值應該為有效的數字。 + + + This value is not a valid country. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國家å。 + + + This file is not a valid image. + è©²æª”æ¡ˆä¸æ˜¯æœ‰æ•ˆçš„圖片。 + + + This is not a valid IP address. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„IP地å€ã€‚ + + + This value is not a valid language. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„語言å。 + + + This value is not a valid locale. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„å€åŸŸå€¼ï¼ˆlocale)。 + + + This value is already used. + 該值已經被使用。 + + + The size of the image could not be detected. + ä¸èƒ½è§£æžåœ–片大å°ã€‚ + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + 圖片太寬 ({{ width }}px),最大寬度為 {{ max_width }}px 。 + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + 圖片寬度ä¸å¤  ({{ width }}px),最å°å¯¬åº¦ç‚º {{ min_width }}px 。 + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + 圖片太高 ({{ height }}px),最大高度為 {{ max_height }}px 。 + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + 圖片高度ä¸å¤  ({{ height }}px),最å°é«˜åº¦ç‚º {{ min_height }}px 。 + + + This value should be the user's current password. + 該變數的值應為用戶目å‰çš„密碼。 + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + 該變數應為 {{ limit }} 個字元。 + + + The file was only partially uploaded. + 該檔案的上傳ä¸å®Œæ•´ã€‚ + + + No file was uploaded. + 沒有上傳任何檔案。 + + + No temporary folder was configured in php.ini. + php.ini 裡沒有é…置臨時目錄。 + + + Cannot write temporary file to disk. + 暫存檔寫入ç£ç¢Ÿå¤±æ•—。 + + + A PHP extension caused the upload to fail. + æŸå€‹ PHP 擴展造æˆä¸Šå‚³å¤±æ•—。 + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + è©²é›†åˆæœ€å°‘æ‡‰åŒ…å« {{ limit }} 個元素。 + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + è©²é›†åˆæœ€å¤šåŒ…å« {{ limit }} 個元素。 + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + è©²é›†åˆæ‡‰åŒ…å« {{ limit }} 個元素 element 。 + + + Invalid card number. + 無效的信用å¡è™Ÿã€‚ + + + Unsupported card type or invalid card number. + 䏿”¯æ´çš„信用å¡é¡žåž‹æˆ–無效的信用å¡è™Ÿã€‚ + + + This is not a valid International Bank Account Number (IBAN). + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際銀行帳號(IBAN)。 + + + This value is not a valid ISBN-10. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„10ä½åœ‹é𛿍™æº–書號(ISBN-10)。 + + + This value is not a valid ISBN-13. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„13ä½åœ‹é𛿍™æº–書號(ISBN-13)。 + + + This value is neither a valid ISBN-10 nor a valid ISBN-13. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際標準書號(ISBN-10 或 ISBN-13)。 + + + This value is not a valid ISSN. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„國際標準期刊號(ISSN)。 + + + This value is not a valid currency. + è©²å€¼ä¸æ˜¯æœ‰æ•ˆçš„貨幣å(currency)。 + + + This value should be equal to {{ compared_value }}. + 該值應等於 {{ compared_value }} 。 + + + This value should be greater than {{ compared_value }}. + 該值應大於 {{ compared_value }} 。 + + + This value should be greater than or equal to {{ compared_value }}. + 該值應大於或等於 {{ compared_value }} 。 + + + This value should be identical to {{ compared_value_type }} {{ compared_value }}. + 該值應與 {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + This value should be less than {{ compared_value }}. + è©²å€¼æ‡‰å°æ–¼ {{ compared_value }} 。 + + + This value should be less than or equal to {{ compared_value }}. + è©²å€¼æ‡‰å°æ–¼æˆ–等於 {{ compared_value }} 。 + + + This value should not be equal to {{ compared_value }}. + 該值應ä¸ç­‰æ–¼ {{ compared_value }} 。 + + + This value should not be identical to {{ compared_value_type }} {{ compared_value }}. + è©²å€¼ä¸æ‡‰èˆ‡ {{ compared_value_type }} {{ compared_value }} 相åŒã€‚ + + + + diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php new file mode 100644 index 0000000..a057414 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintTest.php @@ -0,0 +1,245 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintC; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValue; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValueAsDefault; + +class ConstraintTest extends TestCase +{ + public function testSetProperties() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $this->assertEquals('foo', $constraint->property1); + $this->assertEquals('bar', $constraint->property2); + } + + public function testSetNotExistingPropertyThrowsException() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintA(array( + 'foo' => 'bar', + )); + } + + public function testMagicPropertiesAreNotAllowed() + { + $constraint = new ConstraintA(); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + $constraint->foo = 'bar'; + } + + public function testInvalidAndRequiredOptionsPassed() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\InvalidOptionsException'); + + new ConstraintC(array( + 'option1' => 'default', + 'foo' => 'bar', + )); + } + + public function testSetDefaultProperty() + { + $constraint = new ConstraintA('foo'); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStyle() + { + $constraint = new ConstraintA(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->property2); + } + + public function testSetDefaultPropertyDoctrineStylePlusOtherProperty() + { + $constraint = new ConstraintA(array('value' => 'foo', 'property1' => 'bar')); + + $this->assertEquals('foo', $constraint->property2); + $this->assertEquals('bar', $constraint->property1); + } + + public function testSetDefaultPropertyDoctrineStyleWhenDefaultPropertyIsNamedValue() + { + $constraint = new ConstraintWithValueAsDefault(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testDontSetDefaultPropertyIfValuePropertyExists() + { + $constraint = new ConstraintWithValue(array('value' => 'foo')); + + $this->assertEquals('foo', $constraint->value); + $this->assertNull($constraint->property); + } + + public function testSetUndefinedDefaultProperty() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + new ConstraintB('foo'); + } + + public function testRequiredOptionsMustBeDefined() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\MissingOptionsException'); + + new ConstraintC(); + } + + public function testRequiredOptionsPassed() + { + $constraint = new ConstraintC(array('option1' => 'default')); + + $this->assertSame('default', $constraint->option1); + } + + 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() + { + $constraint = new ConstraintB(array()); + + $this->assertSame(array(Constraint::PROPERTY_CONSTRAINT, Constraint::CLASS_CONSTRAINT), $constraint->getTargets()); + } + + public function testGetTargetsCanBeString() + { + $constraint = new ClassConstraint(); + + $this->assertEquals('class', $constraint->getTargets()); + } + + public function testGetTargetsCanBeArray() + { + $constraint = new ConstraintA(); + + $this->assertEquals(array('property', 'class'), $constraint->getTargets()); + } + + public function testSerialize() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $restoredConstraint = unserialize(serialize($constraint)); + + $this->assertEquals($constraint, $restoredConstraint); + } + + public function testSerializeInitializesGroupsOptionToDefault() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + )); + + $constraint = unserialize(serialize($constraint)); + + $expected = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'Default', + )); + + $this->assertEquals($expected, $constraint); + } + + public function testSerializeKeepsCustomGroups() + { + $constraint = new ConstraintA(array( + 'property1' => 'foo', + 'property2' => 'bar', + 'groups' => 'MyGroup', + )); + + $constraint = unserialize(serialize($constraint)); + + $this->assertSame(array('MyGroup'), $constraint->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidArgumentException + */ + public function testGetErrorNameForUnknownCode() + { + Constraint::getErrorName(1); + } + + public function testOptionsAsDefaultOption() + { + $constraint = new ConstraintA($options = array('value1')); + + $this->assertEquals($options, $constraint->property2); + + $constraint = new ConstraintA($options = array('value1', 'property1' => 'value2')); + + $this->assertEquals($options, $constraint->property2); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\InvalidOptionsException + * @expectedExceptionMessage The options "0", "5" do not exist + */ + public function testInvalidOptions() + { + new ConstraintA(array('property2' => 'foo', 'bar', 5 => 'baz')); + } + + public function testOptionsWithInvalidInternalPointer() + { + $options = array('property1' => 'foo'); + next($options); + next($options); + + $constraint = new ConstraintA($options); + + $this->assertEquals('foo', $constraint->property1); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php new file mode 100644 index 0000000..a35a1cd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationListTest.php @@ -0,0 +1,135 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; + +class ConstraintViolationListTest extends TestCase +{ + protected $list; + + protected function setUp() + { + $this->list = new ConstraintViolationList(); + } + + protected function tearDown() + { + $this->list = null; + } + + public function testInit() + { + $this->assertCount(0, $this->list); + } + + public function testInitWithViolations() + { + $violation = $this->getViolation('Error'); + $this->list = new ConstraintViolationList(array($violation)); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAdd() + { + $violation = $this->getViolation('Error'); + $this->list->add($violation); + + $this->assertCount(1, $this->list); + $this->assertSame($violation, $this->list[0]); + } + + public function testAddAll() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + $otherList = new ConstraintViolationList($violations); + $this->list->addAll($otherList); + + $this->assertCount(3, $this->list); + + $this->assertSame($violations[10], $this->list[0]); + $this->assertSame($violations[20], $this->list[1]); + $this->assertSame($violations[30], $this->list[2]); + } + + public function testIterator() + { + $violations = array( + 10 => $this->getViolation('Error 1'), + 20 => $this->getViolation('Error 2'), + 30 => $this->getViolation('Error 3'), + ); + + $this->list = new ConstraintViolationList($violations); + + // indices are reset upon adding -> array_values() + $this->assertSame(array_values($violations), iterator_to_array($this->list)); + } + + public function testArrayAccess() + { + $violation = $this->getViolation('Error'); + $this->list[] = $violation; + + $this->assertSame($violation, $this->list[0]); + $this->assertArrayHasKey(0, $this->list); + + unset($this->list[0]); + + $this->assertArrayNotHasKey(0, $this->list); + + $this->list[10] = $violation; + + $this->assertSame($violation, $this->list[10]); + $this->assertArrayHasKey(10, $this->list); + } + + public function testToString() + { + $this->list = new ConstraintViolationList(array( + $this->getViolation('Error 1', 'Root'), + $this->getViolation('Error 2', 'Root', 'foo.bar'), + $this->getViolation('Error 3', 'Root', '[baz]'), + $this->getViolation('Error 4', '', 'foo.bar'), + $this->getViolation('Error 5', '', '[baz]'), + )); + + $expected = <<<'EOF' +Root: + Error 1 +Root.foo.bar: + Error 2 +Root[baz]: + Error 3 +foo.bar: + Error 4 +[baz]: + Error 5 + +EOF; + + $this->assertEquals($expected, (string) $this->list); + } + + protected function getViolation($message, $root = null, $propertyPath = null) + { + return new ConstraintViolation($message, $message, array(), $root, $propertyPath, null); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php new file mode 100644 index 0000000..cef4782 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ConstraintViolationTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ConstraintViolation; + +class ConstraintViolationTest extends TestCase +{ + public function testToStringHandlesArrays() + { + $violation = new ConstraintViolation( + 'Array', + '{{ value }}', + array('{{ value }}' => array(1, 2, 3)), + 'Root', + 'property.path', + null + ); + + $expected = <<<'EOF' +Root.property.path: + Array +EOF; + + $this->assertSame($expected, (string) $violation); + } + + public function testToStringHandlesArrayRoots() + { + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null + ); + + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here +EOF; + + $this->assertSame($expected, (string) $violation); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php new file mode 100644 index 0000000..d593aac --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -0,0 +1,192 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\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; + } + + public function provideInvalidConstraintOptions() + { + return array( + array(null), + array(array()), + ); + } + + /** + * @dataProvider provideInvalidConstraintOptions + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testThrowsConstraintExceptionIfNoValueOrProperty($options) + { + $this->createConstraint($options); + } + + /** + * @dataProvider provideAllValidComparisons + * + * @param mixed $dirtyValue + * @param mixed $comparisonValue + */ + public function testValidComparisonToValue($dirtyValue, $comparisonValue) + { + $constraint = $this->createConstraint(array('value' => $comparisonValue)); + + $this->validator->validate($dirtyValue, $constraint); + + $this->assertNoViolation(); + } + + /** + * @return array + */ + public function provideAllValidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideValidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideValidComparisons(); + + /** + * @dataProvider provideAllInvalidComparisons + * + * @param mixed $dirtyValue + * @param mixed $dirtyValueAsString + * @param mixed $comparedValue + * @param mixed $comparedValueString + * @param string $comparedValueType + */ + public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + if ($dirtyValue instanceof \DateTime || $dirtyValue instanceof \DateTimeInterface) { + IntlTestHelper::requireIntl($this, '57.1'); + + 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) + ->setCode($this->getErrorCode()) + ->assertRaised(); + } + + /** + * @return array + */ + public function provideAllInvalidComparisons() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $comparisons = self::addPhp5Dot5Comparisons($this->provideInvalidComparisons()); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * @return array + */ + abstract public function provideInvalidComparisons(); + + /** + * @param array|null $options Options for the constraint + * + * @return Constraint + */ + abstract protected function createConstraint(array $options = null); + + /** + * @return string|null + */ + protected function getErrorCode() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php new file mode 100644 index 0000000..fe505c0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -0,0 +1,441 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\ConstraintValidatorInterface; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\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; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractConstraintValidatorTest extends TestCase +{ + /** + * @var ExecutionContextInterface + */ + protected $context; + + /** + * @var ConstraintValidatorInterface + */ + protected $validator; + + protected $group; + protected $metadata; + protected $object; + protected $value; + protected $root; + protected $propertyPath; + protected $constraint; + protected $defaultTimezone; + + protected function setUp() + { + $this->group = 'MyGroup'; + $this->metadata = null; + $this->object = null; + $this->value = 'InvalidValue'; + $this->root = 'root'; + $this->propertyPath = 'property.path'; + + // Initialize the context with some constraint so that we can + // successfully build a violation. + $this->constraint = new NotNull(); + + $this->context = $this->createContext(); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + \Locale::setDefault('en'); + + $this->setDefaultTimezone('UTC'); + } + + protected function tearDown() + { + $this->restoreDefaultTimezone(); + } + + protected function setDefaultTimezone($defaultTimezone) + { + // Make sure this method can not be called twice before calling + // also restoreDefaultTimezone() + if (null === $this->defaultTimezone) { + $this->defaultTimezone = date_default_timezone_get(); + date_default_timezone_set($defaultTimezone); + } + } + + protected function restoreDefaultTimezone() + { + if (null !== $this->defaultTimezone) { + date_default_timezone_set($this->defaultTimezone); + $this->defaultTimezone = null; + } + } + + protected function createContext() + { + $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); + $contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + + 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->getMockBuilder('Symfony\Component\Validator\MetadataFactoryInterface')->getMock(), + $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(), $this->isInstanceOf('\Symfony\Component\Validator\Constraints\Valid')), $group); + } + + protected function expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null) + { + $contextualValidator = $this->context->getValidator()->inContext($this->context); + $contextualValidator->expects($this->at(2 * $i)) + ->method('atPath') + ->with($propertyPath) + ->will($this->returnValue($contextualValidator)); + $contextualValidator->expects($this->at(2 * $i + 1)) + ->method('validate') + ->with($value, $constraints, $group); + } + + protected function assertNoViolation() + { + $this->assertSame(0, $violationsCount = \count($this->context->getViolations()), sprintf('0 violation expected. Got %u.', $violationsCount)); + } + + /** + * @param 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 Symfony 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 Symfony 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()); + + Assert::assertSame($expectedCount = \count($expected), $violationsCount = \count($violations), sprintf('%u violation(s) expected. Got %u.', $expectedCount, $violationsCount)); + + reset($violations); + + foreach ($expected as $violation) { + Assert::assertEquals($violation, current($violations)); + next($violations); + } + } + + private function getViolation() + { + return new ConstraintViolation( + null, + $this->message, + $this->parameters, + $this->context->getRoot(), + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php new file mode 100644 index 0000000..25e71a1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class AllTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new All(array( + 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new All(array( + new Valid(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php new file mode 100644 index 0000000..57dd600 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\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))), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php new file mode 100644 index 0000000..0646e44 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BicValidatorTest.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\Bic; +use Symfony\Component\Validator\Constraints\BicValidator; + +class BicValidatorTest extends AbstractConstraintValidatorTest +{ + protected function createValidator() + { + return new BicValidator(); + } + + public function testNullIsValid() + { + $this->validator->validate(null, new Bic()); + + $this->assertNoViolation(); + } + + public function testEmptyStringIsValid() + { + $this->validator->validate('', new Bic()); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getValidBics + */ + public function testValidBics($bic) + { + $this->validator->validate($bic, new Bic()); + + $this->assertNoViolation(); + } + + public function getValidBics() + { + // http://formvalidation.io/validators/bic/ + return array( + array('ASPKAT2LXXX'), + array('ASPKAT2L'), + array('DSBACNBXSHA'), + array('UNCRIT2B912'), + array('DABADKKK'), + array('RZOOAT2L303'), + ); + } + + /** + * @dataProvider getInvalidBics + */ + public function testInvalidBics($bic, $code) + { + $constraint = new Bic(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($bic, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$bic.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidBics() + { + return array( + array('DEUTD', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LX', Bic::INVALID_LENGTH_ERROR), + array('ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR), + array('DABADKK', Bic::INVALID_LENGTH_ERROR), + array('1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR), + array('D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR), + array('DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + array('DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR), + + // branch code error + array('THISSVAL1D]', Bic::INVALID_CHARACTERS_ERROR), + + // location code error + array('DEUTDEF]', Bic::INVALID_CHARACTERS_ERROR), + + // lower case values are invalid + array('DeutAT2LXXX', Bic::INVALID_CASE_ERROR), + array('DEUTAT2lxxx', Bic::INVALID_CASE_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php new file mode 100644 index 0000000..17d8bfb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\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) + ->setCode(Blank::NOT_BLANK_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('foobar', '"foobar"'), + array(0, '0'), + array(false, 'false'), + array(1234, '1234'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php new file mode 100644 index 0000000..e87c9c4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CallbackValidatorTest.php @@ -0,0 +1,351 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\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(); + } + + /** + * @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(); + } + + /** + * @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(); + } + + /** + * @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(); + } + + /** + * @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(); + } + + /** + * @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(); + } + + /** + * @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() + { + $constraint = new Callback(); + + $this->assertSame(array(Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT), $constraint->getTargets()); + } + + 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php new file mode 100644 index 0000000..22c9644 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CardSchemeValidatorTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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('MASTERCARD', '2221005555554444'), + array('MASTERCARD', '2230000000000000'), + array('MASTERCARD', '2300000000000000'), + array('MASTERCARD', '2699999999999999'), + array('MASTERCARD', '2709999999999999'), + array('MASTERCARD', '2720995105105100'), + array('VISA', '4111111111111111'), + array('VISA', '4012888888881881'), + array('VISA', '4222222222222'), + array('VISA', '4917610000000000003'), + array(array('AMEX', 'VISA'), '4111111111111111'), + array(array('AMEX', 'VISA'), '378282246310005'), + array(array('JCB', 'MASTERCARD'), '5105105105105100'), + array(array('VISA', 'MASTERCARD'), '5105105105105100'), + ); + } + + public function getInvalidNumbers() + { + return array( + array('VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '357298508610146', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '31569309025904', CardScheme::INVALID_FORMAT_ERROR), + array('DINERS', '37088894118515', CardScheme::INVALID_FORMAT_ERROR), + array('INSTAPAYMENT', '6313440808445746', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '622888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('CHINA_UNIONPAY', '62288888888888888888', CardScheme::INVALID_FORMAT_ERROR), + array('AMEX', '30569309025904', CardScheme::INVALID_FORMAT_ERROR), // DINERS number + array('AMEX', 'invalid', CardScheme::NOT_NUMERIC_ERROR), // A string + array('AMEX', 0, CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '0', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('AMEX', '000000000000', CardScheme::INVALID_FORMAT_ERROR), // a lone number + array('DINERS', '3056930', CardScheme::INVALID_FORMAT_ERROR), // only first part of the number + array('DISCOVER', '1117', CardScheme::INVALID_FORMAT_ERROR), // only last 4 digits + array('MASTERCARD', '2721001234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + array('MASTERCARD', '2220991234567890', CardScheme::INVALID_FORMAT_ERROR), // Not assigned yet + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php new file mode 100644 index 0000000..b515b84 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php new file mode 100644 index 0000000..b5fbf6c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\Optional; +use Symfony\Component\Validator\Constraints\Required; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class CollectionTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectInvalidFieldsOption() + { + new Collection(array( + 'fields' => 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new Collection(array( + 'foo' => 'bar', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new Collection(array( + 'foo' => new Valid(), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinOptional() + { + new Collection(array( + 'foo' => new Optional(new Valid()), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraintWithinRequired() + { + new Collection(array( + 'foo' => new Required(new Valid()), + )); + } + + public function testAcceptOptionalConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Optional(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Optional(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } + + public function testAcceptRequiredConstraintAsOneElementArray() + { + $collection1 = new Collection(array( + 'fields' => array( + 'alternate_email' => array( + new Required(new Email()), + ), + ), + )); + + $collection2 = new Collection(array( + 'fields' => array( + 'alternate_email' => new Required(new Email()), + ), + )); + + $this->assertEquals($collection1, $collection2); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php new file mode 100644 index 0000000..a3c4b33 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayObjectTest.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +class CollectionValidatorArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new \ArrayObject($contents); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php new file mode 100644 index 0000000..7517d0c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorArrayTest.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +class CollectionValidatorArrayTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return $contents; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php new file mode 100644 index 0000000..3d4c296 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorCustomArrayObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\CustomArrayObject; + +class CollectionValidatorCustomArrayObjectTest extends CollectionValidatorTest +{ + public function prepareTestData(array $contents) + { + return new CustomArrayObject($contents); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php new file mode 100644 index 0000000..0376814 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php @@ -0,0 +1,389 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php new file mode 100644 index 0000000..df42550 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CompositeTest.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Composite; +use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Valid; + +class ConcreteComposite extends Composite +{ + public $constraints; + + protected function getCompositeOption() + { + return 'constraints'; + } + + public function getDefaultOption() + { + return 'constraints'; + } +} + +/** + * @author Bernhard Schussek + */ +class CompositeTest extends TestCase +{ + public function testMergeNestedGroupsIfNoExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => array('Default', 'Strict'))), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testSetImplicitNestedGroupsIfExplicitParentGroup() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(), + new NotBlank(), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Default', 'Strict'), $constraint->constraints[1]->groups); + } + + public function testExplicitNestedGroupsMustBeSubsetOfExplicitParentGroups() + { + $constraint = new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + ), + 'groups' => array('Default', 'Strict'), + )); + + $this->assertEquals(array('Default', 'Strict'), $constraint->groups); + $this->assertEquals(array('Default'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfExplicitNestedGroupsNotSubsetOfExplicitParentGroups() + { + new ConcreteComposite(array( + 'constraints' => array( + new NotNull(array('groups' => array('Default', 'Foobar'))), + ), + 'groups' => array('Default', 'Strict'), + )); + } + + public function testImplicitGroupNamesAreForwarded() + { + $constraint = new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new NotBlank(array('groups' => 'Strict')), + )); + + $constraint->addImplicitGroupName('ImplicitGroup'); + + $this->assertEquals(array('Default', 'Strict', 'ImplicitGroup'), $constraint->groups); + $this->assertEquals(array('Default', 'ImplicitGroup'), $constraint->constraints[0]->groups); + $this->assertEquals(array('Strict'), $constraint->constraints[1]->groups); + } + + public function testSingleConstraintsAccepted() + { + $nestedConstraint = new NotNull(); + $constraint = new ConcreteComposite($nestedConstraint); + + $this->assertEquals(array($nestedConstraint), $constraint->constraints); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfNoConstraint() + { + new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + 'NotBlank', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testFailIfNoConstraintObject() + { + new ConcreteComposite(array( + new NotNull(array('groups' => 'Default')), + new \ArrayObject(), + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testValidCantBeNested() + { + new ConcreteComposite(array( + new Valid(), + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php new file mode 100644 index 0000000..5f562e7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorArrayTest.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +/** + * @author Bernhard Schussek + */ +class CountValidatorArrayTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return $content; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php new file mode 100644 index 0000000..7d46967 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorCountableTest.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Tests\Fixtures\Countable; + +/** + * @author Bernhard Schussek + */ +class CountValidatorCountableTest extends CountValidatorTest +{ + protected function createCollection(array $content) + { + return new Countable($content); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php new file mode 100644 index 0000000..5c89c85 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountValidatorTest.php @@ -0,0 +1,203 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php new file mode 100644 index 0000000..4baee3e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CountryValidatorTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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.'"') + ->setCode(Country::NO_SUCH_COUNTRY_ERROR) + ->assertRaised(); + } + + public function getInvalidCountries() + { + return array( + array('foobar'), + array('EN'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + // in order to test with "en_GB" + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('en_GB'); + + $existingCountry = 'GB'; + + $this->validator->validate($existingCountry, new Country()); + + $this->assertNoViolation(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php new file mode 100644 index 0000000..1c11a6b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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, false); + + \Locale::setDefault('en_GB'); + + $this->validator->validate($currency, new Currency()); + + $this->assertNoViolation(); + } + + public function getValidCurrencies() + { + return array( + array('EUR'), + array('USD'), + array('SIT'), + array('AUD'), + array('CAD'), + ); + } + + /** + * @dataProvider getInvalidCurrencies + */ + public function testInvalidCurrencies($currency) + { + $constraint = new Currency(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($currency, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$currency.'"') + ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) + ->assertRaised(); + } + + public function getInvalidCurrencies() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php new file mode 100644 index 0000000..25d88aa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateTimeValidatorTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php new file mode 100644 index 0000000..21f0a2d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php new file mode 100644 index 0000000..5933bd5 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Email; +use Symfony\Component\Validator\Constraints\EmailValidator; +use Symfony\Component\Validator\Validation; + +/** + * @group dns-sensitive + */ +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(); + } + + /** + * @dataProvider getDnsChecks + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testDnsChecks($type, $violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? false : $type)))); + + $constraint = new Email(array( + 'message' => 'myMessage', + 'MX' === $type ? 'checkMX' : 'checkHost' => true, + )); + + $this->validator->validate('foo@example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"foo@example.com"') + ->setCode($violation) + ->assertRaised(); + } + } + + public function getDnsChecks() + { + return array( + array('MX', false), + array('MX', Email::MX_CHECK_FAILED_ERROR), + array('A', false), + array('A', Email::HOST_CHECK_FAILED_ERROR), + array('AAAA', false), + array('AAAA', Email::HOST_CHECK_FAILED_ERROR), + ); + } + + /** + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testHostnameIsProperlyParsed() + { + DnsMock::withMockedHosts(array('baz.com' => array(array('type' => 'MX')))); + + $this->validator->validate( + '"foo@bar"@baz.com', + new Email(array('checkMX' => true)) + ); + + $this->assertNoViolation(); + } + + /** + * @dataProvider provideCheckTypes + */ + public function testEmptyHostIsNotValid($checkType, $violation) + { + $this->validator->validate( + 'foo@bar.fr@', + new Email(array( + 'message' => 'myMessage', + $checkType => true, + )) + ); + + $this + ->buildViolation('myMessage') + ->setParameter('{{ value }}', '"foo@bar.fr@"') + ->setCode($violation) + ->assertRaised(); + } + + public function provideCheckTypes() + { + return array( + array('checkMX', Email::MX_CHECK_FAILED_ERROR), + array('checkHost', Email::HOST_CHECK_FAILED_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php new file mode 100644 index 0000000..32c81c3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/EqualToValidatorTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 = null) + { + return new EqualTo($options); + } + + protected function getErrorCode() + { + return EqualTo::NOT_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 3), + array(3, '3'), + array('a', 'a'), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array('22', '"22"', '333', '"333"', 'string'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01'), 'Jan 1, 2001, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2001-01-01 UTC'), 'Jan 1, 2001, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php new file mode 100644 index 0000000..ee287c9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ExpressionValidatorTest.php @@ -0,0 +1,279 @@ + + * + * 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\Tests\Fixtures\ToString; +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') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionIsEvaluatedWithEmptyStringValue() + { + $constraint = new Expression(array( + 'expression' => 'false', + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtObjectLevel() + { + $constraint = new Expression('this.data == 1'); + + $object = new Entity(); + $object->data = '1'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtObjectLevel() + { + $constraint = new Expression(array( + 'expression' => 'this.data == 1', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '2'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'object') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtObjectLevelWithToString() + { + $constraint = new Expression('this.data == 1'); + + $object = new ToString(); + $object->data = '1'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtObjectLevelWithToString() + { + $constraint = new Expression(array( + 'expression' => 'this.data == 1', + 'message' => 'myMessage', + )); + + $object = new ToString(); + $object->data = '2'; + + $this->setObject($object); + + $this->validator->validate($object, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'toString') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $this->setRoot($object); + $this->setPropertyPath('data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testSucceedingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression('value == this.data'); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + public function testFailingExpressionAtNestedPropertyLevel() + { + $constraint = new Expression(array( + 'expression' => 'value == this.data', + 'message' => 'myMessage', + )); + + $object = new Entity(); + $object->data = '1'; + + $root = new Entity(); + $root->reference = $object; + + $this->setRoot($root); + $this->setPropertyPath('reference.data'); + $this->setProperty($object, 'data'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('reference.data') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testSucceedingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression('value == "1"'); + + $this->setRoot('1'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('1', $constraint); + + $this->assertNoViolation(); + } + + /** + * When validatePropertyValue() is called with a class name + * https://github.com/symfony/symfony/pull/11498. + */ + public function testFailingExpressionAtPropertyLevelWithoutRoot() + { + $constraint = new Expression(array( + 'expression' => 'value == "1"', + 'message' => 'myMessage', + )); + + $this->setRoot('2'); + $this->setPropertyPath(''); + $this->setProperty(null, 'property'); + + $this->validator->validate('2', $constraint); + + $this->buildViolation('myMessage') + ->atPath('') + ->setParameter('{{ value }}', '"2"') + ->setCode(Expression::EXPRESSION_FAILED_ERROR) + ->assertRaised(); + } + + public function testExpressionLanguageUsage() + { + $constraint = new Expression(array( + 'expression' => 'false', + )); + + $expressionLanguage = $this->getMockBuilder('Symfony\Component\ExpressionLanguage\ExpressionLanguage')->getMock(); + + $used = false; + + $expressionLanguage->method('evaluate') + ->will($this->returnCallback(function () use (&$used) { + $used = true; + + return true; + })); + + $validator = new ExpressionValidator(null, $expressionLanguage); + $validator->initialize($this->createContext()); + $validator->validate(null, $constraint); + + $this->assertTrue($used, 'Failed asserting that custom ExpressionLanguage instance is used.'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php new file mode 100644 index 0000000..b7745f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\File; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; + +class FileTest extends TestCase +{ + /** + * @dataProvider provideValidSizes + */ + public function testMaxSize($maxSize, $bytes, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize)); + + $this->assertSame($bytes, $file->maxSize); + $this->assertSame($binaryFormat, $file->binaryFormat); + $this->assertTrue($file->__isset('maxSize')); + } + + public function testMagicIsset() + { + $file = new File(array('maxSize' => 1)); + + $this->assertTrue($file->__isset('maxSize')); + $this->assertTrue($file->__isset('groups')); + $this->assertFalse($file->__isset('toto')); + } + + /** + * @dataProvider provideValidSizes + */ + 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 + */ + public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + $file->maxSize = $maxSize; + } + + /** + * @dataProvider provideInvalidSizes + */ + public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize) + { + $file = new File(array('maxSize' => 1000)); + + try { + $file->maxSize = $maxSize; + } catch (ConstraintDefinitionException $e) { + } + + $this->assertSame(1000, $file->maxSize); + } + + /** + * @dataProvider provideInValidSizes + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testInvalidMaxSize($maxSize) + { + new File(array('maxSize' => $maxSize)); + } + + 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), + ); + } + + public function provideInvalidSizes() + { + return array( + array('+100'), + array('foo'), + array('1Ko'), + array('1kio'), + array('1G'), + array('1Gi'), + ); + } + + /** + * @dataProvider provideFormats + */ + public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat) + { + $file = new File(array('maxSize' => $maxSize, 'binaryFormat' => $guessedFormat)); + + $this->assertSame($binaryFormat, $file->binaryFormat); + } + + public function provideFormats() + { + return array( + array(100, null, false), + array(100, true, true), + array(100, false, false), + array('100K', null, false), + array('100K', true, true), + array('100K', false, false), + array('100Ki', null, true), + array('100Ki', true, true), + array('100Ki', false, false), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php new file mode 100644 index 0000000..f35f93b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorObjectTest.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\HttpFoundation\File\File; + +class FileValidatorObjectTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return new File($filename); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php new file mode 100644 index 0000000..11b8d4c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\File; + +class FileValidatorPathTest extends FileValidatorTest +{ + protected function getFile($filename) + { + return $filename; + } + + public function testFileNotFound() + { + $constraint = new File(array( + 'notFoundMessage' => 'myMessage', + )); + + $this->validator->validate('foobar', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ file }}', '"foobar"') + ->setCode(File::NOT_FOUND_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php new file mode 100644 index 0000000..6e2199c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/FileValidatorTest.php @@ -0,0 +1,483 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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'); + + // access FileValidator::factorizeSizes() private method to format max file size + $reflection = new \ReflectionClass(\get_class(new FileValidator())); + $method = $reflection->getMethod('factorizeSizes'); + $method->setAccessible(true); + list($sizeAsString, $limit, $suffix) = $method->invokeArgs(new FileValidator(), array(0, UploadedFile::getMaxFilesize(), false)); + + // 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 }}' => $limit, + '{{ suffix }}' => $suffix, + ), '1000M'); + + // it correctly parses the maxSize option and not only uses simple string comparison + // 1000M should be bigger than the ini value + $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array( + '{{ limit }}' => '0.1', + '{{ suffix }}' => 'MB', + ), '100K'); + } + + return $tests; + } + + abstract protected function getFile($filename); +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/foo new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif new file mode 100644 index 0000000..6b44fc7 Binary files /dev/null and b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test.gif differ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif new file mode 100644 index 0000000..64dd3ff Binary files /dev/null and b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_4by3.gif differ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif new file mode 100644 index 0000000..8701235 Binary files /dev/null and b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_landscape.gif differ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif new file mode 100644 index 0000000..cc480ca Binary files /dev/null and b/public/system/storage/vendor/symfony/validator/Tests/Constraints/Fixtures/test_portrait.gif differ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php new file mode 100644 index 0000000..2a8bcb3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 = null) + { + return new GreaterThanOrEqual($options); + } + + protected function getErrorCode() + { + return GreaterThanOrEqual::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(3, 2), + array(1, 1), + array(new \DateTime('2010/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2000/01/01'), new \DateTime('2000/01/01')), + array(new \DateTime('2010/01/01'), '2000/01/01'), + array(new \DateTime('2000/01/01'), '2000/01/01'), + array(new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'), + array(new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'), + array('a', 'a'), + array('z', 'a'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array('b', '"b"', 'c', '"c"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php new file mode 100644 index 0000000..8e763fb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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 = null) + { + return new GreaterThan($options); + } + + protected function getErrorCode() + { + return GreaterThan::TOO_LOW_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(2, 1), + array(new \DateTime('2005/01/01'), new \DateTime('2001/01/01')), + array(new \DateTime('2005/01/01'), '2001/01/01'), + array(new \DateTime('2005/01/01 UTC'), '2001/01/01 UTC'), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(4)), + array('333', '22'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(1, '1', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2000/01/01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), + array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000/01/01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(4), '4', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('22', '"22"', '333', '"333"', 'string'), + array('22', '"22"', '22', '"22"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php new file mode 100644 index 0000000..2b906a9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/GroupSequenceTest.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\GroupSequence; + +/** + * @author Bernhard Schussek + */ +class GroupSequenceTest extends TestCase +{ + public function testCreate() + { + $sequence = new GroupSequence(array('Group 1', 'Group 2')); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } + + public function testCreateDoctrineStyle() + { + $sequence = new GroupSequence(array('value' => array('Group 1', 'Group 2'))); + + $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); + } + + /** + * @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->assertArrayHasKey(0, $sequence); + $this->assertArrayNotHasKey(2, $sequence); + unset($sequence[0]); + $this->assertArrayNotHasKey(0, $sequence); + $sequence[] = 'Group 3'; + $this->assertArrayHasKey(2, $sequence); + $this->assertSame('Group 3', $sequence[2]); + $sequence[0] = 'Group 1'; + $this->assertArrayHasKey(0, $sequence); + $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]); + + $this->assertCount(2, $sequence); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php new file mode 100644 index 0000000..16bf834 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php @@ -0,0 +1,450 @@ + + * + * 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('BY 13 NBRB 3600 900000002Z00AB00'), //Belarus + array('BY13 NBRB 3600 900000002Z00AB00'), //Belarus + array('BY22NB23324232T78YR7823HR32U'), //Belarus + 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 + // https://www.swift.com/sites/default/files/resources/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('CR05015202001026284066'), //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('UA213223130000026007233566001'), //Ukraine + 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('BY 13 NBRB 3600 900000002Z00AB001'), //Belarus + array('BY 13 NBRB 3600 900000002Z00AB0'), //Belarus + array('BYRO NBRB 3600 900000002Z00AB0'), //Belarus + array('BY 13 3600 NBRB 900000002Z00AB05'), //Belarus + 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('CR0515202001026284066'), //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('UA21AAAA1300000260072335660012'), //Ukraine + 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('BY90 NBRB 3600 900000002Z00AB00'), //Belarus + 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('CR96042332432534543564'), //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('UA213223130000026007233566002'), //Ukraine + array('AE260211000000230064017'), //United Arab Emirates + ); + } + + /** + * @dataProvider getUnsupportedCountryCodes + */ + public function testIbansWithUnsupportedCountryCode($countryCode) + { + $this->assertViolationRaised($countryCode.'260211000000230064016', Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR); + } + + public function getUnsupportedCountryCodes() + { + return array( + array('AG'), + array('AI'), + array('AQ'), + array('AS'), + array('AW'), + ); + } + + public function testIbansWithInvalidCharacters() + { + $this->assertViolationRaised('CH930076201162385295]', Iban::INVALID_CHARACTERS_ERROR); + } + + /** + * @dataProvider getIbansWithInvalidCountryCode + */ + public function testIbansWithInvalidCountryCode($iban) + { + $this->assertViolationRaised($iban, Iban::INVALID_COUNTRY_CODE_ERROR); + } + + public function getIbansWithInvalidCountryCode() + { + return array( + array('0750447346'), + array('2X0750447346'), + array('A20750447346'), + ); + } + + private function assertViolationRaised($iban, $code) + { + $constraint = new Iban(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($iban, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$iban.'"') + ->setCode($code) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php new file mode 100644 index 0000000..4999919 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 = null) + { + return new IdenticalTo($options); + } + + protected function getErrorCode() + { + return IdenticalTo::NOT_IDENTICAL_ERROR; + } + + public function provideAllValidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideValidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, 3), + array('a', 'a'), + array($date, $date), + array($object, $object), + array(null, 1), + ); + + 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'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php new file mode 100644 index 0000000..4605a06 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php @@ -0,0 +1,332 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php new file mode 100644 index 0000000..bcb5f59 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IpValidatorTest.php @@ -0,0 +1,456 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace 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.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV4() + { + return array( + array('0'), + array('0.0'), + array('0.0.0'), + array('256.0.0.0'), + array('0.256.0.0'), + array('0.0.256.0'), + array('0.0.0.256'), + array('-1.0.0.0'), + array('foobar'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV4 + */ + public function testInvalidPrivateIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV4() + { + return array( + array('10.0.0.0'), + array('172.16.0.0'), + array('192.168.1.0'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV4 + */ + public function testInvalidReservedIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV4() + { + return array( + array('0.0.0.0'), + array('240.0.0.1'), + array('255.255.255.255'), + ); + } + + /** + * @dataProvider getInvalidPublicIpsV4 + */ + public function testInvalidPublicIpsV4($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V4_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV4() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidReservedIpsV4()); + } + + /** + * @dataProvider getInvalidIpsV6 + */ + public function testInvalidIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsV6() + { + return array( + array('z001:0db8:85a3:0000:0000:8a2e:0370:7334'), + array('fe80'), + array('fe80:8329'), + array('fe80:::202:b3ff:fe1e:8329'), + array('fe80::202:b3ff::fe1e:8329'), + // IPv4 mapped to IPv6 + array('2001:0db8:85a3:0000:0000:8a2e:0370:0.0.0.0'), + array('::0.0'), + array('::0.0.0'), + array('::256.0.0.0'), + array('::0.256.0.0'), + array('::0.0.256.0'), + array('::0.0.0.256'), + ); + } + + /** + * @dataProvider getInvalidPrivateIpsV6 + */ + public function testInvalidPrivateIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsV6() + { + return array( + array('fdfe:dcba:9876:ffff:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:fdc6:c46b:bb8f:7d4c'), + array('fdc6:c46b:bb8f:7d4c:0000:8a2e:0370:7334'), + ); + } + + /** + * @dataProvider getInvalidReservedIpsV6 + */ + public function testInvalidReservedIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsV6() + { + // Quoting after official filter documentation: + // "FILTER_FLAG_NO_RES_RANGE = This flag does not apply to IPv6 addresses." + // Full description: http://php.net/manual/en/filter.filters.flags.php + return $this->getInvalidIpsV6(); + } + + /** + * @dataProvider getInvalidPublicIpsV6 + */ + public function testInvalidPublicIpsV6($ip) + { + $constraint = new Ip(array( + 'version' => Ip::V6_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsV6() + { + return array_merge($this->getInvalidPrivateIpsV6(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidIpsAll + */ + public function testInvalidIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidIpsAll() + { + return array_merge($this->getInvalidIpsV4(), $this->getInvalidIpsV6()); + } + + /** + * @dataProvider getInvalidPrivateIpsAll + */ + public function testInvalidPrivateIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_PRIV, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPrivateIpsAll() + { + return array_merge($this->getInvalidPrivateIpsV4(), $this->getInvalidPrivateIpsV6()); + } + + /** + * @dataProvider getInvalidReservedIpsAll + */ + public function testInvalidReservedIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_NO_RES, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidReservedIpsAll() + { + return array_merge($this->getInvalidReservedIpsV4(), $this->getInvalidReservedIpsV6()); + } + + /** + * @dataProvider getInvalidPublicIpsAll + */ + public function testInvalidPublicIpsAll($ip) + { + $constraint = new Ip(array( + 'version' => Ip::ALL_ONLY_PUBLIC, + 'message' => 'myMessage', + )); + + $this->validator->validate($ip, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$ip.'"') + ->setCode(Ip::INVALID_IP_ERROR) + ->assertRaised(); + } + + public function getInvalidPublicIpsAll() + { + return array_merge($this->getInvalidPublicIpsV4(), $this->getInvalidPublicIpsV6()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php new file mode 100644 index 0000000..46cadec --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsFalseValidatorTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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') + ->setCode(IsFalse::NOT_FALSE_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php new file mode 100644 index 0000000..5a55753 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsNullValidatorTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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) + ->setCode(IsNull::NOT_NULL_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(0, '0'), + array(false, 'false'), + array(true, 'true'), + array('', '""'), + array('foo bar', '"foo bar"'), + array(new \DateTime(), 'object'), + array(new \stdClass(), 'object'), + array(array(), 'array'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php new file mode 100644 index 0000000..1c5927d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsTrueValidatorTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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') + ->setCode(IsTrue::NOT_TRUE_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php new file mode 100644 index 0000000..314739f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IsbnValidatorTest.php @@ -0,0 +1,271 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php new file mode 100644 index 0000000..a6d3994 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/IssnValidatorTest.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php new file mode 100644 index 0000000..d9bd4d0 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LanguageValidatorTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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.'"') + ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) + ->assertRaised(); + } + + public function getInvalidLanguages() + { + return array( + array('EN'), + array('foobar'), + ); + } + + public function testValidateUsingCountrySpecificLocale() + { + IntlTestHelper::requireFullIntl($this, false); + + \Locale::setDefault('fr_FR'); + $existingLanguage = 'en'; + + $this->validator->validate($existingLanguage, new Language(array( + 'message' => 'aMessage', + ))); + + $this->assertNoViolation(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php new file mode 100644 index 0000000..cd50181 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LengthValidatorTest.php @@ -0,0 +1,252 @@ + + * + * 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('éééééé'), + ); + } + + public function getOneCharset() + { + return array( + array('é', 'utf8', true), + array("\xE9", 'CP1252', true), + array("\xE9", 'XXX', false), + array("\xE9", 'utf8', false), + ); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testValidValuesMin($value) + { + $constraint = new Length(array('min' => 5)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testValidValuesMax($value) + { + $constraint = new Length(array('max' => 3)); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getFourCharacters + */ + public function testValidValuesExact($value) + { + $constraint = new Length(4); + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesMin($value) + { + $constraint = new Length(array( + 'min' => 4, + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesMax($value) + { + $constraint = new Length(array( + 'max' => 4, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getThreeOrLessCharacters + */ + public function testInvalidValuesExactLessThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_SHORT_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getFiveOrMoreCharacters + */ + public function testInvalidValuesExactMoreThanFour($value) + { + $constraint = new Length(array( + 'min' => 4, + 'max' => 4, + 'exactMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ limit }}', 4) + ->setInvalidValue($value) + ->setPlural(4) + ->setCode(Length::TOO_LONG_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getOneCharset + */ + public function testOneCharset($value, $charset, $isValid) + { + $constraint = new Length(array( + 'min' => 1, + 'max' => 1, + 'charset' => $charset, + 'charsetMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + if ($isValid) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$value.'"') + ->setParameter('{{ charset }}', $charset) + ->setInvalidValue($value) + ->setCode(Length::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } + } + + public function testConstraintGetDefaultOption() + { + $constraint = new Length(5); + + $this->assertEquals(5, $constraint->min); + $this->assertEquals(5, $constraint->max); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php new file mode 100644 index 0000000..84f150b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanOrEqualValidatorTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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 = null) + { + return new LessThanOrEqual($options); + } + + protected function getErrorCode() + { + return LessThanOrEqual::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(1, 1), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2020-01-01')), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2020-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(new \DateTime('2000-01-01 UTC'), '2020-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array(new ComparisonTest_Class(5), new ComparisonTest_Class(5)), + array('a', 'a'), + array('a', 'z'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(2, '2', 1, '1', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(4), '4', __NAMESPACE__.'\ComparisonTest_Class'), + array('c', '"c"', 'b', '"b"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php new file mode 100644 index 0000000..da2885f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LessThanValidatorTest.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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 = null) + { + return new LessThan($options); + } + + protected function getErrorCode() + { + return LessThan::TOO_HIGH_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array(new \DateTime('2000-01-01'), new \DateTime('2010-01-01')), + array(new \DateTime('2000-01-01'), '2010-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2010-01-01 UTC'), + array(new ComparisonTest_Class(4), new ComparisonTest_Class(5)), + array('22', '333'), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 2, '2', 'integer'), + array(2, '2', 2, '2', 'integer'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01'), 'Jan 1, 2010, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2010-01-01 UTC'), 'Jan 1, 2010, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array(new ComparisonTest_Class(6), '6', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + array('333', '"333"', '22', '"22"', 'string'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php new file mode 100644 index 0000000..c028596 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LocaleValidatorTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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'), + array('fil_PH'), + ); + } + + /** + * @dataProvider getInvalidLocales + */ + public function testInvalidLocales($locale) + { + $constraint = new Locale(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($locale, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$locale.'"') + ->setCode(Locale::NO_SUCH_LOCALE_ERROR) + ->assertRaised(); + } + + public function getInvalidLocales() + { + return array( + array('EN'), + array('foobar'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php new file mode 100644 index 0000000..b0e88c3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/LuhnValidatorTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php new file mode 100644 index 0000000..c7c081a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotBlankValidatorTest.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testBlankIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate('', $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '""') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testFalseIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(false, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'false') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } + + public function testEmptyArrayIsInvalid() + { + $constraint = new NotBlank(array( + 'message' => 'myMessage', + )); + + $this->validator->validate(array(), $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', 'array') + ->setCode(NotBlank::IS_BLANK_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php new file mode 100644 index 0000000..a797762 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 = null) + { + return new NotEqualTo($options); + } + + protected function getErrorCode() + { + return NotEqualTo::IS_EQUAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01 UTC'), '2000-01-01 UTC'), + array(new ComparisonTest_Class(6), new ComparisonTest_Class(5)), + array(null, 1), + ); + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + return array( + array(3, '3', 3, '3', 'integer'), + array('2', '"2"', 2, '2', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01'), 'Jan 1, 2000, 12:00 AM', '2000-01-01', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new \DateTime('2000-01-01 UTC'), 'Jan 1, 2000, 12:00 AM', '2000-01-01 UTC', 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array(new ComparisonTest_Class(5), '5', new ComparisonTest_Class(5), '5', __NAMESPACE__.'\ComparisonTest_Class'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php new file mode 100644 index 0000000..16f518f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 = null) + { + return new NotIdenticalTo($options); + } + + protected function getErrorCode() + { + return NotIdenticalTo::IS_IDENTICAL_ERROR; + } + + /** + * {@inheritdoc} + */ + public function provideValidComparisons() + { + return array( + array(1, 2), + array('2', 2), + array('22', '333'), + array(new \DateTime('2001-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2000-01-01'), new \DateTime('2000-01-01')), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01'), '2000-01-01'), + array(new \DateTime('2001-01-01'), '2000-01-01'), + array(new \DateTime('2000-01-01 UTC'), '2000-01-01 UTC'), + array(null, 1), + ); + } + + public function provideAllInvalidComparisons() + { + $this->setDefaultTimezone('UTC'); + + // Don't call addPhp5Dot5Comparisons() automatically, as it does + // not take care of identical objects + $comparisons = $this->provideInvalidComparisons(); + + $this->restoreDefaultTimezone(); + + return $comparisons; + } + + /** + * {@inheritdoc} + */ + public function provideInvalidComparisons() + { + $date = new \DateTime('2000-01-01'); + $object = new ComparisonTest_Class(2); + + $comparisons = array( + array(3, '3', 3, '3', 'integer'), + array('a', '"a"', 'a', '"a"', 'string'), + array($date, 'Jan 1, 2000, 12:00 AM', $date, 'Jan 1, 2000, 12:00 AM', 'DateTime'), + array($object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'), + ); + + return $comparisons; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php new file mode 100644 index 0000000..a244f63 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/NotNullValidatorTest.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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') + ->setParameter('{{ value }}', 'null') + ->setCode(NotNull::IS_NULL_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php new file mode 100644 index 0000000..1093fa4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php @@ -0,0 +1,403 @@ + + * + * 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::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesMax($value, $formattedValue) + { + $constraint = new Range(array( + 'max' => 20, + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getMoreThanTwenty + */ + public function testInvalidValuesCombinedMax($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 20) + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLessThanTen + */ + public function testInvalidValuesCombinedMin($value, $formattedValue) + { + $constraint = new Range(array( + 'min' => 10, + 'max' => 20, + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $formattedValue) + ->setParameter('{{ limit }}', 10) + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getTenthToTwentiethMarch2014() + { + // The provider runs before setUp(), so we need to manually fix + // the default timezone + $this->setDefaultTimezone('UTC'); + + $tests = array( + array(new \DateTime('March 10, 2014')), + array(new \DateTime('March 15, 2014')), + array(new \DateTime('March 20, 2014')), + ); + + 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, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'minMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'max' => 'March 20, 2014', + 'maxMessage' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getLaterThanTwentiethMarch2014 + */ + public function testInvalidDatesCombinedMax($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMaxMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 20, 2014, 12:00 AM') + ->setCode(Range::TOO_HIGH_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getSoonerThanTenthMarch2014 + */ + public function testInvalidDatesCombinedMin($value, $dateTimeAsString) + { + // Conversion of dates to string differs between ICU versions + // Make sure we have the correct version loaded + IntlTestHelper::requireIntl($this, '57.1'); + + $constraint = new Range(array( + 'min' => 'March 10, 2014', + 'max' => 'March 20, 2014', + 'minMessage' => 'myMinMessage', + 'maxMessage' => 'myMaxMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMinMessage') + ->setParameter('{{ value }}', $dateTimeAsString) + ->setParameter('{{ limit }}', 'Mar 10, 2014, 12:00 AM') + ->setCode(Range::TOO_LOW_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array(9.999999), + array(20.000001), + array('9.999999'), + array('20.000001'), + array(new \stdClass()), + ); + } + + public function testNonNumeric() + { + $this->validator->validate('abcd', new Range(array( + 'min' => 10, + 'max' => 20, + 'invalidMessage' => 'myMessage', + ))); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"abcd"') + ->setCode(Range::INVALID_CHARACTERS_ERROR) + ->assertRaised(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php new file mode 100644 index 0000000..26ef1b2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Regex; + +/** + * @author Bernhard Schussek + */ +class RegexTest extends TestCase +{ + public function testConstraintGetDefaultOption() + { + $constraint = new Regex('/^[0-9]+$/'); + + $this->assertSame('/^[0-9]+$/', $constraint->pattern); + } + + public function provideHtmlPatterns() + { + return array( + // HTML5 wraps the pattern in ^(?:pattern)$ + array('/^[0-9]+$/', '[0-9]+'), + array('/[0-9]+$/', '.*[0-9]+'), + array('/^[0-9]+/', '[0-9]+.*'), + array('/[0-9]+/', '.*[0-9]+.*'), + // We need a smart way to allow matching of patterns that contain + // ^ and $ at various sub-clauses of an or-clause + // .*(pattern).* seems to work correctly + array('/[0-9]$|[a-z]+/', '.*([0-9]$|[a-z]+).*'), + array('/[0-9]$|^[a-z]+/', '.*([0-9]$|^[a-z]+).*'), + array('/^[0-9]|[a-z]+$/', '.*(^[0-9]|[a-z]+$).*'), + // Unescape escaped delimiters + array('/^[0-9]+\/$/', '[0-9]+/'), + array('#^[0-9]+\#$#', '[0-9]+#'), + // Cannot be converted + array('/^[0-9]+$/i', null), + + // Inverse matches are simple, just wrap in + // ((?!pattern).)* + array('/^[0-9]+$/', '((?!^[0-9]+$).)*', false), + array('/[0-9]+$/', '((?![0-9]+$).)*', false), + array('/^[0-9]+/', '((?!^[0-9]+).)*', false), + array('/[0-9]+/', '((?![0-9]+).)*', false), + array('/[0-9]$|[a-z]+/', '((?![0-9]$|[a-z]+).)*', false), + array('/[0-9]$|^[a-z]+/', '((?![0-9]$|^[a-z]+).)*', false), + array('/^[0-9]|[a-z]+$/', '((?!^[0-9]|[a-z]+$).)*', false), + array('/^[0-9]+\/$/', '((?!^[0-9]+/$).)*', false), + array('#^[0-9]+\#$#', '((?!^[0-9]+#$).)*', false), + array('/^[0-9]+$/i', null, false), + ); + } + + /** + * @dataProvider provideHtmlPatterns + */ + public function testGetHtmlPattern($pattern, $htmlPattern, $match = true) + { + $constraint = new Regex(array( + 'pattern' => $pattern, + 'match' => $match, + )); + + $this->assertSame($pattern, $constraint->pattern); + $this->assertSame($htmlPattern, $constraint->getHtmlPattern()); + } + + public function testGetCustomHtmlPattern() + { + $constraint = new Regex(array( + 'pattern' => '((?![0-9]$|[a-z]+).)*', + 'htmlPattern' => 'foobar', + )); + + $this->assertSame('((?![0-9]$|[a-z]+).)*', $constraint->pattern); + $this->assertSame('foobar', $constraint->getHtmlPattern()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php new file mode 100644 index 0000000..88e6996 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/RegexValidatorTest.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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.'"') + ->setCode(Regex::REGEX_FAILED_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + return array( + array('abcd'), + array('090foo'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php new file mode 100644 index 0000000..a6ca143 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TimeValidatorTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Component\Validator\Constraints\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), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php new file mode 100644 index 0000000..51bd992 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/TypeValidatorTest.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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') + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + /** + * @dataProvider getValidValues + */ + public function testValidValues($value, $type) + { + $constraint = new Type(array('type' => $type)); + + $this->validator->validate($value, $constraint); + + $this->assertNoViolation(); + } + + public function getValidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array(true, 'Boolean'), + array(false, 'Boolean'), + array(true, 'boolean'), + array(false, 'boolean'), + array(true, 'bool'), + array(false, 'bool'), + array(0, 'numeric'), + array('0', 'numeric'), + array(1.5, 'numeric'), + array('1.5', 'numeric'), + array(0, 'integer'), + array(1.5, 'float'), + array('12345', 'string'), + array(array(), 'array'), + array($object, 'object'), + array($object, 'stdClass'), + array($file, 'resource'), + array('12345', 'digit'), + array('12a34', 'alnum'), + array('abcde', 'alpha'), + array("\n\r\t", 'cntrl'), + array('arf12', 'graph'), + array('abcde', 'lower'), + array('ABCDE', 'upper'), + array('arf12', 'print'), + array('*&$()', 'punct'), + array("\n\r\t", 'space'), + array('AB10BC99', 'xdigit'), + ); + } + + /** + * @dataProvider getInvalidValues + */ + public function testInvalidValues($value, $type, $valueAsString) + { + $constraint = new Type(array( + 'type' => $type, + 'message' => 'myMessage', + )); + + $this->validator->validate($value, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', $valueAsString) + ->setParameter('{{ type }}', $type) + ->setCode(Type::INVALID_TYPE_ERROR) + ->assertRaised(); + } + + public function getInvalidValues() + { + $object = new \stdClass(); + $file = $this->createFile(); + + return array( + array('foobar', 'numeric', '"foobar"'), + array('foobar', 'boolean', '"foobar"'), + array('0', 'integer', '"0"'), + array('1.5', 'float', '"1.5"'), + array(12345, 'string', '12345'), + array($object, 'boolean', 'object'), + array($object, 'numeric', 'object'), + array($object, 'integer', 'object'), + array($object, 'float', 'object'), + array($object, 'string', 'object'), + array($object, 'resource', 'object'), + array($file, 'boolean', 'resource'), + array($file, 'numeric', 'resource'), + array($file, 'integer', 'resource'), + array($file, 'float', 'resource'), + array($file, 'string', 'resource'), + array($file, 'object', 'resource'), + array('12a34', 'digit', '"12a34"'), + array('1a#23', 'alnum', '"1a#23"'), + array('abcd1', 'alpha', '"abcd1"'), + array("\nabc", 'cntrl', "\"\nabc\""), + array("abc\n", 'graph', "\"abc\n\""), + array('abCDE', 'lower', '"abCDE"'), + array('ABcde', 'upper', '"ABcde"'), + array("\nabc", 'print', "\"\nabc\""), + array('abc&$!', 'punct', '"abc&$!"'), + array("\nabc", 'space', "\"\nabc\""), + array('AR1012', 'xdigit', '"AR1012"'), + ); + } + + protected function createFile() + { + if (!static::$file) { + static::$file = fopen(__FILE__, 'r'); + } + + return static::$file; + } + + public static function tearDownAfterClass() + { + if (static::$file) { + fclose(static::$file); + static::$file = null; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php new file mode 100644 index 0000000..bc3bd02 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use Symfony\Bridge\PhpUnit\DnsMock; +use Symfony\Component\Validator\Constraints\Url; +use Symfony\Component\Validator\Constraints\UrlValidator; +use Symfony\Component\Validator\Validation; + +/** + * @group dns-sensitive + */ +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://myhost123/'), + array('http://127.0.0.1/'), + array('http://127.0.0.1:80/'), + array('http://[::1]/'), + array('http://[::1]:80/'), + array('http://[1:2:3::4:5:6:7]/'), + array('http://sãopaulo.com/'), + array('http://xn--sopaulo-xwa.com/'), + array('http://sãopaulo.com.br/'), + array('http://xn--sopaulo-xwa.com.br/'), + array('http://пример.иÑпытание/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f/'), + array('http://مثال.إختبار/'), + array('http://xn--mgbh0fb.xn--kgbechtv/'), + array('http://例å­.测试/'), + array('http://xn--fsqu00a.xn--0zwm56d/'), + array('http://例å­.測試/'), + array('http://xn--fsqu00a.xn--g6w251d/'), + array('http://例ãˆ.テスト/'), + array('http://xn--r8jz45g.xn--zckzah/'), + array('http://مثال.آزمایشی/'), + array('http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'), + array('http://실례.테스트/'), + array('http://xn--9n2bp8q.xn--9t4b11yi5a/'), + array('http://العربية.idn.icann.org/'), + array('http://xn--ogb.idn.icann.org/'), + array('http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'), + array('http://xn--espaa-rta.xn--ca-ol-fsay5a/'), + array('http://xn--d1abbgf6aiiy.xn--p1ai/'), + array('http://☎.com/'), + array('http://username:password@symfony.com'), + array('http://user.name:password@symfony.com'), + array('http://username:pass.word@symfony.com'), + array('http://user.name:pass.word@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'), + array('http://symfony.com/#one_more%20test'), + ); + } + + /** + * @dataProvider getInvalidUrls + */ + public function testInvalidUrls($url) + { + $constraint = new Url(array( + 'message' => 'myMessage', + )); + + $this->validator->validate($url, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$url.'"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + + public function getInvalidUrls() + { + return array( + array('google.com'), + array('://google.com'), + array('http ://google.com'), + array('http:/google.com'), + array('http://goog_le.com'), + array('http://google.com::aa'), + array('http://google.com:aa'), + array('ftp://google.fr'), + array('faked://google.fr'), + array('http://127.0.0.1:aa/'), + array('ftp://[::1]/'), + array('http://[::1'), + array('http://hello.☎/'), + array('http://:password@symfony.com'), + array('http://:password@@symfony.com'), + array('http://username:passwordsymfony.com'), + array('http://usern@me:password@symfony.com'), + array('http://example.com/exploit.html?'), + array('http://example.com/exploit.html?hel lo'), + array('http://example.com/exploit.html?not_a%hex'), + array('http://'), + ); + } + + /** + * @dataProvider getValidCustomUrls + */ + public function testCustomProtocolIsValid($url) + { + $constraint = new Url(array( + 'protocols' => array('ftp', 'file', 'git'), + )); + + $this->validator->validate($url, $constraint); + + $this->assertNoViolation(); + } + + public function getValidCustomUrls() + { + return array( + array('ftp://google.com'), + array('file://127.0.0.1'), + array('git://[::1]/'), + ); + } + + /** + * @dataProvider getCheckDns + * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts + */ + public function testCheckDns($violation) + { + DnsMock::withMockedHosts(array('example.com' => array(array('type' => $violation ? '' : 'A')))); + + $constraint = new Url(array( + 'checkDNS' => true, + 'dnsMessage' => 'myMessage', + )); + + $this->validator->validate('http://example.com', $constraint); + + if (!$violation) { + $this->assertNoViolation(); + } else { + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"example.com"') + ->setCode(Url::INVALID_URL_ERROR) + ->assertRaised(); + } + } + + public function getCheckDns() + { + return array(array(true), array(false)); + } +} + +class EmailProvider +{ + public function __toString() + { + return ''; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php new file mode 100644 index 0000000..05a6068 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php @@ -0,0 +1,221 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 testExpectsUuidConstraintCompatibleType() + { + $constraint = $this->getMockForAbstractClass('Symfony\\Component\\Validator\\Constraint'); + + $this->validator->validate('216fff40-98d9-11e3-a5e2-0800200c9a66', $constraint); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException + */ + public function testExpectsStringCompatibleType() + { + $this->validator->validate(new \stdClass(), new Uuid()); + } + + /** + * @dataProvider getValidStrictUuids + */ + public function testValidStrictUuids($uuid, $versions = null) + { + $constraint = new Uuid(); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216fff40-98d9-11e3-a5e2-0800200c9a66', array(Uuid::V1_MAC)), + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201'), // Version 4 UUID in mixed case + array('456daEFb-5AA6-41B5-8DBC-068B05A8B201', array(Uuid::V4_RANDOM)), + ); + } + + /** + * @dataProvider getInvalidStrictUuids + */ + public function testInvalidStrictUuids($uuid, $code, $versions = null) + { + $constraint = new Uuid(array( + 'message' => 'testMessage', + )); + + if (null !== $versions) { + $constraint->versions = $versions; + } + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('testMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216f-ff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800-200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c-9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff4098d911e3a5e20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + array('216fff40-98d9-01e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-61e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-71e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-81e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-91e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-a1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-b1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-c1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-d1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-e1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-f1e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V2_DCE, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-21e3-a5e2-0800200c9a66', Uuid::INVALID_VERSION_ERROR, array(Uuid::V1_MAC, Uuid::V3_MD5, Uuid::V4_RANDOM, Uuid::V5_SHA1)), + array('216fff40-98d9-11e3-05e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-15e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-25e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-35e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-45e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-55e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-65e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-75e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-c5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-d5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-e5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + array('216fff40-98d9-11e3-f5e2-0800200c9a66', Uuid::INVALID_VARIANT_ERROR), + + // Non-standard UUID allowed by some other systems + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}', Uuid::INVALID_CHARACTERS_ERROR), + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]', Uuid::INVALID_CHARACTERS_ERROR), + ); + } + + /** + * @dataProvider getValidNonStrictUuids + */ + public function testValidNonStrictUuids($uuid) + { + $constraint = new Uuid(array( + 'strict' => false, + )); + + $this->validator->validate($uuid, $constraint); + + $this->assertNoViolation(); + } + + public function getValidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2-0800200c9a66'), // Version 1 UUID in lowercase + array('216FFF40-98D9-11E3-A5E2-0800200C9A66'), // Version 1 UUID in UPPERCASE + array('456daefb-5aa6-41b5-8dbc-068b05a8b201'), // Version 4 UUID in lowercase + array('456DAEFb-5AA6-41B5-8DBC-068b05a8B201'), // Version 4 UUID in mixed case + + // Non-standard UUIDs allowed by some other systems + array('216f-ff40-98d9-11e3-a5e2-0800-200c-9a66'), // Non-standard dash positions (every 4 chars) + array('216fff40-98d911e3-a5e20800-200c9a66'), // Non-standard dash positions (every 8 chars) + array('216fff4098d911e3a5e20800200c9a66'), // No dashes at all + array('{216fff40-98d9-11e3-a5e2-0800200c9a66}'), // Wrapped with curly braces + array('[216fff40-98d9-11e3-a5e2-0800200c9a66]'), // Wrapped with squared braces + ); + } + + /** + * @dataProvider getInvalidNonStrictUuids + */ + public function testInvalidNonStrictUuids($uuid, $code) + { + $constraint = new Uuid(array( + 'strict' => false, + 'message' => 'myMessage', + )); + + $this->validator->validate($uuid, $constraint); + + $this->buildViolation('myMessage') + ->setParameter('{{ value }}', '"'.$uuid.'"') + ->setCode($code) + ->assertRaised(); + } + + public function getInvalidNonStrictUuids() + { + return array( + array('216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216Gff40-98d9-11e3-a5e2-0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e2_0800200c9a6', Uuid::INVALID_CHARACTERS_ERROR), + array('216fff40-98d9-11e3-a5e-20800200c9a66', Uuid::INVALID_HYPHEN_PLACEMENT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a6', Uuid::TOO_SHORT_ERROR), + array('216fff40-98d9-11e3-a5e2-0800200c9a666', Uuid::TOO_LONG_ERROR), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php new file mode 100644 index 0000000..83722fd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Constraints/ValidTest.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class ValidTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectGroupsOption() + { + new Valid(array('groups' => 'foo')); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php new file mode 100644 index 0000000..0f6a2f4 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CallbackClass.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ExecutionContextInterface; + +/** + * @author Bernhard Schussek + */ +class CallbackClass +{ + public static function callback($object, ExecutionContextInterface $context) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php new file mode 100644 index 0000000..a4dc777 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class ClassConstraint extends Constraint +{ + public function getTargets() + { + return self::CLASS_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php new file mode 100644 index 0000000..8a196dc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintA.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintA extends Constraint +{ + public $property1; + public $property2; + + public function getDefaultOption() + { + return 'property2'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php new file mode 100644 index 0000000..b3b85c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintAValidator.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\ExecutionContextInterface; + +class ConstraintAValidator extends ConstraintValidator +{ + public static $passedContext; + + public function initialize(ExecutionContextInterface $context) + { + parent::initialize($context); + + self::$passedContext = $context; + } + + public function validate($value, Constraint $constraint) + { + if ('VALID' != $value) { + $this->context->addViolation('message', array('param' => 'value')); + + return; + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php new file mode 100644 index 0000000..6258923 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintB.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintB extends Constraint +{ + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php new file mode 100644 index 0000000..b0418b8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintC.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintC extends Constraint +{ + public $option1; + + public function getRequiredOptions() + { + return array('option1'); + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php new file mode 100644 index 0000000..4ebd981 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValue.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValue extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'property'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php new file mode 100644 index 0000000..a975e07 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ConstraintWithValueAsDefault.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +/** @Annotation */ +class ConstraintWithValueAsDefault extends Constraint +{ + public $property; + public $value; + + public function getDefaultOption() + { + return 'value'; + } + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php new file mode 100644 index 0000000..afc4237 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Countable.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class Countable implements \Countable +{ + private $content; + + public function __construct(array $content) + { + $this->content = $content; + } + + public function count() + { + return \count($this->content); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php new file mode 100644 index 0000000..feb2531 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/CustomArrayObject.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +/** + * This class is a hand written simplified version of PHP native `ArrayObject` + * class, to show that it behaves differently than the PHP native implementation. + */ +class CustomArrayObject implements \ArrayAccess, \IteratorAggregate, \Countable, \Serializable +{ + private $array; + + public function __construct(array $array = null) + { + $this->array = $array ?: array(); + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new \ArrayIterator($this->array); + } + + public function count() + { + return \count($this->array); + } + + public function serialize() + { + return serialize($this->array); + } + + public function unserialize($serialized) + { + $this->array = (array) unserialize((string) $serialized); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php new file mode 100644 index 0000000..e306191 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Entity.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 EntityInterfaceB +{ + /** + * @Assert\NotNull + * @Assert\Range(min=3) + * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), + * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) + * @Assert\Collection(fields={ + * "foo" = {@Assert\NotNull, @Assert\Range(min=3)}, + * "bar" = @Assert\Range(min=5) + * }) + * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%") + */ + public $firstName; + protected $lastName; + public $reference; + public $reference2; + private $internal; + public $data = 'Overridden data'; + public $initialized = false; + + public function __construct($internal = null) + { + $this->internal = $internal; + } + + public function getInternal() + { + return $this->internal.' from getter'; + } + + public function setLastName($lastName) + { + $this->lastName = $lastName; + } + + /** + * @Assert\NotNull + */ + public function getLastName() + { + return $this->lastName; + } + + public function getValid() + { + } + + /** + * @Assert\IsTrue + */ + public function isValid() + { + return 'valid'; + } + + /** + * @Assert\IsTrue + */ + public function hasPermissions() + { + return 'permissions'; + } + + public function getData() + { + return 'Overridden data'; + } + + /** + * @Assert\Callback(payload="foo") + */ + public function validateMe(ExecutionContextInterface $context) + { + } + + /** + * @Assert\Callback + */ + public static function validateMeStatic($object, ExecutionContextInterface $context) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php new file mode 100644 index 0000000..a0afcf8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceA.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityInterfaceA +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php new file mode 100644 index 0000000..93b3894 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityInterfaceB.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityInterfaceB extends EntityParentInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php new file mode 100644 index 0000000..4674f8b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParent.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\NotNull; + +class EntityParent implements EntityInterfaceA +{ + protected $firstName; + private $internal; + private $data = 'Data'; + + /** + * @NotNull + */ + protected $other; + + public function getData() + { + return 'Data'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php new file mode 100644 index 0000000..3aad6fe --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityParentInterface.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +interface EntityParentInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php new file mode 100644 index 0000000..0b38487 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCar.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticCar extends EntityStaticVehicle +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php new file mode 100644 index 0000000..abf1edb --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticCarTurbo.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticCarTurbo extends EntityStaticCar +{ + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php new file mode 100644 index 0000000..9ce7293 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/EntityStaticVehicle.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class EntityStaticVehicle +{ + public $wheels; + + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('wheels', new Length(array('max' => 99))); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php new file mode 100644 index 0000000..03019fc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraint.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class FailingConstraint extends Constraint +{ + public $message = 'Failed'; + + public function getTargets() + { + return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php new file mode 100644 index 0000000..a019dd6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FailingConstraintValidator.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintValidator; + +class FailingConstraintValidator extends ConstraintValidator +{ + public function validate($value, Constraint $constraint) + { + $this->context->addViolation($constraint->message, array()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php new file mode 100644 index 0000000..8c76a21 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeClassMetadata.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +class FakeClassMetadata extends ClassMetadata +{ + public function addCustomPropertyMetadata($propertyName, $metadata) + { + if (!isset($this->members[$propertyName])) { + $this->members[$propertyName] = array(); + } + + $this->members[$propertyName][] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php new file mode 100644 index 0000000..dbc255f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FakeMetadataFactory.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\MetadataInterface; + +class FakeMetadataFactory implements MetadataFactoryInterface +{ + protected $metadatas = array(); + + public function getMetadataFor($class) + { + $hash = null; + + if (\is_object($class)) { + $hash = spl_object_hash($class); + $class = \get_class($class); + } + + if (!\is_string($class)) { + throw new NoSuchMetadataException(sprintf('No metadata for type %s', \gettype($class))); + } + + if (!isset($this->metadatas[$class])) { + if (isset($this->metadatas[$hash])) { + return $this->metadatas[$hash]; + } + + throw new NoSuchMetadataException(sprintf('No metadata for "%s"', $class)); + } + + return $this->metadatas[$class]; + } + + public function hasMetadataFor($class) + { + $hash = null; + + if (\is_object($class)) { + $hash = spl_object_hash($class); + $class = \get_class($class); + } + + if (!\is_string($class)) { + return false; + } + + return isset($this->metadatas[$class]) || isset($this->metadatas[$hash]); + } + + public function addMetadata($metadata) + { + $this->metadatas[$metadata->getClassName()] = $metadata; + } + + public function addMetadataForValue($value, MetadataInterface $metadata) + { + $key = \is_object($value) ? spl_object_hash($value) : $value; + $this->metadatas[$key] = $metadata; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php new file mode 100644 index 0000000..a4d6a6a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Mapping\Loader\FilesLoader as BaseFilesLoader; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +abstract class FilesLoader extends BaseFilesLoader +{ + protected $timesCalled = 0; + protected $loader; + + public function __construct(array $paths, LoaderInterface $loader) + { + $this->loader = $loader; + parent::__construct($paths); + } + + protected function getFileLoaderInstance($file) + { + ++$this->timesCalled; + + return $this->loader; + } + + public function getTimesCalled() + { + return $this->timesCalled; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php new file mode 100644 index 0000000..be7191f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderChildEntity.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class GroupSequenceProviderChildEntity extends GroupSequenceProviderEntity +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php new file mode 100644 index 0000000..2b0beaf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/GroupSequenceProviderEntity.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\GroupSequenceProviderInterface; + +/** + * @Assert\GroupSequenceProvider + */ +class GroupSequenceProviderEntity implements GroupSequenceProviderInterface +{ + public $firstName; + public $lastName; + + protected $sequence = array(); + + public function __construct($sequence) + { + $this->sequence = $sequence; + } + + public function getGroupSequence() + { + return $this->sequence; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php new file mode 100644 index 0000000..6a9eaa7 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraint.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class InvalidConstraint extends Constraint +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php new file mode 100644 index 0000000..bd9a5cf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/InvalidConstraintValidator.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class InvalidConstraintValidator +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php new file mode 100644 index 0000000..6a832a1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/LegacyClassMetadata.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ClassBasedInterface; +use Symfony\Component\Validator\MetadataInterface; +use Symfony\Component\Validator\PropertyMetadataContainerInterface; + +interface LegacyClassMetadata extends MetadataInterface, PropertyMetadataContainerInterface, ClassBasedInterface +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php new file mode 100644 index 0000000..fadb535 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/PropertyConstraint.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\Constraint; + +class PropertyConstraint extends Constraint +{ + public function getTargets() + { + return self::PROPERTY_CONSTRAINT; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php new file mode 100644 index 0000000..af29735 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/Reference.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class Reference +{ + public $value; + + private $privateValue; + + public function setPrivateValue($privateValue) + { + $this->privateValue = $privateValue; + } + + public function getPrivateValue() + { + return $this->privateValue; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php new file mode 100644 index 0000000..bd2f5c9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/StubGlobalExecutionContext.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\GlobalExecutionContextInterface; +use Symfony\Component\Validator\ValidationVisitorInterface; + +/** + * @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() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php new file mode 100644 index 0000000..714fdb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Fixtures/ToString.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Fixtures; + +class ToString +{ + public $data; + + public function __toString() + { + return 'toString'; + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php b/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php new file mode 100644 index 0000000..1130551 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/LegacyExecutionContextTest.php @@ -0,0 +1,335 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Collection; +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 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->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + $this->metadataFactory = $this->getMockBuilder('Symfony\Component\Validator\MetadataFactoryInterface')->getMock(); + $this->globalContext = $this->getMockBuilder('Symfony\Component\Validator\GlobalExecutionContextInterface')->getMock(); + $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->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock(); + $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; +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php new file mode 100644 index 0000000..a38f1ab --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/LegacyValidatorTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +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()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php new file mode 100644 index 0000000..19b2922 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/DoctrineCacheTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use Doctrine\Common\Cache\ArrayCache; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Cache\DoctrineCache; + +class DoctrineCacheTest extends 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()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php new file mode 100644 index 0000000..7102474 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Cache/LegacyApcCacheTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Cache; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Cache\ApcCache; + +/** + * @group legacy + * @requires extension apc + */ +class LegacyApcCacheTest extends TestCase +{ + protected function setUp() + { + if (!filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) || !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) { + $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'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php new file mode 100644 index 0000000..a3f8a8c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/ClassMetadataTest.php @@ -0,0 +1,323 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; +use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint; + +class ClassMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const PROVIDERCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'; + const PROVIDERCHILDCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderChildEntity'; + + protected $metadata; + + protected function setUp() + { + $this->metadata = new ClassMetadata(self::CLASSNAME); + } + + protected function tearDown() + { + $this->metadata = null; + } + + public function testAddConstraintDoesNotAcceptValid() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new Valid()); + } + + public function testAddConstraintRequiresClassConstraints() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new PropertyConstraint()); + } + + public function testAddPropertyConstraints() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addPropertyConstraint('lastName', new ConstraintB()); + + $this->assertEquals(array('firstName', 'lastName'), $this->metadata->getConstrainedProperties()); + } + + public function testAddMultiplePropertyConstraints() + { + $this->metadata->addPropertyConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('lastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddGetterConstraints() + { + $this->metadata->addGetterConstraint('lastName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testAddMultipleGetterConstraints() + { + $this->metadata->addGetterConstraints('lastName', array(new ConstraintA(), new ConstraintB())); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'Entity'))), + new ConstraintB(array('groups' => array('Default', 'Entity'))), + ); + + $properties = $this->metadata->getPropertyMetadata('lastName'); + + $this->assertCount(1, $properties); + $this->assertEquals('getLastName', $properties[0]->getName()); + $this->assertEquals($constraints, $properties[0]->getConstraints()); + } + + public function testMergeConstraintsMergesClassConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addConstraint(new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addConstraint(new ConstraintA()); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $this->metadata->getConstraints()); + } + + public function testMergeConstraintsMergesMemberConstraints() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('firstName', new ConstraintA()); + $parent->addPropertyConstraint('firstName', new ConstraintB(array('groups' => 'foo'))); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $constraintA1 = new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))); + $constraintA2 = new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))); + $constraintB = new ConstraintB(array( + 'groups' => array('foo'), + )); + + $constraints = array( + $constraintA1, + $constraintB, + $constraintA2, + ); + + $constraintsByGroup = array( + 'Default' => array( + $constraintA1, + $constraintA2, + ), + 'EntityParent' => array( + $constraintA1, + ), + 'Entity' => array( + $constraintA1, + $constraintA2, + ), + 'foo' => array( + $constraintB, + ), + ); + + $members = $this->metadata->getPropertyMetadata('firstName'); + + $this->assertCount(1, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($constraints, $members[0]->getConstraints()); + $this->assertEquals($constraintsByGroup, $members[0]->constraintsByGroup); + } + + public function testMemberMetadatas() + { + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + + $this->assertTrue($this->metadata->hasPropertyMetadata('firstName')); + $this->assertFalse($this->metadata->hasPropertyMetadata('non_existent_field')); + } + + public function testMergeConstraintsKeepsPrivateMembersSeparate() + { + $parent = new ClassMetadata(self::PARENTCLASS); + $parent->addPropertyConstraint('internal', new ConstraintA()); + + $this->metadata->mergeConstraints($parent); + $this->metadata->addPropertyConstraint('internal', new ConstraintA()); + + $parentConstraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + ); + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + ); + + $members = $this->metadata->getPropertyMetadata('internal'); + + $this->assertCount(2, $members); + $this->assertEquals(self::PARENTCLASS, $members[0]->getClassName()); + $this->assertEquals($parentConstraints, $members[0]->getConstraints()); + $this->assertEquals(self::CLASSNAME, $members[1]->getClassName()); + $this->assertEquals($constraints, $members[1]->getConstraints()); + } + + public function testGetReflectionClass() + { + $reflClass = new \ReflectionClass(self::CLASSNAME); + + $this->assertEquals($reflClass, $this->metadata->getReflectionClass()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + $this->metadata->addPropertyConstraint('firstName', new ConstraintA()); + $this->metadata->addGetterConstraint('lastName', new ConstraintB()); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testGroupSequencesWorkIfContainingDefaultGroup() + { + $this->metadata->setGroupSequence(array('Foo', $this->metadata->getDefaultGroup())); + + $this->assertInstanceOf('Symfony\Component\Validator\Constraints\GroupSequence', $this->metadata->getGroupSequence()); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequencesFailIfNotContainingDefaultGroup() + { + $this->metadata->setGroupSequence(array('Foo', 'Bar')); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\GroupDefinitionException + */ + public function testGroupSequencesFailIfContainingDefault() + { + $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()); + } + + public function testMergeConstraintsMergesGroupSequenceProvider() + { + $parent = new ClassMetadata(self::PROVIDERCLASS); + $parent->setGroupSequenceProvider(true); + + $metadata = new ClassMetadata(self::PROVIDERCHILDCLASS); + $metadata->mergeConstraints($parent); + + $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'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php new file mode 100644 index 0000000..a323567 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/BlackHoleMetadataFactoryTest.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory; + +class BlackHoleMetadataFactoryTest extends TestCase +{ + /** + * @expectedException \LogicException + */ + public function testGetMetadataForThrowsALogicException() + { + $metadataFactory = new BlackHoleMetadataFactory(); + $metadataFactory->getMetadataFor('foo'); + } + + public function testHasMetadataForReturnsFalse() + { + $metadataFactory = new BlackHoleMetadataFactory(); + + $this->assertFalse($metadataFactory->hasMetadataFor('foo')); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php new file mode 100644 index 0000000..de68522 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php @@ -0,0 +1,218 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Factory; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class LazyLoadingMetadataFactoryTest extends TestCase +{ + const CLASS_NAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENT_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + const INTERFACE_A_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA'; + const INTERFACE_B_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB'; + const PARENT_INTERFACE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParentInterface'; + + public function testLoadClassMetadataWithInterface() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $constraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testMergeParentConstraints() + { + $factory = new LazyLoadingMetadataFactory(new TestLoader()); + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + + $constraints = array( + new ConstraintA(array('groups' => array( + 'Default', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceA', + 'EntityParent', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityInterfaceB', + 'Entity', + ))), + new ConstraintA(array('groups' => array( + 'Default', + 'EntityParentInterface', + 'EntityInterfaceB', + 'Entity', + ))), + ); + + $this->assertEquals($constraints, $metadata->getConstraints()); + } + + public function testWriteMetadataToCache() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $parentClassConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityParent'))), + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))), + ); + $interfaceAConstraints = array( + new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA'))), + ); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array($this->equalTo(self::PARENT_CLASS)), + array($this->equalTo(self::INTERFACE_A_CLASS)) + ) + ->will($this->returnValue(false)); + $cache->expects($this->exactly(2)) + ->method('write') + ->withConsecutive( + $this->callback(function ($metadata) use ($interfaceAConstraints) { + return $interfaceAConstraints == $metadata->getConstraints(); + }), + $this->callback(function ($metadata) use ($parentClassConstraints) { + return $parentClassConstraints == $metadata->getConstraints(); + }) + ); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + + $this->assertEquals(self::PARENT_CLASS, $metadata->getClassName()); + $this->assertEquals($parentClassConstraints, $metadata->getConstraints()); + } + + public function testReadMetadataFromCache() + { + $loader = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory($loader, $cache); + + $metadata = new ClassMetadata(self::PARENT_CLASS); + $metadata->addConstraint(new ConstraintA()); + + $parentClass = self::PARENT_CLASS; + $interfaceClass = self::INTERFACE_A_CLASS; + + $loader->expects($this->never()) + ->method('loadClassMetadata'); + + $cache->expects($this->never()) + ->method('has'); + $cache->expects($this->exactly(2)) + ->method('read') + ->withConsecutive( + array(self::PARENT_CLASS), + array(self::INTERFACE_A_CLASS) + ) + ->willReturnCallback(function ($name) use ($metadata, $parentClass, $interfaceClass) { + if ($parentClass == $name) { + return $metadata; + } + + return new ClassMetadata($interfaceClass); + }); + + $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENT_CLASS)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException + */ + public function testNonClassNameStringValues() + { + $testedValue = 'error@example.com'; + $loader = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory($loader, $cache); + $cache + ->expects($this->never()) + ->method('read'); + $factory->getMetadataFor($testedValue); + } + + public function testMetadataCacheWithRuntimeConstraint() + { + $cache = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock(); + $factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache); + + $cache + ->expects($this->any()) + ->method('write') + ->will($this->returnCallback(function ($metadata) { serialize($metadata); })) + ; + + $cache->expects($this->any()) + ->method('read') + ->will($this->returnValue(false)); + + $metadata = $factory->getMetadataFor(self::PARENT_CLASS); + $metadata->addConstraint(new Callback(function () {})); + + $this->assertCount(3, $metadata->getConstraints()); + + $metadata = $factory->getMetadataFor(self::CLASS_NAME); + + $this->assertCount(6, $metadata->getConstraints()); + } + + public function testGroupsFromParent() + { + $reader = new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader(); + $factory = new LazyLoadingMetadataFactory($reader); + $metadata = $factory->getMetadataFor('Symfony\Component\Validator\Tests\Fixtures\EntityStaticCarTurbo'); + $groups = array(); + + foreach ($metadata->getPropertyMetadata('wheels') as $propertyMetadata) { + $constraints = $propertyMetadata->getConstraints(); + $groups = array_replace($groups, $constraints[0]->groups); + } + + $this->assertCount(4, $groups); + $this->assertContains('Default', $groups); + $this->assertContains('EntityStaticCarTurbo', $groups); + $this->assertContains('EntityStaticCar', $groups); + $this->assertContains('EntityStaticVehicle', $groups); + } +} + +class TestLoader implements LoaderInterface +{ + public function loadClassMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php new file mode 100644 index 0000000..05aef47 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/GetterMetadataTest.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\GetterMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class GetterMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new GetterMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPublicGetter() + { + // private getters don't work yet because ReflectionMethod::setAccessible() + // does not exist yet in a stable PHP release + + $entity = new Entity('foobar'); + $metadata = new GetterMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar from getter', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPublicGetter() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'data'); + + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromIsser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'valid', 'isValid'); + + $this->assertEquals('valid', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromHasser() + { + $entity = new Entity(); + $metadata = new GetterMetadata(self::CLASSNAME, 'permissions'); + + $this->assertEquals('permissions', $metadata->getPropertyValue($entity)); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ValidatorException + * @expectedExceptionMessage The hasLastName() method does not exist in class Symfony\Component\Validator\Tests\Fixtures\Entity. + */ + public function testUndefinedMethodNameThrowsException() + { + new GetterMetadata(self::CLASSNAME, 'lastName', 'hasLastName'); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php new file mode 100644 index 0000000..1fb2e6e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/LegacyElementMetadataTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +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 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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php new file mode 100644 index 0000000..d032f0e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Symfony\Component\Validator\Mapping\ClassMetadata; + +abstract class AbstractStaticMethodLoader +{ + abstract public static function loadMetadata(ClassMetadata $metadata); +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php new file mode 100644 index 0000000..6e01193 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use Doctrine\Common\Annotations\AnnotationReader; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class AnnotationLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $reader = new AnnotationReader(); + $loader = new AnnotationLoader($reader); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadParentClassMetadata() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $this->assertEquals($expected_parent, $parent_metadata); + } + + /** + * Test MetaData merge with parent annotation. + */ + public function testLoadClassMetadataAndMerge() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + // Load Parent MetaData + $parent_metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $loader->loadClassMetadata($parent_metadata); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + // Merge parent metaData. + $metadata->mergeConstraints($parent_metadata); + + $loader->loadClassMetadata($metadata); + + $expected_parent = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\EntityParent'); + $expected_parent->addPropertyConstraint('other', new NotNull()); + $expected_parent->getReflectionClass(); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->mergeConstraints($expected_parent); + + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Callback(array('callback' => 'validateMe', 'payload' => 'foo'))); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => new Range(array('min' => 5)), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterMethodConstraint('valid', 'isValid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + // load reflection class so that the comparison passes + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProviderAnnotation() + { + $loader = new AnnotationLoader(new AnnotationReader()); + + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + $expected->getReflectionClass(); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php new file mode 100644 index 0000000..6fee7b6 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/FilesLoaderTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; + +class FilesLoaderTest extends TestCase +{ + public function testCallsGetFileLoaderInstanceForeachPath() + { + $loader = $this->getFilesLoader($this->getFileLoader()); + $this->assertEquals(4, $loader->getTimesCalled()); + } + + public function testCallsActualFileLoaderForMetadata() + { + $fileLoader = $this->getFileLoader(); + $fileLoader->expects($this->exactly(4)) + ->method('loadClassMetadata'); + $loader = $this->getFilesLoader($fileLoader); + $loader->loadClassMetadata(new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity')); + } + + public function getFilesLoader(LoaderInterface $loader) + { + return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', array(array( + __DIR__.'/constraint-mapping.xml', + __DIR__.'/constraint-mapping.yaml', + __DIR__.'/constraint-mapping.test', + __DIR__.'/constraint-mapping.txt', + ), $loader)); + } + + public function getFileLoader() + { + return $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php new file mode 100644 index 0000000..0d28b0a --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/LoaderChainTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\LoaderChain; + +class LoaderChainTest extends TestCase +{ + public function testAllLoadersAreCalled() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->once()) + ->method('loadClassMetadata') + ->with($this->equalTo($metadata)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $chain->loadClassMetadata($metadata); + } + + public function testReturnsTrueIfAnyLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(true)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertTrue($chain->loadClassMetadata($metadata)); + } + + public function testReturnsFalseIfNoLoaderReturnedTrue() + { + $metadata = new ClassMetadata('\stdClass'); + + $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader1->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); + $loader2->expects($this->any()) + ->method('loadClassMetadata') + ->will($this->returnValue(false)); + + $chain = new LoaderChain(array( + $loader1, + $loader2, + )); + + $this->assertFalse($chain->loadClassMetadata($metadata)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php new file mode 100644 index 0000000..069ccd3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; + +class StaticMethodLoaderTest extends TestCase +{ + private $errorLevel; + + protected function setUp() + { + $this->errorLevel = error_reporting(); + } + + protected function tearDown() + { + error_reporting($this->errorLevel); + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderEntity'); + + $loader->loadClassMetadata($metadata); + + $this->assertEquals(StaticLoaderEntity::$invokedWith, $metadata); + } + + public function testLoadClassMetadataDoesNotRepeatLoadWithParentClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(0, $metadata->getConstraints()); + + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\BaseStaticLoaderDocument'); + $loader->loadClassMetadata($metadata); + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresInterfaces() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\StaticLoaderInterface'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } + + public function testLoadClassMetadataInAbstractClasses() + { + $loader = new StaticMethodLoader('loadMetadata'); + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticLoader'); + + $loader->loadClassMetadata($metadata); + + $this->assertCount(1, $metadata->getConstraints()); + } + + public function testLoadClassMetadataIgnoresAbstractMethods() + { + // Disable error reporting, as AbstractStaticMethodLoader produces a + // strict standards error + error_reporting(0); + + $metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticMethodLoader'); + + $loader = new StaticMethodLoader('loadMetadata'); + $loader->loadClassMetadata($metadata); + + $this->assertCount(0, $metadata->getConstraints()); + } +} + +interface StaticLoaderInterface +{ + public static function loadMetadata(ClassMetadata $metadata); +} + +abstract class AbstractStaticLoader +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} + +class StaticLoaderEntity +{ + public static $invokedWith = null; + + public static function loadMetadata(ClassMetadata $metadata) + { + self::$invokedWith = $metadata; + } +} + +class StaticLoaderDocument extends BaseStaticLoaderDocument +{ +} + +class BaseStaticLoaderDocument +{ + public static function loadMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new ConstraintA()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php new file mode 100644 index 0000000..100e4fa --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/XmlFileLoaderTest.php @@ -0,0 +1,136 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Constraints\Regex; +use Symfony\Component\Validator\Constraints\Traverse; +use Symfony\Component\Validator\Exception\MappingException; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class XmlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addConstraint(new Traverse(false)); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadClassMetadataWithNonStrings() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping-non-strings.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->addPropertyConstraint('firstName', new Regex(array('pattern' => '/^1/', 'match' => false))); + + $properties = $metadata->getPropertyMetadata('firstName'); + $constraints = $properties[0]->getConstraints(); + + $this->assertFalse($constraints[0]->match); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } + + public function testThrowExceptionIfDocTypeIsSet() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new XmlFileLoader(__DIR__.'/withdoctype.xml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + try { + $loader->loadClassMetadata($metadata); + } catch (MappingException $e) { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\Symfony\Component\Validator\Exception\MappingException'); + $loader->loadClassMetadata($metadata); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php new file mode 100644 index 0000000..680c2cc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping\Loader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Choice; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\IsTrue; +use Symfony\Component\Validator\Constraints\NotNull; +use Symfony\Component\Validator\Constraints\Range; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class YamlFileLoaderTest extends TestCase +{ + public function testLoadClassMetadataReturnsFalseIfEmpty() + { + $loader = new YamlFileLoader(__DIR__.'/empty-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + + $r = new \ReflectionProperty($loader, 'classes'); + $r->setAccessible(true); + $this->assertSame(array(), $r->getValue($loader)); + } + + /** + * @dataProvider provideInvalidYamlFiles + * @expectedException \InvalidArgumentException + */ + public function testInvalidYamlFiles($path) + { + $loader = new YamlFileLoader(__DIR__.'/'.$path); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + } + + public function provideInvalidYamlFiles() + { + return array( + array('nonvalid-mapping.yml'), + array('bad-format.yml'), + ); + } + + /** + * @see https://github.com/symfony/symfony/pull/12158 + */ + public function testDoNotModifyStateIfExceptionIsThrown() + { + $loader = new YamlFileLoader(__DIR__.'/nonvalid-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + try { + $loader->loadClassMetadata($metadata); + } catch (\InvalidArgumentException $e) { + // Call again. Again an exception should be thrown + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('\InvalidArgumentException'); + $loader->loadClassMetadata($metadata); + } + } + + public function testLoadClassMetadataReturnsTrueIfSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $this->assertTrue($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadataReturnsFalseIfNotSuccessful() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('\stdClass'); + + $this->assertFalse($loader->loadClassMetadata($metadata)); + } + + public function testLoadClassMetadata() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity'); + $expected->setGroupSequence(array('Foo', 'Entity')); + $expected->addConstraint(new ConstraintA()); + $expected->addConstraint(new ConstraintB()); + $expected->addConstraint(new Callback('validateMe')); + $expected->addConstraint(new Callback('validateMeStatic')); + $expected->addConstraint(new Callback(array('Symfony\Component\Validator\Tests\Fixtures\CallbackClass', 'callback'))); + $expected->addPropertyConstraint('firstName', new NotNull()); + $expected->addPropertyConstraint('firstName', new Range(array('min' => 3))); + $expected->addPropertyConstraint('firstName', new Choice(array('A', 'B'))); + $expected->addPropertyConstraint('firstName', new All(array(new NotNull(), new Range(array('min' => 3))))); + $expected->addPropertyConstraint('firstName', new All(array('constraints' => array(new NotNull(), new Range(array('min' => 3)))))); + $expected->addPropertyConstraint('firstName', new Collection(array('fields' => array( + 'foo' => array(new NotNull(), new Range(array('min' => 3))), + 'bar' => array(new Range(array('min' => 5))), + )))); + $expected->addPropertyConstraint('firstName', new Choice(array( + 'message' => 'Must be one of %choices%', + 'choices' => array('A', 'B'), + ))); + $expected->addGetterConstraint('lastName', new NotNull()); + $expected->addGetterConstraint('valid', new IsTrue()); + $expected->addGetterConstraint('permissions', new IsTrue()); + + $this->assertEquals($expected, $metadata); + } + + public function testLoadGroupSequenceProvider() + { + $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); + $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + + $loader->loadClassMetadata($metadata); + + $expected = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); + $expected->setGroupSequenceProvider(true); + + $this->assertEquals($expected, $metadata); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml new file mode 100644 index 0000000..d2b4ad2 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/bad-format.yml @@ -0,0 +1,9 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml new file mode 100644 index 0000000..dfd5edd --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping-non-strings.xml @@ -0,0 +1,19 @@ + + + + + Symfony\Component\Validator\Tests\Fixtures\ + + + + + + + + + + + + diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml new file mode 100644 index 0000000..b1426cf --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.xml @@ -0,0 +1,124 @@ + + + + + Symfony\Component\Validator\Tests\Fixtures\ + + + + + Foo + Entity + + + + + + + + + + + + validateMe + + validateMeStatic + + + Symfony\Component\Validator\Tests\Fixtures\CallbackClass + callback + + + + + false + + + + + + + + + + + + + + + + + A + B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml new file mode 100644 index 0000000..c39168c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml @@ -0,0 +1,62 @@ +namespaces: + custom: Symfony\Component\Validator\Tests\Fixtures\ + +Symfony\Component\Validator\Tests\Fixtures\Entity: + group_sequence: + - Foo + - Entity + + constraints: + # Custom constraint + - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~ + # Custom constraint with namespaces prefix + - "custom:ConstraintB": ~ + # Callbacks + - Callback: validateMe + - Callback: validateMeStatic + - Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback] + + properties: + firstName: + # Constraint without value + - NotNull: ~ + # Constraint with single value + - Range: + min: 3 + # Constraint with multiple values + - Choice: [A, B] + # Constraint with child constraints + - All: + - NotNull: ~ + - Range: + min: 3 + # Option with child constraints + - All: + constraints: + - NotNull: ~ + - Range: + min: 3 + # Value with child constraints + - Collection: + fields: + foo: + - NotNull: ~ + - Range: + min: 3 + bar: + - Range: + min: 5 + # Constraint with options + - Choice: { choices: [A, B], message: Must be one of %choices% } + dummy: + + getters: + lastName: + - NotNull: ~ + valid: + - "IsTrue": ~ + permissions: + - "IsTrue": ~ + +Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity: + group_sequence_provider: true diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/empty-mapping.yml new file mode 100644 index 0000000..e69de29 diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/nonvalid-mapping.yml @@ -0,0 +1 @@ +foo diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml new file mode 100644 index 0000000..0beacc3 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/Loader/withdoctype.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php new file mode 100644 index 0000000..f0726c8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/MemberMetadataTest.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\Mapping\MemberMetadata; +use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; +use Symfony\Component\Validator\Tests\Fixtures\ConstraintB; + +class MemberMetadataTest extends TestCase +{ + protected $metadata; + + protected function setUp() + { + $this->metadata = new TestMemberMetadata( + 'Symfony\Component\Validator\Tests\Fixtures\Entity', + 'getLastName', + 'lastName' + ); + } + + protected function tearDown() + { + $this->metadata = null; + } + + /** + * @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->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); + + $this->metadata->addConstraint(new ClassConstraint()); + } + + public function testSerialize() + { + $this->metadata->addConstraint(new ConstraintA(array('property1' => 'A'))); + $this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup'))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + public function testSerializeCollectionCascaded() + { + $this->metadata->addConstraint(new Valid(array('traverse' => true))); + + $metadata = unserialize(serialize($this->metadata)); + + $this->assertEquals($this->metadata, $metadata); + } + + /** + * @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) + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php b/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php new file mode 100644 index 0000000..9fea435 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Mapping/PropertyMetadataTest.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Mapping; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Mapping\PropertyMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; + +class PropertyMetadataTest extends TestCase +{ + const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent'; + + public function testInvalidPropertyName() + { + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + + new PropertyMetadata(self::CLASSNAME, 'foobar'); + } + + public function testGetPropertyValueFromPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + + $this->assertEquals('foobar', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromOverriddenPrivateProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::PARENTCLASS, 'data'); + + $this->assertTrue($metadata->isPublic($entity)); + $this->assertEquals('Overridden data', $metadata->getPropertyValue($entity)); + } + + public function testGetPropertyValueFromRemovedProperty() + { + $entity = new Entity('foobar'); + $metadata = new PropertyMetadata(self::CLASSNAME, 'internal'); + $metadata->name = 'test'; + + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\Validator\Exception\ValidatorException'); + $metadata->getPropertyValue($entity); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php b/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php new file mode 100644 index 0000000..64b3f78 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Resources/TranslationFilesTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Resources; + +use PHPUnit\Framework\TestCase; + +class TranslationFilesTest extends TestCase +{ + /** + * @dataProvider provideTranslationFiles + */ + public function testTranslationFileIsValid($filePath) + { + if (class_exists('PHPUnit_Util_XML')) { + \PHPUnit_Util_XML::loadfile($filePath, false, false, true); + } else { + \PHPUnit\Util\XML::loadfile($filePath, false, false, true); + } + + $this->addToAssertionCount(1); + } + + public function provideTranslationFiles() + { + return array_map( + function ($filePath) { return (array) $filePath; }, + glob(\dirname(\dirname(__DIR__)).'/Resources/translations/*.xlf') + ); + } + + public function testNorwegianAlias() + { + $this->assertFileEquals( + \dirname(\dirname(__DIR__)).'/Resources/translations/validators.nb.xlf', + \dirname(\dirname(__DIR__)).'/Resources/translations/validators.no.xlf', + 'The NO locale should be an alias for the NB variant of the Norwegian language.' + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php b/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php new file mode 100644 index 0000000..235e178 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Util/PropertyPathTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Util; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Util\PropertyPath; + +class PropertyPathTest extends TestCase +{ + /** + * @dataProvider provideAppendPaths + */ + public function testAppend($basePath, $subPath, $expectedPath, $message) + { + $this->assertSame($expectedPath, PropertyPath::append($basePath, $subPath), $message); + } + + public function provideAppendPaths() + { + return array( + array('foo', '', 'foo', 'It returns the basePath if subPath is empty'), + array('', 'bar', 'bar', 'It returns the subPath if basePath is empty'), + array('foo', 'bar', 'foo.bar', 'It append the subPath to the basePath'), + array('foo', '[bar]', 'foo[bar]', 'It does not include the dot separator if subPath uses the array notation'), + array('0', 'bar', '0.bar', 'Leading zeros are kept.'), + ); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php new file mode 100644 index 0000000..0394431 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -0,0 +1,742 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Expression; +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+. + * + * @author Bernhard Schussek + */ +abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest +{ + /** + * @var ValidatorInterface + */ + protected $validator; + + /** + * @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->getMockBuilder('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata')->getMock(); + $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->getMockBuilder('Symfony\Component\Validator\Tests\Fixtures\LegacyClassMetadata')->getMock(); + $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->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + $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'; + $entity->data = array('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->metadata->addPropertyConstraint('data', new Collection(array('firstName' => new Expression('value == this.firstName')))); + + $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->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + $initializer2 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + + $initializer1->expects($this->once()) + ->method('initialize') + ->with($entity) + ->will($this->returnCallback(function ($object) { + $object->initialized = true; + })); + + $initializer2->expects($this->once()) + ->method('initialize') + ->with($entity); + + $this->validator = $this->createValidator($this->metadataFactory, array( + $initializer1, + $initializer2, + )); + + // prepare constraint which + // * checks that "initialized" is set to true + // * validates the object again + $callback = function ($object, ExecutionContextInterface $context) 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()); + } + + public function testCollectionConstraitViolationHasCorrectContext() + { + $data = array( + 'foo' => 'fooValue', + ); + + // Missing field must not be the first in the collection validation + $constraint = new Collection(array( + 'foo' => new NotNull(), + 'bar' => new NotNull(), + )); + + $violations = $this->validate($data, $constraint); + + $this->assertCount(1, $violations); + $this->assertSame($constraint, $violations[0]->getConstraint()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php new file mode 100644 index 0000000..4734632 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractLegacyApiTest.php @@ -0,0 +1,313 @@ + + * + * 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. + * + * @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->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + $initializer2 = $this->getMockBuilder('Symfony\\Component\\Validator\\ObjectInitializerInterface')->getMock(); + + $initializer1->expects($this->once()) + ->method('initialize') + ->with($entity) + ->will($this->returnCallback(function ($object) { + $object->initialized = true; + })); + + $initializer2->expects($this->once()) + ->method('initialize') + ->with($entity); + + $this->validator = $this->createValidator($this->metadataFactory, array( + $initializer1, + $initializer2, + )); + + // prepare constraint which + // * checks that "initialized" is set to true + // * validates the object again + $callback = function ($object, ExecutionContextInterface $context) 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()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php new file mode 100644 index 0000000..8dd9adc --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php @@ -0,0 +1,1284 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Validator; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\Callback; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\Constraints\Valid; +use Symfony\Component\Validator\ConstraintViolationInterface; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\ClassMetadata; +use Symfony\Component\Validator\Tests\Fixtures\Entity; +use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; +use Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity; +use Symfony\Component\Validator\Tests\Fixtures\Reference; + +/** + * @author Bernhard Schussek + */ +abstract class AbstractValidatorTest extends TestCase +{ + const ENTITY_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Entity'; + + const REFERENCE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\Reference'; + + /** + * @var FakeMetadataFactory + */ + public $metadataFactory; + + /** + * @var ClassMetadata + */ + public $metadata; + + /** + * @var ClassMetadata + */ + public $referenceMetadata; + + protected function setUp() + { + $this->metadataFactory = new FakeMetadataFactory(); + $this->metadata = new ClassMetadata(self::ENTITY_CLASS); + $this->referenceMetadata = new ClassMetadata(self::REFERENCE_CLASS); + $this->metadataFactory->addMetadata($this->metadata); + $this->metadataFactory->addMetadata($this->referenceMetadata); + } + + protected function tearDown() + { + $this->metadataFactory = null; + $this->metadata = null; + $this->referenceMetadata = null; + } + + abstract protected function validate($value, $constraints = null, $groups = null); + + abstract protected function validateProperty($object, $propertyName, $groups = null); + + abstract protected function validatePropertyValue($object, $propertyName, $value, $groups = null); + + public function testValidate() + { + $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->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + + $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->getMockBuilder('Symfony\Component\Validator\MetadataInterface')->getMock(); + + $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()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php new file mode 100644 index 0000000..fd1287f --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php new file mode 100644 index 0000000..0b51a11 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/LegacyValidatorLegacyApiTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php b/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php new file mode 100644 index 0000000..1313fb9 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock(); + $validatorContext + ->expects($this->once()) + ->method('validate') + ->with($entity, null, array()) + ->willReturnSelf(); + + $validator = $this + ->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') + ->disableOriginalConstructor() + ->setMethods(array('startContext')) + ->getMock(); + $validator + ->expects($this->once()) + ->method('startContext') + ->willReturn($validatorContext); + + $validator->validate($entity, null, array()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php b/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php new file mode 100644 index 0000000..77d5864 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Tests/ValidatorBuilderTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\ValidatorBuilder; +use Symfony\Component\Validator\ValidatorBuilderInterface; + +class ValidatorBuilderTest extends TestCase +{ + /** + * @var ValidatorBuilderInterface + */ + protected $builder; + + protected function setUp() + { + $this->builder = new ValidatorBuilder(); + } + + protected function tearDown() + { + $this->builder = null; + } + + public function testAddObjectInitializer() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializer( + $this->getMockBuilder('Symfony\Component\Validator\ObjectInitializerInterface')->getMock() + )); + } + + public function testAddObjectInitializers() + { + $this->assertSame($this->builder, $this->builder->addObjectInitializers(array())); + } + + public function testAddXmlMapping() + { + $this->assertSame($this->builder, $this->builder->addXmlMapping('mapping')); + } + + public function testAddXmlMappings() + { + $this->assertSame($this->builder, $this->builder->addXmlMappings(array())); + } + + public function testAddYamlMapping() + { + $this->assertSame($this->builder, $this->builder->addYamlMapping('mapping')); + } + + public function testAddYamlMappings() + { + $this->assertSame($this->builder, $this->builder->addYamlMappings(array())); + } + + public function testAddMethodMapping() + { + $this->assertSame($this->builder, $this->builder->addMethodMapping('mapping')); + } + + public function testAddMethodMappings() + { + $this->assertSame($this->builder, $this->builder->addMethodMappings(array())); + } + + public function testEnableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); + } + + public function testDisableAnnotationMapping() + { + $this->assertSame($this->builder, $this->builder->disableAnnotationMapping()); + } + + public function testSetMetadataCache() + { + $this->assertSame($this->builder, $this->builder->setMetadataCache( + $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock()) + ); + } + + public function testSetConstraintValidatorFactory() + { + $this->assertSame($this->builder, $this->builder->setConstraintValidatorFactory( + $this->getMockBuilder('Symfony\Component\Validator\ConstraintValidatorFactoryInterface')->getMock()) + ); + } + + public function testSetTranslator() + { + $this->assertSame($this->builder, $this->builder->setTranslator( + $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock()) + ); + } + + public function testSetTranslationDomain() + { + $this->assertSame($this->builder, $this->builder->setTranslationDomain('TRANS_DOMAIN')); + } + + public function testGetValidator() + { + $this->assertInstanceOf('Symfony\Component\Validator\Validator\RecursiveValidator', $this->builder->getValidator()); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php b/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php new file mode 100644 index 0000000..4108a02 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Util/PropertyPath.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Util; + +/** + * Contains utility methods for dealing with property paths. + * + * For more extensive functionality, use Symfony's PropertyAccess component. + * + * @author Bernhard Schussek + */ +class PropertyPath +{ + /** + * Appends a path to a given property path. + * + * If the base path is empty, the appended path will be returned unchanged. + * If the base path is not empty, and the appended path starts with a + * squared opening bracket ("["), the concatenation of the two paths is + * returned. Otherwise, the concatenation of the two paths is returned, + * separated by a dot ("."). + * + * @param string $basePath The base path + * @param string $subPath The path to append + * + * @return string The concatenation of the two property paths + */ + public static function append($basePath, $subPath) + { + if ('' !== (string) $subPath) { + if ('[' === $subPath[0]) { + return $basePath.$subPath; + } + + return '' !== (string) $basePath ? $basePath.'.'.$subPath : $subPath; + } + + return $basePath; + } + + /** + * Not instantiable. + */ + private function __construct() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validation.php b/public/system/storage/vendor/symfony/validator/Validation.php new file mode 100644 index 0000000..a469b47 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validation.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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() + { + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidationVisitor.php b/public/system/storage/vendor/symfony/validator/ValidationVisitor.php new file mode 100644 index 0000000..14fd88b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidationVisitor.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since Symfony 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 +{ + private $root; + private $metadataFactory; + private $validatorFactory; + private $translator; + private $translationDomain; + private $objectInitializers; + private $violations; + 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; + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php b/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php new file mode 100644 index 0000000..28d4921 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidationVisitorInterface.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +/** + * 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); +} diff --git a/public/system/storage/vendor/symfony/validator/Validator.php b/public/system/storage/vendor/symfony/validator/Validator.php new file mode 100644 index 0000000..1aa5fd1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator; + +@trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since Symfony 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 +{ + private $metadataFactory; + private $validatorFactory; + private $translator; + private $translationDomain; + 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 %s does not support properties.', $valueAsString)); + } + + // 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 string|string[]|null $groups + * + * @return string[] + */ + private function resolveGroups($groups) + { + return $groups ? (array) $groups : array(Constraint::DEFAULT_GROUP); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php b/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php new file mode 100644 index 0000000..c8b545b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/ContextualValidatorInterface.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintViolationListInterface; + +/** + * A validator in a specific execution context. + * + * @author Bernhard Schussek + */ +interface ContextualValidatorInterface +{ + /** + * Appends the given path to the property path of the context. + * + * If called multiple times, the path will always be reset to the context's + * original path with the given path appended to it. + * + * @param string $path The path to append + * + * @return $this + */ + public function atPath($path); + + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validate($value, $constraints = null, $groups = null); + + /** + * Validates a property of an object against the constraints specified + * for this property. + * + * @param object $object The object + * @param string $propertyName The name of the validated property + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validateProperty($object, $propertyName, $groups = null); + + /** + * Validates a value against the constraints specified for an object's + * property. + * + * @param object|string $objectOrClass The object or its class name + * @param string $propertyName The name of the property + * @param mixed $value The value to validate against the property's constraints + * @param string|GroupSequence|(string|GroupSequence)[]|null $groups The validation groups to validate. If none is given, "Default" is assumed + * + * @return $this + */ + public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); + + /** + * Returns the violations that have been generated so far in the context + * of the validator. + * + * @return ConstraintViolationListInterface The constraint violations + */ + public function getViolations(); +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php b/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php new file mode 100644 index 0000000..c4d818b --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/LegacyValidator.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +@trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since Symfony 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+. + * + * @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 +{ +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php b/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php new file mode 100644 index 0000000..14456d8 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/RecursiveContextualValidator.php @@ -0,0 +1,831 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContext; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\NoSuchMetadataException; +use Symfony\Component\Validator\Exception\RuntimeException; +use Symfony\Component\Validator\Exception\UnsupportedMetadataException; +use Symfony\Component\Validator\Exception\ValidatorException; +use Symfony\Component\Validator\Mapping\CascadingStrategy; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; +use Symfony\Component\Validator\Mapping\GenericMetadata; +use Symfony\Component\Validator\Mapping\MetadataInterface; +use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; +use Symfony\Component\Validator\Mapping\TraversalStrategy; +use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\ObjectInitializerInterface; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Recursive implementation of {@link ContextualValidatorInterface}. + * + * @author Bernhard Schussek + */ +class RecursiveContextualValidator implements ContextualValidatorInterface +{ + private $context; + private $defaultPropertyPath; + private $defaultGroups; + private $metadataFactory; + private $validatorFactory; + private $objectInitializers; + + /** + * Creates a validator for the given context. + * + * @param ExecutionContextInterface $context The execution context + * @param MetadataFactoryInterface $metadataFactory The factory for + * fetching the metadata + * of validated objects + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating + * constraint validators + * @param ObjectInitializerInterface[] $objectInitializers The object initializers + */ + public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) + { + $this->context = $context; + $this->defaultPropertyPath = $context->getPropertyPath(); + $this->defaultGroups = array($context->getGroup() ?: Constraint::DEFAULT_GROUP); + $this->metadataFactory = $metadataFactory; + $this->validatorFactory = $validatorFactory; + $this->objectInitializers = $objectInitializers; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->defaultPropertyPath = $this->context->getPropertyPath($path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value, $constraints = null, $groups = null) + { + $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; + + $previousValue = $this->context->getValue(); + $previousObject = $this->context->getObject(); + $previousMetadata = $this->context->getMetadata(); + $previousPath = $this->context->getPropertyPath(); + $previousGroup = $this->context->getGroup(); + $previousConstraint = null; + + if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) { + $previousConstraint = $this->context->getConstraint(); + } + + // If explicit constraints are passed, validate the value against + // those constraints + if (null !== $constraints) { + // You can pass a single constraint or an array of constraints + // Make sure to deal with an array in the rest of the code + if (!\is_array($constraints)) { + $constraints = array($constraints); + } + + $metadata = new GenericMetadata(); + $metadata->addConstraints($constraints); + + $this->validateGenericNode( + $value, + $previousObject, + \is_object($value) ? spl_object_hash($value) : null, + $metadata, + $this->defaultPropertyPath, + $groups, + null, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + if (null !== $previousConstraint) { + $this->context->setConstraint($previousConstraint); + } + + return $this; + } + + // If an object is passed without explicit constraints, validate that + // object against the constraints defined for the object's class + if (\is_object($value)) { + $this->validateObject( + $value, + $this->defaultPropertyPath, + $groups, + TraversalStrategy::IMPLICIT, + $this->context + ); + + $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); + $this->context->setGroup($previousGroup); + + return $this; + } + + // If an array is passed without explicit constraints, validate each + // object in the array + if (\is_array($value)) { + $this->validateEachObjectIn( + $value, + $this->defaultPropertyPath, + $groups, + 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 string|GroupSequence|(string|GroupSequence)[] $groups The groups to normalize + * + * @return (string|GroupSequence)[] 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|GroupSequence)[] $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 iterable $collection The collection + * @param string $propertyPath The current property path + * @param (string|GroupSequence)[] $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|GroupSequence)[] $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|GroupSequence)[] $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 = null !== $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); + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php b/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php new file mode 100644 index 0000000..bf0050d --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/RecursiveValidator.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\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}. + * + * @author Bernhard Schussek + */ +class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface +{ + protected $contextFactory; + protected $metadataFactory; + protected $validatorFactory; + 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)); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php b/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php new file mode 100644 index 0000000..7815746 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Validator/ValidatorInterface.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Validator; + +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\GroupSequence; +use Symfony\Component\Validator\ConstraintViolationListInterface; +use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; + +/** + * Validates PHP values against constraints. + * + * @author Bernhard Schussek + */ +interface ValidatorInterface extends MetadataFactoryInterface +{ + /** + * Validates a value against a constraint or a list of constraints. + * + * If no constraint is passed, the constraint + * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. + * + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string|GroupSequence|(string|GroupSequence)[]|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 string|GroupSequence|(string|GroupSequence)[]|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 string|GroupSequence|(string|GroupSequence)[]|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. + * + * @return ContextualValidatorInterface The validator for that context + */ + public function inContext(ExecutionContextInterface $context); +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php b/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php new file mode 100644 index 0000000..c99de8c --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorBuilder.php @@ -0,0 +1,372 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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 +{ + private $initializers = array(); + private $xmlMappings = array(); + private $yamlMappings = 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 string|null + */ + 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 Symfony 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php b/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php new file mode 100644 index 0000000..1b0bd72 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorBuilderInterface.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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. + * + * @return $this + */ + public function addObjectInitializer(ObjectInitializerInterface $initializer); + + /** + * Adds a list of object initializers to the validator. + * + * @param ObjectInitializerInterface[] $initializers + * + * @return $this + */ + public function addObjectInitializers(array $initializers); + + /** + * Adds an XML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addXmlMapping($path); + + /** + * Adds a list of XML constraint mapping files to the validator. + * + * @param string[] $paths The paths to the mapping files + * + * @return $this + */ + public function addXmlMappings(array $paths); + + /** + * Adds a YAML constraint mapping file to the validator. + * + * @param string $path The path to the mapping file + * + * @return $this + */ + public function addYamlMapping($path); + + /** + * Adds a list of YAML constraint mappings file to the validator. + * + * @param string[] $paths The paths to the mapping files + * + * @return $this + */ + public function addYamlMappings(array $paths); + + /** + * Enables constraint mapping using the given static method. + * + * @param string $methodName The name of the method + * + * @return $this + */ + public function addMethodMapping($methodName); + + /** + * Enables constraint mapping using the given static methods. + * + * @param string[] $methodNames The names of the methods + * + * @return $this + */ + public function addMethodMappings(array $methodNames); + + /** + * Enables annotation based constraint mapping. + * + * @return $this + */ + public function enableAnnotationMapping(Reader $annotationReader = null); + + /** + * Disables annotation based constraint mapping. + * + * @return $this + */ + public function disableAnnotationMapping(); + + /** + * Sets the class metadata factory used by the validator. + * + * @return $this + */ + public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); + + /** + * Sets the cache for caching class metadata. + * + * @return $this + */ + public function setMetadataCache(CacheInterface $cache); + + /** + * Sets the constraint validator factory used by the validator. + * + * @return $this + */ + public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); + + /** + * Sets the translator used for translating violation messages. + * + * @return $this + */ + public function setTranslator(TranslatorInterface $translator); + + /** + * Sets the default translation domain of violation messages. + * + * The same message can have different translations in different domains. + * Pass the domain that is used for violation messages by default to this + * method. + * + * @param string $translationDomain The translation domain of the violation messages + * + * @return $this + */ + public function setTranslationDomain($translationDomain); + + /** + * Sets the property accessor for resolving property paths. + * + * @param PropertyAccessorInterface $propertyAccessor The property accessor + * + * @return $this + * + * @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 $this + * + * @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(); +} diff --git a/public/system/storage/vendor/symfony/validator/ValidatorInterface.php b/public/system/storage/vendor/symfony/validator/ValidatorInterface.php new file mode 100644 index 0000000..570ba99 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/ValidatorInterface.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\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(); +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php new file mode 100644 index 0000000..284841e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\ConstraintViolation; +use Symfony\Component\Validator\ConstraintViolationList; +use Symfony\Component\Validator\Util\PropertyPath; + +/** + * Default implementation of {@link ConstraintViolationBuilderInterface}. + * + * @author Bernhard Schussek + * + * @internal You should not instantiate or use this class. Code against + * {@link ConstraintViolationBuilderInterface} instead. + */ +class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface +{ + private $violations; + private $message; + private $parameters; + private $root; + private $invalidValue; + private $propertyPath; + private $translator; + private $translationDomain; + private $plural; + private $constraint; + private $code; + + /** + * @var mixed + */ + private $cause; + + public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null) + { + $this->violations = $violations; + $this->message = $message; + $this->parameters = $parameters; + $this->root = $root; + $this->propertyPath = $propertyPath; + $this->invalidValue = $invalidValue; + $this->translator = $translator; + $this->translationDomain = $translationDomain; + $this->constraint = $constraint; + } + + /** + * {@inheritdoc} + */ + public function atPath($path) + { + $this->propertyPath = PropertyPath::append($this->propertyPath, $path); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setTranslationDomain($translationDomain) + { + $this->translationDomain = $translationDomain; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setInvalidValue($invalidValue) + { + $this->invalidValue = $invalidValue; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setPlural($number) + { + $this->plural = $number; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCause($cause) + { + $this->cause = $cause; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function addViolation() + { + if (null === $this->plural) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } else { + try { + $translatedMessage = $this->translator->transChoice( + $this->message, + $this->plural, + $this->parameters, + $this->translationDomain + ); + } catch (\InvalidArgumentException $e) { + $translatedMessage = $this->translator->trans( + $this->message, + $this->parameters, + $this->translationDomain + ); + } + } + + $this->violations->add(new ConstraintViolation( + $translatedMessage, + $this->message, + $this->parameters, + $this->root, + $this->propertyPath, + $this->invalidValue, + $this->plural, + $this->code, + $this->constraint, + $this->cause + )); + } +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php new file mode 100644 index 0000000..811b484 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +/** + * Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} + * objects. + * + * Use the various methods on this interface to configure the built violation. + * Finally, call {@link addViolation()} to add the violation to the current + * execution context. + * + * @author Bernhard Schussek + */ +interface ConstraintViolationBuilderInterface +{ + /** + * Stores the property path at which the violation should be generated. + * + * The passed path will be appended to the current property path of the + * execution context. + * + * @param string $path The property path + * + * @return $this + */ + public function atPath($path); + + /** + * Sets a parameter to be inserted into the violation message. + * + * @param string $key The name of the parameter + * @param string $value The value to be inserted in the parameter's place + * + * @return $this + */ + public function setParameter($key, $value); + + /** + * Sets all parameters to be inserted into the violation message. + * + * @param array $parameters An array with the parameter names as keys and + * the values to be inserted in their place as + * values + * + * @return $this + */ + public function setParameters(array $parameters); + + /** + * Sets the translation domain which should be used for translating the + * violation message. + * + * @param string $translationDomain The translation domain + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface + */ + public function setTranslationDomain($translationDomain); + + /** + * Sets the invalid value that caused this violation. + * + * @param mixed $invalidValue The invalid value + * + * @return $this + */ + public function setInvalidValue($invalidValue); + + /** + * Sets the number which determines how the plural form of the violation + * message is chosen when it is translated. + * + * @param int $number The number for determining the plural form + * + * @return $this + * + * @see \Symfony\Component\Translation\TranslatorInterface::transChoice() + */ + public function setPlural($number); + + /** + * Sets the violation code. + * + * @param string|null $code The violation code + * + * @return $this + */ + public function setCode($code); + + /** + * Sets the cause of the violation. + * + * @param mixed $cause The cause of the violation + * + * @return $this + */ + public function setCause($cause); + + /** + * Adds the violation to the current execution context. + */ + public function addViolation(); +} diff --git a/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php b/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php new file mode 100644 index 0000000..324e9d1 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/Violation/LegacyConstraintViolationBuilder.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Violation; + +@trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since Symfony 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); + } +} diff --git a/public/system/storage/vendor/symfony/validator/composer.json b/public/system/storage/vendor/symfony/validator/composer.json new file mode 100644 index 0000000..99ccc33 --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/composer.json @@ -0,0 +1,58 @@ +{ + "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/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.4|~3.0.0" + }, + "require-dev": { + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", + "symfony/yaml": "^2.0.5|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "egulias/email-validator": "^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.8-dev" + } + } +} diff --git a/public/system/storage/vendor/symfony/validator/phpunit.xml.dist b/public/system/storage/vendor/symfony/validator/phpunit.xml.dist new file mode 100644 index 0000000..5d07c4e --- /dev/null +++ b/public/system/storage/vendor/symfony/validator/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + -- cgit v1.2.3