Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

命名規約

プラグインファイルとその関数が Smarty によって認識されるためには特有の命名規約に従わなければなりません。

プラグインファイル は次のように指定します。

type.name.php

  • type は次のプラグインタイプのうちのいずれか1つです。

    • function
    • modifier
    • block
    • compiler
    • prefilter
    • postfilter
    • outputfilter
    • resource
    • insert

  • name には英数字とアンダースコアのみ使用できます。 PHP の変数 を参照してください。

  • 例: function.html_select_date.phpresource.db.phpmodifier.spacify.php

PHP ファイル内で定義する プラグイン関数 は次のように指定します。

smarty_type, _name

  • type および name の意味は前述したものと同じです。

  • たとえば foo という名前の修飾子の場合は、 function smarty_modifier_foo() となります。

必要なプラグインファイルが見当たらないか、 ファイル名又はプラグイン関数名が不正な場合 Smarty は適切なエラーメッセージを出力します。

Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors