PHP 클래스 HumanNameParser_Parser, HumanNameParser.php

Example usage: $parser = new Parser("John Q. Smith"); echo $parser->getLast() . ", " . $parser->getFirst(); returns "Smith, John"
파일 보기 프로젝트 열기: jasonpriem/HumanNameParser.php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $name = NULL ) * Constructor
getArray ( String $arrType = 'assoc' ) : array returns all the parts of the name as an array
getFirst ( )
getLast ( )
getMiddle ( )
getName ( )
getNicknames ( )
getSuffix ( )
getleadingInit ( )
setName ( mixed $name = NULL ) Sets name string and parses it.

비공개 메소드들

메소드 설명
parse ( ) * Parse the name into its constituent parts.

메소드 상세

__construct() 공개 메소드

* Constructor
public __construct ( $name = NULL )
$name Either a name as a string or as a Name object.

getArray() 공개 메소드

returns all the parts of the name as an array
public getArray ( String $arrType = 'assoc' ) : array
$arrType String pass 'int' to get an integer-indexed array (default is associative)
리턴 array An array of the name-parts

getFirst() 공개 메소드

public getFirst ( )

getLast() 공개 메소드

public getLast ( )

getMiddle() 공개 메소드

public getMiddle ( )

getName() 공개 메소드

public getName ( )

getNicknames() 공개 메소드

public getNicknames ( )

getSuffix() 공개 메소드

public getSuffix ( )

getleadingInit() 공개 메소드

public getleadingInit ( )

setName() 공개 메소드

Takes Name object or a simple string (converts the string into a Name obj), parses and loads its constituant parts.
public setName ( mixed $name = NULL )
$name mixed Either a name as a string or as a Name object.