What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
loadFilter() — フィルタプラグインを読み込みます。
void loadFilter(string type,
string name);
第1パラメータには、読み込むフィルタの種類を
pre
、post
あるいは output
のいずれかで指定します。第2パラメータにはフィルタプラグインの名前を指定します。
Example 13.26. フィルタプラグインを読み込む
<?php // 'trim'というプリフィルタを読み込みます $smarty->loadFilter('pre', 'trim'); // 'datefooter'という他のプリフィルタを読み込みます $smarty->loadFilter('pre', 'datefooter'); // 'compress'というアウトプットフィルタを読み込みます $smarty->loadFilter('output', 'compress'); ?>
registerFilter()
、
$autoload_filters
および
拡張機能
も参照ください。