-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
50 lines (39 loc) · 2.29 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/* index.php */
require_once('classes/UniqueId.class.php');
$oUniqueId = new UniqueId();
// REGIONAL IDS
$scope = 'REGIONAL';
$optional = array('last_name'=>'SAMPLE', 'day_of_birth'=>'2014-12-31', 'gender'=>'F');
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'ON', $optional );
echo "DRIVER_ON = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'ON', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'PQ', $optional );
echo "DRIVER_PQ = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'PQ', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'AB', $optional );
echo "DRIVER_AB = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'AB', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'BC', $optional );
echo "DRIVER_BC = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'BC', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'NS', $optional );
echo "DRIVER_NS = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'NS', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'DRIVER', 'PE', $optional );
echo "DRIVER_PE = [" . $oUniqueId->format( $scope, 'CA', 'DRIVER', 'PE', $result ) . "]<br/>\n";
$result = $oUniqueId->generate( $scope, 'CA', 'HEALTH', 'ON' );
$result = $oUniqueId->validate( $scope, 'CA', 'HEALTH', 'ON', $result );
echo "OHIP = [" . $oUniqueId->format( $scope, 'CA', 'HEALTH', 'ON', $result["id_number"] ) . "]<br/>";
//var_dump( $result );
// NATIONAL IDS
$scope = 'NATIONAL';
$result = $oUniqueId->generate( $scope, 'CA', 'SIN', 'QC' );
$result = $oUniqueId->validate( $scope, 'CA', 'SIN', null, $result );
echo "SIN = [" . $oUniqueId->format( $scope, 'CA', 'SIN', null, $result["id_number"] ) . "]<br/>";
//var_dump( $result );
$result = $oUniqueId->generate( $scope, 'US', 'SSN', 'AZ' );
$result = $oUniqueId->validate( $scope, 'US', 'SSN', null, $result );
echo "SSN = [" . $oUniqueId->format( $scope, 'US', 'SSN', null, $result["id_number"] ) . "]<br/>";
//var_dump( $result );
$result = $oUniqueId->generate( $scope, 'US', 'SSN', 'PR' );
$result = $oUniqueId->validate( $scope, 'US', 'SSN', '', $result );
echo "SSN = [" . $oUniqueId->format( $scope, 'US', 'SSN', '', $result["id_number"] ) . "]<br/>";
//var_dump( $result );
unset( $oUniqueId );
?>