i-kolyas/person-name-format

There is no license information available for the latest version (v1.0.3) of this package.

v1.0.3 2024-02-15 16:23 UTC

This package is auto-updated.

Last update: 2024-09-15 17:47:03 UTC


README

Генерирует имена пользователей в заданном формате

Установка

composer require i-kolyas/person-name-format

Использование

$userName = new PersonName(surname: 'Сидоров', firstname: 'Пётр', patronymic: 'Николаевич');
echo $userName->short() . PHP_EOL; // Сидоров П.
echo $userName->fullShort() . PHP_EOL; // Сидоров П.Н.
echo $userName->long() . PHP_EOL; // Сидоров Пётр
echo $userName->fullLong() . PHP_EOL; // Сидоров Пётр Николаевич