PHP Класс PostCodeUtility

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Автор: OpenEyes ([email protected])
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$counties
$towns

Открытые методы

Метод Описание
__construct ( )
countyForOuterPostCode ( string $_code ) : string Returns county for an outer post code.
isCounty ( string $_string ) : boolean Is the passed string a county?
isTown ( $_string ) : boolean Returns county for an outer post code.
parsePostCode ( string $_string ) : array | false Cleans string, tests that is is postcode, return associative array with components, or false if not valid.
townForOuterPostCode ( string $_code ) : string Returns town for an outer post code.

Описание методов

__construct() публичный Метод

public __construct ( )

countyForOuterPostCode() публичный Метод

Returns county for an outer post code.
public countyForOuterPostCode ( string $_code ) : string
$_code string Outer postcode
Результат string County name

isCounty() публичный Метод

Is the passed string a county?
public isCounty ( string $_string ) : boolean
$_string string Possible County
Результат boolean

isTown() публичный Метод

Returns county for an outer post code.
public isTown ( $_string ) : boolean
Результат boolean

parsePostCode() публичный Метод

Cleans string, tests that is is postcode, return associative array with components, or false if not valid.
public parsePostCode ( string $_string ) : array | false
$_string string Possible postcode string
Результат array | false

townForOuterPostCode() публичный Метод

Returns town for an outer post code.
public townForOuterPostCode ( string $_code ) : string
$_code string Outer postcode
Результат string Town name

Описание свойств

$counties публичное свойство

public $counties

$towns публичное свойство

public $towns