sfMessageSource_MySQL class.
Method Summary
-
array
&()
Gets an array of messages for a particular catalogue and cultural variant.
-
array
catalogues()
Returns a list of catalogue as key and all it variants as value.
-
resource
connect()
Connects to the MySQL datasource
-
db
connection()
Gets the database connection.
-
boolean
delete(, )
Deletes a particular message from the specified catalogue.
-
array
getCatalogueDetails()
Retrieves catalogue details, array($cat_id, $variant, $count).
-
array
getCatalogueList()
Gets all the variants of a particular catalogue.
-
int
getLastModified()
Gets the last modified unix-time for this particular catalogue+variant.
-
boolean
isValidSource()
Checks if a particular catalogue+variant exists in the database.
-
boolean
save()
Saves the list of untranslated blocks to the translation source.
-
boolean
update(, , , )
Updates the translation.
-
boolean
updateCatalogueTime()
Updates the catalogue last modified time.
-
__construct()
Constructor.
-
__destruct()
Destructor, closes the database connection.
& , append , factory , getCache , getCatalogueList , getCulture , getLastModified , getSource , isValidSource , load , read , setCache , setCulture , __construct
Method Details
-
Gets an array of messages for a particular catalogue and cultural variant.
returns translation messages.
-
Returns a list of catalogue as key and all it variants as value.
returns list of catalogues
-
Connects to the MySQL datasource
returns MySQL connection.
throws sfException, connection and database errors.
-
Gets the database connection.
returns database connection.
-
Deletes a particular message from the specified catalogue.
returns true if deleted, false otherwise.
-
(array) getCatalogueDetails ()
Browse code
Retrieves catalogue details, array($cat_id, $variant, $count).
returns catalogue details, array($cat_id, $variant, $count).
-
(array) getCatalogueList ()
Browse code
Gets all the variants of a particular catalogue.
returns list of all variants for this catalogue.
-
(int) getLastModified ()
Browse code
Gets the last modified unix-time for this particular catalogue+variant.
We need to query the database to get the date_modified.
returns last modified in unix-time format.
-
(boolean) isValidSource ()
Browse code
Checks if a particular catalogue+variant exists in the database.
returns true if the catalogue+variant is in the database, false otherwise.
-
Saves the list of untranslated blocks to the translation source.
If the translation was not found, you should add those
strings to the translation source via the append() method.
returns true if saved successfuly, false otherwise.
-
(boolean) update (, , , )
Browse code
Updates the translation.
returns true if translation was updated, false otherwise.
-
(boolean) updateCatalogueTime ()
Browse code
Updates the catalogue last modified time.
returns true if updated, false otherwise.
-
Constructor.
Creates a new message source using MySQL.
-
Destructor, closes the database connection.
|