├── BaseFormatter.php
├── CampaignNameFormatter.php
├── CinemaNameFormatter.php
├── CompanyNameFormatter.php
├── CountryNameFormatter.php
├── MovieTitleFormatter.php
├── PersonNameFormatter.php
└── VatNumberFormatter.php
You can install the package via composer:
composer require brightfish/bf-text-formatter// generic text formatter
use Brightfish\TextFormatter\BaseFormatter;
$formatter = new BaseFormatter;
$formatter->uppercaseWords(['cia', 'fbi', 'nsa']);
$formatter->lowercaseWords(['in', 'a', 'the']);
$formatter->removeWords(['draft', 'void', 'obsolete']);
$result = $formatter->clean("The dog in the house"); // the Dog in the House
$formatter = (new BaseFormatter)->setForceTransliterate(true);use Brightfish\TextFormatter\CampaignNameFormatter;
$formatter = new CampaignNameFormatter();use Brightfish\TextFormatter\CinemaNameFormatter;
$formatter = new CinemaNameFormatter();
$result = $formatter->format("pathe charleroi"); // Pathé Charleroiuse Brightfish\TextFormatter\CompanyNameFormatter;
$formatter = new CompanyNameFormatter();use Brightfish\TextFormatter\MovieTitleFormatter;
$formatter = new MovieTitleFormatter();use Brightfish\TextFormatter\PersonNameFormatter;
$formatter = new PersonNameFormatter();composer testPlease see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.