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])
파일 보기 프로젝트 열기: openeyes/openeyes

공개 프로퍼티들

프로퍼티 타입 설명
$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