aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/voku/portable-ascii/build
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/voku/portable-ascii/build')
-rw-r--r--vendor/voku/portable-ascii/build/composer.json5
-rw-r--r--vendor/voku/portable-ascii/build/docs/base.md127
-rw-r--r--vendor/voku/portable-ascii/build/generate_docs.php26
-rw-r--r--vendor/voku/portable-ascii/build/generate_max_key_length.php20
4 files changed, 178 insertions, 0 deletions
diff --git a/vendor/voku/portable-ascii/build/composer.json b/vendor/voku/portable-ascii/build/composer.json
new file mode 100644
index 000000000..30f30c3cc
--- /dev/null
+++ b/vendor/voku/portable-ascii/build/composer.json
@@ -0,0 +1,5 @@
+{
+ "require-dev": {
+ "voku/php-readme-helper": "~0.6"
+ }
+}
diff --git a/vendor/voku/portable-ascii/build/docs/base.md b/vendor/voku/portable-ascii/build/docs/base.md
new file mode 100644
index 000000000..e21e73137
--- /dev/null
+++ b/vendor/voku/portable-ascii/build/docs/base.md
@@ -0,0 +1,127 @@
+[![Build Status](https://travis-ci.com/voku/portable-ascii.svg?branch=master)](https://travis-ci.com/voku/portable-ascii)
+[![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-ascii/branch/master)
+[![Coverage Status](https://coveralls.io/repos/voku/portable-ascii/badge.svg?branch=master&service=github)](https://coveralls.io/github/voku/portable-ascii?branch=master)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/997c9bb10d1c4791967bdf2e42013e8e)](https://www.codacy.com/app/voku/portable-ascii)
+[![Latest Stable Version](https://poser.pugx.org/voku/portable-ascii/v/stable)](https://packagist.org/packages/voku/portable-ascii)
+[![Total Downloads](https://poser.pugx.org/voku/portable-ascii/downloads)](https://packagist.org/packages/voku/portable-ascii)
+[![License](https://poser.pugx.org/voku/portable-ascii/license)](https://packagist.org/packages/voku/portable-ascii)
+[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/moelleken)
+[![Donate to this project using Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/voku)
+
+# 🔡 Portable ASCII
+
+## Description
+
+It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your server.
+
+The benefit of Portable ASCII is that it is easy to use, easy to bundle.
+
+The project based on ...
++ Sean M. Burke's work (https://metacpan.org/pod/Text::Unidecode)
++ Tomaz Solc's work (https://pypi.org/project/Unidecode/)
++ Portable UTF-8 work (https://github.com/voku/portable-utf8)
++ Daniel St. Jules's work (https://github.com/danielstjules/Stringy)
++ Johnny Broadway's work (https://github.com/jbroadway/urlify)
++ and many cherry-picks from "github"-gists and "Stack Overflow"-snippets ...
+
+## Index
+
+* [Alternative](#alternative)
+* [Install](#install-portable-ascii-via-composer-require)
+* [Why Portable ASCII?](#why-portable-ascii)
+* [Requirements and Recommendations](#requirements-and-recommendations)
+* [Usage](#usage)
+* [Class methods](#class-methods)
+* [Unit Test](#unit-test)
+* [License and Copyright](#license-and-copyright)
+
+## Alternative
+
+If you like a more Object Oriented Way to edit strings, then you can take a look at [voku/Stringy](https://github.com/voku/Stringy), it's a fork of "danielstjules/Stringy" but it used the "Portable ASCII"-Class and some extra methods.
+
+```php
+// Portable ASCII
+use voku\helper\ASCII;
+ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii'
+
+// voku/Stringy
+use Stringy\Stringy as S;
+$stringy = S::create('déjà σσς iıii');
+$stringy->toTransliterate(); // 'deja sss iiii'
+```
+
+## Install "Portable ASCII" via "composer require"
+```shell
+composer require voku/portable-ascii
+```
+
+## Why Portable ASCII?[]()
+I need ASCII char handling in different classes and before I added this functions into "Portable UTF-8",
+but this repo is more modular and portable, because it has no dependencies.
+
+## Requirements and Recommendations
+
+* No extensions are required to run this library. Portable ASCII only needs PCRE library that is available by default since PHP 4.2.0 and cannot be disabled since PHP 5.3.0. "\u" modifier support in PCRE for ASCII handling is not a must.
+* PHP 7.0 is the minimum requirement
+* PHP 8.0 is also supported
+
+## Usage
+
+Example: ASCII::to_ascii()
+```php
+ echo ASCII::to_ascii('�Düsseldorf�', 'de');
+
+ // will output
+ // Duesseldorf
+
+ echo ASCII::to_ascii('�Düsseldorf�', 'en');
+
+ // will output
+ // Dusseldorf
+```
+
+# Portable ASCII | API
+
+The API from the "ASCII"-Class is written as small static methods.
+
+
+## Class methods
+
+%__functions_index__voku\helper\ASCII__%
+
+%__functions_list__voku\helper\ASCII__%
+
+
+## Unit Test
+
+1) [Composer](https://getcomposer.org) is a prerequisite for running the tests.
+
+```
+composer install
+```
+
+2) The tests can be executed by running this command from the root directory:
+
+```bash
+./vendor/bin/phpunit
+```
+
+### Support
+
+For support and donations please visit [Github](https://github.com/voku/portable-ascii/) | [Issues](https://github.com/voku/portable-ascii/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).
+
+For status updates and release announcements please visit [Releases](https://github.com/voku/portable-ascii/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts).
+
+For professional support please contact [me](https://about.me/voku).
+
+### Thanks
+
+- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
+- Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
+- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there!
+- Thanks to [StyleCI](https://styleci.io/) for the simple but powerful code style check.
+- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for really great Static analysis tools and for discover bugs in the code!
+
+### License and Copyright
+
+Released under the MIT License - see `LICENSE.txt` for details.
diff --git a/vendor/voku/portable-ascii/build/generate_docs.php b/vendor/voku/portable-ascii/build/generate_docs.php
new file mode 100644
index 000000000..c86f1f195
--- /dev/null
+++ b/vendor/voku/portable-ascii/build/generate_docs.php
@@ -0,0 +1,26 @@
+<?php
+
+require __DIR__ . '/../vendor/autoload.php';
+require __DIR__ . '/vendor/autoload.php';
+
+$readmeGenerator = new \voku\PhpReadmeHelper\GenerateApi();
+$readmeGenerator->templateMethod = <<<RAW
+#### %name%
+<a href="#voku-php-readme-class-methods">↑</a>
+%description%
+
+**Parameters:**
+%params%
+
+**Return:**
+%return%
+
+--------
+
+RAW;
+$readmeText = ($readmeGenerator)->generate(
+ __DIR__ . '/../src/voku/helper/ASCII.php',
+ __DIR__ . '/docs/base.md'
+);
+
+file_put_contents(__DIR__ . '/../README.md', $readmeText);
diff --git a/vendor/voku/portable-ascii/build/generate_max_key_length.php b/vendor/voku/portable-ascii/build/generate_max_key_length.php
new file mode 100644
index 000000000..743d389f5
--- /dev/null
+++ b/vendor/voku/portable-ascii/build/generate_max_key_length.php
@@ -0,0 +1,20 @@
+<?php
+
+require __DIR__ . '/../vendor/autoload.php';
+
+$languages = \voku\helper\ASCII::getAllLanguages();
+
+$languagesKeyLengths = [];
+foreach ($languages as $language) {
+ $langSpecific = \voku\helper\ASCII::charsArrayWithOneLanguage($language, false, false);
+
+ $langSpecificKeyLength = \array_map('\mb_strlen', \array_keys($langSpecific));
+
+ if (count($langSpecificKeyLength) === 0) {
+ $languagesKeyLengths[$language] = 0;
+ } else {
+ $languagesKeyLengths[$language] = \max($langSpecificKeyLength);
+ }
+}
+
+//var_export($languagesKeyLengths);