7.5. Opt_Compiler_Class class
7.5.8. convert()
7.5.7. component()
« Previous
7.5.9. createFormat()
Next »

7.5.8. convert()

Referencestring convert(string $string)

The method tries to convert the specified $string using one of the patterns already defined in the compiler. If no conversion pattern is found, it returns the unmodified $string.

In the compiler, convert() is usually used to change the variable names in some parts of the template. For example, if we combine the opt:use attribute with one of the sections, the instruction registers the pattern to convert the snippet variable name, like $snippet.element to the suitable section name: $section.element.

See also:

7.5.8. convert()
7.5. Opt_Compiler_Class class
« Previous
7.5.7. component()
Next »
7.5.9. createFormat()