Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaxwilko/human-name-processor
Simple name processing in php
https://github.com/jaxwilko/human-name-processor
Last synced: about 1 month ago
JSON representation
Simple name processing in php
- Host: GitHub
- URL: https://github.com/jaxwilko/human-name-processor
- Owner: jaxwilko
- Created: 2020-05-19T12:51:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T15:06:02.000Z (over 4 years ago)
- Last Synced: 2024-10-12T13:10:56.173Z (3 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Human Name Processor
This package aims to provide quick and easy name processing to produce a standardised format for name handling.
### Installation
```shell script
composer require jaxwilko/human-name-processor
```### Usage
```php
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:```php
$name->getTitle(); // Mr.
$name->getFirstName(); // John
$name->getLastName(); // Smith// the class also provides a __toString method
echo $name; // Mr. John Smith
```### Testing
```shell script
./vendor/bin/phpunit tests --testdox --color
```