library postcodelib
Perform simple analysis and validation on UK postcodes
rossriley/postcodelib
Perform simple analysis and validation on UK postcodes
- Friday, January 22, 2016
- by rossriley
- Repository
- 1 Watchers
- 0 Stars
- 14 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
A Value Object for UK Postcodes
This simple class ensure that a postcode is valid along with some helper methods to ease formatting., (*1)
Usage
use Postcodelib\Postcode;
$postcode = new Postcode('B55SE');
$postcode->valid(); // returns true
$postcode->postcode(); // returns a normalised string: B5 5SE
$postcode->prefix(); // returns B5
$postcode->suffix(); // returns 5SE
dev-master
9999999-dev
Perform simple analysis and validation on UK postcodes
Sources
Download
MIT
1.0
1.0.0.0
Perform simple analysis and validation on UK postcodes
Sources
Download
MIT