本文整理汇总了PHP中QButton::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP QButton::__set方法的具体用法?PHP QButton::__set怎么用?PHP QButton::__set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QButton
的用法示例。
在下文中一共展示了QButton::__set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __set
public function __set($strName, $mixValue)
{
switch ($strName) {
case "StyleClass":
// One of Bootstrap::ButtonDefault, ButtonPrimary, ButtonSuccess, ButtonInfo, ButtonWarning, ButtonDanger
break;
case "SizeClass":
// One of Bootstrap::ButtonLarge, ButtonMedium, ButtonSmall, ButtonExtraSmall
$this->SetStyleClass($mixValue);
break;
case "Glyph":
// One of the glyph icons
$this->strGlyph = QType::Cast($mixValue, QType::String);
break;
case "PrimaryButton":
try {
$this->blnPrimaryButton = QType::Cast($mixValue, QType::Boolean);
$this->SetStyleClass(Bootstrap::ButtonPrimary);
break;
} catch (\QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
try {
parent::__set($strName, $mixValue);
} catch (\QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
break;
}
}
示例2: __set
public function __set($strName, $mixValue)
{
switch ($strName) {
case 'Disabled':
try {
$this->blnDisabled = QType::Cast($mixValue, QType::Boolean);
if ($this->Rendered) {
$this->CallJqUiMethod('option', 'disabled', $this->blnDisabled);
}
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Icons':
$this->mixIcons = $mixValue;
if ($this->Rendered) {
$this->CallJqUiMethod('option', 'icons', $mixValue);
}
break;
case 'Label':
try {
$this->strLabel = QType::Cast($mixValue, QType::String);
if ($this->Rendered) {
$this->CallJqUiMethod('option', 'label', $this->strLabel);
}
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'JqText':
try {
$this->blnJqText = QType::Cast($mixValue, QType::Boolean);
if ($this->Rendered) {
$this->CallJqUiMethod('option', 'text', $this->blnJqText);
}
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Enabled':
$this->Disabled = !$mixValue;
// Tie in standard QCubed functionality
parent::__set($strName, $mixValue);
break;
default:
try {
parent::__set($strName, $mixValue);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
}