TimeTrex API Manual

Install
in package

Table of Contents

$config_vars  : mixed
$api_message_id  : mixed
$critical_disabled_functions  : mixed
$database_driver  : mixed
$extended_error_messages  : mixed
$is_upgrade  : mixed
$progress_bar_obj  : mixed
$temp_db  : mixed
$versions  : mixed
__construct()  : mixed
Install constructor.
checkAllRequirements()  : int
checkApplicationOutOfDate()  : void
Checks if application is out of date and sends a notification to users that need to be notified.
checkApplicationVersionMatchesDatabase()  : void
Checks if application matches database version and sends a notification to users that need to be notified.
checkBaseURL()  : int
checkBCMATH()  : int
checkCALENDAR()  : int
No longer required, used pure PHP implemented TTDate::EasterDays() instead.
checkCleanCacheDirectory()  : int
checkCURL()  : int
Not currently mandatory, but can be useful to provide better SOAP timeouts.
checkDatabaseExists()  : bool
checkDatabaseInSync()  : void
Checks if database is in sync with community edition and sends a notification to users that need to be notified.
checkDatabaseSchema()  : bool|int
checkDatabaseType()  : int
checkDatabaseVersion()  : int
checkDiskSpace()  : int
checkFileChecksums()  : int
checkFilePermissions()  : int
checkGD()  : int
checkGETTEXT()  : int
checkINTL()  : int
checkJSON()  : int
checkMAIL()  : int
checkMBSTRING()  : int
checkOpenSSL()  : int
checkPEAR()  : int
checkPEARHTTP_Download()  : int
checkPEARMail()  : int
checkPEARMail_Mime()  : int
checkPHPAllowURLFopen()  : int
checkPHPCLIBinary()  : int
checkPHPCLIRequirements()  : int
Only check this if *not* being called from the CLI to prevent infinite loops.
checkPHPDisabledFunctions()  : int
Check to see if they have disabled functions in there PHP.ini file.
checkPHPINTSize()  : int
Require 64-bit PHP versions, since accrual policies with length of service dates >2038 will fail otherwise.
checkPHPMaxPostSize()  : int
checkPHPMaxUploadSize()  : int
checkPHPMemoryLimit()  : int
checkPHPOpenBaseDir()  : int
checkPHPSafeMode()  : int
checkPHPVersion()  : int
checkProductEditionMatch()  : mixed
checkSafeCacheDirectory()  : int
checkSafeLogDirectory()  : int
checkSafeStorageDirectory()  : int
checkSimpleXML()  : int
checkSOAP()  : int
checkStackComponentsOutOfDate()  : void
Checks if stack components such as php version are out of date and sends a notification to users that need to be notified.
checkSystemSettingTableExists()  : bool
checkSystemTimeZone()  : int
checkTableExists()  : bool
checkTimeTrexVersion()  : int
checkWritableCacheDirectory()  : int
checkWritableConfigFile()  : int
checkWritableLogDirectory()  : int
checkWritableStorageDirectory()  : int
checkZIP()  : int
cleanCacheDirectory()  : bool
cleanOrphanFiles()  : bool
convertArrayElementsToUUID()  : array<string|int, mixed>
Used by InstallSchema_1100* takes a listfactory result set as first argument.
createDatabase()  : bool
createSchema()  : bool
createSchemaRange()  : bool
Creates DB schema starting at and including start_version, and ending at, including end version.
getAllSchemaVersions()  : array<string|int, mixed>
Get all schema versions A=Community, B=Professional, C=Corporate, D=Enterprise, T=Tax
getAPIMessageID()  : bool|null
Returns the API messageID for each individual call.
getBaseURL()  : string
getConfigFile()  : mixed|string
getCriticalDisabledFunctionList()  : string
getCriticalFunctionList()  : array<string|int, mixed>
getCurrentTimeTrexVersion()  : string
getDatabaseConnection()  : bool|null
getDatabaseDriver()  : null
getDatabaseType()  : int|string
getDatabaseTypeArray()  : array<string|int, mixed>
getDatabaseVersion()  : array<string|int, mixed>|bool|null
getExtendedErrorMessage()  : bool|null|string
getFailedRequirements()  : array<string|int, mixed>|bool
getFullApplicationVersion()  : string
getIsUpgrade()  : bool
getLatestTimeTrexVersion()  : bool
getLicenseText()  : bool|string
getPHPCLI()  : bool
getPHPCLIDirectory()  : string
getPHPCLIRequirementsCommand()  : string
getPHPConfigFile()  : string
getPHPIncludePath()  : string
getPHPINISize()  : mixed|null
getPHPOpenBaseDir()  : string
getPHPVersion()  : string
getProgressBarObject()  : null|ProgressBar
getRecommendedBaseURL()  : mixed
getScheduleMaintenanceJobsCommand()  : bool|string
getSchemaGroupsForProductEdition()  : array<string|int, mixed>
Get all the schema groups available for the current product edition. This helps avoid issues where database schema files may exist for ENTERPRISE edition, but we only want to apply PROFESSIONAL edition schema changes.
getTTProductEdition()  : int
Checks if this is the professional version or not
getWebServerUser()  : bool
handleSchemaGroupChange()  : bool
HumanBoolean()  : string
initializeSequence()  : bool
initializeSequences()  : bool
This can help prevent race conditions when creating new tables.
isInstallMode()  : bool
Read .ini file.
isSUDOinstalled()  : bool
postCreateSchema()  : bool
processColumns()  : array<string|int, mixed>
regexConvertToUUID()  : bool|int|string
regexConvertToUUIDNoHash()  : bool|int|string
Used by InstallSchema_1100*
ScheduleMaintenanceJobs()  : int
sendNotification()  : void
Sends notification that instance has been upgraded.
setAPIMessageID()  : bool
setDatabaseConnection()  : bool
setDatabaseDriver()  : bool
setExtendedErrorMessage()  : bool
setIsUpgrade()  : mixed
setNewDatabaseConnection()  : bool
setVersions()  : bool
syncProductEdition()  : void
Ensures the product edition matches what is installed.
writeConfigFile()  : bool|mixed

Properties

$critical_disabled_functions

protected mixed $critical_disabled_functions = []

$extended_error_messages

protected mixed $extended_error_messages = \null

$versions

protected mixed $versions = ['system_version' => \APPLICATION_VERSION]

Methods

__construct()

Install constructor.

public __construct() : mixed
Return values
mixed

checkAllRequirements()

public checkAllRequirements([bool $post_install_requirements_only = false ][, bool $exclude_check = false ]) : int
Parameters
$post_install_requirements_only : bool = false
$exclude_check : bool = false
Return values
int

checkApplicationOutOfDate()

Checks if application is out of date and sends a notification to users that need to be notified.

public static checkApplicationOutOfDate() : void
Return values
void

checkApplicationVersionMatchesDatabase()

Checks if application matches database version and sends a notification to users that need to be notified.

public static checkApplicationVersionMatchesDatabase() : void
Return values
void

checkBaseURL()

public checkBaseURL() : int
Return values
int

checkBCMATH()

public checkBCMATH() : int
Return values
int

checkCALENDAR()

No longer required, used pure PHP implemented TTDate::EasterDays() instead.

public checkCALENDAR() : int
Return values
int

checkCleanCacheDirectory()

public checkCleanCacheDirectory() : int
Return values
int

checkCURL()

Not currently mandatory, but can be useful to provide better SOAP timeouts.

public checkCURL() : int
Return values
int

checkDatabaseExists()

public checkDatabaseExists( $database_name) : bool
Parameters
$database_name :
Return values
bool

checkDatabaseInSync()

Checks if database is in sync with community edition and sends a notification to users that need to be notified.

public static checkDatabaseInSync() : void
Return values
void

checkDatabaseSchema()

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

checkDatabaseType()

public checkDatabaseType() : int
Return values
int

checkDatabaseVersion()

public checkDatabaseVersion() : int
Return values
int

checkDiskSpace()

public checkDiskSpace() : int
Return values
int

checkFileChecksums()

public checkFileChecksums() : int
Return values
int

checkFilePermissions()

public checkFilePermissions() : int
Return values
int

checkGETTEXT()

public checkGETTEXT() : int
Return values
int

checkINTL()

public checkINTL() : int
Return values
int

checkJSON()

public checkJSON() : int
Return values
int

checkMAIL()

public checkMAIL() : int
Return values
int

checkMBSTRING()

public checkMBSTRING() : int
Return values
int

checkOpenSSL()

public checkOpenSSL() : int
Return values
int

checkPEAR()

public checkPEAR() : int
Return values
int

checkPEARHTTP_Download()

public checkPEARHTTP_Download() : int
Return values
int

checkPEARMail()

public checkPEARMail() : int
Return values
int

checkPEARMail_Mime()

public checkPEARMail_Mime() : int
Return values
int

checkPHPAllowURLFopen()

public checkPHPAllowURLFopen() : int
Return values
int

checkPHPCLIBinary()

public checkPHPCLIBinary() : int
Return values
int

checkPHPCLIRequirements()

Only check this if *not* being called from the CLI to prevent infinite loops.

public checkPHPCLIRequirements() : int
Return values
int

checkPHPDisabledFunctions()

Check to see if they have disabled functions in there PHP.ini file.

public checkPHPDisabledFunctions() : int

This can cause all sorts of strange failures, but most often they have system(), exec() and other OS/file system related functions disabled that completely breaks things.

Return values
int

checkPHPINTSize()

Require 64-bit PHP versions, since accrual policies with length of service dates >2038 will fail otherwise.

public checkPHPINTSize() : int
Return values
int

checkPHPMaxPostSize()

public checkPHPMaxPostSize() : int
Return values
int

checkPHPMaxUploadSize()

public checkPHPMaxUploadSize() : int
Return values
int

checkPHPMemoryLimit()

public checkPHPMemoryLimit() : int
Return values
int

checkPHPOpenBaseDir()

public checkPHPOpenBaseDir() : int
Return values
int

checkPHPSafeMode()

public checkPHPSafeMode() : int
Return values
int

checkPHPVersion()

public checkPHPVersion([null $php_version = null ]) : int
Parameters
$php_version : null = null
Return values
int

checkProductEditionMatch()

public checkProductEditionMatch() : mixed
Return values
mixed

checkSafeCacheDirectory()

public checkSafeCacheDirectory() : int
Return values
int

checkSafeLogDirectory()

public checkSafeLogDirectory() : int
Return values
int

checkSafeStorageDirectory()

public checkSafeStorageDirectory() : int
Return values
int

checkSimpleXML()

public checkSimpleXML() : int
Return values
int

checkSOAP()

public checkSOAP() : int
Return values
int

checkStackComponentsOutOfDate()

Checks if stack components such as php version are out of date and sends a notification to users that need to be notified.

public static checkStackComponentsOutOfDate() : void
Return values
void

checkSystemSettingTableExists()

public checkSystemSettingTableExists() : bool
Return values
bool

checkSystemTimeZone()

public checkSystemTimeZone() : int
Return values
int

checkTableExists()

public checkTableExists( $table_name) : bool
Parameters
$table_name :
Return values
bool

checkTimeTrexVersion()

public checkTimeTrexVersion() : int
Return values
int

checkWritableCacheDirectory()

public checkWritableCacheDirectory() : int
Return values
int

checkWritableConfigFile()

public checkWritableConfigFile() : int
Return values
int

checkWritableLogDirectory()

public checkWritableLogDirectory() : int
Return values
int

checkWritableStorageDirectory()

public checkWritableStorageDirectory() : int
Return values
int

cleanCacheDirectory()

public cleanCacheDirectory([string $exclude_regex_filter = '\.ZIP|\.lock|.state|upgrade_staging' ]) : bool
Parameters
$exclude_regex_filter : string = '\.ZIP|\.lock|.state|upgrade_staging'
Return values
bool

cleanOrphanFiles()

public cleanOrphanFiles() : bool
Return values
bool

convertArrayElementsToUUID()

Used by InstallSchema_1100* takes a listfactory result set as first argument.

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

createDatabase()

public createDatabase( $database_name) : bool
Parameters
$database_name :
Return values
bool

createSchema()

public createSchema( $version) : bool
Parameters
$version :
Return values
bool

createSchemaRange()

Creates DB schema starting at and including start_version, and ending at, including end version.

public createSchemaRange([null $start_version = null ][, null $end_version = null ][, array<string|int, mixed> $group = null ]) : bool

Starting at NULL is first version, ending at NULL is last version.

Parameters
$start_version : null = null
$end_version : null = null
$group : array<string|int, mixed> = null
Return values
bool

getAllSchemaVersions()

Get all schema versions A=Community, B=Professional, C=Corporate, D=Enterprise, T=Tax

public getAllSchemaVersions([array<string|int, mixed> $group = ['A', 'B', 'C', 'D'] ]) : array<string|int, mixed>
Parameters
$group : array<string|int, mixed> = ['A', 'B', 'C', 'D']
Tags
noinspection

PhpUnusedLocalVariableInspection

Return values
array<string|int, mixed>

getAPIMessageID()

Returns the API messageID for each individual call.

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

getBaseURL()

public getBaseURL() : string
Return values
string

getConfigFile()

public getConfigFile() : mixed|string
Return values
mixed|string

getCriticalDisabledFunctionList()

public getCriticalDisabledFunctionList() : string
Return values
string

getCriticalFunctionList()

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

getCurrentTimeTrexVersion()

public getCurrentTimeTrexVersion() : string
Return values
string

getDatabaseConnection()

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

getDatabaseDriver()

public getDatabaseDriver() : null
Return values
null

getDatabaseType()

public getDatabaseType([null $type = null ]) : int|string
Parameters
$type : null = null
Return values
int|string

getDatabaseTypeArray()

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

getDatabaseVersion()

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

getExtendedErrorMessage()

public getExtendedErrorMessage([null $key = null ]) : bool|null|string
Parameters
$key : null = null
Return values
bool|null|string

getFailedRequirements()

public getFailedRequirements([bool $post_install_requirements_only = false ][, bool $exclude_check = false ]) : array<string|int, mixed>|bool
Parameters
$post_install_requirements_only : bool = false
$exclude_check : bool = false
Return values
array<string|int, mixed>|bool

getFullApplicationVersion()

public getFullApplicationVersion() : string
Return values
string

getIsUpgrade()

public getIsUpgrade() : bool
Return values
bool

getLatestTimeTrexVersion()

public getLatestTimeTrexVersion() : bool
Return values
bool

getLicenseText()

public getLicenseText() : bool|string
Return values
bool|string

getPHPCLI()

public getPHPCLI() : bool
Return values
bool

getPHPCLIDirectory()

public getPHPCLIDirectory() : string
Return values
string

getPHPCLIRequirementsCommand()

public getPHPCLIRequirementsCommand() : string
Return values
string

getPHPConfigFile()

public getPHPConfigFile() : string
Return values
string

getPHPIncludePath()

public getPHPIncludePath() : string
Return values
string

getPHPINISize()

public getPHPINISize( $setting_name) : mixed|null
Parameters
$setting_name :
Return values
mixed|null

getPHPOpenBaseDir()

public getPHPOpenBaseDir() : string
Return values
string

getPHPVersion()

public getPHPVersion() : string
Return values
string

getRecommendedBaseURL()

public getRecommendedBaseURL() : mixed
Return values
mixed

getScheduleMaintenanceJobsCommand()

public getScheduleMaintenanceJobsCommand() : bool|string
Return values
bool|string

getSchemaGroupsForProductEdition()

Get all the schema groups available for the current product edition. This helps avoid issues where database schema files may exist for ENTERPRISE edition, but we only want to apply PROFESSIONAL edition schema changes.

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

getTTProductEdition()

Checks if this is the professional version or not

public getTTProductEdition() : int
Return values
int

getWebServerUser()

public getWebServerUser() : bool
Return values
bool

handleSchemaGroupChange()

public handleSchemaGroupChange() : bool
Return values
bool

HumanBoolean()

public HumanBoolean( $bool) : string
Parameters
$bool :
Return values
string

initializeSequence()

public initializeSequence(object $obj,  $table,  $class,  $db_conn) : bool
Parameters
$obj : object
$table :
$class :
$db_conn :
Return values
bool

initializeSequences()

This can help prevent race conditions when creating new tables.

public initializeSequences() : bool

It will also correct any corrupt sequences that don't match their parent tables.

Return values
bool

isInstallMode()

Read .ini file.

public isInstallMode() : bool

Make sure setup_mode is enabled.

Return values
bool

isSUDOinstalled()

public isSUDOinstalled() : bool
Return values
bool

postCreateSchema()

public postCreateSchema( $schema_version,  $create_schema_result) : bool
Parameters
$schema_version :
$create_schema_result :
Return values
bool

processColumns()

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

regexConvertToUUID()

public regexConvertToUUID( $matches[, bool $include_hash = true ]) : bool|int|string
Parameters
$matches :
$include_hash : bool = true
Return values
bool|int|string

regexConvertToUUIDNoHash()

Used by InstallSchema_1100*

public regexConvertToUUIDNoHash( $matches) : bool|int|string
Parameters
$matches :
Return values
bool|int|string

ScheduleMaintenanceJobs()

public ScheduleMaintenanceJobs() : int
Return values
int

sendNotification()

Sends notification that instance has been upgraded.

public static sendNotification() : void
Return values
void

setAPIMessageID()

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

UUID

Return values
bool

setDatabaseConnection()

public setDatabaseConnection(object $db_obj) : bool
Parameters
$db_obj : object
Return values
bool

setDatabaseDriver()

public setDatabaseDriver( $driver) : bool
Parameters
$driver :
Return values
bool

setExtendedErrorMessage()

public setExtendedErrorMessage( $key,  $msg) : bool
Parameters
$key :
$msg :
Return values
bool

setIsUpgrade()

public setIsUpgrade( $val) : mixed
Parameters
$val :
Return values
mixed

setNewDatabaseConnection()

public setNewDatabaseConnection( $type,  $host,  $user,  $password,  $database_name) : bool
Parameters
$type :
$host :
$user :
$password :
$database_name :
Tags
noinspection

PhpUndefinedConstantInspection

Return values
bool

setVersions()

public setVersions() : bool
Return values
bool

syncProductEdition()

Ensures the product edition matches what is installed.

public static syncProductEdition() : void
Return values
void

writeConfigFile()

public writeConfigFile( $new_config_vars) : bool|mixed
Parameters
$new_config_vars :
Return values
bool|mixed

Search results