HTML_QuickForm::applyFilter()

HTML_QuickForm::applyFilter() -- Applies a filter for the given field(s)

概要

require_once 'HTML/QuickForm.php';

void HTML_QuickForm::applyFilter (mixed $element, mixed $filter)

説明

Applies a data filter for the given field(s). Filter is applied recursively.

パラメータ

mixed $element

Form element name or array of such names. Special name '__ALL__' means all the form elements.

mixed $filter

Callback, either function name or array(&$object, 'method')

例外・エラー

表 40-1PEAR_Error の値

Error codeError messageReasonSolution
QUICKFORM_NONEXIST_ELEMENTElement '$elName' does not exist in HTML_QuickForm::applyFilter()Tried to apply a filter to a non-existant elementCheck the element's name spelling
QUICKFORM_INVALID_FILTERCallback function does not exist in QuickForm::applyFilter()Tried to pass a name of a non-existant function as a callbackCheck spelling

注意

since 2.0

この関数は、スタティックにコールする ことはできません。