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

Name

register_compiler_function() — コンパイラ関数プラグインを動的に登録します。

説明

bool register_compiler_function(string name,
                                mixed impl,
                                bool cacheable);

コンパイラ関数 の名前と、 それを実装する PHP のユーザー定義関数名を渡します。

PHP 関数のコールバック function は、次のいずれかとなります。

  • 関数名を含んだ文字列

  • array(&$object, $method) 形式の配列 (&$object はオブジェクトの参照で、 $method はメソッド名を含む文字列)

  • array($class, $method) という形式の配列 ($class はクラス名であり、 $method はクラスのメソッド)

cacheable はほとんどの場合に省略可能です。 これらの正しい使用法についての詳細は、 キャッシュ可能なプラグインの出力の制御 を参照して下さい。

unregister_compiler_function() および コンパイラ関数プラグイン も参照してください。

Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors