本文整理匯總了PHP中HTML_QuickForm::_loadElement方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTML_QuickForm::_loadElement方法的具體用法?PHP HTML_QuickForm::_loadElement怎麽用?PHP HTML_QuickForm::_loadElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTML_QuickForm
的用法示例。
在下文中一共展示了HTML_QuickForm::_loadElement方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: func_get_args
/**
* Creates a new form element of the given type.
*
* This method accepts variable number of parameters, their
* meaning and count depending on $elementType
*
* @param string $elementType type of element to add (text, textarea, file...)
* @since 1.0
* @access public
* @return HTML_QuickForm_Element
* @throws HTML_QuickForm_Error
*/
function &createElement($elementType)
{
$args = func_get_args();
$element =& HTML_QuickForm::_loadElement('createElement', $elementType, array_slice($args, 1));
return $element;
}
示例2:
/**
* Creates a new form element of the given type.
*
* This method accepts variable number of parameters, their
* meaning and count depending on $elementType
*
* @param string $elementType type of element to add (text, textarea, file...)
* @since 1.0
* @access public
* @return HTML_QuickForm_Element
* @throws HTML_QuickForm_Error
*/
static function &createElement($elementType)
{
$args = func_get_args();
$HTML_QuickForm = new HTML_QuickForm();
$element = $HTML_QuickForm->_loadElement('createElement', $elementType, array_slice($args, 1));
return $element;
}