TimeTrex API Manual

ImportUser extends Import
in package

Table of Contents

$branch_manual_id_options  : mixed
$branch_options  : mixed
$class_name  : mixed
$company_id  : mixed
$data  : mixed
$department_manual_id_options  : mixed
$department_options  : mixed
$ethnic_group_options  : mixed
$hierarchy_control_options  : mixed
$job_item_manual_id_options  : mixed
$job_item_options  : mixed
$job_manual_id_options  : mixed
$job_options  : mixed
$obj  : mixed
$pay_period_schedule_options  : mixed
$permission_control_options  : mixed
$policy_group_options  : mixed
$session_id  : mixed
$title_options  : mixed
$user_group_options  : mixed
$user_id  : mixed
$user_names  : mixed
$api_message_id  : mixed
$company_obj  : mixed
$custom_field_map  : mixed
$progress_bar_obj  : mixed
$search_column_priority  : mixed
$user_id_cache  : mixed
_getFactoryOptions()  : array<string|int, mixed>|null
_getUserDefaultData()  : mixed
_import()  : mixed
_parse_name()  : mixed|string
_postParseRow()  : mixed
_preParseRow()  : array<string|int, mixed>
callInputParseFunction()  : mixed|string
cleanStoragePath()  : bool
deleteLocalFile()  : bool
findClosestMatch()  : array<string|int, mixed>|bool|mixed
generateColumnMap()  : array<string|int, mixed>|bool
Generates a "best fit" column map array.
getAPIMessageID()  : bool|null
Returns the API messageID for each individual call.
getBranchOptions()  : bool
getColumnMap()  : mixed
getCompanyObject()  : bool
getCustomFieldOptions()  : array<string|int, mixed>
getDepartmentOptions()  : bool
getEthnicGroupOptions()  : bool
getHierarchyControlOptions()  : bool
getImportOptions()  : bool|mixed|null
getJobItemOptions()  : bool
getJobOptions()  : bool
getLocalFileData()  : array<string|int, mixed>|bool
getLocalFileName()  : string
getObject()  : null|object
getOptions()  : array<string|int, mixed>|bool|mixed
getParsedData()  : mixed
getPayPeriodScheduleOptions()  : bool
getPermissionControlOptions()  : bool
getPolicyGroupOptions()  : bool
getProgressBarObject()  : null|ProgressBar
getRawData()  : array<string|int, mixed>|bool|mixed
getRawDataColumns()  : array<string|int, mixed>|bool
getRawDataFromFile()  : bool
getRawDataLines()  : int|bool
getRemoteFileName()  : mixed
getStoragePath()  : bool|string
getUserGroupOptions()  : bool
getUserIDByRowData()  : bool
getUserIdentificationColumns()  : array<string|int, mixed>|null
getUserObject()  : bool
getUserTitleOptions()  : bool
mapRowData()  : bool
mergeColumnMap()  : mixed
Takes a saved column map and tries to merge it with existing column data from the file.
parse_birth_date()  : false|int
parse_branch()  : array<string|int, mixed>|bool|int|mixed
parse_country()  : array<string|int, mixed>|bool|mixed
parse_custom_field()  : mixed
parse_date()  : false|int
parse_default_branch()  : array<string|int, mixed>|bool|int|mixed
parse_default_department()  : array<string|int, mixed>|bool|int|mixed
parse_default_job()  : array<string|int, mixed>|bool|int|mixed
parse_default_job_item()  : array<string|int, mixed>|bool|int|mixed
parse_department()  : array<string|int, mixed>|bool|int|mixed
parse_ethnic_group()  : array<string|int, mixed>|bool|int|mixed
parse_fax_phone()  : mixed
parse_first_name()  : mixed|string
parse_group()  : array<string|int, mixed>|bool|int|mixed
parse_hierarchy_control_display()  : int
parse_hire_date()  : false|int
parse_home_phone()  : mixed
parse_job()  : array<string|int, mixed>|bool|int|mixed
parse_job_item()  : array<string|int, mixed>|bool|int|mixed
parse_last_name()  : mixed|string
parse_middle_name()  : mixed|string
parse_pay_period_schedule()  : array<string|int, mixed>|bool|int|mixed
parse_permission_control()  : array<string|int, mixed>|bool|int|mixed
parse_phone()  : mixed
parse_phone_id()  : string
parse_phone_password()  : string
parse_policy_group()  : array<string|int, mixed>|bool|int|mixed
parse_postal_code()  : string
parse_province()  : array<string|int, mixed>|bool|mixed|string
parse_sex()  : int
parse_status()  : int
parse_termination_date()  : false|int
parse_time()  : false|int
parse_time_unit()  : bool|float|int|number|string
parse_title()  : array<string|int, mixed>|bool|int|mixed
parse_user_group()  : array<string|int, mixed>|bool|int|mixed
parse_wage()  : mixed
parse_wage_effective_date()  : false|int
parse_wage_type()  : int
parse_wage_weekly_time()  : bool|float|int|number|string
parse_work_phone()  : mixed
parseCustomFieldOptions()  : mixed
parseData()  : bool
Parse data while applying any parse hints.
postParseRow()  : mixed
preParseRow()  : mixed
preProcess()  : bool
process()  : bool
This function can't be named "import" as it will be called during __construct() then.
renameLocalFile()  : bool
saveRawDataToFile()  : bool|int
setAPIMessageID()  : bool
setColumnMap()  : bool
setImportOptions()  : bool
setParsedData()  : bool
setRawData()  : bool
setRemoteFileName()  : bool

Properties

$branch_manual_id_options

public mixed $branch_manual_id_options = \false

$department_manual_id_options

public mixed $department_manual_id_options = \false

$department_options

public mixed $department_options = \false

$hierarchy_control_options

public mixed $hierarchy_control_options = \false

$job_item_manual_id_options

public mixed $job_item_manual_id_options = \false

$job_item_options

public mixed $job_item_options = \false

$job_manual_id_options

public mixed $job_manual_id_options = \false

$pay_period_schedule_options

public mixed $pay_period_schedule_options = \false

$permission_control_options

public mixed $permission_control_options = \false

$custom_field_map

protected mixed $custom_field_map = \null

$progress_bar_obj

protected mixed $progress_bar_obj = \null

$search_column_priority

protected mixed $search_column_priority = \null

Methods

_getFactoryOptions()

public _getFactoryOptions( $name[, null $parent = null ]) : array<string|int, mixed>|null
Parameters
$name :
$parent : null = null
Return values
array<string|int, mixed>|null

_getUserDefaultData()

public _getUserDefaultData(mixed $raw_row) : mixed
Parameters
$raw_row : mixed
Return values
mixed

_import()

public _import(int $validate_only) : mixed
Parameters
$validate_only : int

EPOCH

Return values
mixed

_parse_name()

public _parse_name( $column,  $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed|string
Parameters
$column :
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed|string

_postParseRow()

public _postParseRow( $row_number,  $raw_row) : mixed
Parameters
$row_number :
$raw_row :
Return values
mixed

_preParseRow()

public _preParseRow( $row_number,  $raw_row) : array<string|int, mixed>
Parameters
$row_number :
$raw_row :
Return values
array<string|int, mixed>

callInputParseFunction()

public callInputParseFunction( $function_name,  $map_data[, null $raw_row = null ]) : mixed|string
Parameters
$function_name :
$map_data :
$raw_row : null = null
Return values
mixed|string

cleanStoragePath()

public cleanStoragePath([string $company_id = null ]) : bool
Parameters
$company_id : string = null

UUID

Return values
bool

deleteLocalFile()

public deleteLocalFile() : bool
Return values
bool

findClosestMatch()

public findClosestMatch( $input,  $options[, int $match_percent = 50 ]) : array<string|int, mixed>|bool|mixed
Parameters
$input :
$options :
$match_percent : int = 50
Return values
array<string|int, mixed>|bool|mixed

generateColumnMap()

Generates a "best fit" column map array.

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

getAPIMessageID()

Returns the API messageID for each individual call.

public getAPIMessageID() : bool|null
Return values
bool|null

getBranchOptions()

public getBranchOptions() : bool
Return values
bool

getColumnMap()

public getColumnMap() : mixed
Return values
mixed

getCompanyObject()

public getCompanyObject() : bool
Return values
bool

getCustomFieldOptions()

public getCustomFieldOptions( $meta_data) : array<string|int, mixed>
Parameters
$meta_data :
Return values
array<string|int, mixed>

getDepartmentOptions()

public getDepartmentOptions() : bool
Return values
bool

getEthnicGroupOptions()

public getEthnicGroupOptions() : bool
Return values
bool

getHierarchyControlOptions()

public getHierarchyControlOptions() : bool
Return values
bool

getImportOptions()

public getImportOptions([null $key = null ]) : bool|mixed|null
Parameters
$key : null = null
Return values
bool|mixed|null

getJobItemOptions()

public getJobItemOptions() : bool
Return values
bool

getJobOptions()

public getJobOptions() : bool
Return values
bool

getLocalFileData()

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

getLocalFileName()

public getLocalFileName() : string
Return values
string

getObject()

public getObject() : null|object
Return values
null|object

getOptions()

public getOptions( $name[, null $parent = null ]) : array<string|int, mixed>|bool|mixed
Parameters
$name :
$parent : null = null
Return values
array<string|int, mixed>|bool|mixed

getParsedData()

public getParsedData() : mixed
Return values
mixed

getPayPeriodScheduleOptions()

public getPayPeriodScheduleOptions() : bool
Return values
bool

getPermissionControlOptions()

public getPermissionControlOptions() : bool
Return values
bool

getPolicyGroupOptions()

public getPolicyGroupOptions() : bool
Return values
bool

getRawData()

public getRawData([int $limit = null ]) : array<string|int, mixed>|bool|mixed
Parameters
$limit : int = null

Limit the number of records returned

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

getRawDataColumns()

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

getRawDataFromFile()

public getRawDataFromFile() : bool
Return values
bool

getRawDataLines()

public getRawDataLines() : int|bool
Return values
int|bool

getRemoteFileName()

public getRemoteFileName() : mixed
Return values
mixed

getStoragePath()

public getStoragePath([string $company_id = null ]) : bool|string
Parameters
$company_id : string = null

UUID

Return values
bool|string

getUserGroupOptions()

public getUserGroupOptions() : bool
Return values
bool

getUserIDByRowData()

public getUserIDByRowData( $raw_row) : bool
Parameters
$raw_row :
Return values
bool

getUserIdentificationColumns()

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

getUserObject()

public getUserObject(string $user_id) : bool
Parameters
$user_id : string

UUID

Return values
bool

getUserTitleOptions()

public getUserTitleOptions() : bool
Return values
bool

mapRowData()

public mapRowData( $column_map,  $raw_row) : bool
Parameters
$column_map :
$raw_row :
Return values
bool

mergeColumnMap()

Takes a saved column map and tries to merge it with existing column data from the file.

public mergeColumnMap( $saved_column_map) : mixed

Needs to account for manually added columns that don't exist in the file already. Needs to account for less/more columns added to the file itself.

Parameters
$saved_column_map :
Return values
mixed

parse_birth_date()

public parse_birth_date( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_branch()

public parse_branch( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_country()

public parse_country( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|mixed

parse_custom_field()

public parse_custom_field( $input,  $custom_field_id[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$custom_field_id :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parse_date()

public parse_date( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_default_branch()

public parse_default_branch( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_default_department()

public parse_default_department( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_default_job()

public parse_default_job( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_default_job_item()

public parse_default_job_item( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_department()

public parse_department( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_ethnic_group()

public parse_ethnic_group( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_fax_phone()

public parse_fax_phone( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parse_first_name()

public parse_first_name( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed|string

parse_group()

public parse_group( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_hierarchy_control_display()

public parse_hierarchy_control_display( $input[, null $default_value = null ][, null $parse_hint = null ]) : int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
int

parse_hire_date()

public parse_hire_date( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_home_phone()

public parse_home_phone( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parse_job()

public parse_job( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_job_item()

public parse_job_item( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_last_name()

public parse_last_name( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed|string

parse_middle_name()

public parse_middle_name( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed|string

parse_pay_period_schedule()

public parse_pay_period_schedule( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_permission_control()

public parse_permission_control( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_phone()

public parse_phone( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parse_phone_id()

public parse_phone_id( $input[, null $default_value = null ][, null $parse_hint = null ]) : string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
string

parse_phone_password()

public parse_phone_password( $input[, null $default_value = null ][, null $parse_hint = null ]) : string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
string

parse_policy_group()

public parse_policy_group( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_postal_code()

public parse_postal_code( $input[, null $default_value = null ][, null $parse_hint = null ]) : string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
string

parse_province()

public parse_province( $input[, null $default_value = null ][, null $parse_hint = null ][, null $map_data = null ][, null $raw_row = null ]) : array<string|int, mixed>|bool|mixed|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
$map_data : null = null
$raw_row : null = null
Return values
array<string|int, mixed>|bool|mixed|string

parse_sex()

public parse_sex( $input[, null $default_value = null ][, null $parse_hint = null ]) : int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
int

parse_status()

public parse_status( $input[, null $default_value = null ][, null $parse_hint = null ]) : int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
int

parse_termination_date()

public parse_termination_date( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_time()

public parse_time( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_time_unit()

public parse_time_unit( $input[, null $default_value = null ][, null $parse_hint = null ]) : bool|float|int|number|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
bool|float|int|number|string

parse_title()

public parse_title( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_user_group()

public parse_user_group( $input[, null $default_value = null ][, null $parse_hint = null ]) : array<string|int, mixed>|bool|int|mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
array<string|int, mixed>|bool|int|mixed

parse_wage()

public parse_wage( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parse_wage_effective_date()

public parse_wage_effective_date( $input[, null $default_value = null ][, null $parse_hint = null ]) : false|int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
false|int

parse_wage_type()

public parse_wage_type( $input[, null $default_value = null ][, null $parse_hint = null ]) : int
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
int

parse_wage_weekly_time()

public parse_wage_weekly_time( $input[, null $default_value = null ][, null $parse_hint = null ]) : bool|float|int|number|string
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
bool|float|int|number|string

parse_work_phone()

public parse_work_phone( $input[, null $default_value = null ][, null $parse_hint = null ]) : mixed
Parameters
$input :
$default_value : null = null
$parse_hint : null = null
Return values
mixed

parseCustomFieldOptions()

public parseCustomFieldOptions(mixed $input, mixed $meta_data) : mixed
Parameters
$input : mixed
$meta_data : mixed
Return values
mixed

parseData()

Parse data while applying any parse hints.

public parseData() : bool

This converts the raw data into something that can be passed directly to the setObjectAsArray functions for this object. Which may include converting one column into multiples and vice versa.

Return values
bool

postParseRow()

public postParseRow( $row_number,  $raw_row) : mixed
Parameters
$row_number :
$raw_row :
Return values
mixed

preParseRow()

public preParseRow( $row_number,  $raw_row) : mixed
Parameters
$row_number :
$raw_row :
Return values
mixed

preProcess()

public preProcess() : bool
Return values
bool

process()

This function can't be named "import" as it will be called during __construct() then.

public process([bool $validate_only = false ]) : bool
Parameters
$validate_only : bool = false
Return values
bool

renameLocalFile()

public renameLocalFile() : bool
Return values
bool

saveRawDataToFile()

public saveRawDataToFile( $data) : bool|int
Parameters
$data :
Return values
bool|int

setAPIMessageID()

public setAPIMessageID(string $id) : bool
Parameters
$id : string

UUID

Return values
bool

setColumnMap()

public setColumnMap( $import_map_arr) : bool
Parameters
$import_map_arr :
Return values
bool

setImportOptions()

public setImportOptions( $value) : bool
Parameters
$value :
Return values
bool

setParsedData()

public setParsedData( $value) : bool
Parameters
$value :
Return values
bool

setRawData()

public setRawData( $value) : bool
Parameters
$value :
Return values
bool

setRemoteFileName()

public setRemoteFileName( $value) : bool
Parameters
$value :
Return values
bool

Search results