PHP Class IsoCodes\Ssn

Show file Open project: ronanguilloux/isocodes Class Usage Examples

Public Properties

Property Type Description
$highgroup This list is from September 2007
$possibleGroups The SSA uses a funky method of figuring out what group number to use next. This area has them in the proper order and makes it easier to generate a SSN.
$statePrefixes http://www.ssa.gov/employer/stateweb.htm
$states

Protected Properties

Property Type Description
$initialized

Public Methods

Method Description
generate ( mixed $state = false, string $separator = '-' ) : false | string Generate an SSN based on state.
validate ( mixed $ssn ) : boolean Validate a SSN.

Protected Methods

Method Description
initialize ( ) Cleans the high group number list so it is useful.

Method Details

generate() public static method

Generate an SSN based on state.
public static generate ( mixed $state = false, string $separator = '-' ) : false | string
$state mixed
$separator string
return false | string (false: bad state found)

initialize() protected static method

Cleans the high group number list so it is useful.
protected static initialize ( )

validate() public static method

Validate a SSN.
public static validate ( mixed $ssn ) : boolean
$ssn mixed
return boolean : false, or two letter state abbreviation if it is valid

Property Details

$highgroup public static property

This list is from September 2007
public static $highgroup

$initialized protected static property

protected static $initialized

$possibleGroups public static property

The SSA uses a funky method of figuring out what group number to use next. This area has them in the proper order and makes it easier to generate a SSN.
public static $possibleGroups

$statePrefixes public static property

http://www.ssa.gov/employer/stateweb.htm
public static $statePrefixes

$states public static property

public static $states