diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-07-12 13:22:26 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-07-12 13:22:26 +0100 |
| commit | eb443f28678ab16161c07687d76f1e44a7965ff2 (patch) | |
| tree | c966da0c221a4deaafed8dbd543ef53262923f0c /vendor | |
| parent | e9ac0a130a7293a51af5fb1b6be0d0cbe00b93f4 (diff) | |
| download | webtrees-eb443f28678ab16161c07687d76f1e44a7965ff2.tar.gz webtrees-eb443f28678ab16161c07687d76f1e44a7965ff2.tar.bz2 webtrees-eb443f28678ab16161c07687d76f1e44a7965ff2.zip | |
Update vendor libraries: uuid, tcpdf, utf8, localization
Diffstat (limited to 'vendor')
| -rw-r--r-- | vendor/composer/autoload_classmap.php | 1 | ||||
| -rw-r--r-- | vendor/composer/autoload_namespaces.php | 2 | ||||
| -rw-r--r-- | vendor/composer/autoload_psr4.php | 1 | ||||
| -rw-r--r-- | vendor/composer/installed.json | 166 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/CHANGELOG.md | 3 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/README.md | 2 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Language/LanguageAs.php | 4 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Locale/LocaleEo.php | 2 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Locale/LocaleEs419.php | 4 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Locale/LocaleHi.php | 2 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Locale/LocaleKl.php | 2 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Locale/LocaleSwCd.php | 25 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptAdlm.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptAghb.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptAran.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptBass.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptDupl.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptElba.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptGran.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptHmng.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptKhoj.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptKitl.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptKits.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptLina.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptMahj.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptMani.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptMarc.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptMend.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptModi.php | 7 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptMroo.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptNarb.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptNbat.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptOsge.php | 20 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptPalm.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptPauc.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptPerm.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptPhlp.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptSidd.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptSind.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptTirh.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Script/ScriptWara.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryBs.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryBz.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryGb.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryInterface.php | 2 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryKy.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryPr.php | 5 | ||||
| -rw-r--r-- | vendor/fisharebest/localization/src/Territory/TerritoryPw.php | 5 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/.travis.yml | 12 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/CHANGELOG.md | 8 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php | 61 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php | 112 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/class/Patchwork/Utf8.php | 657 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/class/Patchwork/Utf8/BestFit.php | 68 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/class/Patchwork/Utf8/WindowsStreamWrapper.php | 405 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/composer.json | 6 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Normalizer.php (renamed from vendor/patchwork/utf8/class/Normalizer.php) | 3 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Iconv.php (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php) | 482 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Intl.php (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php) | 167 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Mbstring.php (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php) | 377 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Normalizer.php (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php) | 209 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Xml.php | 61 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.big5.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.big5.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp037.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp037.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1006.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1006.ser) | bin | 4273 -> 4273 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1026.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1026.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp424.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp424.ser) | bin | 3547 -> 3547 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp437.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp437.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp500.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp500.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp737.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp737.ser) | bin | 4247 -> 4247 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp775.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp775.ser) | bin | 4228 -> 4228 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp850.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp850.ser) | bin | 4222 -> 4222 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp852.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp852.ser) | bin | 4221 -> 4221 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp855.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp855.ser) | bin | 4222 -> 4222 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp856.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp856.ser) | bin | 3525 -> 3525 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp857.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp857.ser) | bin | 4170 -> 4170 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp860.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp860.ser) | bin | 4253 -> 4253 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp861.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp861.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp862.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp862.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp863.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp863.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp864.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp864.ser) | bin | 4180 -> 4180 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp865.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp865.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp866.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp866.ser) | bin | 4244 -> 4244 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp869.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp869.ser) | bin | 4071 -> 4071 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp874.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp874.ser) | bin | 3761 -> 3761 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp875.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp875.ser) | bin | 4189 -> 4189 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp932.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp932.ser) | bin | 149785 -> 149785 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp936.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp936.ser) | bin | 415908 -> 415908 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp949.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp949.ser) | bin | 325759 -> 325759 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp950.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp950.ser) | bin | 258514 -> 258514 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.gsm0338.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.gsm0338.ser) | bin | 2228 -> 2228 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser) | bin | 4193 -> 4193 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser) | bin | 4143 -> 4143 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser) | bin | 4196 -> 4196 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser) | bin | 4214 -> 4214 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser) | bin | 4193 -> 4193 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser) | bin | 4195 -> 4195 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser) | bin | 4073 -> 4073 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser) | bin | 4193 -> 4193 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser) | bin | 3427 -> 3427 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser) | bin | 4093 -> 4093 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser) | bin | 3583 -> 3583 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser) | bin | 4192 -> 4192 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-r.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-r.ser) | bin | 4248 -> 4248 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-u.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-u.ser) | bin | 4240 -> 4240 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.mazovia.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.mazovia.ser) | bin | 4254 -> 4254 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.nextstep.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.nextstep.ser) | bin | 4211 -> 4211 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.stdenc.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.stdenc.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.symbol.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.turkish.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser) | bin | 4185 -> 4185 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser) | bin | 2020 -> 2020 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser) | bin | 2016 -> 2016 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1250.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser) | bin | 4124 -> 4124 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1251.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser) | bin | 4193 -> 4193 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1252.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser) | bin | 4124 -> 4124 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1253.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser) | bin | 3921 -> 3921 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1254.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser) | bin | 4090 -> 4090 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1255.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser) | bin | 3821 -> 3821 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1256.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser) | bin | 4213 -> 4213 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1257.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser) | bin | 4005 -> 4005 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1258.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser) | bin | 4057 -> 4057 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser) | bin | 4214 -> 4214 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser) | bin | 4212 -> 4212 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser) | bin | 4190 -> 4190 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser) | bin | 4201 -> 4201 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser) | bin | 4207 -> 4207 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.zdingbat.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.gsm0338.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser) | bin | 2459 -> 2459 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.mazovia.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser) | bin | 4232 -> 4232 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.stdenc.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.symbol.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.zdingbat.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/translit.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalComposition.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/combiningClass.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/lowerCase.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/upperCase.ser (renamed from vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/TurkishUtf8.php | 155 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8.php | 773 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/BestFit.php | 79 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php) | 161 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/iconv.php (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php) | 13 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/intl.php) | 3 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/mbstring.php (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php) | 3 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/utf8_encode.php (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/utf8_encode.php) | 3 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/Compiler.php | 330 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/WindowsStreamWrapper.php | 404 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/caseFolding_full.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/caseFolding_full.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1250.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1250.ser) | bin | 11885 -> 11885 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1251.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1251.ser) | bin | 10912 -> 10912 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1252.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1252.ser) | bin | 11968 -> 11968 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1253.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1253.ser) | bin | 10587 -> 10587 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1254.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1254.ser) | bin | 11902 -> 11902 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1255.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1255.ser) | bin | 5948 -> 5948 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1256.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1256.ser) | bin | 9202 -> 9202 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1257.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1257.ser) | bin | 5903 -> 5903 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1258.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1258.ser) | bin | 5902 -> 5902 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit874.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit874.ser) | bin | 6760 -> 6760 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit932.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit932.ser) | bin | 179471 -> 179471 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit936.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit936.ser) | bin | 464524 -> 464524 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit949.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit949.ser) | bin | 336734 -> 336734 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit950.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit950.ser) | bin | 385467 -> 385467 bytes | |||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/data/translit_extra.ser (renamed from vendor/patchwork/utf8/class/Patchwork/Utf8/data/translit_extra.ser) | 0 | ||||
| -rw-r--r-- | vendor/patchwork/utf8/src/Patchwork/Utf8/unicode-data.tbz2 | bin | 0 -> 1435147 bytes | |||
| -rw-r--r-- | vendor/ramsey/uuid/CHANGELOG.md | 9 | ||||
| -rw-r--r-- | vendor/ramsey/uuid/README.md | 13 | ||||
| -rw-r--r-- | vendor/ramsey/uuid/composer.json | 8 | ||||
| -rw-r--r-- | vendor/ramsey/uuid/src/Uuid.php | 20 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/CHANGELOG.TXT | 3 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/README.TXT | 4 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/composer.json | 2 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/include/tcpdf_images.php | 8 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/include/tcpdf_static.php | 2 | ||||
| -rw-r--r-- | vendor/tecnick.com/tcpdf/tcpdf.php | 9 |
179 files changed, 3027 insertions, 2086 deletions
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 13949e0232..7c94ab81cb 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'Datamatrix' => $vendorDir . '/tecnick.com/tcpdf/include/barcodes/datamatrix.php', + 'Normalizer' => $vendorDir . '/patchwork/utf8/src/Normalizer.php', 'PDF417' => $vendorDir . '/tecnick.com/tcpdf/include/barcodes/pdf417.php', 'PclZip' => $vendorDir . '/pclzip/pclzip/pclzip.lib.php', 'QRcode' => $vendorDir . '/tecnick.com/tcpdf/include/barcodes/qrcode.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index e6be7e8c80..387fc5ff51 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -7,8 +7,6 @@ $baseDir = dirname($vendorDir); return array( 'Zend_' => array($vendorDir . '/bombayworks/zendframework1/library'), - 'Patchwork' => array($vendorDir . '/patchwork/utf8/class'), - 'Normalizer' => array($vendorDir . '/patchwork/utf8/class'), 'Michelf' => array($vendorDir . '/michelf/php-markdown'), 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index c43aef4fa3..3023fb645c 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'Rhumsaa\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), + 'Patchwork\\' => array($vendorDir . '/patchwork/utf8/src/Patchwork'), 'Fisharebest\\Webtrees\\' => array($baseDir . '/app'), 'Fisharebest\\Localization\\' => array($vendorDir . '/fisharebest/localization/src'), 'Fisharebest\\ExtCalendar\\' => array($vendorDir . '/fisharebest/ext-calendar/src'), diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index dc7887741c..a91aa08cca 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -246,62 +246,6 @@ ] }, { - "name": "fisharebest/localization", - "version": "1.4.1", - "version_normalized": "1.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/fisharebest/localization.git", - "reference": "6514b2fb91b6d95968d31d008fcc82df63d7d902" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fisharebest/localization/zipball/6514b2fb91b6d95968d31d008fcc82df63d7d902", - "reference": "6514b2fb91b6d95968d31d008fcc82df63d7d902", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "*", - "satooshi/php-coveralls": "*" - }, - "time": "2015-04-06 15:20:23", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Fisharebest\\Localization\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-3.0+" - ], - "authors": [ - { - "name": "Greg Roach", - "email": "fisharebest@gmail.com", - "role": "Developer" - } - ], - "description": "A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.", - "homepage": "https://github.com/fisharebest/localization", - "keywords": [ - "cldr", - "gettext", - "i18n", - "l10n", - "language", - "locale", - "localization", - "script", - "translate", - "translation" - ] - }, - { "name": "ircmaxell/password-compat", "version": "v1.0.4", "version_normalized": "1.0.4.0", @@ -399,18 +343,74 @@ ] }, { + "name": "fisharebest/localization", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/fisharebest/localization.git", + "reference": "9d91eff07b935f0a40ed3458ccf4150a2680a1fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fisharebest/localization/zipball/9d91eff07b935f0a40ed3458ccf4150a2680a1fd", + "reference": "9d91eff07b935f0a40ed3458ccf4150a2680a1fd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "*", + "satooshi/php-coveralls": "*" + }, + "time": "2015-06-29 22:06:40", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Fisharebest\\Localization\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Greg Roach", + "email": "fisharebest@gmail.com", + "role": "Developer" + } + ], + "description": "A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.", + "homepage": "https://github.com/fisharebest/localization", + "keywords": [ + "cldr", + "gettext", + "i18n", + "l10n", + "language", + "locale", + "localization", + "script", + "translate", + "translation" + ] + }, + { "name": "patchwork/utf8", - "version": "v1.2.2", - "version_normalized": "1.2.2.0", + "version": "v1.2.3", + "version_normalized": "1.2.3.0", "source": { "type": "git", "url": "https://github.com/tchwork/utf8.git", - "reference": "7287a6fb2c46a66ac6bfbaf0e4975229b27efcba" + "reference": "a7a9a987d01d052ff9c99510ecbd07ebc6c270f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tchwork/utf8/zipball/7287a6fb2c46a66ac6bfbaf0e4975229b27efcba", - "reference": "7287a6fb2c46a66ac6bfbaf0e4975229b27efcba", + "url": "https://api.github.com/repos/tchwork/utf8/zipball/a7a9a987d01d052ff9c99510ecbd07ebc6c270f2", + "reference": "a7a9a987d01d052ff9c99510ecbd07ebc6c270f2", "shasum": "" }, "require": { @@ -423,7 +423,7 @@ "ext-mbstring": "Use Mbstring for best performance", "ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows" }, - "time": "2015-04-26 09:51:43", + "time": "2015-06-25 08:17:49", "type": "library", "extra": { "branch-alias": { @@ -432,10 +432,12 @@ }, "installation-source": "dist", "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } + "psr-4": { + "Patchwork\\": "src/Patchwork/" + }, + "classmap": [ + "src/Normalizer.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -459,22 +461,25 @@ }, { "name": "ramsey/uuid", - "version": "2.8.0", - "version_normalized": "2.8.0.0", + "version": "2.8.1", + "version_normalized": "2.8.1.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "cca98c652cac412c9c2f109c69e5532f313435fc" + "reference": "c1d7d8f0ac860fceaadadbda7154e8b5d2f9789e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/cca98c652cac412c9c2f109c69e5532f313435fc", - "reference": "cca98c652cac412c9c2f109c69e5532f313435fc", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/c1d7d8f0ac860fceaadadbda7154e8b5d2f9789e", + "reference": "c1d7d8f0ac860fceaadadbda7154e8b5d2f9789e", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "replace": { + "rhumsaa/uuid": "self.version" + }, "require-dev": { "doctrine/dbal": ">=2.3", "moontoast/math": "~1.1", @@ -487,16 +492,11 @@ "moontoast/math": "Support for converting UUID to 128-bit integer (in string form).", "symfony/console": "Support for use of the bin/uuid command line tool." }, - "time": "2014-11-09 18:42:56", + "time": "2015-06-16 15:12:41", "bin": [ "bin/uuid" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -527,23 +527,23 @@ }, { "name": "tecnick.com/tcpdf", - "version": "6.2.8", - "version_normalized": "6.2.8.0", + "version": "6.2.9", + "version_normalized": "6.2.9.0", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2" + "reference": "fa6ab8a1e1fbabb9e6cfd2f807514fa1497240e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2", - "reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/fa6ab8a1e1fbabb9e6cfd2f807514fa1497240e4", + "reference": "fa6ab8a1e1fbabb9e6cfd2f807514fa1497240e4", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "time": "2015-04-29 16:13:58", + "time": "2015-06-18 09:12:38", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/fisharebest/localization/CHANGELOG.md b/vendor/fisharebest/localization/CHANGELOG.md index 8b6186ee74..f5c5873ccb 100644 --- a/vendor/fisharebest/localization/CHANGELOG.md +++ b/vendor/fisharebest/localization/CHANGELOG.md @@ -1,6 +1,9 @@ CHANGE LOG ========== +## 1.5.0 + - Updated versions of ISO-15924, iana-subtag-registry and CLDR + ## 1.4.1 (2015-04-06) - PHP<=5.3.8 cannot extend abstract classes with abstract functions diff --git a/vendor/fisharebest/localization/README.md b/vendor/fisharebest/localization/README.md index 0bd09ccd97..2737e2c08b 100644 --- a/vendor/fisharebest/localization/README.md +++ b/vendor/fisharebest/localization/README.md @@ -75,7 +75,7 @@ $locale->weekendStart(); // 0=Sunday, 1=Monday, etc. $locale->weekendEnd(); // 0=Sunday, 1=Monday, etc. // Measurement systems and paper sizes. -$locale->measurementSystem(); // "metric" or "US" +$locale->measurementSystem(); // "metric", "UK" or "US" $locale->paperSize(); // "A4" or "US-Letter" // Formatting numbers diff --git a/vendor/fisharebest/localization/src/Language/LanguageAs.php b/vendor/fisharebest/localization/src/Language/LanguageAs.php index 0437d0af3c..ea57661668 100644 --- a/vendor/fisharebest/localization/src/Language/LanguageAs.php +++ b/vendor/fisharebest/localization/src/Language/LanguageAs.php @@ -1,6 +1,6 @@ <?php namespace Fisharebest\Localization\Language; -use Fisharebest\Localization\PluralRule\PluralRule1; +use Fisharebest\Localization\PluralRule\PluralRule2; use Fisharebest\Localization\Script\ScriptBeng; use Fisharebest\Localization\Territory\TerritoryIn; @@ -29,6 +29,6 @@ class LanguageAs extends AbstractLanguage implements LanguageInterface { /** {@inheritdoc} */ public function pluralRule() { - return new PluralRule1; + return new PluralRule2; } } diff --git a/vendor/fisharebest/localization/src/Locale/LocaleEo.php b/vendor/fisharebest/localization/src/Locale/LocaleEo.php index ac7250d14c..51118cd8cc 100644 --- a/vendor/fisharebest/localization/src/Locale/LocaleEo.php +++ b/vendor/fisharebest/localization/src/Locale/LocaleEo.php @@ -35,7 +35,7 @@ class LocaleEo extends AbstractLocale implements LocaleInterface { return array( self::GROUP => self::NBSP, self::DECIMAL => self::COMMA, - self::NEGATIVE => self::MINUS_SIGN, + self::NEGATIVE => self::HYPHEN, ); } } diff --git a/vendor/fisharebest/localization/src/Locale/LocaleEs419.php b/vendor/fisharebest/localization/src/Locale/LocaleEs419.php index 02ebe7b5ff..a83fd9f65e 100644 --- a/vendor/fisharebest/localization/src/Locale/LocaleEs419.php +++ b/vendor/fisharebest/localization/src/Locale/LocaleEs419.php @@ -12,12 +12,12 @@ use Fisharebest\Localization\Territory\Territory419; class LocaleEs419 extends LocaleEs { /** {@inheritdoc} */ public function endonym() { - return 'español de América'; + return 'español latinoamericano'; } /** {@inheritdoc} */ public function endonymSortable() { - return 'ESPANOL DE AMERICA'; + return 'ESPANOL LATINOAMERICANO'; } /** {@inheritdoc} */ diff --git a/vendor/fisharebest/localization/src/Locale/LocaleHi.php b/vendor/fisharebest/localization/src/Locale/LocaleHi.php index 209117c849..fcc57c5d05 100644 --- a/vendor/fisharebest/localization/src/Locale/LocaleHi.php +++ b/vendor/fisharebest/localization/src/Locale/LocaleHi.php @@ -17,7 +17,7 @@ class LocaleHi extends AbstractLocale implements LocaleInterface { /** {@inheritdoc} */ public function endonym() { - return 'हिंदी'; + return 'हिन्दी'; } /** {@inheritdoc} */ diff --git a/vendor/fisharebest/localization/src/Locale/LocaleKl.php b/vendor/fisharebest/localization/src/Locale/LocaleKl.php index 87bbd166d2..cbf213b5b3 100644 --- a/vendor/fisharebest/localization/src/Locale/LocaleKl.php +++ b/vendor/fisharebest/localization/src/Locale/LocaleKl.php @@ -30,7 +30,7 @@ class LocaleKl extends AbstractLocale implements LocaleInterface { return array( self::GROUP => self::DOT, self::DECIMAL => self::COMMA, - self::NEGATIVE => self::MINUS_SIGN, + self::NEGATIVE => self::HYPHEN, ); } diff --git a/vendor/fisharebest/localization/src/Locale/LocaleSwCd.php b/vendor/fisharebest/localization/src/Locale/LocaleSwCd.php new file mode 100644 index 0000000000..f0232dedf7 --- /dev/null +++ b/vendor/fisharebest/localization/src/Locale/LocaleSwCd.php @@ -0,0 +1,25 @@ +<?php namespace Fisharebest\Localization\Locale; + +use Fisharebest\Localization\Territory\TerritoryCd; + +/** + * Class LocaleSwCd + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class LocaleSwCd extends LocaleSw { + /** {@inheritdoc} */ + public function numberSymbols() { + return array( + self::GROUP => self::DOT, + self::DECIMAL => self::COMMA, + ); + } + + /** {@inheritdoc} */ + public function territory() { + return new TerritoryCd; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptAdlm.php b/vendor/fisharebest/localization/src/Script/ScriptAdlm.php new file mode 100644 index 0000000000..05079df1b3 --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptAdlm.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptAdlm - Representation of the Adlam script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptAdlm extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Adlm'; + } + + /** {@inheritdoc} */ + public function number() { + return '166'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptAghb.php b/vendor/fisharebest/localization/src/Script/ScriptAghb.php index 86c5b70637..5161bfb6a8 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptAghb.php +++ b/vendor/fisharebest/localization/src/Script/ScriptAghb.php @@ -17,4 +17,9 @@ class ScriptAghb extends AbstractScript implements ScriptInterface { public function number() { return '239'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Caucasian_Albanian'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptAran.php b/vendor/fisharebest/localization/src/Script/ScriptAran.php new file mode 100644 index 0000000000..e9fc87e867 --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptAran.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptAran - Representation of the Arabic (Nastaliq) script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptAran extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Aran'; + } + + /** {@inheritdoc} */ + public function number() { + return '161'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptBass.php b/vendor/fisharebest/localization/src/Script/ScriptBass.php index eefeeaa146..5aeeedf575 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptBass.php +++ b/vendor/fisharebest/localization/src/Script/ScriptBass.php @@ -17,4 +17,9 @@ class ScriptBass extends AbstractScript implements ScriptInterface { public function number() { return '259'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Bassa_Vah'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptDupl.php b/vendor/fisharebest/localization/src/Script/ScriptDupl.php index cb547ee49f..df7ff0cabe 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptDupl.php +++ b/vendor/fisharebest/localization/src/Script/ScriptDupl.php @@ -17,4 +17,9 @@ class ScriptDupl extends AbstractScript implements ScriptInterface { public function number() { return '755'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Duployan'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptElba.php b/vendor/fisharebest/localization/src/Script/ScriptElba.php index 0d69d18e48..6cc1e8147d 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptElba.php +++ b/vendor/fisharebest/localization/src/Script/ScriptElba.php @@ -17,4 +17,9 @@ class ScriptElba extends AbstractScript implements ScriptInterface { public function number() { return '226'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Elbasan'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptGran.php b/vendor/fisharebest/localization/src/Script/ScriptGran.php index 2e9dc03325..ef39140f33 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptGran.php +++ b/vendor/fisharebest/localization/src/Script/ScriptGran.php @@ -17,4 +17,9 @@ class ScriptGran extends AbstractScript implements ScriptInterface { public function number() { return '343'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Grantha'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptHmng.php b/vendor/fisharebest/localization/src/Script/ScriptHmng.php index 987fd9ed8b..7839a2072d 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptHmng.php +++ b/vendor/fisharebest/localization/src/Script/ScriptHmng.php @@ -17,4 +17,9 @@ class ScriptHmng extends AbstractScript implements ScriptInterface { public function number() { return '450'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Pahawh_Hmong'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptKhoj.php b/vendor/fisharebest/localization/src/Script/ScriptKhoj.php index 0e3089376c..06efeca45e 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptKhoj.php +++ b/vendor/fisharebest/localization/src/Script/ScriptKhoj.php @@ -17,4 +17,9 @@ class ScriptKhoj extends AbstractScript implements ScriptInterface { public function number() { return '322'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Khojki'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptKitl.php b/vendor/fisharebest/localization/src/Script/ScriptKitl.php new file mode 100644 index 0000000000..e6f2ba96d4 --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptKitl.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptKitl - Representation of the Khitan large script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptKitl extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Kitl'; + } + + /** {@inheritdoc} */ + public function number() { + return '505'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptKits.php b/vendor/fisharebest/localization/src/Script/ScriptKits.php new file mode 100644 index 0000000000..c2adc6d494 --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptKits.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptKits - Representation of the Khitan small script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptKits extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Kits'; + } + + /** {@inheritdoc} */ + public function number() { + return '288'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptLina.php b/vendor/fisharebest/localization/src/Script/ScriptLina.php index 8c47e92b29..4d222eaf46 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptLina.php +++ b/vendor/fisharebest/localization/src/Script/ScriptLina.php @@ -17,4 +17,9 @@ class ScriptLina extends AbstractScript implements ScriptInterface { public function number() { return '400'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Linear_A'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptMahj.php b/vendor/fisharebest/localization/src/Script/ScriptMahj.php index 85b613db50..49c5154c16 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptMahj.php +++ b/vendor/fisharebest/localization/src/Script/ScriptMahj.php @@ -17,4 +17,9 @@ class ScriptMahj extends AbstractScript implements ScriptInterface { public function number() { return '314'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Mahajani'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptMani.php b/vendor/fisharebest/localization/src/Script/ScriptMani.php index 307ea545f8..f4e0ebf97f 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptMani.php +++ b/vendor/fisharebest/localization/src/Script/ScriptMani.php @@ -17,4 +17,9 @@ class ScriptMani extends AbstractScript implements ScriptInterface { public function number() { return '139'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Manichaean'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptMarc.php b/vendor/fisharebest/localization/src/Script/ScriptMarc.php new file mode 100644 index 0000000000..bc46e4e31f --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptMarc.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptMarc - Representation of the Marchen script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptMarc extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Marc'; + } + + /** {@inheritdoc} */ + public function number() { + return '332'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptMend.php b/vendor/fisharebest/localization/src/Script/ScriptMend.php index ef572df29d..36f1afa55e 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptMend.php +++ b/vendor/fisharebest/localization/src/Script/ScriptMend.php @@ -17,4 +17,9 @@ class ScriptMend extends AbstractScript implements ScriptInterface { public function number() { return '438'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Mende_Kikakui'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptModi.php b/vendor/fisharebest/localization/src/Script/ScriptModi.php index b818487d1e..401a9847dc 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptModi.php +++ b/vendor/fisharebest/localization/src/Script/ScriptModi.php @@ -15,6 +15,11 @@ class ScriptModi extends AbstractScript implements ScriptInterface { /** {@inheritdoc} */ public function number() { - return '323'; + return '324'; + } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Modi'; } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptMroo.php b/vendor/fisharebest/localization/src/Script/ScriptMroo.php index bc4f45342d..3e4ec66ed8 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptMroo.php +++ b/vendor/fisharebest/localization/src/Script/ScriptMroo.php @@ -17,4 +17,9 @@ class ScriptMroo extends AbstractScript implements ScriptInterface { public function number() { return '199'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Mro'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptNarb.php b/vendor/fisharebest/localization/src/Script/ScriptNarb.php index ab07711059..287b700c35 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptNarb.php +++ b/vendor/fisharebest/localization/src/Script/ScriptNarb.php @@ -17,4 +17,9 @@ class ScriptNarb extends AbstractScript implements ScriptInterface { public function number() { return '106'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Old_North_Arabian'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptNbat.php b/vendor/fisharebest/localization/src/Script/ScriptNbat.php index 5dabc5d71f..2c5ceea522 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptNbat.php +++ b/vendor/fisharebest/localization/src/Script/ScriptNbat.php @@ -17,4 +17,9 @@ class ScriptNbat extends AbstractScript implements ScriptInterface { public function number() { return '159'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Nabataean'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptOsge.php b/vendor/fisharebest/localization/src/Script/ScriptOsge.php new file mode 100644 index 0000000000..e7130880ce --- /dev/null +++ b/vendor/fisharebest/localization/src/Script/ScriptOsge.php @@ -0,0 +1,20 @@ +<?php namespace Fisharebest\Localization\Script; + +/** + * Class ScriptOsge - Representation of the Osage script. + * + * @author Greg Roach <fisharebest@gmail.com> + * @copyright (c) 2015 Greg Roach + * @license GPLv3+ + */ +class ScriptOsge extends AbstractScript implements ScriptInterface { + /** {@inheritdoc} */ + public function code() { + return 'Osge'; + } + + /** {@inheritdoc} */ + public function number() { + return '219'; + } +} diff --git a/vendor/fisharebest/localization/src/Script/ScriptPalm.php b/vendor/fisharebest/localization/src/Script/ScriptPalm.php index 2cf9de7ea3..99d28dd516 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptPalm.php +++ b/vendor/fisharebest/localization/src/Script/ScriptPalm.php @@ -17,4 +17,9 @@ class ScriptPalm extends AbstractScript implements ScriptInterface { public function number() { return '126'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Palmyrene'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptPauc.php b/vendor/fisharebest/localization/src/Script/ScriptPauc.php index b071e7d959..35cdf33cc9 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptPauc.php +++ b/vendor/fisharebest/localization/src/Script/ScriptPauc.php @@ -17,4 +17,9 @@ class ScriptPauc extends AbstractScript implements ScriptInterface { public function number() { return '263'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Pau_Cin_Hau'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptPerm.php b/vendor/fisharebest/localization/src/Script/ScriptPerm.php index f5badc9a53..1ece3e6e1e 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptPerm.php +++ b/vendor/fisharebest/localization/src/Script/ScriptPerm.php @@ -17,4 +17,9 @@ class ScriptPerm extends AbstractScript implements ScriptInterface { public function number() { return '227'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Old_Permic'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptPhlp.php b/vendor/fisharebest/localization/src/Script/ScriptPhlp.php index 695b20bb1a..75d7b85ef7 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptPhlp.php +++ b/vendor/fisharebest/localization/src/Script/ScriptPhlp.php @@ -17,4 +17,9 @@ class ScriptPhlp extends AbstractScript implements ScriptInterface { public function number() { return '132'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Psalter_Pahlavi'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptSidd.php b/vendor/fisharebest/localization/src/Script/ScriptSidd.php index 4520a8b145..be74d642c2 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptSidd.php +++ b/vendor/fisharebest/localization/src/Script/ScriptSidd.php @@ -17,4 +17,9 @@ class ScriptSidd extends AbstractScript implements ScriptInterface { public function number() { return '302'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Siddham'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptSind.php b/vendor/fisharebest/localization/src/Script/ScriptSind.php index 51e0c5379a..6a147c166a 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptSind.php +++ b/vendor/fisharebest/localization/src/Script/ScriptSind.php @@ -17,4 +17,9 @@ class ScriptSind extends AbstractScript implements ScriptInterface { public function number() { return '318'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Khudawadi'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptTirh.php b/vendor/fisharebest/localization/src/Script/ScriptTirh.php index 68c28cb15f..f8411af857 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptTirh.php +++ b/vendor/fisharebest/localization/src/Script/ScriptTirh.php @@ -17,4 +17,9 @@ class ScriptTirh extends AbstractScript implements ScriptInterface { public function number() { return '326'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Tirhuta'; + } } diff --git a/vendor/fisharebest/localization/src/Script/ScriptWara.php b/vendor/fisharebest/localization/src/Script/ScriptWara.php index 7a64e2f6ab..aee27b4b6e 100644 --- a/vendor/fisharebest/localization/src/Script/ScriptWara.php +++ b/vendor/fisharebest/localization/src/Script/ScriptWara.php @@ -17,4 +17,9 @@ class ScriptWara extends AbstractScript implements ScriptInterface { public function number() { return '262'; } + + /** {@inheritdoc} */ + public function unicodeName() { + return 'Warang_Citi'; + } } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryBs.php b/vendor/fisharebest/localization/src/Territory/TerritoryBs.php index 503721314a..493946eef6 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryBs.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryBs.php @@ -17,4 +17,9 @@ class TerritoryBs extends AbstractTerritory implements TerritoryInterface { public function firstDay() { return 0; } + + /** {@inheritdoc} */ + public function measurementSystem() { + return 'US'; + } } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryBz.php b/vendor/fisharebest/localization/src/Territory/TerritoryBz.php index 08a0f74693..fb4dab0980 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryBz.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryBz.php @@ -19,6 +19,11 @@ class TerritoryBz extends AbstractTerritory implements TerritoryInterface { } /** {@inheritdoc} */ + public function measurementSystem() { + return 'US'; + } + + /** {@inheritdoc} */ public function paperSize() { return 'US-Letter'; } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryGb.php b/vendor/fisharebest/localization/src/Territory/TerritoryGb.php index e2c26e2956..fad7d1537b 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryGb.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryGb.php @@ -12,4 +12,9 @@ class TerritoryGb extends AbstractTerritory implements TerritoryInterface { public function code() { return 'GB'; } + + /** {@inheritdoc} */ + public function measurementSystem() { + return 'UK'; + } } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryInterface.php b/vendor/fisharebest/localization/src/Territory/TerritoryInterface.php index 13f51b044a..5172ef2d0b 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryInterface.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryInterface.php @@ -26,7 +26,7 @@ interface TerritoryInterface { public function firstDay(); /** - * Does this territory prefer 'metric' or 'US' measurements. + * Does this territory prefer 'metric', 'UK' or 'US' measurements. * * @return string */ diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryKy.php b/vendor/fisharebest/localization/src/Territory/TerritoryKy.php index cf9eeb4fe1..604c0af58e 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryKy.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryKy.php @@ -12,4 +12,9 @@ class TerritoryKy extends AbstractTerritory implements TerritoryInterface { public function code() { return 'KY'; } + + /** {@inheritdoc} */ + public function measurementSystem() { + return 'US'; + } } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryPr.php b/vendor/fisharebest/localization/src/Territory/TerritoryPr.php index e449ae8ef7..a583d40d67 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryPr.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryPr.php @@ -19,6 +19,11 @@ class TerritoryPr extends AbstractTerritory implements TerritoryInterface { } /** {@inheritdoc} */ + public function measurementSystem() { + return 'US'; + } + + /** {@inheritdoc} */ public function paperSize() { return 'US-Letter'; } diff --git a/vendor/fisharebest/localization/src/Territory/TerritoryPw.php b/vendor/fisharebest/localization/src/Territory/TerritoryPw.php index 2d072650db..14ede29145 100644 --- a/vendor/fisharebest/localization/src/Territory/TerritoryPw.php +++ b/vendor/fisharebest/localization/src/Territory/TerritoryPw.php @@ -12,4 +12,9 @@ class TerritoryPw extends AbstractTerritory implements TerritoryInterface { public function code() { return 'PW'; } + + /** {@inheritdoc} */ + public function measurementSystem() { + return 'US'; + } } diff --git a/vendor/patchwork/utf8/.travis.yml b/vendor/patchwork/utf8/.travis.yml index 7988d562cf..39803bf642 100644 --- a/vendor/patchwork/utf8/.travis.yml +++ b/vendor/patchwork/utf8/.travis.yml @@ -1,18 +1,16 @@ language: php +sudo: false + php: - 5.3 - 5.4 - 5.5 - 5.6 - nightly - - hhvm-nightly - -matrix: - allow_failures: - - php: nightly - - php: hhvm-nightly + - hhvm script: - phpunit --coverage-text - - phpunit --group unicode --coverage-text + - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi; + - phpunit --group unicode diff --git a/vendor/patchwork/utf8/CHANGELOG.md b/vendor/patchwork/utf8/CHANGELOG.md index 1695ada21e..da707af362 100644 --- a/vendor/patchwork/utf8/CHANGELOG.md +++ b/vendor/patchwork/utf8/CHANGELOG.md @@ -1,3 +1,11 @@ +## v1.2.3 (2015-06-25) + +- fix mb_strrpos shim with negative offset +- sync tests with latest PHP/HHVM behaviors +- remove PHP7/HHVM from allowed failures +- move to PSR-1+2+4 +- mv class/ src/ + ## v1.2.2 (2015-04-26) - Fix ucwords to be functionally the same as in-built PHP version diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php deleted file mode 100644 index 6a44df8b1e..0000000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: -/* - * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the (at your option): - * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or - * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). - */ - -namespace Patchwork\PHP\Shim; - -/** - * utf8_encode/decode - */ -class Xml -{ - static function utf8_encode($s) - { - $s .= $s; - $len = strlen($s); - - for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) switch (true) - { - case $s[$i] < "\x80": $s[$j] = $s[$i]; break; - case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; - default: $s[$j] = "\xC3"; $s[++$j] = chr(ord($s[$i]) - 64); break; - } - - return substr($s, 0, $j); - } - - static function utf8_decode($s) - { - $s .= ''; - $len = strlen($s); - - for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) - { - switch ($s[$i] & "\xF0") - { - case "\xC0": - case "\xD0": - $c = (ord($s[$i] & "\x1F") << 6) | ord($s[++$i] & "\x3F"); - $s[$j] = $c < 256 ? chr($c) : '?'; - break; - - case "\xF0": ++$i; - case "\xE0": - $s[$j] = '?'; - $i += 2; - break; - - default: - $s[$j] = $s[$i]; - } - } - - return substr($s, 0, $j); - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php b/vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php deleted file mode 100644 index ef61ea9938..0000000000 --- a/vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: -/* - * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the (at your option): - * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or - * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). - */ - -namespace Patchwork; - -/** - * Turkish locale specialized version of Patchwork\Utf8 - */ -class TurkishUtf8 extends Utf8 -{ - static function strtocasefold($s, $full = true) - { - if (false !== strpos($s, 'İ')) $s = str_replace('İ', 'i', $s); - return parent::strtocasefold($s, $full); - } - - static function stripos($s, $needle, $offset = 0) - { - if (false !== strpos($needle, 'I')) $needle = str_replace('I', 'ı', $needle); - if (false !== strpos($needle, 'İ')) $needle = str_replace('İ', 'i', $needle); - if (false !== strpos($s, 'I')) $s = str_replace('I', 'ı', $s); - if (false !== strpos($s, 'İ')) $s = str_replace('İ', 'i', $s); - - return parent::stripos($s, $needle, $offset); - } - - static function strripos($s, $needle, $offset = 0) - { - if (false !== strpos($needle, 'I')) $needle = str_replace('I', 'ı', $needle); - if (false !== strpos($needle, 'İ')) $needle = str_replace('İ', 'i', $needle); - if (false !== strpos($s, 'I')) $s = str_replace('I', 'ı', $s); - if (false !== strpos($s, 'İ')) $s = str_replace('İ', 'i', $s); - - return parent::strripos($s, $needle, $offset); - } - - static function stristr($s, $needle, $before_needle = false) - { - $needle = self::stripos($s, $needle); - if (false === $needle) return false; - if ($before_needle) return self::substr($s, 0, $needle); - return self::substr($s, $needle); - } - - static function strrichr($s, $needle, $before_needle = false) - { - $needle = self::strripos($s, $needle); - if (false === $needle) return false; - if ($before_needle) return self::substr($s, 0, $needle); - return self::substr($s, $needle); - } - - static function strtolower($s) - { - if (false !== strpos($s, 'İ')) $s = str_replace('İ', 'i', $s); - if (false !== strpos($s, 'I')) $s = str_replace('I', 'ı', $s); - return parent::strtolower($s); - } - - static function strtoupper($s) - { - if (false !== strpos($s, 'i')) $s = str_replace('i', 'İ', $s); - return parent::strtoupper($s); - } - - static function str_ireplace($search, $replace, $subject, &$count = null) - { - $search = (array) $search; - - foreach ($search as $i => $s) - { - if ('' === $s .= '') $s = '/^(?<=.)$/'; - else - { - $s = preg_quote($s, '/'); - $s = strtr($s, array( - 'i' => '(?-i:[iİ])', - 'İ' => '(?-i:[iİ])', - 'ı' => '(?-i:[ıI])', - 'I' => '(?-i:[ıI])', - )); - $s = "/{$s}/ui"; - } - - $search[$i] = $s; - } - - $subject = preg_replace($search, $replace, $subject, -1, $replace); - $count = $replace; - - return $subject; - } - - static function ucfirst($s) - { - if ('i' === substr($s, 0, 1)) return 'İ' . substr($s, 1); - else return parent::ucfirst($s); - } - - static function ucwords($s) - { - if (false !== strpos($s, 'i')) $s = preg_replace('/\bi/u', 'İ', $s); - return parent::ucwords($s); - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8.php b/vendor/patchwork/utf8/class/Patchwork/Utf8.php deleted file mode 100644 index 0614cff29d..0000000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8.php +++ /dev/null @@ -1,657 +0,0 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: -/* - * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the (at your option): - * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or - * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). - */ - -namespace Patchwork; - -use Normalizer as n; - -/** - * UTF-8 Grapheme Cluster aware string manipulations implementing the quasi complete - * set of native PHP string functions that need UTF-8 awareness and more. - * Missing are printf-family functions. - */ -class Utf8 -{ - protected static - - $pathPrefix, - $commonCaseFold = 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",'ι' ) - ), - $cp1252 = array('','','','','
','','','','','','','','','','','','','','','','','','','','','',''), - $utf8 = array('€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ'); - - - static function isUtf8($s) - { - return (bool) preg_match('//u', $s); // Since PHP 5.2.5, this also excludes invalid five and six bytes sequences - } - - // Generic UTF-8 to ASCII transliteration - - static function toAscii($s, $subst_chr = '?') - { - if (preg_match("/[\x80-\xFF]/", $s)) - { - static $translitExtra = array(); - $translitExtra or $translitExtra = static::getData('translit_extra'); - - $s = n::normalize($s, n::NFKC); - -/**/ $glibc = 'glibc' === ICONV_IMPL; - - preg_match_all('/./u', $s, $s); - - foreach ($s[0] as &$c) - { - if (! isset($c[1])) continue; - -/**/ if ($glibc) -/**/ { - $t = iconv('UTF-8', 'ASCII//TRANSLIT', $c); -/**/ } -/**/ else -/**/ { - $t = iconv('UTF-8', 'ASCII//IGNORE//TRANSLIT', $c); - - if (! isset($t[0])) $t = '?'; - else if (isset($t[1])) $t = ltrim($t, '\'`"^~'); -/**/ } - - if ('?' === $t) - { - if (isset($translitExtra[$c])) - { - $t = $translitExtra[$c]; - } - else - { - $t = n::normalize($c, n::NFD); - - if ($t[0] < "\x80") $t = $t[0]; - else $t = $subst_chr; - } - } - - $c = $t; - } - - $s = implode('', $s[0]); - } - - return $s; - } - - static function wrapPath($path = '') - { - if (null === static::$pathPrefix) - { - if (extension_loaded('wfio')) - { - static::$pathPrefix = 'wfio://'; - } - else if ('\\' === DIRECTORY_SEPARATOR && class_exists('COM', false)) - { - static::$pathPrefix = 'utf8'.mt_rand(); - stream_wrapper_register(static::$pathPrefix, 'Patchwork\Utf8\WindowsStreamWrapper'); - static::$pathPrefix .= '://'; - } else { - if ('\\' === DIRECTORY_SEPARATOR) { - trigger_error('The `wfio` or `com_dotnet` extension is required to handle UTF-8 filesystem access on Windows'); - } - static::$pathPrefix = 'file://'; - } - } - - return static::$pathPrefix . $path; - } - - static function filter($var, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') - { - switch (gettype($var)) - { - case 'array': - foreach ($var as $k => $v) $var[$k] = static::filter($v, $normalization_form, $leading_combining); - break; - - case 'object': - foreach ($var as $k => $v) $var->$k = static::filter($v, $normalization_form, $leading_combining); - break; - - case 'string': - if (false !== strpos($var, "\r")) - { - // Workaround https://bugs.php.net/65732 - $var = str_replace("\r\n", "\n", $var); - $var = strtr($var, "\r", "\n"); - } - - if (preg_match('/[\x80-\xFF]/', $var)) - { - if (n::isNormalized($var, $normalization_form)) $n = '-'; - else - { - $n = n::normalize($var, $normalization_form); - if (isset($n[0])) $var = $n; - else $var = static::utf8_encode($var); - } - - if ($var[0] >= "\x80" && isset($n[0], $leading_combining[0]) && preg_match('/^\p{Mn}/u', $var)) - { - // Prevent leading combining chars - // for NFC-safe concatenations. - $var = $leading_combining . $var; - } - } - break; - } - - return $var; - } - - // Unicode transformation for caseless matching - // see http://unicode.org/reports/tr21/tr21-5.html - - static function strtocasefold($s, $full = true) - { - $s = str_replace(self::$commonCaseFold[0], self::$commonCaseFold[1], $s); - - if ($full) - { - static $fullCaseFold = false; - $fullCaseFold || $fullCaseFold = static::getData('caseFolding_full'); - - $s = str_replace($fullCaseFold[0], $fullCaseFold[1], $s); - } - - return static::strtolower($s); - } - - // Generic case sensitive collation support for self::strnatcmp() - - static function strtonatfold($s) - { - $s = n::normalize($s, n::NFD); - return preg_replace('/\p{Mn}+/u', '', $s); - } - - // PHP string functions that need UTF-8 awareness - - static function filter_input($type, $var, $filter = FILTER_DEFAULT, $option = null) - { - if (4 > func_num_args()) $var = filter_input($type, $var, $filter); - else $var = filter_input($type, $var, $filter, $option); - - return static::filter($var); - } - - static function filter_input_array($type, $def = null, $add_empty = true) - { - if (2 > func_num_args()) $a = filter_input_array($type); - else $a = filter_input_array($type, $def, $add_empty); - - return static::filter($a); - } - - static function json_decode($json, $assoc = false, $depth = 512, $options = 0) - { -/**/ if (PHP_VERSION_ID < 50400) -/**/ { - $json = json_decode($json, $assoc, $depth); -/**/ } -/**/ else -/**/ { - $json = json_decode($json, $assoc, $depth, $options); -/**/ } - - return static::filter($json); - } - - static function substr($s, $start, $len = 2147483647) - { -/**/ static $bug62759; - -/**/ isset($bug62759) or $bug62759 = extension_loaded('intl') && 'à' === grapheme_substr('éà', 1, -2); - -/**/ if ($bug62759) -/**/ { - return PHP\Shim\Intl::grapheme_substr_workaround62759($s, $start, $len); -/**/ } -/**/ else -/**/ { - return grapheme_substr($s, $start, $len); -/**/ } - } - - static function strlen($s) {return grapheme_strlen($s);} - static function strpos ($s, $needle, $offset = 0) {return grapheme_strpos ($s, $needle, $offset);} - static function strrpos($s, $needle, $offset = 0) {return grapheme_strrpos($s, $needle, $offset);} - - static function stripos($s, $needle, $offset = 0) - { -/**/ if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) -/**/ { - // Don't use grapheme_stripos because of https://bugs.php.net/61860 - if (! preg_match('//u', $s .= '')) return false; - if ($offset < 0) $offset = 0; - if (! $needle = mb_stripos($s, $needle .= '', $offset, 'UTF-8')) return $needle; - return grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')); -/**/ } -/**/ else -/**/ { - return grapheme_stripos($s, $needle, $offset); -/**/ } - } - - static function strripos($s, $needle, $offset = 0) - { -/**/ if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) -/**/ { - // Don't use grapheme_strripos because of https://bugs.php.net/61860 - if (! preg_match('//u', $s .= '')) return false; - if ($offset < 0) $offset = 0; - if (! $needle = mb_strripos($s, $needle .= '', $offset, 'UTF-8')) return $needle; - return grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')); -/**/ } -/**/ else -/**/ { - return grapheme_strripos($s, $needle, $offset); -/**/ } - } - - static function stristr($s, $needle, $before_needle = false) - { - if ('' === $needle .= '') return false; - return mb_stristr($s, $needle, $before_needle, 'UTF-8'); - } - - static function strstr ($s, $needle, $before_needle = false) {return grapheme_strstr($s, $needle, $before_needle);} - static function strrchr ($s, $needle, $before_needle = false) {return mb_strrchr ($s, $needle, $before_needle, 'UTF-8');} - static function strrichr($s, $needle, $before_needle = false) {return mb_strrichr($s, $needle, $before_needle, 'UTF-8');} - - static function strtolower($s) {return mb_strtolower($s, 'UTF-8');} - static function strtoupper($s) {return mb_strtoupper($s, 'UTF-8');} - - static function wordwrap($s, $width = 75, $break = "\n", $cut = false) - { - if (false === wordwrap('-', $width, $break, $cut)) return false; - - is_string($break) or $break = (string) $break; - - $w = ''; - $s = explode($break, $s); - $iLen = count($s); - $chars = array(); - - if (1 === $iLen && '' === $s[0]) - return ''; - - for ($i = 0; $i < $iLen; ++$i) - { - if ($i) - { - $chars[] = $break; - $w .= '#'; - } - - $c = $s[$i]; - unset($s[$i]); - - foreach (self::str_split($c) as $c) - { - $chars[] = $c; - $w .= ' ' === $c ? ' ' : '?'; - } - } - - $s = ''; - $j = 0; - $b = $i = -1; - $w = wordwrap($w, $width, '#', $cut); - - while (false !== $b = strpos($w, '#', $b+1)) - { - for (++$i; $i < $b; ++$i) - { - $s .= $chars[$j]; - unset($chars[$j++]); - } - - if ($break === $chars[$j] || ' ' === $chars[$j]) unset($chars[$j++]); - $s .= $break; - } - - return $s . implode('', $chars); - } - - static function chr($c) - { - if (0x80 > $c %= 0x200000) return chr($c); - if (0x800 > $c) return chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F); - if (0x10000 > $c) return chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F); - return chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F); - } - - static function count_chars($s, $mode = 0) - { - if (1 != $mode) user_error(__METHOD__ . '(): the only allowed $mode is 1', E_USER_WARNING); - $s = self::str_split($s); - return array_count_values($s); - } - - static function ltrim($s, $charlist = INF) - { - $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); - return preg_replace("/^{$charlist}+/u", '', $s); - } - - static function ord($s) - { - $a = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $a) return (($a - 0xF0)<<18) + (($s[2] - 0x80)<<12) + (($s[3] - 0x80)<<6) + $s[4] - 0x80; - if (0xE0 <= $a) return (($a - 0xE0)<<12) + (($s[2] - 0x80)<<6) + $s[3] - 0x80; - if (0xC0 <= $a) return (($a - 0xC0)<<6) + $s[2] - 0x80; - return $a; - } - - static function rtrim($s, $charlist = INF) - { - $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); - return preg_replace("/{$charlist}+$/u", '', $s); - } - - static function trim($s, $charlist = INF) {return self::rtrim(self::ltrim($s, $charlist), $charlist);} - - static function str_ireplace($search, $replace, $subject, &$count = null) - { - $search = (array) $search; - - foreach ($search as $i => $s) - { - if ('' === $s .= '') $s = '/^(?<=.)$/'; - else $s = '/' . preg_quote($s, '/') . '/ui'; - - $search[$i] = $s; - } - - $subject = preg_replace($search, $replace, $subject, -1, $replace); - $count = $replace; - - return $subject; - } - - static function str_pad($s, $len, $pad = ' ', $type = STR_PAD_RIGHT) - { - $slen = grapheme_strlen($s); - if ($len <= $slen) return $s; - - $padlen = grapheme_strlen($pad); - $freelen = $len - $slen; - $len = $freelen % $padlen; - - if (STR_PAD_RIGHT == $type) return $s . str_repeat($pad, $freelen / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : ''); - if (STR_PAD_LEFT == $type) return str_repeat($pad, $freelen / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : '') . $s; - if (STR_PAD_BOTH == $type) - { - $freelen /= 2; - - $type = ceil($freelen); - $len = $type % $padlen; - $s .= str_repeat($pad, $type / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : ''); - - $type = floor($freelen); - $len = $type % $padlen; - return str_repeat($pad, $type / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : '') . $s; - } - - user_error(__METHOD__ . '(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH', E_USER_WARNING); - } - - static function str_shuffle($s) - { - $s = self::str_split($s); - shuffle($s); - return implode('', $s); - } - - static function str_split($s, $len = 1) - { - if (1 > $len = (int) $len) - { - $len = func_get_arg(1); - return str_split($s, $len); - } - -/**/ if (extension_loaded('intl')) -/**/ { - $a = array(); - $p = 0; - $l = strlen($s); - - while ($p < $l) $a[] = grapheme_extract($s, 1, GRAPHEME_EXTR_COUNT, $p, $p); -/**/ } -/**/ else -/**/ { - preg_match_all('/' . GRAPHEME_CLUSTER_RX . '/u', $s, $a); - $a = $a[0]; -/**/ } - - if (1 == $len) return $a; - - $s = array(); - $p = -1; - - foreach ($a as $l => $a) - { - if ($l % $len) $s[$p] .= $a; - else $s[++$p] = $a; - } - - return $s; - } - - static function str_word_count($s, $format = 0, $charlist = '') - { - $charlist = self::rxClass($charlist, '\pL'); - $s = preg_split("/({$charlist}+(?:[\p{Pd}’']{$charlist}+)*)/u", $s, -1, PREG_SPLIT_DELIM_CAPTURE); - - $charlist = array(); - $len = count($s); - - if (1 == $format) for ($i = 1; $i < $len; $i+=2) $charlist[] = $s[$i]; - else if (2 == $format) - { - $offset = grapheme_strlen($s[0]); - for ($i = 1; $i < $len; $i+=2) - { - $charlist[$offset] = $s[$i]; - $offset += grapheme_strlen($s[$i]) + grapheme_strlen($s[$i+1]); - } - } - else $charlist = ($len - 1) / 2; - - return $charlist; - } - - static function strcmp ($a, $b) {return $a . '' === $b . '' ? 0 : strcmp(n::normalize($a, n::NFD), n::normalize($b, n::NFD));} - static function strnatcmp ($a, $b) {return $a . '' === $b . '' ? 0 : strnatcmp(self::strtonatfold($a), self::strtonatfold($b));} - static function strcasecmp ($a, $b) {return self::strcmp (static::strtocasefold($a), static::strtocasefold($b));} - static function strnatcasecmp($a, $b) {return self::strnatcmp(static::strtocasefold($a), static::strtocasefold($b));} - static function strncasecmp ($a, $b, $len) {return self::strncmp(static::strtocasefold($a), static::strtocasefold($b), $len);} - static function strncmp ($a, $b, $len) {return self::strcmp(self::substr($a, 0, $len), self::substr($b, 0, $len));} - - static function strcspn($s, $charlist, $start = 0, $len = 2147483647) - { - if ('' === $charlist .= '') return null; - if ($start || 2147483647 != $len) $s = self::substr($s, $start, $len); - - return preg_match('/^(.*?)' . self::rxClass($charlist) . '/us', $s, $len) ? grapheme_strlen($len[1]) : grapheme_strlen($s); - } - - static function strpbrk($s, $charlist) - { - if (preg_match('/' . self::rxClass($charlist) . '/us', $s, $m)) return substr($s, strpos($s, $m[0])); - else return false; - } - - static function strrev($s) - { - $s = self::str_split($s); - return implode('', array_reverse($s)); - } - - static function strspn($s, $mask, $start = 0, $len = 2147483647) - { - if ($start || 2147483647 != $len) $s = self::substr($s, $start, $len); - return preg_match('/^' . self::rxClass($mask) . '+/u', $s, $s) ? grapheme_strlen($s[0]) : 0; - } - - static function strtr($s, $from, $to = INF) - { - if (INF !== $to) - { - $from = self::str_split($from); - $to = self::str_split($to); - - $a = count($from); - $b = count($to); - - if ($a > $b) $from = array_slice($from, 0, $b); - else if ($a < $b) $to = array_slice($to , 0, $a); - - $from = array_combine($from, $to); - } - - return strtr($s, $from); - } - - static function substr_compare($a, $b, $offset, $len = 2147483647, $i = 0) - { - $a = self::substr($a, $offset, $len); - return $i ? static::strcasecmp($a, $b) : self::strcmp($a, $b); - } - - static function substr_count($s, $needle, $offset = 0, $len = 2147483647) - { - return substr_count(self::substr($s, $offset, $len), $needle); - } - - static function substr_replace($s, $replace, $start, $len = 2147483647) - { - $s = self::str_split($s); - $replace = self::str_split($replace); - array_splice($s, $start, $len, $replace); - return implode('', $s); - } - - static function ucfirst($s) - { - $c = iconv_substr($s, 0, 1, 'UTF-8'); - return static::ucwords($c) . substr($s, strlen($c)); - } - - static function lcfirst($s) - { - $c = iconv_substr($s, 0, 1, 'UTF-8'); - return static::strtolower($c) . substr($s, strlen($c)); - } - - static function ucwords($s) - { - return preg_replace_callback( - "/\b(.)/u", - function ($matches) { - return mb_convert_case($matches[1], MB_CASE_TITLE, 'UTF-8'); - }, - $s - ); - } - - static function number_format($number, $decimals = 0, $dec_point = '.', $thousands_sep = ',') - { -/**/ if (PHP_VERSION_ID < 50400) -/**/ { - if (isset($thousands_sep[1]) || isset($dec_point[1])) - { - return str_replace( - array('.', ','), - array($dec_point, $thousands_sep), - number_format($number, $decimals, '.', ',') - ); - } -/**/ } - - return number_format($number, $decimals, $dec_point, $thousands_sep); - } - - static function utf8_encode($s) - { - $s = utf8_encode($s); - if (false === strpos($s, "\xC2")) return $s; - else return str_replace(self::$cp1252, self::$utf8, $s); - } - - static function utf8_decode($s) - { - $s = str_replace(self::$utf8, self::$cp1252, $s); - return utf8_decode($s); - } - - static function strwidth($s) - { - if (false !== strpos($s, "\r")) - { - $s = str_replace("\r\n", "\n", $s); - $s = strtr($s, "\r", "\n"); - } - $width = 0; - - foreach (explode("\n", $s) as $s) - { - $s = preg_replace('/\x1B\[[\d;]*m/', '', $s); - $c = substr_count($s, "\xAD") - substr_count($s, "\x08"); - $s = preg_replace('/[\x00\x05\x07\p{Mn}\p{Me}\p{Cf}\x{1160}-\x{11FF}\x{200B}]+/u', '', $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); - - if ($width < $c = iconv_strlen($s, 'UTF-8') + $wide + $c) - { - $width = $c; - } - } - - return $width; - } - - protected static function rxClass($s, $class = '') - { - $class = array($class); - - foreach (self::str_split($s) as $s) - { - if ('-' === $s) $class[0] = '-' . $class[0]; - else if (!isset($s[2])) $class[0] .= preg_quote($s, '/'); - else if (1 === iconv_strlen($s, 'UTF-8')) $class[0] .= $s; - else $class[] = $s; - } - - $class[0] = '[' . $class[0] . ']'; - - if (1 === count($class)) return $class[0]; - else return '(?:' . implode('|', $class) . ')'; - } - - protected static function getData($file) - { - $file = __DIR__ . '/Utf8/data/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/BestFit.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/BestFit.php deleted file mode 100644 index 72b0d00dd3..0000000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/BestFit.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: -/* - * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the (at your option): - * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or - * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). - */ - -namespace Patchwork\Utf8; - -/** - * UTF-8 to Code Page conversion using best fit mappings - * See http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/ - */ -class BestFit -{ - static function fit($cp, $s, $placeholder = '?') - { - if (! $len = strlen($s)) return 0 === $len ? '' : false; - - static $map = array(); - static $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); - - $s .= ''; - $cp = (string) (int) $cp; - $result = '9' === $cp[0] ? $s . $s : $s; - - if ('932' === $cp && 2 === func_num_args()) $placeholder = "\x81\x45"; // Katakana Middle Dot in CP932 - - if (!isset($map[$cp])) - { - $i = static::getData('to.bestfit' . $cp); - if (false === $i) return false; - $map[$cp] = $i; - } - - $i = $j = 0; - $cp = $map[$cp]; - - while ($i < $len) - { - if ($s[$i] < "\x80") $uchr = $s[$i++]; - else - { - $ulen = $ulen_mask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - } - - if (isset($cp[$uchr])) $uchr = $cp[$uchr]; - else $uchr = $placeholder; - - isset($uchr[0]) && $result[$j++] = $uchr[0]; - isset($uchr[1]) && $result[$j++] = $uchr[1]; - } - - return substr($result, 0, $j); - } - - protected static function getData($file) - { - $file = __DIR__ . '/data/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/WindowsStreamWrapper.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/WindowsStreamWrapper.php deleted file mode 100644 index 6ee7fe63a5..0000000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/WindowsStreamWrapper.php +++ /dev/null @@ -1,405 +0,0 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: -/* - * Copyright (C) 2014 Nicolas Grekas - p@tchwork.com - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the (at your option): - * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or - * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). - */ - -namespace Patchwork\Utf8; - -/** - * Unicode UTF-8 aware stream based filesystem access on MS-Windows. - * - * Based on COM Scripting.FileSystemObject object and short paths. - * See Patchwork\Utf8::wrapPath() - * - * See also https://code.google.com/p/php-wfio/ for a PHP extension - * and comments on http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php - */ -class WindowsStreamWrapper -{ - public $context; - - protected $handle; - - static function hide($path) - { - list($fs, $path) = self::fs($path); - if ($fs->FileExists($path)) $fs->GetFile($path)->Attributes |= 2; - else if ($fs->FolderExists($path)) $fs->GetFolder($path)->Attributes |= 2; - else return false; - - return true; - } - - static function fs($path, $is_utf8 = true) - { - static $fs; - - if (! class_exists('COM', false)) { - throw new \RuntimeException('The `wfio` or `com_dotnet` extension is required to handle UTF-8 filesystem access on Windows'); - } - - isset($fs) or $fs = new \COM('Scripting.FileSystemObject', null, CP_UTF8); - - $path = explode('://', $path, 2); - $path = $path[(int) isset($path[1])]; - $path = strtr($path, '/', '\\'); - $pre = ''; - - if (! isset($path[0]) - || ( '/' !== $path[0] - && '\\' !== $path[0] - && false === strpos($path, ':') ) ) - { - $pre = getcwd() . '\\'; - } - - $pre = new \VARIANT($pre); - - if ($is_utf8) $path = new \VARIANT($path, VT_BSTR, CP_UTF8); - else $path = new \VARIANT($path); - - return array($fs, $fs->getAbsolutePathName(variant_cat($pre, $path))); - } - - function dir_closedir() - { - $this->handle = null; - - return true; - } - - function dir_opendir($path, $options) - { - list($fs, $path) = self::fs($path); - if (! $fs->FolderExists($path)) return false; - - $dir = $fs->GetFolder($path); - - try - { - $f = array('.', '..'); - - foreach ($dir->SubFolders() as $v) $f[] = $v->Name; - foreach ($dir->Files as $v) $f[] = $v->Name; - } - catch (\Exception $f) - { - $f = array(); - } - - $this->handle = $f; - - return true; - } - - function dir_readdir() - { - if (list(, $c) = each($this->handle)) return $c; - - return false; - } - - function dir_rewinddir() - { - reset($this->handle); - - return true; - } - - function mkdir($path, $mode, $options) - { - list($fs, $path) = self::fs($path); - - try - { - if ($options & STREAM_MKDIR_RECURSIVE) - { - $path = $fs->GetAbsolutePathName($path); - - $path = explode('\\', $path); - - if (isset($path[3]) && '' === $path[0] . $path[1]) - { - $pre = '\\\\' . $path[2] . '\\' . $path[3] . '\\'; - $i = 4; - } - else if (isset($path[1])) - { - $pre = $path[0] . '\\'; - $i = 1; - } - else - { - $pre = ''; - $i = 0; - } - - while (isset($path[$i]) && $fs->FolderExists($pre . $path[$i])) - { - $pre .= $path[$i++] . '\\'; - } - - if (! isset($path[$i])) return false; - - while (isset($path[$i])) - { - $fs->CreateFolder($pre .= $path[$i++] . '\\'); - } - - return true; - } - else - { - $fs->CreateFolder($path); - } - - return true; - } - catch (\Exception $e) - { - return false; - } - } - - function rename($from, $to) - { - list($fs, $to) = self::fs($to); - - if ($fs->FileExists($to) || $fs->FolderExists($to)) - { - return false; - } - - list(,$from) = self::fs($from); - - try - { - if ($fs->FileExists($from)) - { - $fs->MoveFile($from, $to); - - return true; - } - - if ($fs->FolderExists($from)) - { - $fs->MoveFolder($from, $to); - - return true; - } - } - catch (\Exception $e) {} - - return false; - } - - function rmdir($path, $options) - { - list($fs, $path) = self::fs($path); - - if ($fs->FolderExists($path)) return rmdir($fs->GetFolder($path)->ShortPath); - - return false; - } - - // @todo function stream_cast($cast_as) - - function stream_close() - { - fclose($this->handle); - $this->handle = null; - } - - function stream_eof() - { - return feof($this->handle); - } - - function stream_flush() - { - return fflush($this->handle); - } - - function stream_lock($operation) - { - return flock($this->handle, $operation); - } - - function stream_metadata($path, $option, $value) - { - list($fs, $path) = self::fs($path); - - if ($fs->FileExists($path)) $f = $fs->GetFile($path); - else if ($fs->FileExists($path)) $f = $fs->GetFolder($path); - else $f = false; - - if (STREAM_META_TOUCH === $option) - { - if ($f) return touch($f->ShortPath); - - try - { - $fs->OpenTextFile($path, 8, true, 0)->Close(); - - return true; - } - catch (\Exception $e) {} - } - - if (! $f) return false; - - switch ($option) - { - case STREAM_META_ACCESS: return chmod($f->ShortPath, $value); - case STREAM_META_OWNER: - case STREAM_META_OWNER_NAME: return chown($f->ShortPath, $value); - case STREAM_META_GROUP: - case STREAM_META_GROUP_NAME: return chgrp($f->ShortPath, $value); - default: return false; - } - } - - function stream_open($path, $mode, $options, &$opened_path) - { - $mode .= ''; - list($fs, $path) = self::fs($path); - - if ($fs->FolderExists($path)) return false; - - try - { - if ('x' === $m = substr($mode, 0, 1)) - { - $fs->CreateTextFile($path, false)->Close(); - $f = $fs->GetFile($path); - $mode[0] = 'w'; - } - else - { - $f = $fs->GetFile($path); - } - } - catch (\Exception $f) - { - try - { - switch ($m) - { - case 'w': - case 'c': - case 'a': - $h = $fs->CreateTextFile($path, true); - $f = $fs->GetFile($path); - $h->Close(); - break; - - default: return false; - } - } - catch (\Exception $e) - { - return false; - } - } - - if (! (STREAM_REPORT_ERRORS & $options)) - { - set_error_handler('var_dump', 0); - $e = error_reporting(0); - } - - $this->handle = fopen($f->ShortPath, $mode); - - if (! (STREAM_REPORT_ERRORS & $options)) - { - error_reporting($e); - restore_error_handler(); - } - - if ($this->handle) return true; - if (isset($h)) $f->Delete(true); - - return false; - } - - function stream_read($count) - { - return fread($this->handle, $count); - } - - function stream_seek($offset, $whence = SEEK_SET) - { - return fseek($this->handle, $offset, $whence); - } - - function stream_set_option($option, $arg1, $arg2) - { - switch ($option) - { - case STREAM_OPTION_BLOCKING: return stream_set_blocking($this->handle, $arg1); - case STREAM_OPTION_READ_TIMEOUT: return stream_set_timeout($this->handle, $arg1, $arg2); - case STREAM_OPTION_WRITE_BUFFER: return stream_set_write_buffer($this->handle, $arg1, $arg2); - default: return false; - } - } - - function stream_stat() - { - return fstat($this->handle); - } - - function stream_tell() - { - return ftell($this->handle); - } - - function stream_truncate($new_size) - { - return ftruncate($this->handle, $new_size); - } - - function stream_write($data) - { - return fwrite($this->handle, $data, strlen($data)); - } - - function unlink($path) - { - list($fs, $path) = self::fs($path); - - if ($fs->FileExists($path)) return unlink($fs->GetFile($path)->ShortPath); - - return false; - } - - function url_stat($path, $flags) - { - list($fs, $path) = self::fs($path); - - if ($fs->FileExists($path)) $f = $fs->GetFile($path); - else if ($fs->FolderExists($path)) $f = $fs->GetFolder($path); - else return false; - - if (STREAM_URL_STAT_QUIET & $flags) - { - set_error_handler('var_dump', 0); - $e = error_reporting(0); - } - - if (STREAM_URL_STAT_LINK & $flags) $f = @lstat($f->ShortPath) ?: stat($f->ShortPath); - else $f = stat($f->ShortPath); - - if (STREAM_URL_STAT_QUIET & $flags) - { - error_reporting($e); - restore_error_handler(); - } - - return $f; - } -} diff --git a/vendor/patchwork/utf8/composer.json b/vendor/patchwork/utf8/composer.json index e06e85c693..4b35276161 100644 --- a/vendor/patchwork/utf8/composer.json +++ b/vendor/patchwork/utf8/composer.json @@ -22,10 +22,8 @@ "ext-mbstring": "Use Mbstring for best performance" }, "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } + "psr-4": {"Patchwork\\": "src/Patchwork/"}, + "classmap": ["src/Normalizer.php"] }, "extra": { "branch-alias": { diff --git a/vendor/patchwork/utf8/class/Normalizer.php b/vendor/patchwork/utf8/src/Normalizer.php index 3acd5f308e..f9b716c6d9 100644 --- a/vendor/patchwork/utf8/class/Normalizer.php +++ b/vendor/patchwork/utf8/src/Normalizer.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Iconv.php index 43e5933f47..15abcbdcc1 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Iconv.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -32,21 +33,14 @@ namespace Patchwork\PHP\Shim; */ class Iconv { - const - - ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string', - ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'; - - - public static - - $input_encoding = 'utf-8', - $output_encoding = 'utf-8', - $internal_encoding = 'utf-8'; + const ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string'; + const ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'; - protected static + public static $input_encoding = 'utf-8'; + public static $output_encoding = 'utf-8'; + public static $internal_encoding = 'utf-8'; - $alias = array( + protected static $alias = array( 'utf8' => 'utf-8', 'ascii' => 'us-ascii', 'tis-620' => 'iso-8859-11', @@ -119,163 +113,165 @@ class Iconv 'iso885914' => 'iso-8859-14', 'iso885915' => 'iso-8859-15', 'iso885916' => 'iso-8859-16', - ), + ); + protected static $translit_map = array(); + protected static $convert_map = array(); + protected static $error_handler; + protected static $last_error; - $translit_map = array(), - $convert_map = array(), - $error_handler, - $last_error, + protected static $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + protected static $is_valid_utf8; - $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4), - $is_valid_utf8; - - - static function iconv($in_charset, $out_charset, $str) + public static function iconv($in_charset, $out_charset, $str) { - if ('' === $str .= '') return ''; + if ('' === $str .= '') { + return ''; + } // Prepare for //IGNORE and //TRANSLIT $TRANSLIT = $IGNORE = ''; $out_charset = strtolower($out_charset); - $in_charset = strtolower($in_charset ); + $in_charset = strtolower($in_charset); - '' === $out_charset && $out_charset = 'iso-8859-1'; - '' === $in_charset && $in_charset = 'iso-8859-1'; + '' === $out_charset and $out_charset = 'iso-8859-1'; + '' === $in_charset and $in_charset = 'iso-8859-1'; - if ('//translit' === substr($out_charset, -10)) - { + if ('//translit' === substr($out_charset, -10)) { $TRANSLIT = '//TRANSLIT'; $out_charset = substr($out_charset, 0, -10); } - if ('//ignore' === substr($out_charset, -8)) - { + if ('//ignore' === substr($out_charset, -8)) { $IGNORE = '//IGNORE'; $out_charset = substr($out_charset, 0, -8); } - '//translit' === substr($in_charset, -10) && $in_charset = substr($in_charset, 0, -10); - '//ignore' === substr($in_charset, -8) && $in_charset = substr($in_charset, 0, -8); - - isset(self::$alias[ $in_charset]) && $in_charset = self::$alias[ $in_charset]; - isset(self::$alias[$out_charset]) && $out_charset = self::$alias[$out_charset]; + '//translit' === substr($in_charset, -10) and $in_charset = substr($in_charset, 0, -10); + '//ignore' === substr($in_charset, -8) and $in_charset = substr($in_charset, 0, -8); + isset(self::$alias[ $in_charset]) and $in_charset = self::$alias[ $in_charset]; + isset(self::$alias[$out_charset]) and $out_charset = self::$alias[$out_charset]; // Load charset maps - if ( ('utf-8' !== $in_charset && !static::loadMap('from.', $in_charset, $in_map)) - || ('utf-8' !== $out_charset && !static::loadMap( 'to.', $out_charset, $out_map)) ) - { + if (('utf-8' !== $in_charset && !static::loadMap('from.', $in_charset, $in_map)) + || ('utf-8' !== $out_charset && !static::loadMap('to.', $out_charset, $out_map))) { user_error(sprintf(self::ERROR_WRONG_CHARSET, $in_charset, $out_charset)); + return false; } - - if ('utf-8' !== $in_charset) - { + if ('utf-8' !== $in_charset) { // Convert input to UTF-8 $result = ''; - if (self::map_to_utf8($result, $in_map, $str, $IGNORE)) $str = $result; - else $str = false; + if (self::map_to_utf8($result, $in_map, $str, $IGNORE)) { + $str = $result; + } else { + $str = false; + } self::$is_valid_utf8 = true; - } - else - { + } else { self::$is_valid_utf8 = preg_match('//u', $str); - if (!self::$is_valid_utf8 && !$IGNORE) - { + if (!self::$is_valid_utf8 && !$IGNORE) { user_error(self::ERROR_ILLEGAL_CHARACTER); + return false; } - if ('utf-8' === $out_charset) - { + if ('utf-8' === $out_charset) { // UTF-8 validation $str = self::utf8_to_utf8($str, $IGNORE); } } - if ('utf-8' !== $out_charset && false !== $str) - { + if ('utf-8' !== $out_charset && false !== $str) { // Convert output to UTF-8 $result = ''; - if (self::map_from_utf8($result, $out_map, $str, $IGNORE, $TRANSLIT)) return $result; - else return false; + if (self::map_from_utf8($result, $out_map, $str, $IGNORE, $TRANSLIT)) { + return $result; + } else { + return false; + } + } else { + return $str; } - else return $str; } - static function iconv_mime_decode_headers($str, $mode = 0, $charset = INF) + public static function iconv_mime_decode_headers($str, $mode = 0, $charset = INF) { - INF === $charset && $charset = self::$internal_encoding; + INF === $charset and $charset = self::$internal_encoding; - false !== strpos($str, "\r") && $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); + false !== strpos($str, "\r") and $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); $str = explode("\n\n", $str, 2); $headers = array(); $str = preg_split('/\n(?![ \t])/', $str[0]); - foreach ($str as $str) - { + foreach ($str as $str) { $str = self::iconv_mime_decode($str, $mode, $charset); - if (false === $str) return false; + if (false === $str) { + return false; + } $str = explode(':', $str, 2); - if (2 === count($str)) - { - if (isset($headers[$str[0]])) - { - is_array($headers[$str[0]]) || $headers[$str[0]] = array($headers[$str[0]]); + if (2 === count($str)) { + if (isset($headers[$str[0]])) { + is_array($headers[$str[0]]) or $headers[$str[0]] = array($headers[$str[0]]); $headers[$str[0]][] = ltrim($str[1]); + } else { + $headers[$str[0]] = ltrim($str[1]); } - else $headers[$str[0]] = ltrim($str[1]); } } return $headers; } - static function iconv_mime_decode($str, $mode = 0, $charset = INF) + public static function iconv_mime_decode($str, $mode = 0, $charset = INF) { - INF === $charset && $charset = self::$internal_encoding; - if (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) $charset .= '//IGNORE'; + INF === $charset and $charset = self::$internal_encoding; + if (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { + $charset .= '//IGNORE'; + } - false !== strpos($str, "\r") && $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); + false !== strpos($str, "\r") and $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); $str = preg_split('/\n(?![ \t])/', rtrim($str), 2); $str = preg_replace('/[ \t]*\n[ \t]+/', ' ', rtrim($str[0])); $str = preg_split('/=\?([^?]+)\?([bqBQ])\?(.*?)\?=/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); $result = self::iconv('utf-8', $charset, $str[0]); - if (false === $result) return false; + if (false === $result) { + return false; + } $i = 1; $len = count($str); - while ($i < $len) - { + while ($i < $len) { $c = strtolower($str[$i]); - if ( (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) + if ((ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) && 'utf-8' !== $c && !isset(self::$alias[$c]) - && !static::loadMap('from.', $c, $d) ) $d = false; - else if ('B' === strtoupper($str[$i+1])) $d = base64_decode($str[$i+2]); - else $d = rawurldecode(strtr(str_replace('%', '%25', $str[$i+2]), '=_', '% ')); + && !static::loadMap('from.', $c, $d)) { + $d = false; + } elseif ('B' === strtoupper($str[$i + 1])) { + $d = base64_decode($str[$i + 2]); + } else { + $d = rawurldecode(strtr(str_replace('%', '%25', $str[$i + 2]), '=_', '% ')); + } - if (false !== $d) - { + if (false !== $d) { $result .= self::iconv($c, $charset, $d); - $d = self::iconv('utf-8' , $charset, $str[$i+3]); - if ('' !== trim($d)) $result .= $d; - } - else if (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) - { - $result .= "=?{$str[$i]}?{$str[$i+1]}?{$str[$i+2]}?={$str[$i+3]}"; - } - else - { + $d = self::iconv('utf-8', $charset, $str[$i + 3]); + if ('' !== trim($d)) { + $result .= $d; + } + } elseif (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { + $result .= "=?{$str[$i]}?{$str[$i + 1]}?{$str[$i + 2]}?={$str[$i + 3]}"; + } else { $result = false; break; } @@ -286,55 +282,55 @@ class Iconv return $result; } - static function iconv_get_encoding($type = 'all') + public static function iconv_get_encoding($type = 'all') { - switch ($type) - { - case 'input_encoding' : return self::$input_encoding; - case 'output_encoding' : return self::$output_encoding; - case 'internal_encoding': return self::$internal_encoding; + switch ($type) { + case 'input_encoding' : return self::$input_encoding; + case 'output_encoding' : return self::$output_encoding; + case 'internal_encoding': return self::$internal_encoding; } return array( 'input_encoding' => self::$input_encoding, 'output_encoding' => self::$output_encoding, - 'internal_encoding' => self::$internal_encoding + 'internal_encoding' => self::$internal_encoding, ); } - static function iconv_set_encoding($type, $charset) + public static function iconv_set_encoding($type, $charset) { - switch ($type) - { - case 'input_encoding' : self::$input_encoding = $charset; break; - case 'output_encoding' : self::$output_encoding = $charset; break; - case 'internal_encoding': self::$internal_encoding = $charset; break; + switch ($type) { + case 'input_encoding' : self::$input_encoding = $charset; break; + case 'output_encoding' : self::$output_encoding = $charset; break; + case 'internal_encoding': self::$internal_encoding = $charset; break; - default: return false; + default: return false; } return true; } - static function iconv_mime_encode($field_name, $field_value, $pref = INF) + public static function iconv_mime_encode($field_name, $field_value, $pref = INF) { - is_array($pref) || $pref = array(); + is_array($pref) or $pref = array(); $pref += array( 'scheme' => 'B', 'input-charset' => self::$internal_encoding, 'output-charset' => self::$internal_encoding, 'line-length' => 76, - 'line-break-chars' => "\r\n" + 'line-break-chars' => "\r\n", ); - preg_match('/[\x80-\xFF]/', $field_name) && $field_name = ''; + preg_match('/[\x80-\xFF]/', $field_name) and $field_name = ''; $scheme = strtoupper(substr($pref['scheme'], 0, 1)); $in = strtolower($pref['input-charset']); $out = strtolower($pref['output-charset']); - if ('utf-8' !== $in && false === $field_value = self::iconv($in, 'utf-8', $field_value)) return false; + if ('utf-8' !== $in and false === $field_value = self::iconv($in, 'utf-8', $field_value)) { + return false; + } preg_match_all('/./us', $field_value, $chars); @@ -350,9 +346,10 @@ class Iconv $Q = 'Q' === $scheme; - foreach ($chars as $c) - { - if ('utf-8' !== $out && false === $c = self::iconv('utf-8', $out, $c)) return false; + foreach ($chars as $c) { + if ('utf-8' !== $out && false === $c = self::iconv('utf-8', $out, $c)) { + return false; + } $o = $Q ? $c = preg_replace_callback( @@ -360,12 +357,11 @@ class Iconv array(__CLASS__, 'qp_byte_callback'), $c ) - : base64_encode($line_data . $c); + : base64_encode($line_data.$c); - if (isset($o[$line_break - $line_length])) - { - $Q || $line_data = base64_encode($line_data); - $field_value[] = $line_start . $line_data . '?='; + if (isset($o[$line_break - $line_length])) { + $Q or $line_data = base64_encode($line_data); + $field_value[] = $line_start.$line_data.'?='; $line_length = $line_offset; $line_data = ''; } @@ -374,48 +370,55 @@ class Iconv $Q && $line_length += strlen($c); } - if ('' !== $line_data) - { - $Q || $line_data = base64_encode($line_data); - $field_value[] = $line_start . $line_data . '?='; + if ('' !== $line_data) { + $Q or $line_data = base64_encode($line_data); + $field_value[] = $line_start.$line_data.'?='; } - return $field_name . ': ' . implode($pref['line-break-chars'] . ' ', $field_value); + return $field_name.': '.implode($pref['line-break-chars'].' ', $field_value); } - static function ob_iconv_handler($buffer, $mode) + public static function ob_iconv_handler($buffer, $mode) { return self::iconv(self::$internal_encoding, self::$output_encoding, $buffer); } - static function iconv_strlen($s, $encoding = INF) + public static function iconv_strlen($s, $encoding = INF) { -/**/ if (extension_loaded('xml')) + static $hasXml; + isset($hasXml) or $hasXml = extension_loaded('xml'); + + if ($hasXml) { return self::strlen1($s, $encoding); -/**/ else - return self::strlen2($s, $encoding); + } + + return self::strlen2($s, $encoding); } - static function strlen1($s, $encoding = INF) + public static function strlen1($s, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; + INF === $encoding and $encoding = self::$internal_encoding; + if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } return strlen(utf8_decode($s)); } - static function strlen2($s, $encoding = INF) + public static function strlen2($s, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; + INF === $encoding and $encoding = self::$internal_encoding; + if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } $ulen_mask = self::$ulen_mask; - $i = 0; $j = 0; + $i = 0; + $j = 0; $len = strlen($s); - while ($i < $len) - { + while ($i < $len) { $u = $s[$i] & "\xF0"; $i += isset($ulen_mask[$u]) ? $ulen_mask[$u] : 1; ++$j; @@ -424,78 +427,110 @@ class Iconv return $j; } - static function iconv_strpos($haystack, $needle, $offset = 0, $encoding = INF) + public static function iconv_strpos($haystack, $needle, $offset = 0, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5)) - { - if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) return false; - if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) return false; + if (0 !== strncasecmp($encoding, 'utf-8', 5)) { + if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { + return false; + } + if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { + return false; + } } - if ($offset = (int) $offset) $haystack = self::iconv_substr($haystack, $offset, 2147483647, 'utf-8'); + if ($offset = (int) $offset) { + $haystack = self::iconv_substr($haystack, $offset, 2147483647, 'utf-8'); + } $pos = strpos($haystack, $needle); + return false === $pos ? false : ($offset + ($pos ? self::iconv_strlen(substr($haystack, 0, $pos), 'utf-8') : 0)); } - static function iconv_strrpos($haystack, $needle, $encoding = INF) + public static function iconv_strrpos($haystack, $needle, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5)) - { - if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) return false; - if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) return false; + if (0 !== strncasecmp($encoding, 'utf-8', 5)) { + if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { + return false; + } + if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { + return false; + } } $pos = isset($needle[0]) ? strrpos($haystack, $needle) : false; + return false === $pos ? false : self::iconv_strlen($pos ? substr($haystack, 0, $pos) : $haystack, 'utf-8'); } - static function iconv_substr($s, $start, $length = 2147483647, $encoding = INF) + public static function iconv_substr($s, $start, $length = 2147483647, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 === strncasecmp($encoding, 'utf-8', 5)) $encoding = INF; - else if (false === $s = self::iconv($encoding, 'utf-8', $s)) return false; + INF === $encoding and $encoding = self::$internal_encoding; + if (0 === strncasecmp($encoding, 'utf-8', 5)) { + $encoding = INF; + } elseif (false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } $s .= ''; $slen = self::iconv_strlen($s, 'utf-8'); $start = (int) $start; - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; + if (0 > $start) { + $start += $slen; + } + if (0 > $start) { + return false; + } + if ($start >= $slen) { + return false; + } $rx = $slen - $start; - if (0 > $length) $length += $rx; - if (0 === $length) return ''; - if (0 > $length) return false; + if (0 > $length) { + $length += $rx; + } + if (0 === $length) { + return ''; + } + if (0 > $length) { + return false; + } - if ($length > $rx) $length = $rx; + if ($length > $rx) { + $length = $rx; + } - $rx = '/^' . ($start ? self::preg_offset($start) : '') . '(' . self::preg_offset($length) . ')/u'; + $rx = '/^'.($start ? self::preg_offset($start) : '').'('.self::preg_offset($length).')/u'; $s = preg_match($rx, $s, $s) ? $s[1] : ''; - if (INF === $encoding) return $s; - else return self::iconv('utf-8', $encoding, $s); + if (INF === $encoding) { + return $s; + } else { + return self::iconv('utf-8', $encoding, $s); + } } protected static function loadMap($type, $charset, &$map) { - if (!isset(self::$convert_map[$type . $charset])) - { - if (false === $map = static::getData($type . $charset)) - { - if ('to.' === $type && static::loadMap('from.', $charset, $map)) $map = array_flip($map); - else return false; + if (!isset(self::$convert_map[$type.$charset])) { + if (false === $map = static::getData($type.$charset)) { + if ('to.' === $type && static::loadMap('from.', $charset, $map)) { + $map = array_flip($map); + } else { + return false; + } } - self::$convert_map[$type . $charset] = $map; + self::$convert_map[$type.$charset] = $map; + } else { + $map = self::$convert_map[$type.$charset]; } - else $map = self::$convert_map[$type . $charset]; return true; } @@ -509,33 +544,32 @@ class Iconv $i = $j = 0; $len = strlen($str); - while ($i < $len) - { - if ($str[$i] < "\x80") $u[$j++] = $str[$i++]; - else - { + while ($i < $len) { + if ($str[$i] < "\x80") { + $u[$j++] = $str[$i++]; + } else { $ulen = $str[$i] & "\xF0"; $ulen = isset($ulen_mask[$ulen]) ? $ulen_mask[$ulen] : 1; $uchr = substr($str, $i, $ulen); - if (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr))) - { - if ($IGNORE) - { + if (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr))) { + if ($IGNORE) { ++$i; continue; } user_error(self::ERROR_ILLEGAL_CHARACTER); + return false; + } else { + $i += $ulen; } - else $i += $ulen; $u[$j++] = $uchr[0]; - isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1]) - && isset($uchr[2]) && 0 !== ($u[$j++] = $uchr[2]) - && isset($uchr[3]) && 0 !== ($u[$j++] = $uchr[3]); + isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1]) + && isset($uchr[2]) && 0 !== ($u[$j++] = $uchr[2]) + && isset($uchr[3]) && 0 !== ($u[$j++] = $uchr[3]); } } @@ -545,13 +579,14 @@ class Iconv protected static function map_to_utf8(&$result, $map, $str, $IGNORE) { $len = strlen($str); - for ($i = 0; $i < $len; ++$i) - { - if (isset($str[$i+1], $map[$str[$i] . $str[$i+1]])) $result .= $map[$str[$i] . $str[++$i]]; - else if (isset($map[$str[$i]])) $result .= $map[$str[$i]]; - else if (!$IGNORE) - { + for ($i = 0; $i < $len; ++$i) { + if (isset($str[$i + 1], $map[$str[$i].$str[$i + 1]])) { + $result .= $map[$str[$i].$str[++$i]]; + } elseif (isset($map[$str[$i]])) { + $result .= $map[$str[$i]]; + } elseif (!$IGNORE) { user_error(self::ERROR_ILLEGAL_CHARACTER); + return false; } } @@ -564,53 +599,50 @@ class Iconv $ulen_mask = self::$ulen_mask; $valid = self::$is_valid_utf8; - if ($TRANSLIT) self::$translit_map or self::$translit_map = static::getData('translit'); + if ($TRANSLIT) { + self::$translit_map or self::$translit_map = static::getData('translit'); + } $i = 0; $len = strlen($str); - while ($i < $len) - { - if ($str[$i] < "\x80") $uchr = $str[$i++]; - else - { + while ($i < $len) { + if ($str[$i] < "\x80") { + $uchr = $str[$i++]; + } else { $ulen = $str[$i] & "\xF0"; $ulen = isset($ulen_mask[$ulen]) ? $ulen_mask[$ulen] : 1; $uchr = substr($str, $i, $ulen); - if ($IGNORE && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) - { + if ($IGNORE && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) { ++$i; continue; + } else { + $i += $ulen; } - else $i += $ulen; } - if (isset($map[$uchr])) - { + if (isset($map[$uchr])) { $result .= $map[$uchr]; - } - else if ($TRANSLIT) - { - if (isset(self::$translit_map[$uchr])) - { + } elseif ($TRANSLIT) { + if (isset(self::$translit_map[$uchr])) { $uchr = self::$translit_map[$uchr]; - } - else if ($uchr >= "\xC3\x80") - { + } elseif ($uchr >= "\xC3\x80") { $uchr = \Normalizer::normalize($uchr, \Normalizer::NFD); - if ($uchr[0] < "\x80") $uchr = $uchr[0]; - else if ($IGNORE) continue; - else return false; + if ($uchr[0] < "\x80") { + $uchr = $uchr[0]; + } elseif ($IGNORE) { + continue; + } else { + return false; + } } - $str = $uchr . substr($str, $i); + $str = $uchr.substr($str, $i); $len = strlen($str); $i = 0; - } - else if (!$IGNORE) - { + } elseif (!$IGNORE) { return false; } } @@ -620,7 +652,7 @@ class Iconv protected static function qp_byte_callback($m) { - return '=' . strtoupper(dechex(ord($m[0]))); + return '='.strtoupper(dechex(ord($m[0]))); } protected static function preg_offset($offset) @@ -628,19 +660,21 @@ class Iconv $rx = array(); $offset = (int) $offset; - while ($offset > 65535) - { + while ($offset > 65535) { $rx[] = '.{65535}'; $offset -= 65535; } - return implode('', $rx) . '.{' . $offset . '}'; + return implode('', $rx).'.{'.$offset.'}'; } protected static function getData($file) { - $file = __DIR__ . '/charset/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; + $file = __DIR__.'/charset/'.$file.'.ser'; + if (file_exists($file)) { + return unserialize(file_get_contents($file)); + } else { + return false; + } } } diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Intl.php index 97381fa171..88be63dbcd 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Intl.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -30,7 +31,7 @@ class Intl // This regular expression is a work around for http://bugs.exim.org/1279 const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])'; - static function grapheme_extract($s, $size, $type = GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0) + public static function grapheme_extract($s, $size, $type = GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0) { if (!is_scalar($s)) { $hasError = false; @@ -50,105 +51,169 @@ class Intl $type = (int) $type; $start = (int) $start; - if (!isset($s[0]) || 0 > $size || 0 > $start || 0 > $type || 2 < $type) return false; - if (0 === $size) return ''; + if (!isset($s[0]) || 0 > $size || 0 > $start || 0 > $type || 2 < $type) { + return false; + } + if (0 === $size) { + return ''; + } $next = $start; - $s = preg_split('/(' . GRAPHEME_CLUSTER_RX . ')/u', "\r\n" . $s, $size + 1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $s = preg_split('/('.GRAPHEME_CLUSTER_RX.')/u', "\r\n".$s, $size + 1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); - if (!isset($s[1])) return false; + if (!isset($s[1])) { + return false; + } $i = 1; $ret = ''; - do - { - if (GRAPHEME_EXTR_COUNT === $type) --$size; - else if (GRAPHEME_EXTR_MAXBYTES === $type) $size -= strlen($s[$i]); - else $size -= iconv_strlen($s[$i], 'UTF-8//IGNORE'); + do { + if (GRAPHEME_EXTR_COUNT === $type) { + --$size; + } elseif (GRAPHEME_EXTR_MAXBYTES === $type) { + $size -= strlen($s[$i]); + } else { + $size -= iconv_strlen($s[$i], 'UTF-8//IGNORE'); + } - if ($size >= 0) $ret .= $s[$i]; - } - while (isset($s[++$i]) && $size > 0); + if ($size >= 0) { + $ret .= $s[$i]; + } + } while (isset($s[++$i]) && $size > 0); $next += strlen($ret); return $ret; } - static function grapheme_strlen($s) + public static function grapheme_strlen($s) { - preg_replace('/' . GRAPHEME_CLUSTER_RX . '/u', '', $s, -1, $len); + preg_replace('/'.GRAPHEME_CLUSTER_RX.'/u', '', $s, -1, $len); + return 0 === $len && '' !== $s ? null : $len; } - static function grapheme_substr($s, $start, $len = 2147483647) + public static function grapheme_substr($s, $start, $len = 2147483647) { - preg_match_all('/' . GRAPHEME_CLUSTER_RX . '/u', $s, $s); + preg_match_all('/'.GRAPHEME_CLUSTER_RX.'/u', $s, $s); $slen = count($s[0]); $start = (int) $start; - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; + if (0 > $start) { + $start += $slen; + } + if (0 > $start) { + return false; + } + if ($start >= $slen) { + return false; + } $rem = $slen - $start; - if (0 > $len) $len += $rem; - if (0 === $len) return ''; - if (0 > $len) return false; - if ($len > $rem) $len = $rem; + if (0 > $len) { + $len += $rem; + } + if (0 === $len) { + return ''; + } + if (0 > $len) { + return false; + } + if ($len > $rem) { + $len = $rem; + } return implode('', array_slice($s[0], $start, $len)); } - static function grapheme_substr_workaround62759($s, $start, $len) + public static function grapheme_substr_workaround62759($s, $start, $len) { // Intl based http://bugs.php.net/62759 and 55562 workaround - if (2147483647 == $len) return grapheme_substr($s, $start); + if (2147483647 == $len) { + return grapheme_substr($s, $start); + } $s .= ''; $slen = grapheme_strlen($s); $start = (int) $start; - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; + if (0 > $start) { + $start += $slen; + } + if (0 > $start) { + return false; + } + if ($start >= $slen) { + return false; + } $rem = $slen - $start; - if (0 > $len) $len += $rem; - if (0 === $len) return ''; - if (0 > $len) return false; - if ($len > $rem) $len = $rem; + if (0 > $len) { + $len += $rem; + } + if (0 === $len) { + return ''; + } + if (0 > $len) { + return false; + } + if ($len > $rem) { + $len = $rem; + } return grapheme_substr($s, $start, $len); } - static function grapheme_strpos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 0);} - static function grapheme_stripos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 1);} - static function grapheme_strrpos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 2);} - static function grapheme_strripos($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 3);} - static function grapheme_stristr ($s, $needle, $before_needle = false) {return mb_stristr($s, $needle, $before_needle, 'UTF-8');} - static function grapheme_strstr ($s, $needle, $before_needle = false) {return mb_strstr ($s, $needle, $before_needle, 'UTF-8');} - + public static function grapheme_strpos($s, $needle, $offset = 0) + { + return self::grapheme_position($s, $needle, $offset, 0); + } + public static function grapheme_stripos($s, $needle, $offset = 0) + { + return self::grapheme_position($s, $needle, $offset, 1); + } + public static function grapheme_strrpos($s, $needle, $offset = 0) + { + return self::grapheme_position($s, $needle, $offset, 2); + } + public static function grapheme_strripos($s, $needle, $offset = 0) + { + return self::grapheme_position($s, $needle, $offset, 3); + } + public static function grapheme_stristr($s, $needle, $before_needle = false) + { + return mb_stristr($s, $needle, $before_needle, 'UTF-8'); + } + public static function grapheme_strstr($s, $needle, $before_needle = false) + { + return mb_strstr($s, $needle, $before_needle, 'UTF-8'); + } protected static function grapheme_position($s, $needle, $offset, $mode) { - if (! preg_match('/./us', $needle .= '')) return false; - if (! preg_match('/./us', $s .= '')) return false; - if ($offset > 0) $s = self::grapheme_substr($s, $offset); - else if ($offset < 0) $offset = 0; + if (!preg_match('/./us', $needle .= '')) { + return false; + } + if (!preg_match('/./us', $s .= '')) { + return false; + } + if ($offset > 0) { + $s = self::grapheme_substr($s, $offset); + } elseif ($offset < 0) { + $offset = 0; + } - switch ($mode) - { - case 0: $needle = iconv_strpos ($s, $needle, 0, 'UTF-8'); break; - case 1: $needle = mb_stripos ($s, $needle, 0, 'UTF-8'); break; - case 2: $needle = iconv_strrpos($s, $needle, 'UTF-8'); break; - default: $needle = mb_strripos ($s, $needle, 0, 'UTF-8'); break; + switch ($mode) { + case 0: $needle = iconv_strpos($s, $needle, 0, 'UTF-8'); break; + case 1: $needle = mb_stripos($s, $needle, 0, 'UTF-8'); break; + case 2: $needle = iconv_strrpos($s, $needle, 'UTF-8'); break; + default: $needle = mb_strripos($s, $needle, 0, 'UTF-8'); break; } return $needle ? self::grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')) + $offset : $needle; diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Mbstring.php index d299c4d8f2..7ef5c4ef4a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Mbstring.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -59,90 +60,90 @@ class Mbstring { const MB_CASE_FOLD = PHP_INT_MAX; - protected static - - $encoding_list = array('ASCII', 'UTF-8'), - $language = 'neutral', - $internal_encoding = 'UTF-8', - $caseFold = array( + protected static $encoding_list = array('ASCII', 'UTF-8'); + protected static $language = 'neutral'; + protected static $internal_encoding = 'UTF-8'; + protected 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",'ι' ) + array('μ','s','ι', 'σ','β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1",'ι'), ); - - static function mb_convert_encoding($s, $to_encoding, $from_encoding = INF) + public static function mb_convert_encoding($s, $to_encoding, $from_encoding = INF) { - INF === $from_encoding && $from_encoding = self::$internal_encoding; + INF === $from_encoding and $from_encoding = self::$internal_encoding; $from_encoding = strtolower($from_encoding); $to_encoding = strtolower($to_encoding); - if ('base64' === $from_encoding) - { + if ('base64' === $from_encoding) { $s = base64_decode($s); $from_encoding = $to_encoding; } - if ('base64' === $to_encoding) return base64_encode($s); + if ('base64' === $to_encoding) { + return base64_encode($s); + } + + if ('html-entities' === $to_encoding) { + 'html-entities' === $from_encoding and $from_encoding = 'Windows-1252'; + if ('utf-8' !== $from_encoding && 'utf8' !== $from_encoding) { + $s = iconv($from_encoding, 'UTF-8//IGNORE', $s); + } - if ('html-entities' === $to_encoding) - { - 'html-entities' === $from_encoding && $from_encoding = 'Windows-1252'; - 'utf-8' === $from_encoding - || 'utf8' === $from_encoding - || $s = iconv($from_encoding, 'UTF-8//IGNORE', $s); return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); } - if ('html-entities' === $from_encoding) - { + if ('html-entities' === $from_encoding) { $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); $from_encoding = 'UTF-8'; } - return iconv($from_encoding, $to_encoding . '//IGNORE', $s); + return iconv($from_encoding, $to_encoding.'//IGNORE', $s); } - static function mb_decode_mimeheader($s) + public static function mb_decode_mimeheader($s) { - return iconv_mime_decode($s, 2, self::$internal_encoding . '//IGNORE'); + return iconv_mime_decode($s, 2, self::$internal_encoding.'//IGNORE'); } - static function mb_encode_mimeheader($s, $charset = INF, $transfer_encoding = INF, $linefeed = INF, $indent = INF) + public static function mb_encode_mimeheader($s, $charset = INF, $transfer_encoding = INF, $linefeed = INF, $indent = INF) { user_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); } - - static function mb_convert_case($s, $mode, $encoding = INF) + public static function mb_convert_case($s, $mode, $encoding = INF) { - if ('' === $s .= '') return ''; + if ('' === $s .= '') { + return ''; + } - if (INF === $encoding) $encoding = self::$internal_encoding; - else $encoding = strtoupper($encoding); + if (INF === $encoding) { + $encoding = self::$internal_encoding; + } else { + $encoding = strtoupper($encoding); + } - if ('UTF-8' === $encoding || 'UTF8' === $encoding) $encoding = INF; - else $s = iconv($encoding, 'UTF-8//IGNORE', $s); + if ('UTF-8' === $encoding || 'UTF8' === $encoding) { + $encoding = INF; + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } - if (MB_CASE_TITLE == $mode) - { + if (MB_CASE_TITLE == $mode) { $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s); $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $s); - } - else - { - if (MB_CASE_UPPER == $mode) - { + } else { + if (MB_CASE_UPPER == $mode) { static $upper; - isset($upper) || $upper = static::getData('upperCase'); + isset($upper) or $upper = static::getData('upperCase'); $map = $upper; - } - else - { - if (self::MB_CASE_FOLD === $mode) $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } static $lower; - isset($lower) || $lower = static::getData('lowerCase'); + isset($lower) or $lower = static::getData('lowerCase'); $map = $lower; } @@ -151,25 +152,21 @@ class Mbstring $i = 0; $len = strlen($s); - while ($i < $len) - { + while ($i < $len) { $ulen = $s[$i] < "\x80" ? 1 : $ulen_mask[$s[$i] & "\xF0"]; $uchr = substr($s, $i, $ulen); $i += $ulen; - if (isset($map[$uchr])) - { + if (isset($map[$uchr])) { $uchr = $map[$uchr]; $nlen = strlen($uchr); - if ($nlen == $ulen) - { + if ($nlen == $ulen) { $nlen = $i; - do $s[--$nlen] = $uchr[--$ulen]; - while ($ulen); - } - else - { + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { $s = substr_replace($s, $uchr, $i - $ulen, $ulen); $len += $nlen - $ulen; $i += $nlen - $ulen; @@ -178,17 +175,22 @@ class Mbstring } } - if (INF === $encoding) return $s; - else return iconv('UTF-8', $encoding, $s); + if (INF === $encoding) { + return $s; + } else { + return iconv('UTF-8', $encoding, $s); + } } - static function mb_internal_encoding($encoding = INF) + public static function mb_internal_encoding($encoding = INF) { - if (INF === $encoding) return self::$internal_encoding; - else $encoding = strtoupper($encoding); + if (INF === $encoding) { + return self::$internal_encoding; + } else { + $encoding = strtoupper($encoding); + } - if ('UTF-8' === $encoding || 'UTF8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) - { + if ('UTF-8' === $encoding || 'UTF8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { self::$internal_encoding = 'UTF8' === $encoding ? 'UTF-8' : $encoding; return true; @@ -197,93 +199,105 @@ class Mbstring return false; } - static function mb_language($lang = INF) + public static function mb_language($lang = INF) { - if (INF === $lang) return self::$language; + if (INF === $lang) { + return self::$language; + } - switch ($lang = strtolower($lang)) - { - case 'uni': - case 'neutral': - self::$language = $lang; - return true; + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; } return false; } - static function mb_list_encodings() + public static function mb_list_encodings() { return array('UTF-8'); } - static function mb_encoding_aliases($encoding) + public static function mb_encoding_aliases($encoding) { - switch (strtolower($encoding)) - { - case 'utf8': - case 'utf-8': return array('utf8'); + switch (strtolower($encoding)) { + case 'utf8': + case 'utf-8': + return array('utf8'); } return false; } - static function mb_check_encoding($var = INF, $encoding = INF) + public static function mb_check_encoding($var = INF, $encoding = INF) { - if (INF === $encoding) - { - if (INF === $var) return false; + if (INF === $encoding) { + if (INF === $var) { + return false; + } $encoding = self::$internal_encoding; } return false !== mb_detect_encoding($var, array($encoding), true); } - static function mb_detect_encoding($str, $encoding_list = INF, $strict = false) + public static function mb_detect_encoding($str, $encoding_list = INF, $strict = false) { - if (INF === $encoding_list) $encoding_list = self::$encoding_list; - else - { - if (! is_array($encoding_list)) $encoding_list = array_map('trim', explode(',', $encoding_list)); + if (INF === $encoding_list) { + $encoding_list = self::$encoding_list; + } else { + if (!is_array($encoding_list)) { + $encoding_list = array_map('trim', explode(',', $encoding_list)); + } $encoding_list = array_map('strtoupper', $encoding_list); } - foreach ($encoding_list as $enc) - { - switch ($enc) - { - case 'ASCII': - if (! preg_match('/[\x80-\xFF]/', $str)) return $enc; - break; + foreach ($encoding_list 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 $enc; - break; + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return $enc; + } + break; - default: - return strncmp($enc, 'ISO-8859-', 9) ? false : $enc; + default: + return strncmp($enc, 'ISO-8859-', 9) ? false : $enc; } } return false; } - static function mb_detect_order($encoding_list = INF) + public static function mb_detect_order($encoding_list = INF) { - if (INF === $encoding_list) return self::$encoding_list; + if (INF === $encoding_list) { + return self::$encoding_list; + } - if (! is_array($encoding_list)) $encoding_list = array_map('trim', explode(',', $encoding_list)); + if (!is_array($encoding_list)) { + $encoding_list = array_map('trim', explode(',', $encoding_list)); + } $encoding_list = array_map('strtoupper', $encoding_list); - foreach ($encoding_list as $enc) - { - switch ($enc) - { - default: if (strncmp($enc, 'ISO-8859-', 9)) return false; - case 'ASCII': - case 'UTF8': - case 'UTF-8': + foreach ($encoding_list as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + case 'ASCII': + case 'UTF8': + case 'UTF-8': } } @@ -292,122 +306,139 @@ class Mbstring return true; } - static function mb_strlen($s, $encoding = INF) + public static function mb_strlen($s, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; - return iconv_strlen($s, $encoding . '//IGNORE'); + INF === $encoding and $encoding = self::$internal_encoding; + + return iconv_strlen($s, $encoding.'//IGNORE'); } - static function mb_strpos($haystack, $needle, $offset = 0, $encoding = INF) + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; - if ('' === $needle .= '') - { - user_error(__METHOD__ . ': Empty delimiter', E_USER_WARNING); + INF === $encoding and $encoding = self::$internal_encoding; + if ('' === $needle .= '') { + user_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + return false; + } else { + return iconv_strpos($haystack, $needle, $offset, $encoding.'//IGNORE'); } - else return iconv_strpos($haystack, $needle, $offset, $encoding . '//IGNORE'); } - static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = INF) + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; - if ($offset != (int) $offset) - { + if ($offset != (int) $offset) { $offset = 0; - } - else if ($offset = (int) $offset) - { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } 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 . '//IGNORE'); + $pos = iconv_strrpos($haystack, $needle, $encoding.'//IGNORE'); return false !== $pos ? $offset + $pos : false; } - static function mb_strtolower($s, $encoding = INF) + public static function mb_strtolower($s, $encoding = INF) { return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); } - static function mb_strtoupper($s, $encoding = INF) + public static function mb_strtoupper($s, $encoding = INF) { return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); } - static function mb_substitute_character($c = INF) + public static function mb_substitute_character($c = INF) { return INF !== $c ? false : 'none'; } - static function mb_substr($s, $start, $length = null, $encoding = INF) + public static function mb_substr($s, $start, $length = null, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; - if ($start < 0) - { - $start = iconv_strlen($s, $encoding . '//IGNORE') + $start; - if ($start < 0) $start = 0; + if ($start < 0) { + $start = iconv_strlen($s, $encoding.'//IGNORE') + $start; + if ($start < 0) { + $start = 0; + } } - if (null === $length) $length = 2147483647; - else if ($length < 0) - { - $length = iconv_strlen($s, $encoding . '//IGNORE') + $length - $start; - if ($length < 0) return ''; + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding.'//IGNORE') + $length - $start; + if ($length < 0) { + return ''; + } } - return iconv_substr($s, $start, $length, $encoding . '//IGNORE') . ''; + return iconv_substr($s, $start, $length, $encoding.'//IGNORE').''; } - static function mb_stripos($haystack, $needle, $offset = 0, $encoding = INF) + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; $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); } - static function mb_stristr($haystack, $needle, $part = false, $encoding = INF) + public static function mb_stristr($haystack, $needle, $part = false, $encoding = INF) { $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + return self::getSubpart($pos, $part, $haystack, $encoding); } - static function mb_strrchr($haystack, $needle, $part = false, $encoding = INF) + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; $needle = self::mb_substr($needle, 0, 1, $encoding); $pos = iconv_strrpos($haystack, $needle, $encoding); + return self::getSubpart($pos, $part, $haystack, $encoding); } - static function mb_strrichr($haystack, $needle, $part = false, $encoding = INF) + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = INF) { $needle = self::mb_substr($needle, 0, 1, $encoding); $pos = self::mb_strripos($haystack, $needle, $encoding); + return self::getSubpart($pos, $part, $haystack, $encoding); } - static function mb_strripos($haystack, $needle, $offset = 0, $encoding = INF) + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = INF) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; $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); } - static function mb_strstr($haystack, $needle, $part = false, $encoding = INF) + public static function mb_strstr($haystack, $needle, $part = false, $encoding = INF) { $pos = strpos($haystack, $needle); - if (false === $pos) return false; - if ($part) return substr($haystack, 0, $pos); - else return substr($haystack, $pos); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } else { + return substr($haystack, $pos); + } } - static function mb_get_info($type = 'all') + public static function mb_get_info($type = 'all') { $info = array( 'internal_encoding' => self::$internal_encoding, @@ -435,17 +466,17 @@ class Mbstring } } - static function mb_http_input($type = '') + public static function mb_http_input($type = '') { return false; } - static function mb_http_output($encoding = INF) + public static function mb_http_output($encoding = INF) { return INF !== $encoding ? 'pass' === $encoding : 'pass'; } - static function mb_strwidth($s, $encoding = INF) + public static function mb_strwidth($s, $encoding = INF) { $encoding = INF === $encoding ? self::$internal_encoding : strtoupper($encoding); @@ -460,23 +491,28 @@ class Mbstring return (iconv_strlen($s, 'UTF-8') << 1) - $narrow; } - static function mb_substr_count($haystack, $needle, $encoding = INF) + public static function mb_substr_count($haystack, $needle, $encoding = INF) { return substr_count($haystack, $needle); } - static function mb_output_handler($contents, $status) + public static function mb_output_handler($contents, $status) { return $contents; } protected static function getSubpart($pos, $part, $haystack, $encoding) { - INF === $encoding && $encoding = self::$internal_encoding; + INF === $encoding and $encoding = self::$internal_encoding; - if (false === $pos) return false; - if ($part) return self::mb_substr($haystack, 0, $pos, $encoding); - else return self::mb_substr($haystack, $pos, null, $encoding); + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } else { + return self::mb_substr($haystack, $pos, null, $encoding); + } } protected static function html_encoding_callback($m) @@ -516,8 +552,11 @@ class Mbstring protected static function getData($file) { - $file = __DIR__ . '/unidata/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; + $file = __DIR__.'/unidata/'.$file.'.ser'; + if (file_exists($file)) { + return unserialize(file_get_contents($file)); + } else { + return false; + } } } diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Normalizer.php index c29647036d..eac95fbe4b 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Normalizer.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -18,59 +19,72 @@ namespace Patchwork\PHP\Shim; */ class Normalizer { - const - - NONE = 1, - FORM_D = 2, NFD = 2, - FORM_KD = 3, NFKD = 3, - FORM_C = 4, NFC = 4, - FORM_KC = 5, NFKC = 5; - + const NONE = 1; + const FORM_D = 2; + const FORM_KD = 3; + const FORM_C = 4; + const FORM_KC = 5; + const NFD = 2; + const NFKD = 3; + const NFC = 4; + const NFKC = 5; - protected static + protected static $C; + protected static $D; + protected static $KD; + protected static $cC; + protected static $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + protected static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - $C, $D, $KD, $cC, - $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4), - $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - - static function isNormalized($s, $form = self::NFC) + public static function isNormalized($s, $form = self::NFC) { - if (strspn($s .= '', self::$ASCII) === strlen($s)) return true; - if (self::NFC === $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) return true; + if (strspn($s .= '', self::$ASCII) === strlen($s)) { + return true; + } + if (self::NFC === $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { + return true; + } + return false; // Pretend false as quick checks implementented in PHP won't be so quick } - static function normalize($s, $form = self::NFC) + public static function normalize($s, $form = self::NFC) { - if (!preg_match('//u', $s .= '')) return false; + if (!preg_match('//u', $s .= '')) { + return false; + } - switch ($form) - { - case self::NONE: return $s; - case self::NFC: $C = true; $K = false; break; - case self::NFD: $C = false; $K = false; break; - case self::NFKC: $C = true; $K = true; break; - case self::NFKD: $C = false; $K = true; break; - default: return false; + switch ($form) { + case self::NONE: return $s; + case self::NFC: $C = true; $K = false; break; + case self::NFD: $C = false; $K = false; break; + case self::NFKC: $C = true; $K = true; break; + case self::NFKD: $C = false; $K = true; break; + default: return false; } - if ('' === $s) return ''; + if ('' === $s) { + return ''; + } - if ($K && empty(self::$KD)) self::$KD = static::getData('compatibilityDecomposition'); + if ($K && empty(self::$KD)) { + self::$KD = static::getData('compatibilityDecomposition'); + } - if (empty(self::$D)) - { + if (empty(self::$D)) { self::$D = static::getData('canonicalDecomposition'); self::$cC = static::getData('combiningClass'); } - if ($C) - { - if (empty(self::$C)) self::$C = static::getData('canonicalComposition'); + if ($C) { + if (empty(self::$C)) { + self::$C = static::getData('canonicalComposition'); + } + return self::recompose(self::decompose($s, $K)); + } else { + return self::decompose($s, $K); } - else return self::decompose($s, $K); } protected static function recompose($s) @@ -88,20 +102,16 @@ class Normalizer $last_uchr = substr($s, 0, $i); $last_ucls = isset($combClass[$last_uchr]) ? 256 : 0; - while ($i < $len) - { - if ($s[$i] < "\x80") - { + while ($i < $len) { + if ($s[$i] < "\x80") { // ASCII chars - if ($tail) - { + if ($tail) { $last_uchr .= $tail; $tail = ''; } - if ($j = strspn($s, $ASCII, $i+1)) - { + if ($j = strspn($s, $ASCII, $i + 1)) { $last_uchr .= substr($s, $i, $j); $i += $j; } @@ -109,29 +119,23 @@ class Normalizer $result .= $last_uchr; $last_uchr = $s[$i]; ++$i; - } - else - { + } else { $ulen = $ulen_mask[$s[$i] & "\xF0"]; $uchr = substr($s, $i, $ulen); if ($last_uchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $last_uchr || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr - || $last_ucls) - { + || $last_ucls) { // Table lookup and combining chars composition $ucls = isset($combClass[$uchr]) ? $combClass[$uchr] : 0; - if (isset($compMap[$last_uchr . $uchr]) && (!$last_ucls || $last_ucls < $ucls)) - { - $last_uchr = $compMap[$last_uchr . $uchr]; - } - else if ($last_ucls = $ucls) $tail .= $uchr; - else - { - if ($tail) - { + if (isset($compMap[$last_uchr.$uchr]) && (!$last_ucls || $last_ucls < $ucls)) { + $last_uchr = $compMap[$last_uchr.$uchr]; + } elseif ($last_ucls = $ucls) { + $tail .= $uchr; + } else { + if ($tail) { $last_uchr .= $tail; $tail = ''; } @@ -139,9 +143,7 @@ class Normalizer $result .= $last_uchr; $last_uchr = $uchr; } - } - else - { + } else { // Hangul chars $L = ord($last_uchr[2]) - 0x80; @@ -150,22 +152,21 @@ class Normalizer $uchr = substr($s, $i + $ulen, 3); - if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") - { + if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { $T = ord($uchr[2]) - 0xA7; 0 > $T && $T += 0x40; $ulen += 3; } $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; - $last_uchr = chr(0xE0 | $L>>12) . chr(0x80 | $L>>6 & 0x3F) . chr(0x80 | $L & 0x3F); + $last_uchr = chr(0xE0 | $L >> 12).chr(0x80 | $L >> 6 & 0x3F).chr(0x80 | $L & 0x3F); } $i += $ulen; } } - return $result . $last_uchr . $tail; + return $result.$last_uchr.$tail; } protected static function decompose($s, $c) @@ -176,99 +177,87 @@ class Normalizer $decompMap = self::$D; $combClass = self::$cC; $ulen_mask = self::$ulen_mask; - if ($c) $compatMap = self::$KD; + if ($c) { + $compatMap = self::$KD; + } $c = array(); $i = 0; $len = strlen($s); - while ($i < $len) - { - if ($s[$i] < "\x80") - { + while ($i < $len) { + if ($s[$i] < "\x80") { // ASCII chars - if ($c) - { + if ($c) { ksort($c); $result .= implode('', $c); $c = array(); } - $j = 1 + strspn($s, $ASCII, $i+1); + $j = 1 + strspn($s, $ASCII, $i + 1); $result .= substr($s, $i, $j); $i += $j; - } - else - { + } else { $ulen = $ulen_mask[$s[$i] & "\xF0"]; $uchr = substr($s, $i, $ulen); $i += $ulen; - if (isset($combClass[$uchr])) - { + if (isset($combClass[$uchr])) { // Combining chars, for sorting - isset($c[$combClass[$uchr]]) || $c[$combClass[$uchr]] = ''; + isset($c[$combClass[$uchr]]) or $c[$combClass[$uchr]] = ''; $c[$combClass[$uchr]] .= isset($compatMap[$uchr]) ? $compatMap[$uchr] : (isset($decompMap[$uchr]) ? $decompMap[$uchr] : $uchr); - } - else - { - if ($c) - { + } else { + if ($c) { ksort($c); $result .= implode('', $c); $c = array(); } - if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) - { + if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { // Table lookup $j = isset($compatMap[$uchr]) ? $compatMap[$uchr] : (isset($decompMap[$uchr]) ? $decompMap[$uchr] : $uchr); - if ($uchr != $j) - { + if ($uchr != $j) { $uchr = $j; $j = strlen($uchr); $ulen = $uchr[0] < "\x80" ? 1 : $ulen_mask[$uchr[0] & "\xF0"]; - if ($ulen != $j) - { + if ($ulen != $j) { // Put trailing chars in $s $j -= $ulen; $i -= $j; - if (0 > $i) - { - $s = str_repeat(' ', -$i) . $s; + if (0 > $i) { + $s = str_repeat(' ', -$i).$s; $len -= $i; $i = 0; } - while ($j--) $s[$i+$j] = $uchr[$ulen+$j]; + while ($j--) { + $s[$i + $j] = $uchr[$ulen + $j]; + } $uchr = substr($uchr, 0, $ulen); } } - } - else - { + } else { // Hangul chars $uchr = unpack('C*', $uchr); - $j = (($uchr[1]-224) << 12) + (($uchr[2]-128) << 6) + $uchr[3] - 0xAC80; + $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; - $uchr = "\xE1\x84" . chr(0x80 + (int) ($j / 588)) - . "\xE1\x85" . chr(0xA1 + (int) (($j % 588) / 28)); + $uchr = "\xE1\x84".chr(0x80 + (int) ($j / 588)) + ."\xE1\x85".chr(0xA1 + (int) (($j % 588) / 28)); - if ($j %= 28) - { + if ($j %= 28) { $uchr .= $j < 25 - ? ("\xE1\x86" . chr(0xA7 + $j)) - : ("\xE1\x87" . chr(0x67 + $j)); + ? ("\xE1\x86".chr(0xA7 + $j)) + : ("\xE1\x87".chr(0x67 + $j)); } } @@ -277,8 +266,7 @@ class Normalizer } } - if ($c) - { + if ($c) { ksort($c); $result .= implode('', $c); } @@ -288,8 +276,11 @@ class Normalizer protected static function getData($file) { - $file = __DIR__ . '/unidata/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; + $file = __DIR__.'/unidata/'.$file.'.ser'; + if (file_exists($file)) { + return unserialize(file_get_contents($file)); + } else { + return false; + } } } diff --git a/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Xml.php b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Xml.php new file mode 100644 index 0000000000..84bb2d4d18 --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/Xml.php @@ -0,0 +1,61 @@ +<?php + +/* + * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork\PHP\Shim; + +/** + * utf8_encode/decode. + */ +class Xml +{ + public static function utf8_encode($s) + { + $s .= $s; + $len = strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = chr(ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s .= ''; + $len = strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (ord($s[$i] & "\x1F") << 6) | ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? chr($c) : '?'; + break; + + case "\xF0": ++$i; + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } +} diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.big5.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.big5.ser index 379bc53fc8..379bc53fc8 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.big5.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.big5.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp037.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp037.ser Binary files differindex a629eb49da..a629eb49da 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp037.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp037.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1006.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1006.ser Binary files differindex d3a6c4c80f..d3a6c4c80f 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1006.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1006.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1026.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1026.ser Binary files differindex 8ec9bea327..8ec9bea327 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1026.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp1026.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp424.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp424.ser Binary files differindex 5e1168e51f..5e1168e51f 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp424.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp424.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp437.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp437.ser Binary files differindex aa20fd8212..aa20fd8212 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp437.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp437.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp500.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp500.ser Binary files differindex 9bdfdfbc08..9bdfdfbc08 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp500.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp500.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp737.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp737.ser Binary files differindex d586ac9a37..d586ac9a37 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp737.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp737.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp775.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp775.ser Binary files differindex c993ef5b4d..c993ef5b4d 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp775.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp775.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp850.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp850.ser Binary files differindex 8035a9135a..8035a9135a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp850.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp850.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp852.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp852.ser Binary files differindex 83d6b3c8f9..83d6b3c8f9 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp852.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp852.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp855.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp855.ser Binary files differindex 2b99b4c536..2b99b4c536 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp855.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp855.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp856.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp856.ser Binary files differindex bcc21feb27..bcc21feb27 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp856.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp856.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp857.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp857.ser Binary files differindex a7074a46d1..a7074a46d1 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp857.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp857.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp860.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp860.ser Binary files differindex 848d9fe4c2..848d9fe4c2 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp860.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp860.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp861.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp861.ser Binary files differindex e0469a6fbd..e0469a6fbd 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp861.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp861.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp862.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp862.ser Binary files differindex eabcebf85c..eabcebf85c 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp862.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp862.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp863.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp863.ser Binary files differindex a64d70a0b3..a64d70a0b3 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp863.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp863.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp864.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp864.ser Binary files differindex 1d9c371354..1d9c371354 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp864.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp864.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp865.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp865.ser Binary files differindex 816ddf373d..816ddf373d 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp865.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp865.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp866.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp866.ser Binary files differindex 8e0f7dcb07..8e0f7dcb07 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp866.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp866.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp869.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp869.ser Binary files differindex 32de1f2a89..32de1f2a89 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp869.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp869.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp874.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp874.ser Binary files differindex 030ce156f3..030ce156f3 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp874.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp874.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp875.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp875.ser Binary files differindex e42792a2d2..e42792a2d2 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp875.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp875.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp932.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp932.ser Binary files differindex 5861d4c968..5861d4c968 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp932.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp932.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp936.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp936.ser Binary files differindex 8fc183b580..8fc183b580 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp936.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp936.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp949.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp949.ser Binary files differindex 4447cdb860..4447cdb860 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp949.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp949.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp950.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp950.ser Binary files differindex b2f11df1b5..b2f11df1b5 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp950.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.cp950.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.gsm0338.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.gsm0338.ser Binary files differindex a877b832d0..a877b832d0 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.gsm0338.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.gsm0338.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser Binary files differindex 5fecd4ca2a..5fecd4ca2a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser Binary files differindex 3f0cce13f3..3f0cce13f3 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser Binary files differindex 2757b1ce7a..2757b1ce7a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser Binary files differindex 55a7a3e162..55a7a3e162 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser Binary files differindex 7b963ae875..7b963ae875 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser Binary files differindex 2ce20a16ea..2ce20a16ea 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser Binary files differindex 8da2482934..8da2482934 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser Binary files differindex 7dbeb25b0b..7dbeb25b0b 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser Binary files differindex 626fffe624..626fffe624 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser Binary files differindex f750169186..f750169186 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser Binary files differindex d89cc063c8..d89cc063c8 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser Binary files differindex 2dcfeb89eb..2dcfeb89eb 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser Binary files differindex a137558317..a137558317 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser Binary files differindex 4179e15bee..4179e15bee 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser Binary files differindex be4c816ead..be4c816ead 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-r.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-r.ser Binary files differindex c46860b97d..c46860b97d 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-r.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-r.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-u.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-u.ser Binary files differindex 6e5af630cb..6e5af630cb 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-u.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.koi8-u.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.mazovia.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.mazovia.ser Binary files differindex 05fa2bdf8a..05fa2bdf8a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.mazovia.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.mazovia.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.nextstep.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.nextstep.ser Binary files differindex 476da9c87f..476da9c87f 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.nextstep.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.nextstep.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.stdenc.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.stdenc.ser index 81edeb0126..81edeb0126 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.stdenc.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.stdenc.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.symbol.ser index 889217bf22..889217bf22 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.symbol.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.turkish.ser Binary files differindex a3651e68c1..a3651e68c1 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.turkish.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser Binary files differindex f10af33590..f10af33590 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii.ser Binary files differindex 3a2f7e4971..3a2f7e4971 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.us-ascii.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1250.ser Binary files differindex 9e799cb517..9e799cb517 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1250.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1251.ser Binary files differindex 6592885cbb..6592885cbb 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1251.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1252.ser Binary files differindex cccc26c9e7..cccc26c9e7 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1252.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1253.ser Binary files differindex 13c5a0b63d..13c5a0b63d 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1253.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1254.ser Binary files differindex 96d69722a6..96d69722a6 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1254.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1255.ser Binary files differindex c366bfdb64..c366bfdb64 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1255.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1256.ser Binary files differindex cc98d2c691..cc98d2c691 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1256.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1257.ser Binary files differindex 2a52206115..2a52206115 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1257.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1258.ser Binary files differindex 114dd8468a..114dd8468a 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.windows-1258.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser Binary files differindex 246603d8ec..246603d8ec 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser Binary files differindex 3f606d653f..3f606d653f 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser Binary files differindex c4b66d93b4..c4b66d93b4 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser Binary files differindex 15b35b1c50..15b35b1c50 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser Binary files differindex a39e96a6b6..a39e96a6b6 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.zdingbat.ser index 3a894d2d31..3a894d2d31 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/from.zdingbat.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.gsm0338.ser Binary files differindex e675fc33c5..e675fc33c5 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.gsm0338.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.mazovia.ser Binary files differindex 70a534fe73..70a534fe73 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.mazovia.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.stdenc.ser index 0cb46281ea..0cb46281ea 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.stdenc.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.symbol.ser index fc6150543f..fc6150543f 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.symbol.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.zdingbat.ser index 1f293bf8ce..1f293bf8ce 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/to.zdingbat.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/translit.ser index 5e5652dc80..5e5652dc80 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/charset/translit.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalComposition.ser index c548707599..c548707599 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalComposition.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser index 7adfb96b85..7adfb96b85 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/combiningClass.ser index 9a52768238..9a52768238 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/combiningClass.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser index 9ec5bcd975..9ec5bcd975 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/lowerCase.ser index 13dabdde91..13dabdde91 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/lowerCase.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/upperCase.ser index e9e0ec2d8b..e9e0ec2d8b 100644 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser +++ b/vendor/patchwork/utf8/src/Patchwork/PHP/Shim/unidata/upperCase.ser diff --git a/vendor/patchwork/utf8/src/Patchwork/TurkishUtf8.php b/vendor/patchwork/utf8/src/Patchwork/TurkishUtf8.php new file mode 100644 index 0000000000..24a30d04ff --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/TurkishUtf8.php @@ -0,0 +1,155 @@ +<?php + +/* + * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork; + +/** + * Turkish locale specialized version of Patchwork\Utf8. + */ +class TurkishUtf8 extends Utf8 +{ + public static function strtocasefold($s, $full = true) + { + if (false !== strpos($s, 'İ')) { + $s = str_replace('İ', 'i', $s); + } + + return parent::strtocasefold($s, $full); + } + + public static function stripos($s, $needle, $offset = 0) + { + if (false !== strpos($needle, 'I')) { + $needle = str_replace('I', 'ı', $needle); + } + if (false !== strpos($needle, 'İ')) { + $needle = str_replace('İ', 'i', $needle); + } + if (false !== strpos($s, 'I')) { + $s = str_replace('I', 'ı', $s); + } + if (false !== strpos($s, 'İ')) { + $s = str_replace('İ', 'i', $s); + } + + return parent::stripos($s, $needle, $offset); + } + + public static function strripos($s, $needle, $offset = 0) + { + if (false !== strpos($needle, 'I')) { + $needle = str_replace('I', 'ı', $needle); + } + if (false !== strpos($needle, 'İ')) { + $needle = str_replace('İ', 'i', $needle); + } + if (false !== strpos($s, 'I')) { + $s = str_replace('I', 'ı', $s); + } + if (false !== strpos($s, 'İ')) { + $s = str_replace('İ', 'i', $s); + } + + return parent::strripos($s, $needle, $offset); + } + + public static function stristr($s, $needle, $before_needle = false) + { + $needle = self::stripos($s, $needle); + if (false === $needle) { + return false; + } + if ($before_needle) { + return self::substr($s, 0, $needle); + } + + return self::substr($s, $needle); + } + + public static function strrichr($s, $needle, $before_needle = false) + { + $needle = self::strripos($s, $needle); + if (false === $needle) { + return false; + } + if ($before_needle) { + return self::substr($s, 0, $needle); + } + + return self::substr($s, $needle); + } + + public static function strtolower($s) + { + if (false !== strpos($s, 'İ')) { + $s = str_replace('İ', 'i', $s); + } + if (false !== strpos($s, 'I')) { + $s = str_replace('I', 'ı', $s); + } + + return parent::strtolower($s); + } + + public static function strtoupper($s) + { + if (false !== strpos($s, 'i')) { + $s = str_replace('i', 'İ', $s); + } + + return parent::strtoupper($s); + } + + public static function str_ireplace($search, $replace, $subject, &$count = null) + { + $search = (array) $search; + + foreach ($search as $i => $s) { + if ('' === $s .= '') { + $s = '/^(?<=.)$/'; + } else { + $s = preg_quote($s, '/'); + $s = strtr($s, array( + 'i' => '(?-i:[iİ])', + 'İ' => '(?-i:[iİ])', + 'ı' => '(?-i:[ıI])', + 'I' => '(?-i:[ıI])', + )); + $s = "/{$s}/ui"; + } + + $search[$i] = $s; + } + + $subject = preg_replace($search, $replace, $subject, -1, $replace); + $count = $replace; + + return $subject; + } + + public static function ucfirst($s) + { + if ('i' === substr($s, 0, 1)) { + return 'İ'.substr($s, 1); + } else { + return parent::ucfirst($s); + } + } + + public static function ucwords($s) + { + if (false !== strpos($s, 'i')) { + $s = preg_replace('/\bi/u', 'İ', $s); + } + + return parent::ucwords($s); + } +} diff --git a/vendor/patchwork/utf8/src/Patchwork/Utf8.php b/vendor/patchwork/utf8/src/Patchwork/Utf8.php new file mode 100644 index 0000000000..9ca119b323 --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8.php @@ -0,0 +1,773 @@ +<?php + +/* + * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork; + +use Normalizer as n; + +/** + * UTF-8 Grapheme Cluster aware string manipulations implementing the quasi complete + * set of native PHP string functions that need UTF-8 awareness and more. + * Missing are printf-family functions. + */ +class Utf8 +{ + protected static $pathPrefix; + protected static $commonCaseFold = 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",'ι'), + ); + protected static $cp1252 = array('','','','','
','','','','','','','','','','','','','','','','','','','','','',''); + protected static $utf8 = array('€','‚','ƒ','„','…','†','‡','ˆ','‰','Š','‹','Œ','Ž','‘','’','“','”','•','–','—','˜','™','š','›','œ','ž','Ÿ'); + + public static function isUtf8($s) + { + return (bool) preg_match('//u', $s); // Since PHP 5.2.5, this also excludes invalid five and six bytes sequences + } + + // Generic UTF-8 to ASCII transliteration + + public static function toAscii($s, $subst_chr = '?') + { + if (preg_match("/[\x80-\xFF]/", $s)) { + static $translitExtra = array(); + $translitExtra or $translitExtra = static::getData('translit_extra'); + + $s = n::normalize($s, n::NFKC); + + $glibc = 'glibc' === ICONV_IMPL; + + preg_match_all('/./u', $s, $s); + + foreach ($s[0] as &$c) { + if (!isset($c[1])) { + continue; + } + + if ($glibc) { + $t = iconv('UTF-8', 'ASCII//TRANSLIT', $c); + } else { + $t = iconv('UTF-8', 'ASCII//IGNORE//TRANSLIT', $c); + + if (!isset($t[0])) { + $t = '?'; + } elseif (isset($t[1])) { + $t = ltrim($t, '\'`"^~'); + } + } + + if ('?' === $t) { + if (isset($translitExtra[$c])) { + $t = $translitExtra[$c]; + } else { + $t = n::normalize($c, n::NFD); + + if ($t[0] < "\x80") { + $t = $t[0]; + } else { + $t = $subst_chr; + } + } + } + + $c = $t; + } + + $s = implode('', $s[0]); + } + + return $s; + } + + public static function wrapPath($path = '') + { + if (null === static::$pathPrefix) { + static $hasWfio; + isset($hasWfio) or $hasWfio = extension_loaded('wfio'); + + if ($hasWfio) { + static::$pathPrefix = 'wfio://'; + } elseif ('\\' === DIRECTORY_SEPARATOR && class_exists('COM', false)) { + static::$pathPrefix = 'utf8'.mt_rand(); + stream_wrapper_register(static::$pathPrefix, 'Patchwork\Utf8\WindowsStreamWrapper'); + static::$pathPrefix .= '://'; + } else { + if ('\\' === DIRECTORY_SEPARATOR) { + trigger_error('The `wfio` or `com_dotnet` extension is required to handle UTF-8 filesystem access on Windows'); + } + static::$pathPrefix = 'file://'; + } + } + + return static::$pathPrefix.$path; + } + + public static function filter($var, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') + { + switch (gettype($var)) { + case 'array': + foreach ($var as $k => $v) { + $var[$k] = static::filter($v, $normalization_form, $leading_combining); + } + break; + + case 'object': + foreach ($var as $k => $v) { + $var->$k = static::filter($v, $normalization_form, $leading_combining); + } + break; + + case 'string': + if (false !== strpos($var, "\r")) { + // Workaround https://bugs.php.net/65732 + $var = str_replace("\r\n", "\n", $var); + $var = strtr($var, "\r", "\n"); + } + + if (preg_match('/[\x80-\xFF]/', $var)) { + if (n::isNormalized($var, $normalization_form)) { + $n = '-'; + } else { + $n = n::normalize($var, $normalization_form); + if (isset($n[0])) { + $var = $n; + } else { + $var = static::utf8_encode($var); + } + } + + if ($var[0] >= "\x80" && isset($n[0], $leading_combining[0]) && preg_match('/^\p{Mn}/u', $var)) { + // Prevent leading combining chars + // for NFC-safe concatenations. + $var = $leading_combining.$var; + } + } + break; + } + + return $var; + } + + // Unicode transformation for caseless matching + // see http://unicode.org/reports/tr21/tr21-5.html + + public static function strtocasefold($s, $full = true) + { + $s = str_replace(self::$commonCaseFold[0], self::$commonCaseFold[1], $s); + + if ($full) { + static $fullCaseFold = false; + $fullCaseFold or $fullCaseFold = static::getData('caseFolding_full'); + + $s = str_replace($fullCaseFold[0], $fullCaseFold[1], $s); + } + + return static::strtolower($s); + } + + // Generic case sensitive collation support for self::strnatcmp() + + public static function strtonatfold($s) + { + $s = n::normalize($s, n::NFD); + + return preg_replace('/\p{Mn}+/u', '', $s); + } + + // PHP string functions that need UTF-8 awareness + + public static function filter_input($type, $var, $filter = FILTER_DEFAULT, $option = null) + { + if (4 > func_num_args()) { + $var = filter_input($type, $var, $filter); + } else { + $var = filter_input($type, $var, $filter, $option); + } + + return static::filter($var); + } + + public static function filter_input_array($type, $def = null, $add_empty = true) + { + if (2 > func_num_args()) { + $a = filter_input_array($type); + } else { + $a = filter_input_array($type, $def, $add_empty); + } + + return static::filter($a); + } + + public static function json_decode($json, $assoc = false, $depth = 512, $options = 0) + { + if (PHP_VERSION_ID < 50400) { + $json = json_decode($json, $assoc, $depth); + } else { + $json = json_decode($json, $assoc, $depth, $options); + } + + return static::filter($json); + } + + public static function substr($s, $start, $len = 2147483647) + { + static $bug62759; + isset($bug62759) or $bug62759 = extension_loaded('intl') && 'à' === grapheme_substr('éà', 1, -2); + + if ($bug62759) { + return PHP\Shim\Intl::grapheme_substr_workaround62759($s, $start, $len); + } else { + return grapheme_substr($s, $start, $len); + } + } + + public static function strlen($s) + { + return grapheme_strlen($s); + } + public static function strpos($s, $needle, $offset = 0) + { + return grapheme_strpos($s, $needle, $offset); + } + public static function strrpos($s, $needle, $offset = 0) + { + return grapheme_strrpos($s, $needle, $offset); + } + + public static function stripos($s, $needle, $offset = 0) + { + if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) { + // Don't use grapheme_stripos because of https://bugs.php.net/61860 + if (!preg_match('//u', $s .= '')) { + return false; + } + if ($offset < 0) { + $offset = 0; + } + if (!$needle = mb_stripos($s, $needle .= '', $offset, 'UTF-8')) { + return $needle; + } + + return grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')); + } + + return grapheme_stripos($s, $needle, $offset); + } + + public static function strripos($s, $needle, $offset = 0) + { + if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) { + // Don't use grapheme_strripos because of https://bugs.php.net/61860 + if (!preg_match('//u', $s .= '')) { + return false; + } + if ($offset < 0) { + $offset = 0; + } + if (!$needle = mb_strripos($s, $needle .= '', $offset, 'UTF-8')) { + return $needle; + } + + return grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')); + } + + return grapheme_strripos($s, $needle, $offset); + } + + public static function stristr($s, $needle, $before_needle = false) + { + if ('' === $needle .= '') { + return false; + } + + return mb_stristr($s, $needle, $before_needle, 'UTF-8'); + } + + public static function strstr($s, $needle, $before_needle = false) + { + return grapheme_strstr($s, $needle, $before_needle); + } + public static function strrchr($s, $needle, $before_needle = false) + { + return mb_strrchr($s, $needle, $before_needle, 'UTF-8'); + } + public static function strrichr($s, $needle, $before_needle = false) + { + return mb_strrichr($s, $needle, $before_needle, 'UTF-8'); + } + + public static function strtolower($s) + { + return mb_strtolower($s, 'UTF-8'); + } + public static function strtoupper($s) + { + return mb_strtoupper($s, 'UTF-8'); + } + + public static function wordwrap($s, $width = 75, $break = "\n", $cut = false) + { + if (false === wordwrap('-', $width, $break, $cut)) { + return false; + } + + is_string($break) or $break = (string) $break; + + $w = ''; + $s = explode($break, $s); + $iLen = count($s); + $chars = array(); + + if (1 === $iLen && '' === $s[0]) { + return ''; + } + + for ($i = 0; $i < $iLen; ++$i) { + if ($i) { + $chars[] = $break; + $w .= '#'; + } + + $c = $s[$i]; + unset($s[$i]); + + foreach (self::str_split($c) as $c) { + $chars[] = $c; + $w .= ' ' === $c ? ' ' : '?'; + } + } + + $s = ''; + $j = 0; + $b = $i = -1; + $w = wordwrap($w, $width, '#', $cut); + + while (false !== $b = strpos($w, '#', $b + 1)) { + for (++$i; $i < $b; ++$i) { + $s .= $chars[$j]; + unset($chars[$j++]); + } + + if ($break === $chars[$j] || ' ' === $chars[$j]) { + unset($chars[$j++]); + } + $s .= $break; + } + + return $s.implode('', $chars); + } + + public static function chr($c) + { + if (0x80 > $c %= 0x200000) { + return chr($c); + } + if (0x800 > $c) { + return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); + } + if (0x10000 > $c) { + return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + } + + return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + } + + public static function count_chars($s, $mode = 0) + { + if (1 != $mode) { + user_error(__METHOD__.'(): the only allowed $mode is 1', E_USER_WARNING); + } + $s = self::str_split($s); + + return array_count_values($s); + } + + public static function ltrim($s, $charlist = INF) + { + $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); + + return preg_replace("/^{$charlist}+/u", '', $s); + } + + public static function ord($s) + { + $a = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $a) { + return (($a - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $a) { + return (($a - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $a) { + return (($a - 0xC0) << 6) + $s[2] - 0x80; + } + + return $a; + } + + public static function rtrim($s, $charlist = INF) + { + $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); + + return preg_replace("/{$charlist}+$/u", '', $s); + } + + public static function trim($s, $charlist = INF) + { + return self::rtrim(self::ltrim($s, $charlist), $charlist); + } + + public static function str_ireplace($search, $replace, $subject, &$count = null) + { + $search = (array) $search; + + foreach ($search as $i => $s) { + if ('' === $s .= '') { + $s = '/^(?<=.)$/'; + } else { + $s = '/'.preg_quote($s, '/').'/ui'; + } + + $search[$i] = $s; + } + + $subject = preg_replace($search, $replace, $subject, -1, $replace); + $count = $replace; + + return $subject; + } + + public static function str_pad($s, $len, $pad = ' ', $type = STR_PAD_RIGHT) + { + $slen = grapheme_strlen($s); + if ($len <= $slen) { + return $s; + } + + $padlen = grapheme_strlen($pad); + $freelen = $len - $slen; + $len = $freelen % $padlen; + + if (STR_PAD_RIGHT == $type) { + return $s.str_repeat($pad, $freelen / $padlen).($len ? grapheme_substr($pad, 0, $len) : ''); + } + if (STR_PAD_LEFT == $type) { + return str_repeat($pad, $freelen / $padlen).($len ? grapheme_substr($pad, 0, $len) : '').$s; + } + if (STR_PAD_BOTH == $type) { + $freelen /= 2; + + $type = ceil($freelen); + $len = $type % $padlen; + $s .= str_repeat($pad, $type / $padlen).($len ? grapheme_substr($pad, 0, $len) : ''); + + $type = floor($freelen); + $len = $type % $padlen; + + return str_repeat($pad, $type / $padlen).($len ? grapheme_substr($pad, 0, $len) : '').$s; + } + + user_error(__METHOD__.'(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH', E_USER_WARNING); + } + + public static function str_shuffle($s) + { + $s = self::str_split($s); + shuffle($s); + + return implode('', $s); + } + + public static function str_split($s, $len = 1) + { + if (1 > $len = (int) $len) { + $len = func_get_arg(1); + + return str_split($s, $len); + } + + static $hasIntl; + isset($hasIntl) or $hasIntl = extension_loaded('intl'); + + if ($hasIntl) { + $a = array(); + $p = 0; + $l = strlen($s); + + while ($p < $l) { + $a[] = grapheme_extract($s, 1, GRAPHEME_EXTR_COUNT, $p, $p); + } + } else { + preg_match_all('/'.GRAPHEME_CLUSTER_RX.'/u', $s, $a); + $a = $a[0]; + } + + if (1 == $len) { + return $a; + } + + $s = array(); + $p = -1; + + foreach ($a as $l => $a) { + if ($l % $len) { + $s[$p] .= $a; + } else { + $s[++$p] = $a; + } + } + + return $s; + } + + public static function str_word_count($s, $format = 0, $charlist = '') + { + $charlist = self::rxClass($charlist, '\pL'); + $s = preg_split("/({$charlist}+(?:[\p{Pd}’']{$charlist}+)*)/u", $s, -1, PREG_SPLIT_DELIM_CAPTURE); + + $charlist = array(); + $len = count($s); + + if (1 == $format) { + for ($i = 1; $i < $len; $i += 2) { + $charlist[] = $s[$i]; + } + } elseif (2 == $format) { + $offset = grapheme_strlen($s[0]); + for ($i = 1; $i < $len; $i += 2) { + $charlist[$offset] = $s[$i]; + $offset += grapheme_strlen($s[$i]) + grapheme_strlen($s[$i + 1]); + } + } else { + $charlist = ($len - 1) / 2; + } + + return $charlist; + } + + public static function strcmp($a, $b) + { + return $a.'' === $b.'' ? 0 : strcmp(n::normalize($a, n::NFD), n::normalize($b, n::NFD)); + } + public static function strnatcmp($a, $b) + { + return $a.'' === $b.'' ? 0 : strnatcmp(self::strtonatfold($a), self::strtonatfold($b)); + } + public static function strcasecmp($a, $b) + { + return self::strcmp(static::strtocasefold($a), static::strtocasefold($b)); + } + public static function strnatcasecmp($a, $b) + { + return self::strnatcmp(static::strtocasefold($a), static::strtocasefold($b)); + } + public static function strncasecmp($a, $b, $len) + { + return self::strncmp(static::strtocasefold($a), static::strtocasefold($b), $len); + } + public static function strncmp($a, $b, $len) + { + return self::strcmp(self::substr($a, 0, $len), self::substr($b, 0, $len)); + } + + public static function strcspn($s, $charlist, $start = 0, $len = 2147483647) + { + if ('' === $charlist .= '') { + return; + } + if ($start || 2147483647 != $len) { + $s = self::substr($s, $start, $len); + } + + return preg_match('/^(.*?)'.self::rxClass($charlist).'/us', $s, $len) ? grapheme_strlen($len[1]) : grapheme_strlen($s); + } + + public static function strpbrk($s, $charlist) + { + if (preg_match('/'.self::rxClass($charlist).'/us', $s, $m)) { + return substr($s, strpos($s, $m[0])); + } else { + return false; + } + } + + public static function strrev($s) + { + $s = self::str_split($s); + + return implode('', array_reverse($s)); + } + + public static function strspn($s, $mask, $start = 0, $len = 2147483647) + { + if ($start || 2147483647 != $len) { + $s = self::substr($s, $start, $len); + } + + return preg_match('/^'.self::rxClass($mask).'+/u', $s, $s) ? grapheme_strlen($s[0]) : 0; + } + + public static function strtr($s, $from, $to = INF) + { + if (INF !== $to) { + $from = self::str_split($from); + $to = self::str_split($to); + + $a = count($from); + $b = count($to); + + if ($a > $b) { + $from = array_slice($from, 0, $b); + } elseif ($a < $b) { + $to = array_slice($to, 0, $a); + } + + $from = array_combine($from, $to); + } + + return strtr($s, $from); + } + + public static function substr_compare($a, $b, $offset, $len = 2147483647, $i = 0) + { + $a = self::substr($a, $offset, $len); + + return $i ? static::strcasecmp($a, $b) : self::strcmp($a, $b); + } + + public static function substr_count($s, $needle, $offset = 0, $len = 2147483647) + { + return substr_count(self::substr($s, $offset, $len), $needle); + } + + public static function substr_replace($s, $replace, $start, $len = 2147483647) + { + $s = self::str_split($s); + $replace = self::str_split($replace); + array_splice($s, $start, $len, $replace); + + return implode('', $s); + } + + public static function ucfirst($s) + { + $c = iconv_substr($s, 0, 1, 'UTF-8'); + + return static::ucwords($c).substr($s, strlen($c)); + } + + public static function lcfirst($s) + { + $c = iconv_substr($s, 0, 1, 'UTF-8'); + + return static::strtolower($c).substr($s, strlen($c)); + } + + public static function ucwords($s) + { + return preg_replace_callback( + "/\b(.)/u", + function ($matches) { + return mb_convert_case($matches[1], MB_CASE_TITLE, 'UTF-8'); + }, + $s + ); + } + + public static function number_format($number, $decimals = 0, $dec_point = '.', $thousands_sep = ',') + { + if (PHP_VERSION_ID < 50400) { + if (isset($thousands_sep[1]) || isset($dec_point[1])) { + return str_replace( + array('.', ','), + array($dec_point, $thousands_sep), + number_format($number, $decimals, '.', ',') + ); + } + } + + return number_format($number, $decimals, $dec_point, $thousands_sep); + } + + public static function utf8_encode($s) + { + $s = utf8_encode($s); + if (false === strpos($s, "\xC2")) { + return $s; + } else { + return str_replace(self::$cp1252, self::$utf8, $s); + } + } + + public static function utf8_decode($s) + { + $s = str_replace(self::$utf8, self::$cp1252, $s); + + return utf8_decode($s); + } + + public static function strwidth($s) + { + if (false !== strpos($s, "\r")) { + $s = str_replace("\r\n", "\n", $s); + $s = strtr($s, "\r", "\n"); + } + $width = 0; + + foreach (explode("\n", $s) as $s) { + $s = preg_replace('/\x1B\[[\d;]*m/', '', $s); + $c = substr_count($s, "\xAD") - substr_count($s, "\x08"); + $s = preg_replace('/[\x00\x05\x07\p{Mn}\p{Me}\p{Cf}\x{1160}-\x{11FF}\x{200B}]+/u', '', $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); + + if ($width < $c = iconv_strlen($s, 'UTF-8') + $wide + $c) { + $width = $c; + } + } + + return $width; + } + + protected static function rxClass($s, $class = '') + { + $class = array($class); + + foreach (self::str_split($s) as $s) { + if ('-' === $s) { + $class[0] = '-'.$class[0]; + } elseif (!isset($s[2])) { + $class[0] .= preg_quote($s, '/'); + } elseif (1 === iconv_strlen($s, 'UTF-8')) { + $class[0] .= $s; + } else { + $class[] = $s; + } + } + + $class[0] = '['.$class[0].']'; + + if (1 === count($class)) { + return $class[0]; + } else { + return '(?:'.implode('|', $class).')'; + } + } + + protected static function getData($file) + { + $file = __DIR__.'/Utf8/data/'.$file.'.ser'; + if (file_exists($file)) { + return unserialize(file_get_contents($file)); + } else { + return false; + } + } +} diff --git a/vendor/patchwork/utf8/src/Patchwork/Utf8/BestFit.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/BestFit.php new file mode 100644 index 0000000000..6f87f6340f --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/BestFit.php @@ -0,0 +1,79 @@ +<?php + +/* + * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork\Utf8; + +/** + * UTF-8 to Code Page conversion using best fit mappings + * See http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/. + */ +class BestFit +{ + public static function fit($cp, $s, $placeholder = '?') + { + if (!$len = strlen($s)) { + return 0 === $len ? '' : false; + } + + static $map = array(); + static $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $s .= ''; + $cp = (string) (int) $cp; + $result = '9' === $cp[0] ? $s.$s : $s; + + if ('932' === $cp && 2 === func_num_args()) { + $placeholder = "\x81\x45"; // Katakana Middle Dot in CP932 + } + + if (!isset($map[$cp])) { + $i = static::getData('to.bestfit'.$cp); + if (false === $i) { + return false; + } + $map[$cp] = $i; + } + + $i = $j = 0; + $cp = $map[$cp]; + + while ($i < $len) { + if ($s[$i] < "\x80") { + $uchr = $s[$i++]; + } else { + $ulen = $ulen_mask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + } + + if (isset($cp[$uchr])) { + $uchr = $cp[$uchr]; + } else { + $uchr = $placeholder; + } + + isset($uchr[0]) and $result[$j++] = $uchr[0]; + isset($uchr[1]) and $result[$j++] = $uchr[1]; + } + + return substr($result, 0, $j); + } + + protected static function getData($file) + { + $file = __DIR__.'/data/'.$file.'.ser'; + if (file_exists($file)) { + return unserialize(file_get_contents($file)); + } else { + return false; + } + } +} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php index 851dd908d4..7d4050d45e 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -14,10 +15,9 @@ use Normalizer as n; use Patchwork\Utf8 as u; use Patchwork\PHP\Shim as s; - class Bootup { - static function initAll() + public static function initAll() { ini_set('default_charset', 'UTF-8'); @@ -29,155 +29,139 @@ class Bootup self::initLocale(); } - static function initUtf8Encode() + public static function initUtf8Encode() { - function_exists('utf8_encode') or require __DIR__ . '/Bootup/utf8_encode.php'; + function_exists('utf8_encode') or require __DIR__.'/Bootup/utf8_encode.php'; } - static function initMbstring() + public static function initMbstring() { - if (extension_loaded('mbstring')) - { - if ( ((int) ini_get('mbstring.encoding_translation') || in_array(strtolower(ini_get('mbstring.encoding_translation')), array('on', 'yes', 'true'))) - && !in_array(strtolower(ini_get('mbstring.http_input')), array('pass', '8bit', 'utf-8')) ) - { + if (extension_loaded('mbstring')) { + if (((int) ini_get('mbstring.encoding_translation') || in_array(strtolower(ini_get('mbstring.encoding_translation')), array('on', 'yes', 'true'))) + && !in_array(strtolower(ini_get('mbstring.http_input')), array('pass', '8bit', 'utf-8'))) { user_error('php.ini settings: Please disable mbstring.encoding_translation or set mbstring.http_input to "pass"', E_USER_WARNING); } - if (MB_OVERLOAD_STRING & (int) ini_get('mbstring.func_overload')) - { + if (MB_OVERLOAD_STRING & (int) ini_get('mbstring.func_overload')) { user_error('php.ini settings: Please disable mbstring.func_overload', E_USER_WARNING); } - if (function_exists('mb_regex_encoding')) mb_regex_encoding('UTF-8'); + if (function_exists('mb_regex_encoding')) { + mb_regex_encoding('UTF-8'); + } ini_set('mbstring.script_encoding', 'pass'); - if ('utf-8' !== strtolower(mb_internal_encoding())) - { + if ('utf-8' !== strtolower(mb_internal_encoding())) { mb_internal_encoding('UTF-8'); } - if ('none' !== strtolower(mb_substitute_character())) - { + if ('none' !== strtolower(mb_substitute_character())) { mb_substitute_character('none'); } - if (!in_array(strtolower(mb_http_output()), array('pass', '8bit'))) - { + if (!in_array(strtolower(mb_http_output()), array('pass', '8bit'))) { mb_http_output('pass'); } - if (!in_array(strtolower(mb_language()), array('uni', 'neutral'))) - { + if (!in_array(strtolower(mb_language()), array('uni', 'neutral'))) { mb_language('uni'); } - } - else if (!defined('MB_OVERLOAD_MAIL')) - { + } elseif (!defined('MB_OVERLOAD_MAIL')) { extension_loaded('iconv') or static::initIconv(); - require __DIR__ . '/Bootup/mbstring.php'; + require __DIR__.'/Bootup/mbstring.php'; } } - static function initIconv() + public static function initIconv() { - if (extension_loaded('iconv')) - { - if ('UTF-8' !== strtoupper(iconv_get_encoding('input_encoding'))) - { + if (extension_loaded('iconv')) { + if ('UTF-8' !== strtoupper(iconv_get_encoding('input_encoding'))) { iconv_set_encoding('input_encoding', 'UTF-8'); } - if ('UTF-8' !== strtoupper(iconv_get_encoding('internal_encoding'))) - { + if ('UTF-8' !== strtoupper(iconv_get_encoding('internal_encoding'))) { iconv_set_encoding('internal_encoding', 'UTF-8'); } - if ('UTF-8' !== strtoupper(iconv_get_encoding('output_encoding'))) - { + if ('UTF-8' !== strtoupper(iconv_get_encoding('output_encoding'))) { iconv_set_encoding('output_encoding', 'UTF-8'); } - } - else if (!defined('ICONV_IMPL')) - { - require __DIR__ . '/Bootup/iconv.php'; + } elseif (!defined('ICONV_IMPL')) { + require __DIR__.'/Bootup/iconv.php'; } } - static function initExif() + public static function initExif() { - if (extension_loaded('exif')) - { - if (ini_get('exif.encode_unicode') && 'UTF-8' !== strtoupper(ini_get('exif.encode_unicode'))) - { + if (extension_loaded('exif')) { + if (ini_get('exif.encode_unicode') && 'UTF-8' !== strtoupper(ini_get('exif.encode_unicode'))) { ini_set('exif.encode_unicode', 'UTF-8'); } - if (ini_get('exif.encode_jis') && 'UTF-8' !== strtoupper(ini_get('exif.encode_jis'))) - { + if (ini_get('exif.encode_jis') && 'UTF-8' !== strtoupper(ini_get('exif.encode_jis'))) { ini_set('exif.encode_jis', 'UTF-8'); } } } - static function initIntl() + public static function initIntl() { - if (defined('GRAPHEME_CLUSTER_RX')) return; + if (defined('GRAPHEME_CLUSTER_RX')) { + return; + } define('GRAPHEME_CLUSTER_RX', PCRE_VERSION >= '8.32' ? '\X' : s\Intl::GRAPHEME_CLUSTER_RX); - if (! extension_loaded('intl')) - { + if (!extension_loaded('intl')) { extension_loaded('iconv') or static::initIconv(); extension_loaded('mbstring') or static::initMbstring(); - require __DIR__ . '/Bootup/intl.php'; + require __DIR__.'/Bootup/intl.php'; } } - static function initLocale() + public static function initLocale() { // With non-UTF-8 locale, basename() bugs. // Be aware that setlocale() can be slow. // You'd better properly configure your LANG environment variable to an UTF-8 locale. - if ('' === basename('§')) - { + if ('' === basename('§')) { setlocale(LC_ALL, 'C.UTF-8', 'C'); setlocale(LC_CTYPE, 'en_US.UTF-8', 'fr_FR.UTF-8', 'es_ES.UTF-8', 'de_DE.UTF-8', 'ru_RU.UTF-8', 'pt_BR.UTF-8', 'it_IT.UTF-8', 'ja_JP.UTF-8', 'zh_CN.UTF-8', '0'); } } - static function filterRequestUri($uri = null, $exit = true) + public static function filterRequestUri($uri = null, $exit = true) { - if (! isset($uri)) - { - if (! isset($_SERVER['REQUEST_URI'])) return; - else $uri = $_SERVER['REQUEST_URI']; + if (!isset($uri)) { + if (!isset($_SERVER['REQUEST_URI'])) { + return; + } else { + $uri = $_SERVER['REQUEST_URI']; + } } // Ensures the URL is well formed UTF-8 // When not, assumes Windows-1252 and redirects to the corresponding UTF-8 encoded URL - if (! preg_match('//u', urldecode($uri))) - { + if (!preg_match('//u', urldecode($uri))) { $uri = preg_replace_callback( '/[\x80-\xFF]+/', - function($m) {return urlencode($m[0]);}, + function ($m) {return urlencode($m[0]);}, $uri ); $uri = preg_replace_callback( '/(?:%[89A-F][0-9A-F])+/i', - function($m) {return urlencode(u::utf8_encode(urldecode($m[0])));}, + function ($m) {return urlencode(u::utf8_encode(urldecode($m[0])));}, $uri ); - if ($exit) - { + if ($exit) { header('HTTP/1.1 301 Moved Permanently'); - header('Location: ' . $uri); + header('Location: '.$uri); exit; // TODO: remove this in 1.2 (BC) } @@ -186,7 +170,7 @@ class Bootup return $uri; } - static function filterRequestInputs($normalization_form = 4 /* n::NFC */, $leading_combining = '◌') + public static function filterRequestInputs($normalization_form = 4 /* n::NFC */, $leading_combining = '◌') { // Ensures inputs are well formed UTF-8 // When not, assumes Windows-1252 and converts to UTF-8 @@ -194,47 +178,50 @@ class Bootup $a = array(&$_FILES, &$_ENV, &$_GET, &$_POST, &$_COOKIE, &$_SERVER, &$_REQUEST); - foreach ($a[0] as &$r) $a[] = array(&$r['name'], &$r['type']); + foreach ($a[0] as &$r) { + $a[] = array(&$r['name'], &$r['type']); + } unset($a[0]); $len = count($a) + 1; - for ($i = 1; $i < $len; ++$i) - { - foreach ($a[$i] as &$r) - { + for ($i = 1; $i < $len; ++$i) { + foreach ($a[$i] as &$r) { $s = $r; // $r is a ref, $s a copy - if (is_array($s)) $a[$len++] =& $r; - else $r = static::filterString($s, $normalization_form, $leading_combining); + if (is_array($s)) { + $a[$len++] = &$r; + } else { + $r = static::filterString($s, $normalization_form, $leading_combining); + } } unset($a[$i]); } } - static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') + public static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') { - if (false !== strpos($s, "\r")) - { + if (false !== strpos($s, "\r")) { // Workaround https://bugs.php.net/65732 $s = str_replace("\r\n", "\n", $s); $s = strtr($s, "\r", "\n"); } - if (preg_match('/[\x80-\xFF]/', $s)) - { - if (n::isNormalized($s, $normalization_form)) $n = '-'; - else - { + if (preg_match('/[\x80-\xFF]/', $s)) { + if (n::isNormalized($s, $normalization_form)) { + $n = '-'; + } else { $n = n::normalize($s, $normalization_form); - if (isset($n[0])) $s = $n; - else $s = u::utf8_encode($s); + if (isset($n[0])) { + $s = $n; + } else { + $s = u::utf8_encode($s); + } } - if ($s[0] >= "\x80" && isset($n[0], $leading_combining[0]) && preg_match('/^\p{Mn}/u', $s)) - { + if ($s[0] >= "\x80" && isset($n[0], $leading_combining[0]) && preg_match('/^\p{Mn}/u', $s)) { // Prevent leading combining chars // for NFC-safe concatenations. - $s = $leading_combining . $s; + $s = $leading_combining.$s; } } diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/iconv.php index 813f09125e..1359801083 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/iconv.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * @@ -24,11 +25,11 @@ function iconv_mime_decode_headers($encoded_headers, $mode = 0, $enc = INF) {ret if (extension_loaded('mbstring')) { - function iconv_strlen($s, $enc = INF) {INF === $enc && $enc = s\Iconv::$internal_encoding; return mb_strlen($s, $enc);}; - function iconv_strpos($s, $needle, $offset = 0, $enc = INF) {INF === $enc && $enc = s\Iconv::$internal_encoding; return mb_strpos($s, $needle, $offset, $enc);}; - function iconv_strrpos($s, $needle, $enc = INF) {INF === $enc && $enc = s\Iconv::$internal_encoding; return mb_strrpos($s, $needle, $enc);}; - function iconv_substr($s, $start, $length = 2147483647, $enc = INF) {INF === $enc && $enc = s\Iconv::$internal_encoding; return mb_substr($s, $start, $length, $enc);}; - function iconv_mime_decode($encoded_headers, $mode = 0, $enc = INF) {INF === $enc && $enc = s\Iconv::$internal_encoding; return mb_decode_mimeheader($encoded_headers, $mode, $enc);}; + function iconv_strlen($s, $enc = INF) {INF === $enc and $enc = s\Iconv::$internal_encoding; return mb_strlen($s, $enc);}; + function iconv_strpos($s, $needle, $offset = 0, $enc = INF) {INF === $enc and $enc = s\Iconv::$internal_encoding; return mb_strpos($s, $needle, $offset, $enc);}; + function iconv_strrpos($s, $needle, $enc = INF) {INF === $enc and $enc = s\Iconv::$internal_encoding; return mb_strrpos($s, $needle, $enc);}; + function iconv_substr($s, $start, $length = 2147483647, $enc = INF) {INF === $enc and $enc = s\Iconv::$internal_encoding; return mb_substr($s, $start, $length, $enc);}; + function iconv_mime_decode($encoded_headers, $mode = 0, $enc = INF) {INF === $enc and $enc = s\Iconv::$internal_encoding; return mb_decode_mimeheader($encoded_headers, $mode, $enc);}; } else { diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/intl.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php index 22704ddf6f..3c78ea5aff 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/intl.php +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/mbstring.php index 9b0c6d8d60..474c4f1f0e 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/mbstring.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/utf8_encode.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/utf8_encode.php index 4180481985..b379e7e458 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/utf8_encode.php +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup/utf8_encode.php @@ -1,4 +1,5 @@ -<?php // vi: set fenc=utf-8 ts=4 sw=4 et: +<?php + /* * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com * diff --git a/vendor/patchwork/utf8/src/Patchwork/Utf8/Compiler.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/Compiler.php new file mode 100644 index 0000000000..79ae891b99 --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/Compiler.php @@ -0,0 +1,330 @@ +<?php + +/* + * Copyright (C) 2013 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork\Utf8; + +/** + * Compiler is a use once class that implements the compilation of unicode + * and charset data to a format suitable for other Utf8 classes. + * + * See http://unicode.org/Public/UNIDATA/ for unicode data + * See http://unicode.org/Public/MAPPINGS/ for charset conversion maps + * See http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/ for mappings + * See http://unicode.org/repos/cldr/trunk/common/transforms/ for Latin-ASCII.xml + */ +class Compiler +{ + public static function charsetMaps($out_dir, $map_dir = null) + { + isset($map_dir) or $map_dir = __DIR__.'/unicode/charset/'; + $h = opendir($map_dir); + while (false !== $f = readdir($h)) { + if (false === strpos($f, '.') && is_file($map_dir.$f)) { + $from = $to = array(); + $data = file_get_contents($map_dir.$f); + + if ('gsm0338' === $f) { + $rx = '/^#?0x([0-9A-F]+)[ \t]+0x([0-9A-F]+)/mi'; + } else { + $rx = '/^0x([0-9A-F]+)[ \t]+0x([0-9A-F]+)/mi'; + } + + preg_match_all($rx, $data, $data, PREG_SET_ORDER); + + if ('nextstep' === $f) { + $from = array_map('chr', range(0, 127)); + $from = array_combine($from, $from); + } elseif ('mazovia' === $f) { + $from = array("\x9B" => self::chr(0x007A).self::chr(0x0142)); + $to = array(self::chr(0x203A) => "\x9B"); + } + + foreach ($data as $data) { + $data = array_map('hexdec', $data); + $data[2] = self::chr($data[2]); + $data[1] = $data[1] > 255 + ? chr($data[1] >> 8).chr($data[1] % 256) + : chr($data[1]); + + if (isset($from[$data[1]])) { + isset($to[$data[2]]) or $to[$data[2]] = $data[1]; + } else { + $from[$data[1]] = $data[2]; + } + } + + file_put_contents("{$out_dir}from.{$f}.ser", serialize($from)); + + if ($to) { + $to += array_flip($from); + file_put_contents("{$out_dir}to.{$f}.ser", serialize($to)); + } + } + } + closedir($h); + } + + public static function translitMap($out_dir) + { + $map = array(); + + $h = fopen(self::getFile('UnicodeData.txt'), 'rt'); + while (false !== $line = fgets($h)) { + $m = array(); + + if (preg_match('/^([^;]*);[^;]*;[^;]*;[^;]*;[^;]*;<(circle|compat|font|fraction|narrow|small|square|wide)> ([^;]*);/', $line, $m)) { + $m[1] = self::chr(hexdec($m[1])); + + $m[3] = explode(' ', $m[3]); + $m[3] = array_map('hexdec', $m[3]); + $m[3] = array_map(array(__CLASS__, 'chr'), $m[3]); + $m[3] = implode('', $m[3]); + + switch ($m[2]) { + case 'compat': + if (' ' === $m[3][0]) { + continue 2; + } + break; + case 'circle': $m[3] = '('.$m[3].')'; break; + case 'fraction': $m[3] = ' '.$m[3].' '; break; + } + + $m = array($m[1], $m[3]); + } elseif (preg_match('/^([^;]*);CJK COMPATIBILITY IDEOGRAPH-[^;]*;[^;]*;[^;]*;[^;]*;([^;]*);/', $line, $m)) { + $m = array( + self::chr(hexdec($m[1])), + self::chr(hexdec($m[2])), + ); + } + + if (!$m) { + continue; + } + + $map[$m[0]] = $m[1]; + } + fclose($h); + + foreach (file(self::getFile('Latin-ASCII.xml')) as $line) { + if (preg_match('/<tRule>(.) → (.*?) ;/u', $line, $m)) { + if ('\u' === $m[1][0]) { + $m[1] = self::chr(hexdec(substr($m[1], 2))); + } + + $m[2] = htmlspecialchars_decode($m[2]); + + switch ($m[2][0]) { + case '\\': $m[2] = substr($m[2], 1); break; + case "'": $m[2] = substr($m[2], 1, -1); break; + } + + isset($map[$m[1]]) or $map[$m[1]] = $m[2]; + } + } + + file_put_contents($out_dir.'translit.ser', serialize($map)); + } + + public static function bestFit($out_dir, $map_dir = null) + { + isset($map_dir) or $map_dir = __DIR__.'/unicode/charset/'; + $dh = opendir($map_dir); + while (false !== $f = readdir($dh)) { + if (0 === strpos($f, 'bestfit') && preg_match('/^bestfit\d+\.txt$/D', $f)) { + $from = array(); + $to = array(); + $lead = ''; + + $h = fopen($map_dir.$f, 'rb'); + + while (false !== $s = fgets($h)) { + if (0 === strpos($s, 'WCTABLE')) { + break; + } + if (0 === strpos($s, 'DBCSTABLE')) { + $lead = substr(rtrim($s), -2); + $lead = chr(hexdec($lead)); + } elseif (preg_match("/^0x([0-9a-f]{2})\t0x([0-9a-f]{4})/", $s, $s)) { + $s = array_map('hexdec', $s); + $from[$lead.chr($s[1])] = self::chr($s[2]); + } + } + + while (false !== $s = fgets($h)) { + if (0 === strpos($s, 'ENDCODEPAGE')) { + break; + } + + $s = explode("\t", rtrim($s)); + + if (isset($s[1])) { + $s[0] = substr($s[0], 2); + $s[1] = substr($s[1], 2); + $s = array_map('hexdec', $s); + $s[1] = $s[1] > 255 + ? chr($s[1] >> 8).chr($s[1] % 256) + : chr($s[1]); + + $to[self::chr($s[0])] = $s[1]; + } + } + + fclose($h); + +// file_put_contents($out_dir . 'from.' . substr($f, 0, -3) .'ser', serialize($from)); + file_put_contents($out_dir.'to.'.substr($f, 0, -3).'ser', serialize($to)); + } + } + closedir($dh); + } + + // Write unicode data maps to disk + + public static function unicodeMaps($out_dir) + { + $upperCase = array(); + $lowerCase = array(); + $caseFolding = array(); + $combiningClass = array(); + $canonicalComposition = array(); + $canonicalDecomposition = array(); + $compatibilityDecomposition = array(); + + $exclusion = array(); + + $h = fopen(self::getFile('CompositionExclusions.txt'), 'rt'); + while (false !== $m = fgets($h)) { + if (preg_match('/^(?:# )?([0-9A-F]+) /', $m, $m)) { + $exclusion[self::chr(hexdec($m[1]))] = 1; + } + } + fclose($h); + + $h = fopen(self::getFile('UnicodeData.txt'), 'rt'); + while (false !== $m = fgets($h)) { + $m = explode(';', $m); + + $k = self::chr(hexdec($m[0])); + $combClass = (int) $m[3]; + $decomp = $m[5]; + + $m[12] && $m[12] != $m[0] and $upperCase[$k] = self::chr(hexdec($m[12])); + $m[13] && $m[13] != $m[0] and $lowerCase[$k] = self::chr(hexdec($m[13])); + + $combClass and $combiningClass[$k] = $combClass; + + if ($decomp) { + $canonic = '<' != $decomp[0]; + $canonic or $decomp = preg_replace("'^<.*> '", '', $decomp); + + $decomp = explode(' ', $decomp); + + $exclude = count($decomp) == 1 || isset($exclusion[$k]); + + $decomp = array_map('hexdec', $decomp); + $decomp = array_map(array(__CLASS__, 'chr'), $decomp); + $decomp = implode('', $decomp); + + if ($canonic) { + $canonicalDecomposition[$k] = $decomp; + $exclude or $canonicalComposition[$decomp] = $k; + } + + $compatibilityDecomposition[$k] = $decomp; + } + } + fclose($h); + + do { + $m = 0; + + foreach ($canonicalDecomposition as $k => $decomp) { + $h = strtr($decomp, $canonicalDecomposition); + if ($h != $decomp) { + $canonicalDecomposition[$k] = $h; + $m = 1; + } + } + } while ($m); + + do { + $m = 0; + + foreach ($compatibilityDecomposition as $k => $decomp) { + $h = strtr($decomp, $compatibilityDecomposition); + if ($h != $decomp) { + $compatibilityDecomposition[$k] = $h; + $m = 1; + } + } + } while ($m); + + foreach ($compatibilityDecomposition as $k => $decomp) { + if (isset($canonicalDecomposition[$k]) && $canonicalDecomposition[$k] == $decomp) { + unset($compatibilityDecomposition[$k]); + } + } + + $h = fopen(self::getFile('CaseFolding.txt'), 'rt'); + while (false !== $m = fgets($h)) { + if (preg_match('/^([0-9A-F]+); ([CFST]); ([0-9A-F]+(?: [0-9A-F]+)*)/', $m, $m)) { + $k = self::chr(hexdec($m[1])); + + $decomp = explode(' ', $m[3]); + $decomp = array_map('hexdec', $decomp); + $decomp = array_map(array(__CLASS__, 'chr'), $decomp); + $decomp = implode('', $decomp); + + @($lowerCase[$k] != $decomp and $caseFolding[$m[2]][$k] = $decomp); + } + } + fclose($h); + + // Only full case folding is worth serializing + $caseFolding = array( + array_keys($caseFolding['F']), + array_values($caseFolding['F']), + ); + + $upperCase = serialize($upperCase); + $lowerCase = serialize($lowerCase); + $caseFolding = serialize($caseFolding); + $combiningClass = serialize($combiningClass); + $canonicalComposition = serialize($canonicalComposition); + $canonicalDecomposition = serialize($canonicalDecomposition); + $compatibilityDecomposition = serialize($compatibilityDecomposition); + + file_put_contents($out_dir.'upperCase.ser', $upperCase); + file_put_contents($out_dir.'lowerCase.ser', $lowerCase); + file_put_contents($out_dir.'caseFolding_full.ser', $caseFolding); + file_put_contents($out_dir.'combiningClass.ser', $combiningClass); + file_put_contents($out_dir.'canonicalComposition.ser', $canonicalComposition); + file_put_contents($out_dir.'canonicalDecomposition.ser', $canonicalDecomposition); + file_put_contents($out_dir.'compatibilityDecomposition.ser', $compatibilityDecomposition); + } + + protected static function chr($c) + { + $c %= 0x200000; + + return $c < 0x80 ? chr($c) : ( + $c < 0x800 ? chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F) : ( + $c < 0x10000 ? chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F) : ( + chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F) + ))); + } + + protected static function getFile($file) + { + return __DIR__.'/unicode/data/'.$file; + } +} diff --git a/vendor/patchwork/utf8/src/Patchwork/Utf8/WindowsStreamWrapper.php b/vendor/patchwork/utf8/src/Patchwork/Utf8/WindowsStreamWrapper.php new file mode 100644 index 0000000000..aaf7cbdb0b --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/WindowsStreamWrapper.php @@ -0,0 +1,404 @@ +<?php + +/* + * Copyright (C) 2014 Nicolas Grekas - p@tchwork.com + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the (at your option): + * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or + * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). + */ + +namespace Patchwork\Utf8; + +/** + * Unicode UTF-8 aware stream based filesystem access on MS-Windows. + * + * Based on COM Scripting.FileSystemObject object and short paths. + * See Patchwork\Utf8::wrapPath() + * + * See also https://code.google.com/p/php-wfio/ for a PHP extension + * and comments on http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php + */ +class WindowsStreamWrapper +{ + public $context; + + protected $handle; + + public static function hide($path) + { + list($fs, $path) = self::fs($path); + if ($fs->FileExists($path)) { + $fs->GetFile($path)->Attributes |= 2; + } elseif ($fs->FolderExists($path)) { + $fs->GetFolder($path)->Attributes |= 2; + } else { + return false; + } + + return true; + } + + public static function fs($path, $is_utf8 = true) + { + static $fs; + + if (!class_exists('COM', false)) { + throw new \RuntimeException('The `wfio` or `com_dotnet` extension is required to handle UTF-8 filesystem access on Windows'); + } + + isset($fs) or $fs = new \COM('Scripting.FileSystemObject', null, CP_UTF8); + + $path = explode('://', $path, 2); + $path = $path[(int) isset($path[1])]; + $path = strtr($path, '/', '\\'); + $pre = ''; + + if (!isset($path[0]) || ('/' !== $path[0] && '\\' !== $path[0] && false === strpos($path, ':'))) { + $pre = getcwd().'\\'; + } + + $pre = new \VARIANT($pre); + + if ($is_utf8) { + $path = new \VARIANT($path, VT_BSTR, CP_UTF8); + } else { + $path = new \VARIANT($path); + } + + return array($fs, $fs->getAbsolutePathName(variant_cat($pre, $path))); + } + + public function dir_closedir() + { + $this->handle = null; + + return true; + } + + public function dir_opendir($path, $options) + { + list($fs, $path) = self::fs($path); + if (!$fs->FolderExists($path)) { + return false; + } + + $dir = $fs->GetFolder($path); + + try { + $f = array('.', '..'); + + foreach ($dir->SubFolders() as $v) { + $f[] = $v->Name; + } + foreach ($dir->Files as $v) { + $f[] = $v->Name; + } + } catch (\Exception $f) { + $f = array(); + } + + $this->handle = $f; + + return true; + } + + public function dir_readdir() + { + if (list(, $c) = each($this->handle)) { + return $c; + } + + return false; + } + + public function dir_rewinddir() + { + reset($this->handle); + + return true; + } + + public function mkdir($path, $mode, $options) + { + list($fs, $path) = self::fs($path); + + try { + if ($options & STREAM_MKDIR_RECURSIVE) { + $path = $fs->GetAbsolutePathName($path); + + $path = explode('\\', $path); + + if (isset($path[3]) && '' === $path[0].$path[1]) { + $pre = '\\\\'.$path[2].'\\'.$path[3].'\\'; + $i = 4; + } elseif (isset($path[1])) { + $pre = $path[0].'\\'; + $i = 1; + } else { + $pre = ''; + $i = 0; + } + + while (isset($path[$i]) && $fs->FolderExists($pre.$path[$i])) { + $pre .= $path[$i++].'\\'; + } + + if (!isset($path[$i])) { + return false; + } + + while (isset($path[$i])) { + $fs->CreateFolder($pre .= $path[$i++].'\\'); + } + + return true; + } else { + $fs->CreateFolder($path); + } + + return true; + } catch (\Exception $e) { + return false; + } + } + + public function rename($from, $to) + { + list($fs, $to) = self::fs($to); + + if ($fs->FileExists($to) || $fs->FolderExists($to)) { + return false; + } + + list(, $from) = self::fs($from); + + try { + if ($fs->FileExists($from)) { + $fs->MoveFile($from, $to); + + return true; + } + + if ($fs->FolderExists($from)) { + $fs->MoveFolder($from, $to); + + return true; + } + } catch (\Exception $e) { + } + + return false; + } + + public function rmdir($path, $options) + { + list($fs, $path) = self::fs($path); + + if ($fs->FolderExists($path)) { + return rmdir($fs->GetFolder($path)->ShortPath); + } + + return false; + } + + public function stream_close() + { + fclose($this->handle); + $this->handle = null; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_flush() + { + return fflush($this->handle); + } + + public function stream_lock($operation) + { + return flock($this->handle, $operation); + } + + public function stream_metadata($path, $option, $value) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) { + $f = $fs->GetFile($path); + } elseif ($fs->FileExists($path)) { + $f = $fs->GetFolder($path); + } else { + $f = false; + } + + if (STREAM_META_TOUCH === $option) { + if ($f) { + return touch($f->ShortPath); + } + + try { + $fs->OpenTextFile($path, 8, true, 0)->Close(); + + return true; + } catch (\Exception $e) { + } + } + + if (!$f) { + return false; + } + + switch ($option) { + case STREAM_META_ACCESS: return chmod($f->ShortPath, $value); + case STREAM_META_OWNER: + case STREAM_META_OWNER_NAME: return chown($f->ShortPath, $value); + case STREAM_META_GROUP: + case STREAM_META_GROUP_NAME: return chgrp($f->ShortPath, $value); + default: return false; + } + } + + public function stream_open($path, $mode, $options, &$opened_path) + { + $mode .= ''; + list($fs, $path) = self::fs($path); + + if ($fs->FolderExists($path)) { + return false; + } + + try { + if ('x' === $m = substr($mode, 0, 1)) { + $fs->CreateTextFile($path, false)->Close(); + $f = $fs->GetFile($path); + $mode[0] = 'w'; + } else { + $f = $fs->GetFile($path); + } + } catch (\Exception $f) { + try { + switch ($m) { + case 'w': + case 'c': + case 'a': + $h = $fs->CreateTextFile($path, true); + $f = $fs->GetFile($path); + $h->Close(); + break; + + default: return false; + } + } catch (\Exception $e) { + return false; + } + } + + if (!(STREAM_REPORT_ERRORS & $options)) { + set_error_handler('var_dump', 0); + $e = error_reporting(0); + } + + $this->handle = fopen($f->ShortPath, $mode); + + if (!(STREAM_REPORT_ERRORS & $options)) { + error_reporting($e); + restore_error_handler(); + } + + if ($this->handle) { + return true; + } + if (isset($h)) { + $f->Delete(true); + } + + return false; + } + + public function stream_read($count) + { + return fread($this->handle, $count); + } + + public function stream_seek($offset, $whence = SEEK_SET) + { + return fseek($this->handle, $offset, $whence); + } + + public function stream_set_option($option, $arg1, $arg2) + { + switch ($option) { + case STREAM_OPTION_BLOCKING: return stream_set_blocking($this->handle, $arg1); + case STREAM_OPTION_READ_TIMEOUT: return stream_set_timeout($this->handle, $arg1, $arg2); + case STREAM_OPTION_WRITE_BUFFER: return stream_set_write_buffer($this->handle, $arg1, $arg2); + default: return false; + } + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_tell() + { + return ftell($this->handle); + } + + public function stream_truncate($new_size) + { + return ftruncate($this->handle, $new_size); + } + + public function stream_write($data) + { + return fwrite($this->handle, $data, strlen($data)); + } + + public function unlink($path) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) { + return unlink($fs->GetFile($path)->ShortPath); + } + + return false; + } + + public function url_stat($path, $flags) + { + list($fs, $path) = self::fs($path); + + if ($fs->FileExists($path)) { + $f = $fs->GetFile($path); + } elseif ($fs->FolderExists($path)) { + $f = $fs->GetFolder($path); + } else { + return false; + } + + if (STREAM_URL_STAT_QUIET & $flags) { + set_error_handler('var_dump', 0); + $e = error_reporting(0); + } + + if (STREAM_URL_STAT_LINK & $flags) { + $f = @lstat($f->ShortPath) ?: stat($f->ShortPath); + } else { + $f = stat($f->ShortPath); + } + + if (STREAM_URL_STAT_QUIET & $flags) { + error_reporting($e); + restore_error_handler(); + } + + return $f; + } +} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/caseFolding_full.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/caseFolding_full.ser index b8cacc97de..b8cacc97de 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/caseFolding_full.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/caseFolding_full.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1250.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1250.ser Binary files differindex 6b90eccc1e..6b90eccc1e 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1250.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1250.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1251.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1251.ser Binary files differindex 981e1800b6..981e1800b6 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1251.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1251.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1252.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1252.ser Binary files differindex d43292b1a5..d43292b1a5 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1252.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1252.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1253.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1253.ser Binary files differindex 4904d69169..4904d69169 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1253.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1253.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1254.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1254.ser Binary files differindex 9b9c71d479..9b9c71d479 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1254.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1254.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1255.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1255.ser Binary files differindex 6aa32b4ca6..6aa32b4ca6 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1255.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1255.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1256.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1256.ser Binary files differindex 17ca822f40..17ca822f40 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1256.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1256.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1257.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1257.ser Binary files differindex 3c3fa7dc14..3c3fa7dc14 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1257.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1257.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1258.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1258.ser Binary files differindex 4afc772022..4afc772022 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit1258.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit1258.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit874.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit874.ser Binary files differindex f554c7e5d6..f554c7e5d6 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit874.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit874.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit932.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit932.ser Binary files differindex bf0a160c96..bf0a160c96 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit932.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit932.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit936.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit936.ser Binary files differindex 683fc30e78..683fc30e78 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit936.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit936.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit949.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit949.ser Binary files differindex 6afa6236d8..6afa6236d8 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit949.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit949.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit950.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit950.ser Binary files differindex c2e828d739..c2e828d739 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/to.bestfit950.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/to.bestfit950.ser diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/translit_extra.ser b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/translit_extra.ser index ceb35dbe05..ceb35dbe05 100644 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/translit_extra.ser +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/data/translit_extra.ser diff --git a/vendor/patchwork/utf8/src/Patchwork/Utf8/unicode-data.tbz2 b/vendor/patchwork/utf8/src/Patchwork/Utf8/unicode-data.tbz2 Binary files differnew file mode 100644 index 0000000000..5d2e24a893 --- /dev/null +++ b/vendor/patchwork/utf8/src/Patchwork/Utf8/unicode-data.tbz2 diff --git a/vendor/ramsey/uuid/CHANGELOG.md b/vendor/ramsey/uuid/CHANGELOG.md index e4a9b589f0..98505ecfa8 100644 --- a/vendor/ramsey/uuid/CHANGELOG.md +++ b/vendor/ramsey/uuid/CHANGELOG.md @@ -1,5 +1,14 @@ # Rhumsaa\Uuid Changelog +## 2.8.1 + +_Released: 2015-06-16_ + + * Use `passthru()` and output buffering in `getIfconfig()`. + * Cache the system node in a static variable so that we process it only once per runtime. + * Set ramsey/uuid as a replacement for rhumsaa/uuid in composer.json. + * Documentation updates and corrections. + ## 2.8.0 _Released: 2014-11-09_ diff --git a/vendor/ramsey/uuid/README.md b/vendor/ramsey/uuid/README.md index 8c9bb2774e..7071c97dde 100644 --- a/vendor/ramsey/uuid/README.md +++ b/vendor/ramsey/uuid/README.md @@ -1,11 +1,10 @@ # Rhumsaa\Uuid for PHP -[](https://travis-ci.org/ramsey/uuid) -[](https://coveralls.io/r/ramsey/uuid) -[](https://packagist.org/packages/rhumsaa/uuid) -[](https://packagist.org/packages/rhumsaa/uuid) -[](https://packagist.org/packages/rhumsaa/uuid) -[](http://hhvm.h4cc.de/package/rhumsaa/uuid) +[](https://travis-ci.org/ramsey/uuid) +[](https://coveralls.io/r/ramsey/uuid) +[](https://packagist.org/packages/rhumsaa/uuid) +[](https://packagist.org/packages/rhumsaa/uuid) +[](https://packagist.org/packages/rhumsaa/uuid) [](https://packagist.org/packages/rhumsaa/uuid) ## About @@ -91,7 +90,7 @@ the following command to install the package and add it as a requirement to `composer.json`: ```bash -composer.phar require "rhumsaa/uuid=~2.8" +composer.phar require "ramsey/uuid=~2.8" ``` diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json index 4e2c627c0a..4a82193d2e 100644 --- a/vendor/ramsey/uuid/composer.json +++ b/vendor/ramsey/uuid/composer.json @@ -1,5 +1,5 @@ { - "name": "rhumsaa/uuid", + "name": "ramsey/uuid", "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", "type": "library", "keywords": ["uuid", "identifier", "guid"], @@ -38,9 +38,7 @@ "autoload": { "psr-4": {"Rhumsaa\\Uuid\\": "src/"} }, - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev" - } + "replace": { + "rhumsaa/uuid": "self.version" } } diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php index ec03ecdab8..fdea5e1872 100644 --- a/vendor/ramsey/uuid/src/Uuid.php +++ b/vendor/ramsey/uuid/src/Uuid.php @@ -93,7 +93,7 @@ final class Uuid /** * Version of the Rhumsaa\Uuid package */ - const VERSION = '2.8.0'; + const VERSION = '2.8.1'; /** * For testing, 64-bit system override; if true, treat the system as 32-bit @@ -448,7 +448,7 @@ final class Uuid 'Cannot call ' . __METHOD__ . ' without support for large ' . 'integers, since integer is an unsigned ' . '128-bit integer; Moontoast\Math\BigNumber is required' - . '; consider calling getMostSignificantBitsHex instead' + . '; consider calling getHex instead' ); } @@ -1134,20 +1134,21 @@ final class Uuid */ protected static function getIfconfig() { + ob_start(); switch (strtoupper(substr(php_uname('a'), 0, 3))) { case 'WIN': - $ifconfig = `ipconfig /all 2>&1`; + passthru('ipconfig /all 2>&1'); break; case 'DAR': - $ifconfig = `ifconfig 2>&1`; + passthru('ifconfig 2>&1'); break; case 'LIN': default: - $ifconfig = `netstat -ie 2>&1`; + passthru('netstat -ie 2>&1'); break; } - return $ifconfig; + return ob_get_clean(); } /** @@ -1162,7 +1163,12 @@ final class Uuid */ protected static function getNodeFromSystem() { - $node = null; + static $node = null; + + if ($node !== null) { + return $node; + } + $pattern = '/[^:]([0-9A-Fa-f]{2}([:-])[0-9A-Fa-f]{2}(\2[0-9A-Fa-f]{2}){4})[^:]/'; $matches = array(); diff --git a/vendor/tecnick.com/tcpdf/CHANGELOG.TXT b/vendor/tecnick.com/tcpdf/CHANGELOG.TXT index 8776ad9499..5277d01aaf 100644 --- a/vendor/tecnick.com/tcpdf/CHANGELOG.TXT +++ b/vendor/tecnick.com/tcpdf/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.2.9 (2015-06-18) + - + 6.2.8 (2015-04-29) - Removed unwanted file. diff --git a/vendor/tecnick.com/tcpdf/README.TXT b/vendor/tecnick.com/tcpdf/README.TXT index c51d9c0369..b3a4a8bc5d 100644 --- a/vendor/tecnick.com/tcpdf/README.TXT +++ b/vendor/tecnick.com/tcpdf/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.2.8 -Release date: 2015-04-29 +Version: 6.2.9 +Release date: 2015-06-18 Author: Nicola Asuni Copyright (c) 2002-2015: diff --git a/vendor/tecnick.com/tcpdf/composer.json b/vendor/tecnick.com/tcpdf/composer.json index 736f2ba516..72fbdc8ddf 100644 --- a/vendor/tecnick.com/tcpdf/composer.json +++ b/vendor/tecnick.com/tcpdf/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.2.8", + "version": "6.2.9", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", diff --git a/vendor/tecnick.com/tcpdf/include/tcpdf_images.php b/vendor/tecnick.com/tcpdf/include/tcpdf_images.php index c7ae9bd967..40cbe9d621 100644 --- a/vendor/tecnick.com/tcpdf/include/tcpdf_images.php +++ b/vendor/tecnick.com/tcpdf/include/tcpdf_images.php @@ -160,6 +160,14 @@ class TCPDF_IMAGES { * @public static */ public static function _parsejpeg($file) { + // check if is a local file + if (!@file_exists($file)) { + // try to encode spaces on filename + $tfile = str_replace(' ', '%20', $file); + if (@file_exists($tfile)) { + $file = $tfile; + } + } $a = getimagesize($file); if (empty($a)) { //Missing or incorrect image file diff --git a/vendor/tecnick.com/tcpdf/include/tcpdf_static.php b/vendor/tecnick.com/tcpdf/include/tcpdf_static.php index c68d0951c5..4ab18b6c4d 100644 --- a/vendor/tecnick.com/tcpdf/include/tcpdf_static.php +++ b/vendor/tecnick.com/tcpdf/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.2.8'; + private static $tcpdf_version = '6.2.9'; /** * String alias for total number of pages. diff --git a/vendor/tecnick.com/tcpdf/tcpdf.php b/vendor/tecnick.com/tcpdf/tcpdf.php index 32458daa6f..1412834912 100644 --- a/vendor/tecnick.com/tcpdf/tcpdf.php +++ b/vendor/tecnick.com/tcpdf/tcpdf.php @@ -1,9 +1,9 @@ <?php //============================================================+ // File name : tcpdf.php -// Version : 6.2.8 +// Version : 6.2.9 // Begin : 2002-08-03 -// Last Update : 2015-04-29 +// Last Update : 2015-06-18 // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // ------------------------------------------------------------------- @@ -7026,6 +7026,7 @@ class TCPDF { AND (($info === 'pngalpha') OR (isset($info['trns']) AND !empty($info['trns'])))) { return $this->ImagePngAlpha($file, $x, $y, $pixw, $pixh, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign, $filehash); } + $info = false; } if (($info === false) AND function_exists($gdfunction)) { try { @@ -10362,7 +10363,7 @@ class TCPDF { * @public */ public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color='', $style=-1, $firstblock=false) { - if (isset($url[1]) AND ($url[0] == '#')) { + if (isset($url[1]) AND ($url[0] == '#') AND is_numeric($url[1])) { // convert url to internal link $lnkdata = explode(',', $url); if (isset($lnkdata[0]) ) { @@ -18649,7 +18650,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $this->lispacer = $prev_lispacer; if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) { $this->Ln($this->lasth); - if ($this->y < $maxbottomliney) { + if (($this->y < $maxbottomliney) AND ($startlinepage == $this->page)) { $this->y = $maxbottomliney; } } |
