TimeTrexClientAPI
in package
Table of Contents
- $base_url : mixed
- $class_factory : mixed
- $class_factory_method : mixed
- $curl_obj : mixed
- $idempotent_key : mixed
- $namespace : mixed
- $protocol : mixed
- $protocol_version : mixed
- $response_headers : mixed
- $session_hash : mixed
- $session_id : mixed
- $soap_obj : mixed
- __call() : bool|TimeTrexClientAPIReturnHandler
- __construct() : mixed
- TimeTrexClientAPI constructor.
- __destruct() : bool
- buildURL() : string
- calcSessionHash() : string
- Use the SessionHash to ensure the URL for the session doesn't get changed out from under us without re-logging in.
- call() : bool|TimeTrexClientAPIReturnHandler
- generateUUID() : string
- Basic UUID generator that does not require any 3rd party libraries.
- getClientConnectionObject() : SoapClient|resource
- getIdempotentKey() : string
- getProtocol() : string
- getSessionHash() : null
- getSessionID() : bool|string
- handleCurlResponseHeaders() : mixed
- isFault() : mixed
- isLoggedIn() : mixed
- Login() : bool
- Logout() : mixed
- registerAPIKey() : bool
- setClass() : bool
- setIdempotentKey() : bool
- When set to FALSE, idempotent requests are disabled. Otherwise they are enabled by default.
- setMethod() : bool
- setProtocol() : bool
- setSessionID() : bool
- setURL() : bool
- handleServerCookies() : bool
- Persist cookies in memory across all HTTP calls.
- setSessionHash() : bool
Properties
$base_url
protected
mixed
$base_url
= 'https://demo.timetrex.com/api/json/api.php'
$class_factory
protected
mixed
$class_factory
= \null
$class_factory_method
protected
mixed
$class_factory_method
= \null
$curl_obj
protected
mixed
$curl_obj
= \null
$idempotent_key
protected
mixed
$idempotent_key
= \null
$namespace
protected
mixed
$namespace
= 'urn:api'
$protocol
protected
mixed
$protocol
= \null
$protocol_version
protected
mixed
$protocol_version
= 2
$response_headers
protected
mixed
$response_headers
= []
$session_hash
protected
mixed
$session_hash
= \null
$session_id
protected
mixed
$session_id
= \null
$soap_obj
protected
mixed
$soap_obj
= \null
Methods
__call()
public
__call( $function_name[, array<string|int, mixed> $args = [] ]) : bool|TimeTrexClientAPIReturnHandler
Parameters
Return values
bool|TimeTrexClientAPIReturnHandler —__construct()
TimeTrexClientAPI constructor.
public
__construct([null $class = null ][, null $url = null ][, string $session_id = null ]) : mixed
Parameters
- $class : null = null
- $url : null = null
- $session_id : string = null
-
UUID
Return values
mixed —__destruct()
public
__destruct() : bool
Return values
bool —buildURL()
public
buildURL() : string
Return values
string —calcSessionHash()
Use the SessionHash to ensure the URL for the session doesn't get changed out from under us without re-logging in.
public
calcSessionHash( $url, string $session_id) : string
Parameters
Return values
string —call()
public
call( $function_name[, array<string|int, mixed> $args = [] ]) : bool|TimeTrexClientAPIReturnHandler
Parameters
Return values
bool|TimeTrexClientAPIReturnHandler —generateUUID()
Basic UUID generator that does not require any 3rd party libraries.
public
generateUUID([null $data = null ]) : string
Parameters
- $data : null = null
Tags
Return values
string —getClientConnectionObject()
public
getClientConnectionObject() : SoapClient|resource
Return values
SoapClient|resource —getIdempotentKey()
public
getIdempotentKey() : string
Return values
string —getProtocol()
public
getProtocol() : string
Return values
string —getSessionHash()
public
getSessionHash() : null
Return values
null —getSessionID()
public
getSessionID() : bool|string
Return values
bool|string —handleCurlResponseHeaders()
public
handleCurlResponseHeaders(mixed $curl, mixed $header) : mixed
Parameters
- $curl : mixed
- $header : mixed
Return values
mixed —isFault()
public
isFault( $result) : mixed
Parameters
Return values
mixed —isLoggedIn()
public
isLoggedIn() : mixed
Return values
mixed —Login()
public
Login( $user_name[, null $password = null ][, string $type = 'USER_NAME' ]) : bool
Parameters
Return values
bool —Logout()
public
Logout() : mixed
Return values
mixed —registerAPIKey()
public
registerAPIKey( $user_name, $password[, mixed $end_point = null ]) : bool
Parameters
Return values
bool —setClass()
public
setClass( $value) : bool
Parameters
Return values
bool —setIdempotentKey()
When set to FALSE, idempotent requests are disabled. Otherwise they are enabled by default.
public
setIdempotentKey( $value) : bool
Parameters
Return values
bool —setMethod()
public
setMethod( $value) : bool
Parameters
Return values
bool —setProtocol()
public
setProtocol( $value) : bool
Parameters
Return values
bool —setSessionID()
public
setSessionID( $value) : bool
Parameters
Return values
bool —setURL()
public
setURL( $url) : bool
Parameters
Return values
bool —handleServerCookies()
Persist cookies in memory across all HTTP calls.
private
handleServerCookies() : bool
Return values
bool —setSessionHash()
private
setSessionHash() : bool