Translator
in package
Aleph Translator Class
Tags
Table of Contents
- $charset : string
- Character set
- $table15 : array<string|int, mixed>
- Table 15 configuration
- $table40 : array<string|int, mixed>
- Table 40 configuration
- $table_sub_library : array<string|int, mixed>
- Sub library configuration table
- __construct() : mixed
- Constructor
- parsetable() : array<string|int, mixed>
- Parse a table
- regexp() : string
- Apply standard regular expression cleanup to a string.
- tab15Callback() : void
- Callback for tab15 (modify $tab15 by reference)
- tab15Translate() : string
- Get a tab15 item status
- tab40Callback() : void
- Callback for tab40 (modify $tab40 by reference)
- tab40Translate() : string
- Get a tab40 collection description
- tabSubLibraryCallback() : void
- Sub-library callback (modify $tab_sub_library by reference)
- tabSubLibraryTranslate() : string
- Support method for tab15Translate -- translate a sub-library name
Properties
$charset
Character set
protected
string
$charset
$table15
Table 15 configuration
protected
array<string|int, mixed>
$table15
$table40
Table 40 configuration
protected
array<string|int, mixed>
$table40
$table_sub_library
Sub library configuration table
protected
array<string|int, mixed>
$table_sub_library
Methods
__construct()
Constructor
public
__construct(array<string|int, mixed> $configArray) : mixed
Parameters
- $configArray : array<string|int, mixed>
-
Aleph configuration
Return values
mixed —parsetable()
Parse a table
public
parsetable(string $file, string $callback) : array<string|int, mixed>
Parameters
- $file : string
-
Input file
- $callback : string
-
Callback routine for parsing
Return values
array<string|int, mixed> —regexp()
Apply standard regular expression cleanup to a string.
public
static regexp(string $string) : string
Parameters
- $string : string
-
String to clean up.
Return values
string —tab15Callback()
Callback for tab15 (modify $tab15 by reference)
public
static tab15Callback(array<string|int, mixed> $matches, array<string|int, mixed> &$tab15, string $charset) : void
Parameters
- $matches : array<string|int, mixed>
-
preg_match() return array
- $tab15 : array<string|int, mixed>
-
result array to generate
- $charset : string
-
character set
Return values
void —tab15Translate()
Get a tab15 item status
public
tab15Translate(string $slc, string $isc, string $ipsc) : string
Parameters
- $slc : string
-
Sub-library
- $isc : string
-
Item status code
- $ipsc : string
-
Item process status code
Return values
string —tab40Callback()
Callback for tab40 (modify $tab40 by reference)
public
static tab40Callback(array<string|int, mixed> $matches, array<string|int, mixed> &$tab40, string $charset) : void
Parameters
- $matches : array<string|int, mixed>
-
preg_match() return array
- $tab40 : array<string|int, mixed>
-
result array to generate
- $charset : string
-
character set
Return values
void —tab40Translate()
Get a tab40 collection description
public
tab40Translate(string $collection, string $sublib) : string
Parameters
- $collection : string
-
Collection
- $sublib : string
-
Sub-library
Return values
string —tabSubLibraryCallback()
Sub-library callback (modify $tab_sub_library by reference)
public
static tabSubLibraryCallback(array<string|int, mixed> $matches, array<string|int, mixed> &$tab_sub_library, string $charset) : void
Parameters
- $matches : array<string|int, mixed>
-
preg_match() return array
- $tab_sub_library : array<string|int, mixed>
-
result array to generate
- $charset : string
-
character set
Return values
void —tabSubLibraryTranslate()
Support method for tab15Translate -- translate a sub-library name
public
tabSubLibraryTranslate(string $sl) : string
Parameters
- $sl : string
-
Text to translate