mixed HTML_Template_Sigma::setTemplate (
string $template
, boolean $removeUnknownVariables
= = true
, boolean $removeEmptyBlocks
= = true
)
テンプレートを設定します。 loadTemplateFile() を使用してディスクからテンプレートファイルを読み込むか、 あるいはこの関数を使用して手動でテンプレートを設定します。
$template
テンプレートの内容。
$removeUnknownVariables
未知の/未使用の変数を削除するか?
$removeEmptyBlocks
空のブロックを削除するか?
成功した場合に SIGMA_OK、失敗した場合にエラーオブジェクトを返します。
エラーコード | エラーメッセージ | 原因 | 対応 |
---|---|---|---|
SIGMA_BLOCK_DUPLICATE | The name of a block must be unique within a template. Block 'blockname' found twice. | $template にふたつのブロックが含まれており、それらの名前が重複しています |
$template を調べ、いずれかのブロック名を別のものに変更します |
SIGMA_CALLBACK_SYNTAX_ERROR | Cannot parse template function: (error description) | テンプレート関数のパラメータが間違っています | テンプレート関数の定義を修正します。 クォートのしかた に注意してください |
This function can not be called statically.