APITimeClockUnAuthenticated_TTA8
extends APITimeClockUnAuthenticated
in package
Table of Contents
- $mode_flag_map : mixed
- $type_ids : mixed
- $company_obj : mixed
- $mode_flag : mixed
- $station_obj : mixed
- $test_mode : mixed
- $user_id_to_timeclock_user_id_map : mixed
- __construct() : mixed
- APITimeClockUnAuthenticated constructor.
- checkStationType() : bool
- getCompanyObject() : bool|null
- getConfig() : bool
- getDate() : int
- getFirmware() : array<string|int, mixed>|bool
- getFirmwareFile() : string
- getFirmwareVersion() : bool
- getLatestFirmwareVersion() : string
- getMessage() : array<string|int, mixed>
- getModeFlagMap() : mixed
- getStationObject() : bool|null
- getTimeZone() : array<string|int, mixed>
- getUserIdentification() : array<string|int, mixed>|bool
- The clock needs to pass a list of new users that were just added to it, so the identification for those users is included no matter what, along with any new data.
- getUserIdForEmployeeNumber() : bool|int
- getUsers() : array<string|int, mixed>|bool
- Accept a list of valid_user_ids from getUserIDs() so we can always send data for those users.
- isLatestData() : array<string|int, mixed>
- isLatestFirmwareVersion() : bool
- ping() : bool
- PING function to test internet connection.
- setAttendance() : bool
- setLog() : bool
- setUserIdentification() : bool
- convertTimeClockUserIDToUserID() : array<string|int, mixed>|bool|int
- convertUserIdToTimeClockUserID() : bool|int
- getNextTimeClockUserId() : bool|int
- getStatusAndType() : array<string|int, mixed>
- getUserIdToTimeClockUserIdMap() : bool
- getUserIdToTimeClockUserIdMapInitializationDate() : bool|int
- processPunches() : bool
- setTimeClockUserIdForUser() : bool
Properties
$mode_flag_map
public
mixed
$mode_flag_map
= [
//We can use: OEMCode to set our own version numbers and such on the clock.
//1 is the default options that need to be set first so all values are reset to factory defaults.
1 => [
//Make UserID support up to 9 digits by default, the maximum.
//When PIN's greater than 5 digits are detected the clock just switches to using PIN2 field instead of PIN
//So getUser() needs to take this into account.
['name' => '~PIN2Width', 'value' => 9],
['name' => '~MustChoiceInOut', 'value' => 0],
['name' => 'WorkCode', 'value' => 0],
['name' => '~ExtendFmt', 'value' => 1],
['name' => '~LockFunOn', 'value' => 2],
//Access Control options in menu. Required for selecting type verification methods.
['name' => '~UserExtFmt', 'value' => 1],
//User Verification Methods Menu
['name' => 'GVS', 'value' => 0],
//FP or PW or RF
['name' => 'ShowScore', 'value' => 1],
//Always show score to help diagnose fingerprint problems.
['name' => 'State0', 'value' => 'In'],
['name' => 'State1', 'value' => 'Out'],
['name' => 'State2', 'value' => ''],
['name' => 'State3', 'value' => ''],
['name' => 'State4', 'value' => ''],
['name' => 'State5', 'value' => ''],
['name' => 'State0ExtraField', 'value' => '1'],
//Only ask for extra fields when punching IN.
['name' => 'State1ExtraField', 'value' => '0'],
['name' => 'State2ExtraField', 'value' => '0'],
['name' => 'State3ExtraField', 'value' => '1'],
['name' => 'State4ExtraField', 'value' => '0'],
['name' => 'State5ExtraField', 'value' => '1'],
['name' => 'ExtraField0', 'value' => ''],
['name' => 'ExtraField1', 'value' => ''],
['name' => 'ExtraField2', 'value' => ''],
['name' => 'ExtraField3', 'value' => ''],
['name' => 'ExtraField4', 'value' => ''],
['name' => 'ExtraField5', 'value' => ''],
['name' => 'ExtraField6', 'value' => ''],
['name' => 'ExtraField7', 'value' => ''],
['name' => 'ExtraField8', 'value' => ''],
['name' => 'ExtraField9', 'value' => ''],
],
2 => [['name' => '~MustChoiceInOut', 'value' => 1]],
//4 => array( array( 'name' => 'WorkCode', 'value' => 1 ), array( 'name' => '~ExtendFmt', 'value' => 1 ) ),
//8 => array( array( 'name' => 'WorkCode', 'value' => 2 ), array( 'name' => '~ExtendFmt', 'value' => 1 ) ),
4 => [['name' => 'State1', 'value' => '']],
//Disable Out State, so only In is available and TimeTrex can be forced to determine it everytime.
//16-Aug-10: For some reason there is a bug that if just Lunch is enabled, the timeclock is making lunch punches break punches.
//Doepker ran into this problem.
8 => [['name' => 'State2', 'value' => 'Break Out'], ['name' => 'State3', 'value' => 'Break In']],
16 => [['name' => 'State4', 'value' => 'Lunch Out'], ['name' => 'State5', 'value' => 'Lunch In']],
32 => [['name' => 'ExtraField0', 'value' => 'Branch?'], ['name' => '~ExtendFmt', 'value' => 1]],
64 => [['name' => 'ExtraField1', 'value' => 'Department?'], ['name' => '~ExtendFmt', 'value' => 1]],
128 => [['name' => 'ExtraField2', 'value' => 'Job?'], ['name' => '~ExtendFmt', 'value' => 1]],
256 => [['name' => 'ExtraField3', 'value' => 'Task?'], ['name' => '~ExtendFmt', 'value' => 1]],
512 => [['name' => 'ExtraField4', 'value' => 'Quantity?'], ['name' => '~ExtendFmt', 'value' => 1]],
1024 => [['name' => 'ExtraField5', 'value' => 'Bad Quantity?'], ['name' => '~ExtendFmt', 'value' => 1]],
//2048 - Hold for ExtraField6
//4096 - Hold for ExtraField7
//8192 - Hold for ExtraField8
//16384 - Hold for ExtraField9
32768 => [['name' => 'GVS1', 'value' => 9]],
//Fingerprint & Password
65536 => [['name' => 'GVS1', 'value' => 10]],
//Fingerprint & Proximity Card
131072 => [['name' => 'GVS1', 'value' => 8]],
//PIN & Fingerprint
262144 => [['name' => 'GVS1', 'value' => 11]],
]
$type_ids
public
mixed
$type_ids
= [100]
$company_obj
protected
mixed
$company_obj
= \null
$mode_flag
protected
mixed
$mode_flag
= \null
$station_obj
protected
mixed
$station_obj
= \null
$test_mode
protected
mixed
$test_mode
= \false
$user_id_to_timeclock_user_id_map
protected
mixed
$user_id_to_timeclock_user_id_map
= \false
Methods
__construct()
APITimeClockUnAuthenticated constructor.
public
__construct() : mixed
Return values
mixed —checkStationType()
public
checkStationType(int $type_id) : bool
Parameters
- $type_id : int
Return values
bool —getCompanyObject()
public
getCompanyObject() : bool|null
Return values
bool|null —getConfig()
public
getConfig(int $last_check_epoch[, array<string|int, mixed> $current_config = [] ]) : bool
Parameters
- $last_check_epoch : int
- $current_config : array<string|int, mixed> = []
Return values
bool —getDate()
public
getDate() : int
Return values
int —getFirmware()
public
getFirmware([null $current_version = null ]) : array<string|int, mixed>|bool
Parameters
- $current_version : null = null
Return values
array<string|int, mixed>|bool —getFirmwareFile()
public
getFirmwareFile() : string
Return values
string —getFirmwareVersion()
public
getFirmwareVersion() : bool
Return values
bool —getLatestFirmwareVersion()
public
getLatestFirmwareVersion() : string
Return values
string —getMessage()
public
getMessage(string $user_id, int $punch_status, int $order) : array<string|int, mixed>
Parameters
- $user_id : string
-
UUID
- $punch_status : int
- $order : int
Return values
array<string|int, mixed> —getModeFlagMap()
public
getModeFlagMap() : mixed
Return values
mixed —getStationObject()
public
getStationObject() : bool|null
Return values
bool|null —getTimeZone()
public
getTimeZone() : array<string|int, mixed>
Return values
array<string|int, mixed> —getUserIdentification()
The clock needs to pass a list of new users that were just added to it, so the identification for those users is included no matter what, along with any new data.
public
getUserIdentification(int $last_update_epoch[, array<string|int, mixed> $clock_user_ids = [] ]) : array<string|int, mixed>|bool
The clock will need to do this automatically.
Parameters
- $last_update_epoch : int
- $clock_user_ids : array<string|int, mixed> = []
Return values
array<string|int, mixed>|bool —getUserIdForEmployeeNumber()
public
getUserIdForEmployeeNumber( $employee_number) : bool|int
Parameters
Return values
bool|int —getUsers()
Accept a list of valid_user_ids from getUserIDs() so we can always send data for those users.
public
getUsers(int $last_update_epoch[, array<string|int, mixed> $clock_user_ids = [] ]) : array<string|int, mixed>|bool
as well as sending updated data based on last_update_epoch. Since users can be assigned/unassigned from clocks without updating their own data in some cases.
Parameters
- $last_update_epoch : int
- $clock_user_ids : array<string|int, mixed> = []
Return values
array<string|int, mixed>|bool —isLatestData()
public
isLatestData(int $last_check_epoch[, int $clock_epoch = null ]) : array<string|int, mixed>
Parameters
- $last_check_epoch : int
-
EPOCH
- $clock_epoch : int = null
-
EPOCH
Return values
array<string|int, mixed> —isLatestFirmwareVersion()
public
isLatestFirmwareVersion( $current_version) : bool
Parameters
Return values
bool —ping()
PING function to test internet connection.
public
ping() : bool
Return values
bool —setAttendance()
public
setAttendance( $data) : bool
Parameters
Return values
bool —setLog()
public
setLog( $data) : bool
Parameters
Return values
bool —setUserIdentification()
public
setUserIdentification( $data) : bool
Parameters
Return values
bool —convertTimeClockUserIDToUserID()
protected
convertTimeClockUserIDToUserID(string|array<string|int, string> $timeclock_user_ids) : array<string|int, mixed>|bool|int
Parameters
- $timeclock_user_ids : string|array<string|int, string>
-
UUID
Return values
array<string|int, mixed>|bool|int —convertUserIdToTimeClockUserID()
protected
convertUserIdToTimeClockUserID(string $user_id) : bool|int
Parameters
- $user_id : string
-
UUID
Return values
bool|int —getNextTimeClockUserId()
protected
getNextTimeClockUserId() : bool|int
Return values
bool|int —getStatusAndType()
protected
getStatusAndType(int $clock_status_id) : array<string|int, mixed>
Parameters
- $clock_status_id : int
Return values
array<string|int, mixed> —getUserIdToTimeClockUserIdMap()
protected
getUserIdToTimeClockUserIdMap() : bool
Return values
bool —getUserIdToTimeClockUserIdMapInitializationDate()
protected
getUserIdToTimeClockUserIdMapInitializationDate() : bool|int
Return values
bool|int —processPunches()
protected
processPunches( $attendance_log) : bool
Parameters
Return values
bool —setTimeClockUserIdForUser()
protected
setTimeClockUserIdForUser(string $user_id) : bool
Parameters
- $user_id : string
-
UUID