englishdom / convertor
Text converter
Installs: 6 488
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 0
Requires
- php: ^7.1|^8.0
Requires (Dev)
- phpunit/phpunit: ^8.0.0
This package is not auto-updated.
Last update: 2024-12-13 19:48:29 UTC
README
Installation
composer require englishdom\convertor
Using
Set different input adapter. Default input adapter Text
.
$converter = new Converter();
$converter->setInput(new MyInputAdapter());
Set different output adapter. Default output adapter Text
.
$converter = new Converter();
$converter->setOutput(new MyOutputAdapter());
Set different filters. Default filters Dash
,Quotes
,Apostrophe
$converter = new Converter();
$converter->setFilters([new MyFilter(), new MyFilterOth()]);
Convert text
$converter = new Converter();
$response = $converter->convert('text');