本文整理汇总了PHP中TextField::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP TextField::__set方法的具体用法?PHP TextField::__set怎么用?PHP TextField::__set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextField
的用法示例。
在下文中一共展示了TextField::__set方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __set
/**
* Add specific attributes
*
* @param string $strKey
* @param mixed $varValue
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'category':
case 'bounds':
case 'componentRestrictions':
case 'callback':
case 'use_route_type':
case 'use_street_number_type':
case 'use_locality_type':
case 'use_administrative_area_level_1_type':
case 'use_country_type':
case 'use_postal_code_type':
case 'use_lat_long':
$this->options[$strKey] = $varValue;
break;
case 'use_route':
case 'use_street_number':
case 'use_locality':
case 'use_administrative_area_level_1':
case 'use_country':
case 'use_postal_code':
$this->useFields[substr($strKey, 4)] = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例2: __set
/**
* Make sure we have the correct value
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'value':
$this->varValue = Number::create($varValue);
break;
}
parent::__set($strKey, $varValue);
}
示例3: __set
/**
* @param string $strKey
* @param mixed $varValue
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'maxlength':
if ($varValue > 0) {
$this->arrAttributes['maxlength'] = $varValue;
}
break;
case 'mandatory':
if ($varValue) {
$this->arrAttributes['required'] = 'required';
} else {
unset($this->arrAttributes['required']);
}
parent::__set($strKey, $varValue);
break;
case 'placeholder':
$this->arrAttributes['placeholder'] = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例4: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'isTag':
$this->blnSubmitInput = !$varValue;
break;
case 'table':
$this->strTagTable = $varValue;
break;
case 'value':
$this->varValue = implode(",", array_filter(trimsplit(",", $varValue), 'strlen'));
break;
case 'maxtags':
$this->intMaxTags = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例5: __set
/**
* Add specific attributes
*
* @param string $strKey
* @param mixed $varValue
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'format':
case 'startDate':
case 'endDate':
case 'excludeCSS':
case 'excludeJS':
case 'autoclose':
case 'beforeShowDay':
case 'beforeShowMonth':
case 'beforeShowYear':
case 'beforeShowDecade':
case 'beforeShowCentury':
case 'calendarWeeks':
case 'clearBtn':
case 'container':
case 'datesDisabled':
case 'daysOfWeekDisabled':
case 'daysOfWeekHighlighted':
case 'defaultViewDate':
case 'disableTouchKeyboard':
case 'enableOnReadonly':
case 'forceParse':
case 'assumeNearbyYear':
case 'assumeNearbyYear_number':
case 'immediateUpdates':
case 'inputs':
case 'keyboardNavigation':
case 'language':
case 'maxViewMode':
case 'minViewMode':
case 'multidate':
case 'multidate_count':
case 'multidateSeparator':
case 'orientation':
case 'showOnFocus':
case 'startView':
case 'templates':
case 'title':
case 'todayBtn':
case 'todayHighlight':
case 'toggleActive':
case 'weekStart':
case 'zIndexOffset':
$this->options[$strKey] = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}