jaxwilko / human-name-processor
Simple name processing in php
Installs: 7 233
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-12-20 01:07:06 UTC
README
This package aims to provide quick and easy name processing to produce a standardised format for name handling.
Installation
composer require jaxwilko/human-name-processor
Usage
<?php require __DIR__ . '/vendor/autoload.php'; $processor = new JaxName\HumanNameProcessor(); $name = $processor->make('Mr. John Smith');
The processor make method returns an instance of JaxName\HumanName
which provides methods for getting elements of
the name. For instance:
$name->getTitle(); // Mr. $name->getFirstName(); // John $name->getLastName(); // Smith // the class also provides a __toString method echo $name; // Mr. John Smith
Testing
./vendor/bin/phpunit tests --testdox --color