TimeTrex API Manual

ImportJob extends Import
in package

Table of Contents

$branch_manual_id_options  : mixed
$branch_options  : mixed
$class_name  : mixed
$client_options  : mixed
$company_id  : mixed
$data  : mixed
$department_manual_id_options  : mixed
$department_options  : mixed
$group_options  : mixed
$job_item_manual_id_options  : mixed
$job_item_options  : mixed
$job_manual_id_options  : mixed
$job_options  : mixed
$obj  : mixed
$session_id  : mixed
$user_id  : mixed
$api_message_id  : mixed
$company_obj  : mixed
$custom_field_map  : mixed
$progress_bar_obj  : mixed
$search_column_priority  : mixed
$user_id_cache  : mixed
_defaultData()  : mixed
_import()  : mixed
_parse_name()  : mixed|string
_postParseRow()  : 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
getClientOptions()  : bool
getColumnMap()  : mixed
getCompanyObject()  : bool
getCustomFieldOptions()  : array<string|int, mixed>
getDepartmentOptions()  : bool
getImportOptions()  : bool|mixed|null
getJobGroupOptions()  : bool
getJobIDByRowData()  : bool
getJobItemOptions()  : bool
getJobOptions()  : bool
getLocalFileData()  : array<string|int, mixed>|bool
getLocalFileName()  : string
getObject()  : null|object
getOptions()  : array<string|int, mixed>|null
getParsedData()  : mixed
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
getUserIDByRowData()  : bool
getUserIdentificationColumns()  : array<string|int, mixed>|null
getUserObject()  : bool
mapRowData()  : bool
mergeColumnMap()  : mixed
Takes a saved column map and tries to merge it with existing column data from the file.
parse_branch()  : array<string|int, mixed>|bool|int|mixed
parse_client()  : array<string|int, mixed>|bool|int|mixed
parse_country()  : array<string|int, mixed>|bool|mixed
parse_custom_field()  : mixed
parse_date()  : false|int
parse_department()  : array<string|int, mixed>|bool|int|mixed
parse_estimate_time()  : bool|float|int|number|string
parse_fax_phone()  : mixed
parse_first_name()  : mixed|string
parse_home_phone()  : mixed
parse_job()  : array<string|int, mixed>|bool|int|mixed
parse_job_group()  : 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_phone()  : mixed
parse_postal_code()  : string
parse_province()  : array<string|int, mixed>|bool|mixed|string
parse_sex()  : int
parse_status()  : int
parse_time()  : false|int
parse_time_unit()  : 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
_getFactoryOptions()  : bool

Properties

$branch_manual_id_options

public mixed $branch_manual_id_options = \false

$department_manual_id_options

public mixed $department_manual_id_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

$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

_defaultData()

public _defaultData( $row_number,  $raw_row) : mixed
Parameters
$row_number :
$raw_row :
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

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

getClientOptions()

public getClientOptions() : 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

getImportOptions()

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

getJobGroupOptions()

public getJobGroupOptions() : bool
Return values
bool

getJobIDByRowData()

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

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([bool $name = false ][, null $parent = null ]) : array<string|int, mixed>|null
Parameters
$name : bool = false
$parent : null = null
Return values
array<string|int, mixed>|null

getParsedData()

public getParsedData() : mixed
Return values
mixed

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

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

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_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_client()

public parse_client( $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_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_estimate_time()

public parse_estimate_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_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_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_group()

public parse_job_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_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_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_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_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_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

_getFactoryOptions()

protected _getFactoryOptions( $name[, null $parent = null ]) : bool
Parameters
$name :
$parent : null = null
Return values
bool

Search results