2017 © Pedro Peláez
 

library vocative-polish-firstname

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

image

ecommercebox/vocative-polish-firstname

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  • Monday, June 12, 2017
  • by lutek
  • Repository
  • 2 Watchers
  • 3 Stars
  • 6,086 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 7 % Grown

The README.md

VocativePolishFirstName

Component for remake first name to Polish vocative, (*1)

Installation

Install the library by adding it to your composer.json or running:, (*2)

composer require "ecommercebox/vocative-polish-firstname:*"

How to use

Create object with first name, you can setup encoding and own "titles" as optional arguments. First name is converted to first letter up., (*3)

//required
$input = 'MARIUSZ';

//optional
$encoding = "UTF-8";
//default group ['U' => 'Panie/Pani', 'M' => 'Panie', 'W' => 'Pani'];
//override default group titles
$titles = ['U' => '', 'M' => 'Drogi Panie', 'W' => 'Droga Pani'];
//override or add new exeptions, where W = Woman, M = Man
$exeptions = [
    'Ola' => ['W', 'Oluu'],
    'Jan' => ['M', 'Janku']
];

//init object
$name = new \ecbox\VocativePolishFirstName($input, $encoding, $titles, $exeptions);

Setup additional titles group, (*4)

$titles = ['U' => 'Szanowna(y) Pani(e)', 'M' => 'Szanowny Panie', 'W' => 'Szanowna Pani'];
$name->setTitles($titles, 'polite');

Get vocative first name with default title definition. Optional argument $delimiter, default is space and title definition group name, (*5)

echo $name->getVocativeString();
// output: Drogi Panie Mariuszu

Get vocative first name with custom title definition. Optional argument $delimiter, default is space and title definition group name, (*6)

echo $name->getVocativeString('polite');
// output: Szanowny Panie Mariuszu

Get vocative first name, (*7)

echo $name->getVocativeFirstName();
// output: Mariuszu

Get default title for first name, (*8)

echo $name->getDetectedTitle();
// output: Drogi Panie

Get custom group title for first name, (*9)

echo $name->getDetectedTitle('polite');
// output: Szanowny Panie

Check if male, (*10)

echo $name->isMale();
// output: true if yes

Check if woman, (*11)

echo $name->isWoman();
// output: true if yes

Get array, (*12)

$array = $name->getVocativeArray();
// array: ['M', "Mariuszu"];
// where M: Male, W: Woman, U: Unknown

Test results

You can check quality using test file: testVocativePolishFirstName, (*13)

We are using dictionary test. See results!, (*14)

Test date: 2016-07-11, (*15)

Total dictionary names: 1704, (*16)

Differences: 0, (*17)

The percentage of errors: 0%, (*18)

License

MIT license. See the LICENSE file for more details., (*19)

The Versions

12/06 2017

dev-master

9999999-dev

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

11/07 2016

1.0.0

1.0.0.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

09/03 2016

0.9.6

0.9.6.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

28/01 2016

0.9.5

0.9.5.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

28/10 2015

0.9.4

0.9.4.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

27/10 2015

0.9.3

0.9.3.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

27/10 2015

0.9.2

0.9.2.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

27/10 2015

0.9.1

0.9.1.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz

27/10 2015

0.9.0

0.9.0.0

Component for remake first name to Polish vocative. Odmiana polskich imion na wołacz

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Mariusz Mielnik

imiona vocative wołacz wolacz