Overview

Classes

  • RTMykad
  • Overview
  • Class
  • Tree

Class RTMykad

Simple helper to fetch information from MyKad Number

License: https://rogertiongdev.github.io/MIT-License/
Author: Roger Tiong RTdev
Version: 0.1
Located at RTMykad.php
Methods summary
public
# setMyKad( string $MyKadNo )

Set MyKad Number

Set MyKad Number

Parameters

$MyKadNo
public array
# getData( )

Return MyKad data

Return MyKad data

Returns

array
public boolean
# isValid( )

Return is MyKad valid (TRUE/FALSE)

Return is MyKad valid (TRUE/FALSE)

Returns

boolean
public string
# formatMyKad( string $data )

Remove spaces and dash from MyKad Number

Remove spaces and dash from MyKad Number

Parameters

$data

Returns

string
public boolean
# isMyKadValid( string $data )

Validate MyKad Format

Validate MyKad Format

Parameters

$data

Returns

boolean
public array
# splitMyKad( string $data )

Split MyKad Number to 3 section:
- head: xxxxxx
- body: xx
- tail: xxxx

Split MyKad Number to 3 section:
- head: xxxxxx
- body: xx
- tail: xxxx

Parameters

$data

Returns

array
public array
# getBirthData( string $data )

Return birth data
- bdate: Birth date Y-m-d
- byear: Birth year Y
- bmth: Birth month m
- bday: Birth day d
- age: Current age

Return birth data
- bdate: Birth date Y-m-d
- byear: Birth year Y
- bmth: Birth month m
- bday: Birth day d
- age: Current age

Parameters

$data

Returns

array
public string
# getMyKadState( string $data )

Return State

Return State

Parameters

$data

Returns

string
public string
# getMyKadGender( string $data )

Return Gender

Return Gender

Parameters

$data

Returns

string
Constants summary
integer MyKadNoLen

Standard MyKad Number length

Standard MyKad Number length

# 12
integer MyKadMinAge

Standard MyKad minimum age

Standard MyKad minimum age

# 12
RTMykad API documentation generated by ApiGen