HTML_Template_IT::setOption()

HTML_Template_IT::setOption() -- sets an option

Synopsis

Описание

Sets an option. Please notice that changing some option might result in an unexpected behaviour of HTML_Template_IT.

Возвращаемое значение

int - Returns 1 on success, otherwise an IT_Error object.

Параметр

Options

Таблица 43-1. Possible options:

Option Default value Description
removeUnknownVariables TRUE If TRUE all template variables, which are not filled, are removed while parsing. This option is usually set by calling HTML_Template_IT::loadTemplatefile() or HTML_Template_IT::setTemplate().
removeEmptyBlocks TRUE If TRUE all blocks not containing any filled template variables are removed. This option is usually set by calling HTML_Template_IT::loadTemplatefile() or HTML_Template_IT::setTemplate().
clearCache FALSE If TRUE parsed blocks are not cached. If you don't know exactly what you do, just leave the default value.
clearCacheOnParse FALSE If TRUE the variable cache will be cleaned after parsing. If you don't know exactly what you do, just leave the default value.
openingDelimiter '{' Defines the character, every template variable has to start with. If you change this value, you have to call init() to reinitialise the template. If you don't know exactly what you do, just leave the default value.
closingDelimiter '}' Defines the character, every template variable has to end with. If you change this value, you have to call init() to reinitialise the template. If you don't know exactly what you do, just leave the default value.
blocknameRegExp '[\.0-9A-Za-z_-]+' The regular expression, thats used to parse block names. If you change this value, you have to call init() to reinitialise the template. If you don't know exactly what you do, just leave the default value.
variablenameRegExp '[\.0-9A-Za-z_-]+' The regular expression, thats used to parse template variable names. If you change this value, you have to call init() to reinitialise the template. If you don't know exactly what you do, just leave the default value.

Заметка

Эта функция не должна вызываться статически.

См. также

HTML_Template_IT::loadTemplatefile()

HTML_Template_IT::setTemplate()

    Поддержать сайт на родительском проекте КГБ