Public Member Functions | |
__construct ($parent) | |
A standard constructor method for all XML translators. | |
doc () | |
A doc method that can be called externally to get a brief description of this class. | |
getInFormat () | |
Gets the expected input format the user has set. | |
getInputOption ($key) | |
returns the value of the requested input option If the desired option is not set, returns null. | |
getOption ($key) | |
If the requested option is set, returns that option's value. | |
getOutFormat () | |
Gets the expected output format the user wants. | |
sendToTarget ($si, $input) | |
Puts the output of the translator into the appropriate slot in the SPage object. | |
setInputOption ($key, $value) | |
Sets the given input option to the given value. | |
setInputOptions ($options) | |
Set all the input options. Sets all the input options. The given array is simply stored as the input options. | |
setOption ($key, $value) | |
Sets the desired option to the given value. | |
translate ($si) | |
A translator helper function that looks for the desired translation helper class. |
The most basic translation class. It is extended by all other classes. Do not use this translator directly. Extend it to make the desired translators.
STrans::__construct | ( | $ | parent | ) |
A standard constructor method for all XML translators.
$parent | [PageRender]: the current instance of PageRender in use. |
Reimplemented in STransInteractivateInstructor, STransInteractivateLesson, STransListXML, and STransXFormsXML.
STrans::doc | ( | ) |
A doc method that can be called externally to get a brief description of this class.
Reimplemented from SObject.
Reimplemented in STransBookXML, STransHTML, STransListXML, STransMediaAgentSheetsApplet, STransMediaApplet, STransMediaDocument, STransMediaFile, STransMediaImage, STransMediaInteractivateApplet, STransMediaNetLogoApplet, STransNavXML, STransObject, STransPhotoXML, STransStdXML, STransStdXML3, STransTK, STransXML, and STransXSL.
STrans::getInFormat | ( | ) |
Gets the expected input format the user has set.
Child classes will override this function.
Reimplemented in STransHTML, STransMediaAgentSheetsApplet, STransMediaApplet, STransMediaDocument, STransMediaFile, STransMediaImage, STransMediaInteractivateApplet, STransMediaNetLogoApplet, STransObject, STransStdXML, STransStdXML3, STransTK, STransXML, and STransXSL.
STrans::getInputOption | ( | $ | key | ) |
returns the value of the requested input option If the desired option is not set, returns null.
$key | [string]: the name of the requested option. |
STrans::getOption | ( | $ | key | ) |
If the requested option is set, returns that option's value.
If the option is set, returns the value. If it isn't set asks the parent for the same option.
$key | [string]: the name of the option. |
STrans::getOutFormat | ( | ) |
Gets the expected output format the user wants.
Child classes should override this function.
Reimplemented in STransHTML, STransMediaAgentSheetsApplet, STransMediaApplet, STransMediaDocument, STransMediaFile, STransMediaImage, STransMediaInteractivateApplet, STransMediaNetLogoApplet, STransObject, STransStdXML, STransStdXML3, STransTK, STransXML, and STransXSL.
STrans::sendToTarget | ( | $ | si, | |
$ | input | |||
) |
Puts the output of the translator into the appropriate slot in the SPage object.
Grabs the target slot and the input mode (append or set) from the SInput object. If the option "trans_mode" is set to append, it will append to the slot. Otherwise it overwrites the slot ('set'). It hands SPage the desired slot and the output.
STrans::setInputOption | ( | $ | key, | |
$ | value | |||
) |
Sets the given input option to the given value.
$key | [string]: the name of the desired input option. | |
$value | [string]: the desired value for the input option. |
STrans::setInputOptions | ( | $ | options | ) |
Set all the input options. Sets all the input options. The given array is simply stored as the input options.
$options | [array]: an associative array of the input options. |
STrans::setOption | ( | $ | key, | |
$ | value | |||
) |
Sets the desired option to the given value.
$key | [string]: the name of the option being set. | |
$value | [string]: the value to set the option to. |
STrans::translate | ( | $ | si | ) |
A translator helper function that looks for the desired translation helper class.
Child classes can use this function to get the correct translator. NOTE: this translator does no translation itself. If a custom translator is set, the function will try to use it. If the translator has logged errors or cannot find the custom translator, it will return false. If no custom translator is selected or the custom translator is found, it returns true.
Reimplemented in STransBookXML, STransHTML, STransHTMLMedia, STransHTMLTK, STransListXML, STransMediaAgentSheetsApplet, STransMediaApplet, STransMediaDocument, STransMediaFile, STransMediaImage, STransMediaInteractivateApplet, STransMediaNetLogoApplet, STransNavXML, STransNSDLSearchXML, STransObject, STransPhotoXML, STransSDRMetadata, STransStdXML, STransStdXML3, STransTK, STransXFormsXML, STransXML, STransXSL, and TransSDRPendingXML.