englishdom/convertor

Text converter

1.1.4 2024-01-12 15:39 UTC

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');