symfony API

sfMessageSource_Creole Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfMessageSource_Creole class.

Inheritence

sfMessageSource_Creole  <  sfMessageSource_Database < sfMessageSource

Method Summary

  • array &($variant)
    Get an array of messages for a particular catalogue and cultural
  • array catalogues()
    Returns a list of catalogue as key and all it variants as value.
  • db connection()
    Get the database connection.
  • boolean delete($message, $catalogue)
    Delete a particular message from the specified catalogue.
  • array getCatalogueDetails($catalogue)
    Retrieve catalogue details, array($catId, $variant, $count).
  • int getLastModified($source)
    Get the last modified unix-time for this particular catalogue+variant.
  • boolean isValidSource($variant)
    Check if a particular catalogue+variant exists in the database.
  • boolean save($catalogue)
    Save the list of untranslated blocks to the translation source.
  • boolean update($text, $target, $comments, $catalogue)
    Update the translation.
  • boolean updateCatalogueTime()
    Update the catalogue last modified time.
  • __construct($source)
    Constructor.
  • __destruct()
    Destructor, close the database connection.

Methods inherited from sfMessageSource_Database

getCatalogueList , getId , parseDSN

Methods inherited from sfMessageSource

& , append , factory , getCache , getCatalogueList , getCulture , getLastModified , getSource , isValidSource , load , read , setCache , setCulture , __construct

Method Details

  • (array) & ($variant) Browse code

    $variant the catalogue name + variant

    Get an array of messages for a particular catalogue and cultural

    variant.

    returns translation messages.

  • (array) catalogues () Browse code

    Returns a list of catalogue as key and all it variants as value.

    returns list of catalogues

  • (db) connection () Browse code

    Get the database connection.

    returns database connection.

  • (boolean) delete ($message, $catalogue) Browse code

    $message the source message to delete.
    $catalogue the catalogue to delete from.

    Delete a particular message from the specified catalogue.

    returns true if deleted, false otherwise.

  • (array) getCatalogueDetails ($catalogue) Browse code

    $catalogue catalogue

    Retrieve catalogue details, array($catId, $variant, $count).

    returns catalogue details, array($catId, $variant, $count).

  • (int) getLastModified ($source) Browse code

    $source catalogue+variant

    Get 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 ($variant) Browse code

    $variant catalogue+variant

    Check if a particular catalogue+variant exists in the database.

    returns true if the catalogue+variant is in the database, false otherwise.

  • (boolean) save ($catalogue) Browse code

    $catalogue the catalogue to add to

    Save 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 ($text, $target, $comments, $catalogue) Browse code

    $text the source string.
    $target the new translation string.
    $comments comments
    $catalogue the catalogue of the translation.

    Update the translation.

    returns true if translation was updated, false otherwise.

  • (boolean) updateCatalogueTime () Browse code

    Update the catalogue last modified time.

    returns true if updated, false otherwise.

  • __construct ($source) Browse code

    $source Creole datasource.

    Constructor.

    Create a new message source using Creole.

  • __destruct () Browse code

    Destructor, close the database connection.