Formagic translator class

Provides an standard interface used by all Formagic framework classes. Contains no stand-alone translation features: If no translation callback is provided, Formagic_Translator will simply return the same string that was passed in the first place.

category Formagic
package Translator
author Florian Sonnenburg
copyright Copyright (c) 2010 Florian Sonnenburg
version $Id: Translator.php 160 2012-04-02 20:18:14Z meweasle $

 Methods

Translates a string or returns it if no translator is set.

_(string $string) : string

Parameters

$string

string

The string to be translated

Returns

stringThe translated string

Constructor

__construct() : void

Empty by default, allows subclass initialization.

Sets the translation callback with class and method.

setCallback(mixed $object, string $method) : void

Parameters

$object

mixed

Translation class

$method

string

Translation class

 Properties

 

Callback array containing the translation class and method

$_callback : array