TimeTrex API Manual

TimeTrexSoapServer extends TimeTrexSoapServerUnAuthenticated
in package

Table of Contents

$authentication  : mixed
$company_obj  : mixed
$permission_obj  : mixed
$schedule_shift_obj  : mixed
$shift_obj  : mixed
$station_type  : mixed
$user_obj  : mixed
$user_id_to_timeclock_user_id_map  : mixed
__call()  : bool
__construct()  : mixed
TimeTrexSoapServer constructor.
addLogEntry()  : mixed
enroll()  : bool
getBranches()  : array<string|int, mixed>|bool
getClientConfig()  : array<string|int, mixed>
getClientVersion()  : bool
getCompanyObject()  : mixed
getDepartments()  : array<string|int, mixed>|bool
getEnrollUsers()  : array<string|int, mixed>|bool
getJobItems()  : array<string|int, mixed>|bool
getJobs()  : array<string|int, mixed>|bool
getJobtoJobItemMap()  : array<string|int, mixed>|bool
getJobtoUserMap()  : array<string|int, mixed>|bool
getLatestVersion()  : string
Check for updates each day... And on startup, and allow a menu option to force a check.
getLatestVersionMD5()  : string
getLatestVersionURL()  : string
getOtherFields()  : bool
getPermissionObject()  : null|Permission
getPunchData()  : mixed
getScheduleShiftObject()  : mixed
getStationObject()  : bool
getTime()  : int
getTimeOffset()  : int
getUserFullName()  : mixed
getUserIdentifiers()  : array<string|int, mixed>|bool
getUserObject()  : bool|null|UserFactory
getUserPreferenceData()  : array<string|int, mixed>
getUserPreferenceObject()  : mixed
getUsers()  : array<string|int, mixed>|bool
isGoodTimeToUpgrade()  : int
Ask server if its a good time to upgrade. That way the server can take load in to account, as well as check the schedule on this station, and make sure people aren't about to punch in!
isLatestData()  : array<string|int, mixed>|bool
isLatestVersion()  : bool
Login()  : bool|null
Logout()  : bool
ping()  : bool
PING function to test internet connection.
setClientLog()  : bool
setOfflinePunch()  : bool
setPunchData()  : string
setStation()  : bool
startingUpgrade()  : bool
Just a function to log the update start.
StationCheckAllowed()  : bool
convertTimeClockUserIDToUserID()  : bool|string|array<string|int, string>
convertUserIdToTimeClockUserID()  : bool|int
getNextTimeClockUserId()  : bool|int
getUserIdToTimeClockUserIdMap()  : bool
setTimeClockUserIdForUser()  : bool
isLoggedIn()  : bool

Properties

Methods

__call()

public __call( $name,  $arguments) : bool
Parameters
$name :
$arguments :
Return values
bool

addLogEntry()

public addLogEntry(string $object_id, int $action_id,  $description, string $user_id,  $table) : mixed
Parameters
$object_id : string

UUID

$action_id : int
$description :
$user_id : string

UUID

$table :
Return values
mixed

enroll()

public enroll(string $user_id, string $id[, string $type = 'iButton' ], int $number[, null $extra_value = null ]) : bool
Parameters
$user_id : string

UUID

$id : string

UUID

$type : string = 'iButton'
$number : int
$extra_value : null = null
Return values
bool

getBranches()

public getBranches(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getClientConfig()

public getClientConfig(string $station_id) : array<string|int, mixed>
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>

getDepartments()

public getDepartments(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getEnrollUsers()

public getEnrollUsers() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

getJobItems()

public getJobItems(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getJobtoJobItemMap()

public getJobtoJobItemMap(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getJobtoUserMap()

public getJobtoUserMap(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getLatestVersion()

Check for updates each day... And on startup, and allow a menu option to force a check.

public getLatestVersion() : string
Return values
string

getStationObject()

public getStationObject([null $station_id = null ]) : bool
Parameters
$station_id : null = null
Return values
bool

getUserIdentifiers()

public getUserIdentifiers(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

getUserPreferenceData()

public getUserPreferenceData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUsers()

public getUsers(string $station_id) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

Return values
array<string|int, mixed>|bool

isGoodTimeToUpgrade()

Ask server if its a good time to upgrade. That way the server can take load in to account, as well as check the schedule on this station, and make sure people aren't about to punch in!

public isGoodTimeToUpgrade(string $station_id) : int

Return offset in seconds of when to upgrade perhaps? 0 means now, 3600 means in one hour? Or just keep returning false, and cache the data... Returning a new offset is better I think, because that way the 24hr timer can be sync'd to a good time to do the upgrades.

Parameters
$station_id : string

UUID

Return values
int

isLatestData()

public isLatestData(string $station_id, int $last_check_epoch) : array<string|int, mixed>|bool
Parameters
$station_id : string

UUID

$last_check_epoch : int

EPOCH

Return values
array<string|int, mixed>|bool

Login()

public Login( $user_name[, null $password = null ][, null $type = null ]) : bool|null
Parameters
$user_name :
$password : null = null
$type : null = null
Return values
bool|null

setStation()

public setStation( $source,  $station[, null $description = null ][, int $type = 20 ]) : bool
Parameters
$source :
$station :
$description : null = null
$type : int = 20

20=Phone

Return values
bool

startingUpgrade()

Just a function to log the update start.

public startingUpgrade(string $station_id) : bool
Parameters
$station_id : string

UUID

Return values
bool

convertTimeClockUserIDToUserID()

protected convertTimeClockUserIDToUserID(int|array<string|int, int> $timeclock_user_ids[, null $company_obj = null ]) : bool|string|array<string|int, string>
Parameters
$timeclock_user_ids : int|array<string|int, int>
$company_obj : null = null
Return values
bool|string|array<string|int, string>

UUID

convertUserIdToTimeClockUserID()

protected convertUserIdToTimeClockUserID(string $user_id) : bool|int
Parameters
$user_id : string

UUID

Return values
bool|int

getUserIdToTimeClockUserIdMap()

protected getUserIdToTimeClockUserIdMap([null $company_obj = null ]) : bool
Parameters
$company_obj : null = null
Return values
bool

Search results