smarty template engine
Monday, October 13, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


register_compiler_function()

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() および コンパイラ関数プラグイン も参照してください。




 

credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.