package Core

 Methods

APIFileDownload()

APIFileDownload($file_name, $type, $data) 
Static

Parameters

$file_name

$type

$data

AdjustXY()

AdjustXY($coord, $adjust_coord) 
Static

Parameters

$coord

$adjust_coord

Array2CSV()

Array2CSV($data, $columns = NULL, $ignore_last_row = TRUE, $include_header = TRUE, $eol = "\n"
Static

Parameters

$data

$columns

$ignore_last_row

$include_header

$eol

Array2XML()

Array2XML($data, $columns = NULL, $column_format = NULL, $ignore_last_row = TRUE, $include_xml_header = FALSE, $root_element_name = 'data', $row_element_name = 'row'
Static

Parameters

$data

$columns

$column_format

$ignore_last_row

$include_xml_header

$root_element_name

$row_element_name

ArrayAssocSum()

ArrayAssocSum($array, $element = NULL, $decimals = NULL, $include_non_numeric = FALSE
Static

Parameters

$array

$element

$decimals

$include_non_numeric

ArrayAvg()

ArrayAvg($arr) 
Static

Parameters

$arr

ArrayGroupBy()

ArrayGroupBy($array, $group_by_elements, $ignore_elements = array()
Static

Parameters

$array

$group_by_elements

$ignore_elements

Export2XML()

Export2XML($factory_arr, $filter_data, $output_file) 
Static

Parameters

$factory_arr

$filter_data

$output_file

ExportListFactory2XML()

ExportListFactory2XML($lf, $filter_data, $file_pointer) 
Static

Parameters

$lf

$filter_data

$file_pointer

FileDownloadHeader()

FileDownloadHeader($file_name, $type, $size) 
Static

Parameters

$file_name

$type

$size

HumanBoolean()

HumanBoolean($bool) 
Static

Parameters

$bool

MajorVersionCompare()

MajorVersionCompare($version1, $version2, $operator) 
Static

Parameters

$version1

$version2

$operator

Just a number format that looks like currency without currency symbol can maybe be replaced by TTi18n::numberFormat()

MoneyFormat($value, boolean $pretty = TRUE) : string
Static

Parameters

$value

$pretty

boolean

Returns

string

NumberToLetter()

NumberToLetter($number) 
Static

Parameters

$number

PercentDistribution()

PercentDistribution($amount, $percent_arr, $remainder_operation = 'last', $precision = 2
Static

Parameters

$amount

$percent_arr

$remainder_operation

$precision

TruncateString()

TruncateString($str, $length, $start = 0, $abbreviate = FALSE
Static

Parameters

$str

$length

$start

$abbreviate

abbreviateString()

abbreviateString($str) 
Static

Parameters

$str

addKeyPrefix()

addKeyPrefix($prefix, $arr, $ignore_elements = NULL
Static

Parameters

$prefix

$arr

$ignore_elements

addSortPrefix()

addSortPrefix($arr, $begin_counter = 1
Static

Parameters

$arr

$begin_counter

arrayChangeValueCase()

arrayChangeValueCase($input, $case = CASE_LOWER
Static

Parameters

$input

$case

arrayColumn()

arrayColumn($input = NULL, $columnKey = NULL, $indexKey = NULL
Static

Parameters

$input

$columnKey

$indexKey

arrayCommonValue()

arrayCommonValue($arr) 
Static

Parameters

$arr

arrayDiffAssocRecursive()

arrayDiffAssocRecursive($array1, $array2) 
Static

Parameters

$array1

$array2

arrayDiffByKey()

arrayDiffByKey($keys, $options) 
Static

Parameters

$keys

$options

Case insensitive array_unique().

arrayIUnique($array) : array
Static

Parameters

$array

Returns

array

arrayIntersectByKey()

arrayIntersectByKey($keys, $options) 
Static

Parameters

$keys

$options

arrayIntersectByRow()

arrayIntersectByRow($rows) 
Static

Parameters

$rows

arrayMergeRecursive()

arrayMergeRecursive(array $array1, array $array2) 
Static

Parameters

$array1

$array2

arrayMergeRecursiveDistinct()

arrayMergeRecursiveDistinct(array $array1, array $array2) 
Static

Parameters

$array1

$array2

array_isearch()

array_isearch($str, $array) 
Static

Parameters

$str

$array

calculateIncludeExcludeAmount()

calculateIncludeExcludeAmount($amount, $element, $include_elements = array(), $exclude_elements = array()
Static

Parameters

$amount

$element

$include_elements

$exclude_elements

calculateMultipleColumns()

calculateMultipleColumns($data, $include_elements = array(), $exclude_elements = array()
Static

Parameters

$data

$include_elements

$exclude_elements

calculatePercent()

calculatePercent($current, $maximum, $precision = 0
Static

Parameters

$current

$maximum

$precision

checkValidDomain()

checkValidDomain() 
Static

checkValidImage()

checkValidImage($file_data) 
Static

Parameters

$file_data

checkValidReferer()

checkValidReferer($referer = FALSE
Static

Parameters

$referer

Delete all files in directory

cleanDir($path, $recursive = FALSE, $del_dirs = FALSE, $del_root = FALSE, $exclude_regex_filter = NULL) : \success
Static
access public

Parameters

$path

directory to clean

$recursive

delete files in subdirs

$del_dirs

$del_root

$exclude_regex_filter

Returns

\success

convertObjectToArray()

convertObjectToArray($obj) 
Static

Parameters

$obj

countLinesInFile()

countLinesInFile($file) 
Static

Parameters

$file

decodeInteger()

decodeInteger($str, $max = 2147483646
Static

Parameters

$str

$max

decrypt()

decrypt($str, $key = NULL
Static

Parameters

$str

$key

deleteEmptyDirectory()

deleteEmptyDirectory($path, $recurse_parent_levels = 0
Static

Parameters

$path

$recurse_parent_levels

detectMobileBrowser()

detectMobileBrowser($useragent = NULL
Static

Parameters

$useragent

disableCaching()

disableCaching($email_notification = TRUE
Static

Parameters

$email_notification

downloadHTTPFile()

downloadHTTPFile($url, $file_name) 
Static

Parameters

$url

$file_name

encodeInteger()

encodeInteger($int) 
Static

Parameters

$int

encrypt()

encrypt($str, $key = NULL
Static

Parameters

$str

$key

escapeCSVTriggerChars()

escapeCSVTriggerChars($input) 
Static

Parameters

$input

findClosestMatch()

findClosestMatch($search_str, $search_arr, $minimum_percent_match = 0, $return_all_matches = FALSE
Static

Parameters

$search_str

$search_arr

$minimum_percent_match

$return_all_matches

findSubmitButton()

findSubmitButton($prefix = 'action'
Static

Parameters

$prefix

flattenArray()

flattenArray($array, $preserve = FALSE, $r = array()
Static

Parameters

$array

$preserve

$r

formatAddress()

formatAddress($name, $address1 = FALSE, $address2 = FALSE, $city = FALSE, $province = FALSE, $postal_code = FALSE, $country = FALSE
Static

Parameters

$name

$address1

$address2

$city

$province

$postal_code

$country

formatEmailAddress()

formatEmailAddress($email, $user_obj) 
Static

Parameters

$email

$user_obj

generateCopyName()

generateCopyName($name, $strict = FALSE
Static

Parameters

$name

$strict

generateShareName()

generateShareName($from, $name, $strict = FALSE
Static

Parameters

$from

$name

$strict

getAfterDecimal()

getAfterDecimal($float, $format_number = TRUE
Static

Parameters

$float

$format_number

getAmountDifferenceUpToLimit()

getAmountDifferenceUpToLimit($amount, $limit) 
Static

Parameters

$amount

$limit

getAmountUpToLimit()

getAmountUpToLimit($amount, $limit) 
Static

Parameters

$amount

$limit

getArrayNeighbors()

getArrayNeighbors($arr, $key, $neighbor = 'both'
Static

Parameters

$arr

$key

$neighbor

getBeforeDecimal()

getBeforeDecimal($float) 
Static

Parameters

$float

getBytesFromSize()

getBytesFromSize($val) 
Static

Parameters

$val

getCityAndProvinceAndPostalCode()

getCityAndProvinceAndPostalCode($city, $province, $postal_code) 
Static

Parameters

$city

$province

$postal_code

getCurrentCompanyProductEdition()

getCurrentCompanyProductEdition() 
Static

getEmailDomain()

getEmailDomain() 
Static

getEmailLocalPart()

getEmailLocalPart() 
Static

getEmailReturnPathLocalPart()

getEmailReturnPathLocalPart($email = NULL
Static

Parameters

$email

getFileList()

getFileList($start_dir, $regex_filter = NULL, $recurse = FALSE
Static

Parameters

$start_dir

$regex_filter

$recurse

getFullName()

getFullName($first_name, $middle_name, $last_name, $reverse = FALSE, $include_middle = TRUE
Static

Parameters

$first_name

$middle_name

$last_name

$reverse

$include_middle

getHostName()

getHostName($include_port = TRUE
Static

Parameters

$include_port

getHostNameWithoutSubDomain()

getHostNameWithoutSubDomain($host_name) 
Static

Parameters

$host_name

getInstanceIdentificationString()

getInstanceIdentificationString($primary_company, $system_settings) 
Static

Parameters

$primary_company

$system_settings

getJSArray()

getJSArray($values, $name = NULL, $assoc = FALSE, $object = FALSE
Static

Parameters

$values

$name

$assoc

$object

getMapURL()

getMapURL($address1, $address2, $city, $province, $postal_code, $country, $service = 'google'
Static

Parameters

$address1

$address2

$city

$province

$postal_code

$country

$service

getMimeType()

getMimeType($file_name, $buffer = FALSE, $keep_charset = FALSE, $unknown_type = 'application/octet-stream'
Static

Parameters

$file_name

$buffer

$keep_charset

$unknown_type

getPasswordStrength()

getPasswordStrength($password) 
Static

Parameters

$password

getPointerFromArray()

getPointerFromArray($array, $element, $start = 1
Static

Parameters

$array

$element

$start

getRemoteHTTPFileSize()

getRemoteHTTPFileSize($url) 
Static

Parameters

$url

getRemoteIPAddress()

getRemoteIPAddress() 
Static

getSortDirectionArray()

getSortDirectionArray($text_keys = FALSE
Static

Parameters

$text_keys

getSystemLoad()

getSystemLoad() 
Static

getSystemMemoryInfo()

getSystemMemoryInfo() 
Static

getURLProtocol()

getURLProtocol() 
Static

getUniqueID()

getUniqueID() 
Static

hex2rgb()

hex2rgb($hex, $asString = TRUE
Static

Parameters

$hex

$asString

importApplyColumnMap()

importApplyColumnMap($column_map, $csv_arr) 
Static

Parameters

$column_map

$csv_arr

inArrayByKeyAndValue()

inArrayByKeyAndValue($arr, $search_key, $search_value) 
Static

Parameters

$arr

$search_key

$search_value

isEmail()

isEmail($email, $check_dns = TRUE, $error_level = TRUE
Static

Parameters

$email

$check_dns

$error_level

isOpenPort()

isOpenPort($address, $port = 80, $timeout = 3
Static

Parameters

$address

$port

$timeout

isSSL()

isSSL($ignore_force_ssl = FALSE
Static

Parameters

$ignore_force_ssl

isSubDirectory()

isSubDirectory($child_dir, $parent_dir) 
Static

Parameters

$child_dir

$parent_dir

isSystemLoadValid()

isSystemLoadValid() 
Static

isUnSupportedBrowser()

isUnSupportedBrowser($useragent = NULL
Static

Parameters

$useragent

isWritable()

isWritable($path) 
Static

Parameters

$path

issetOr()

issetOr($var, $default = NULL
Static

Parameters

$var

$default

parseCSV()

parseCSV($file, $head = FALSE, $first_column = FALSE, $delim = ',', $len = 9216, $max_lines = NULL
Static

Parameters

$file

$head

$first_column

$delim

$len

$max_lines

parseCallerID()

parseCallerID($number) 
Static

Parameters

$number

parseDatabaseHostString()

parseDatabaseHostString($database_host_string) 
Static

Parameters

$database_host_string

parseRFC822EmailAddress()

parseRFC822EmailAddress($input, $return_just_key = FALSE
Static

Parameters

$input

$return_just_key

preSetArrayValues()

preSetArrayValues($arr, $keys, $preset_value = NULL
Static

Parameters

$arr

$keys

$preset_value

prependArray()

prependArray($prepend_arr, $arr) 
Static

Parameters

$prepend_arr

$arr

reScaleRange()

reScaleRange($value, $old_min = 1, $old_max = 5, $new_min = 1, $new_max = 10
Static

Parameters

$value

$old_min

$old_max

$new_min

$new_max

redirectMobileBrowser()

redirectMobileBrowser() 
Static

redirectUnSupportedBrowser()

redirectUnSupportedBrowser() 
Static

removeDecimal()

removeDecimal($value) 
Static

Parameters

$value

removeKeyPrefix()

removeKeyPrefix($prefix, $arr, $ignore_elements = NULL
Static

Parameters

$prefix

$arr

$ignore_elements

value should be a float and not a string. be sure to run this before TTi18n currency or number formatter due to foreign numeric formatting for decimal being a comma.

removeTrailingZeros($value, integer $minimum_decimals = 2) : string
Static

Parameters

$value

float

$minimum_decimals

integer

Returns

string

rename()

rename($oldname, $newname) 
Static

Parameters

$oldname

$newname

sendSystemMail()

sendSystemMail($subject, $body, $attachments = NULL, $force = FALSE
Static

Parameters

$subject

$body

$attachments

$force

strReplaceOnce()

strReplaceOnce($str_pattern, $str_replacement, $string) 
Static

Parameters

$str_pattern

$str_replacement

$string

stripHTMLSpecialChars()

stripHTMLSpecialChars($str) 
Static

Parameters

$str

stripThe()

stripThe($str, $add_to_end = FALSE
Static

Parameters

$str

$add_to_end

sumMultipleColumns()

sumMultipleColumns($data, $sum_elements) 
Static

Parameters

$data

$sum_elements

trimSortPrefix()

trimSortPrefix($value, $trim_arr_value = FALSE
Static

Parameters

$value

$trim_arr_value

writeBarCodeFile()

writeBarCodeFile($file_name, $num, $print_text = TRUE, $height = 60
Static

Parameters

$file_name

$num

$print_text

$height

zips an array of files and returns a file array for download

zip($file_array, $zip_file_name = FALSE, $ignore_single_file = FALSE
Static

Parameters

$file_array

$zip_file_name

$ignore_single_file