Postcode
in package
Postcode Utilities
Utility functions related to postcodes
Table of Contents
Methods
- canonicalisePostcode() : mixed
- Canonicalise Postcode
- postcodeToConstituencies() : mixed
- Postcode To Constituencies
- postcodeToConstituency() : mixed
- Postcode To Constituency
- postcodeFetchFromDb() : mixed
- Fetch Postcode Information from DB
- postcodeFetchFromMapit() : mixed
- Fetch Postcode Information from MapIt
- postcodeToConstituenciesInternal() : mixed
- Postcode To Constituencies (Internal)
Methods
canonicalisePostcode()
Canonicalise Postcode
public
static canonicalisePostcode(mixed $pc) : mixed
Take a postcode and turn it into a tidied, uppercased canonical version.
Parameters
- $pc : mixed
postcodeToConstituencies()
Postcode To Constituencies
public
static postcodeToConstituencies(mixed $postcode) : mixed
Parameters
- $postcode : mixed
postcodeToConstituency()
Postcode To Constituency
public
static postcodeToConstituency(mixed $postcode) : mixed
Parameters
- $postcode : mixed
postcodeFetchFromDb()
Fetch Postcode Information from DB
private
static postcodeFetchFromDb(string $postcode) : mixed
Parameters
- $postcode : string
postcodeFetchFromMapit()
Fetch Postcode Information from MapIt
private
static postcodeFetchFromMapit(string $postcode) : mixed
Parameters
- $postcode : string
postcodeToConstituenciesInternal()
Postcode To Constituencies (Internal)
private
static postcodeToConstituenciesInternal(mixed $postcode, bool $mp_only) : mixed
Parameters
- $postcode : mixed
- $mp_only : bool