Property | Type | Description | |
---|---|---|---|
$db | db | A resource link to the database | |
$dns | array | The DSN array property, parsed by PEAR's DB DSN parser. | |
$source | string | The datasource string, full DSN to the database. |
Method | Description | |
---|---|---|
__construct ( $source ) | Constructor. | |
__destruct ( ) | Destructor, close the database connection. | |
catalogues ( ) : array | Returns a list of catalogue as key and all it variants as value. | |
connection ( ) : db | Get the database connection. | |
delete ( $message, $catalogue = 'messages' ) : boolean | Delete a particular message from the specified catalogue. | |
save ( $catalogue = 'messages' ) : boolean | Save the list of untranslated blocks to the translation source. | |
update ( $text, $target, $comments, $catalogue = 'messages' ) : boolean | Update the translation. |
Method | Description | |
---|---|---|
connect ( ) : resource | Connect to the MySQL datasource | |
getCatalogueList ( $catalogue ) : array | Get all the variants of a particular catalogue. | |
getLastModified ( $source ) : integer | Get the last modified unix-time for this particular catalogue+variant. | |
isValidSource ( $variant ) : boolean | Check if a particular catalogue+variant exists in the database. | |
loadData ( $variant ) : array | Get an array of messages for a particular catalogue and cultural variant. |
Method | Description | |
---|---|---|
getCatalogueDetails ( $catalogue = 'messages' ) : array | Retrive catalogue details, array($cat_id, $variant, $count). | |
updateCatalogueTime ( $cat_id, $variant ) : boolean | Update the catalogue last modified time. |
public catalogues ( ) : array | ||
return | array | list of catalogues |
protected connect ( ) : resource | ||
return | resource | MySQL connection. |
public connection ( ) : db | ||
return | db | database connection. |
protected getCatalogueList ( $catalogue ) : array | ||
return | array | list of all variants for this catalogue. |
protected getLastModified ( $source ) : integer | ||
return | integer | last modified in unix-time format. |
protected isValidSource ( $variant ) : boolean | ||
return | boolean | true if the catalogue+variant is in the database, false otherwise. |
protected array $dns | ||
return | array |
protected string $source | ||
return | string |