Download the PHP package zvermafia/transliteration without Composer
On this page you can find all versions of the php package zvermafia/transliteration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zvermafia/transliteration
More information about zvermafia/transliteration
Files in zvermafia/transliteration
Package transliteration
Short Description Uzbek latin <=> cyrillic transliterator
License MIT
Homepage https://github.com/zvermafia/transliterator
Informations about the package transliteration
Uzbek transliterator
Uzbek latin <=> cyrillic transliterator. Under the hood it uses some online transliteration services. But it's extendable!
Navigation by sections
- Install
- Usage
- Make your own implementation (extending)
- Change log
- Testing
- Contributing
- Security
- Credits
- License
Install
Via Composer
Usage
Out of the box there are two implementations for your choice:
Zvermafia\Transliteration\AlifTransliterator
which uses an alif.uz online transliteration service's API;Zvermafia\Transliteration\LotinTransliterator
which uses a lotin.uz online transliteration service's API;
Also you can implement your own class which will use another service's API or won't use any services' API and does all the job by itself.
Make your own implementation (extending)
If these two already exist implementations aren't enough for you, then you can extend functionalities of this package by implementing your own transliterator class. If so there are three possible ways:
- Create a class by implementing a
Zvermafia\Transliteration\Interfaces\TransliteratorInterface
interface. In this case you must realize all the methods defined in the interface from scratch by yourself; - This is the recommended way (if you're not going to use third party APIs with HTTP). Create a class by extending
Zvermafia\Transliteration\Abstracts\TransliteratorAbstract
abstract class. In this case you must realize only that methods which aren't already realized by the abstract class. The abstract class already realized common methods of the interface; - This one is similar to the previous way. Because in this case you'll use a
Zvermafia\Transliteration\Abstracts\HttpTransliteratorAbstract
abstract class which is extends by theZvermafia\Transliteration\Abstracts\TransliteratorAbstract
. But what is the difference? The difference is in this abstract class realized some common methods which will work with the HTTP through the cURL extension. So you must only configure some specific HTTP request parameters to work with an API.
So here are examples by the points.
An example for the point number 1:
An example for the point number 2:
An example for the point number 3:
As examples for this point you can see source codes of Zvermafia\Transliteration\AlifTransliterator
and Zvermafia\Transliteration\LotinTransliterator
.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Mokhirjon Naimov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of transliteration with dependencies
ext-curl Version *