XarayaTranslationMemory  1.6
Functions
Common.php File Reference

Go to the source code of this file.

Functions

 fixstr ($text)
 
 FixQuot ($text)
 
GetDbConn ()
 
GetTables ()
 
 GetConfigVar ($varName)
 
 CacheIndexes ()
 
 GetMicroTime ()
 
 ShowMicroTime ($basetime, $comment="")
 

Function Documentation

◆ CacheIndexes()

CacheIndexes ( )

Load the word and sentence indexes and available locales into the related static class variables using the related static class methods.

Definition at line 94 of file Common.php.

References TranslationProject\InitLocaleIDCache(), TranslationString\InitSentenceLengthCache(), and TranslationWordList\InitWordsCache().

◆ FixQuot()

FixQuot (   $text)

Fix string for using in HTML input controls

Parameters
$textThe text to escape.
Returns
The escaped text &,<,>," replaced with HTML entities.

Definition at line 49 of file Common.php.

◆ fixstr()

fixstr (   $text)

Fix string for using in SQL statement

Parameters
$textThe text to escape.
Returns
The escaped text to use in SQL statements.

Definition at line 36 of file Common.php.

Referenced by TranslationWordList\AddToWordIndex(), and TranslationString\FindText().

◆ GetConfigVar()

GetConfigVar (   $varName)

Return a variable value from the global $CONFIG array.

Definition at line 84 of file Common.php.

References $CONFIG.

Referenced by TranslationBackend\__construct(), TranslationExportXaraya\Export(), and TranslationImportXaraya\Import().

◆ GetDbConn()

& GetDbConn ( )

◆ GetMicroTime()

GetMicroTime ( )

Return current microtime timestamp for use in performance debug with ShowMicroTime()

Returns
A float of current microseconds time.

Definition at line 107 of file Common.php.

Referenced by ShowMicroTime().

◆ GetTables()

& GetTables ( )

◆ ShowMicroTime()

ShowMicroTime (   $basetime,
  $comment = "" 
)

Show time passed since basetime in microseconds unit.

Parameters
Float$basetimeTime received from GetMicroTime earlier.
String$commentComment to display before number.

Definition at line 119 of file Common.php.

References GetMicroTime().