Preposition replace library

Installs: 1 731

Dependents: 0

Stars: 3

Watchers: 2

Open Issues: 1

Language: PHP

1.1.3 2014-07-25 18:04 UTC


PHP Prepositioner for replacing prepositions with   after preposition

Build Status Code Climate Coverage Status Dependency Status

Latest Stable Version Latest Unstable Version License


Install package via composer:

$ composer require tomaj/prepositioner


Simple usage without Factory is very simple:

$prepositioner = new Tomaj\Prepositioner\Prepositioner(array('one', 'two'));

This example replaces all occurences of 'one' or 'two' strings in $inputText as 'one ' and 'two '.

For using with Factory which contains language support try:

$prepositioner = Tomaj\Prepositioner\Factory::build('slovak')


For new language support you need to implement new language class which implements LanguageInterface with prepositions. See SlovakLanguage for details.

Known issue

  1. each new language has to be in Tomaj\Prepositioner namespace