本文整理汇总了PHP中QDataGrid::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP QDataGrid::__set方法的具体用法?PHP QDataGrid::__set怎么用?PHP QDataGrid::__set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDataGrid
的用法示例。
在下文中一共展示了QDataGrid::__set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __set
public function __set($strName, $mixValue)
{
switch ($strName) {
case 'Title':
try {
$this->strLabelForNoneFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate('%s found nothing.'));
/**Translators: ignore %s */
$this->strLabelForOneFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate(' 1 %s found.'));
/**Translators: ignore %s */
$this->strLabelForMultipleFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate(' %d %s found.'));
/**Translators: ignore %s */
$this->strLabelForPaginated = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate('%s %d-%d of %d.'));
/**Translators: ignore %s */
$this->strNoun = '';
$this->strNounPlural = '';
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'AlwaysShowPaginator':
try {
$this->blnAlwaysShowPaginator = QType::Cast($mixValue, QType::Boolean);
break;
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
try {
parent::__set($strName, $mixValue);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
}
示例2: __set
/**
* This will set the property $strName to be $mixValue
*
* @param string $strName Name of the property to set
* @param string $mixValue New value of the property
* @return mixed
*/
public function __set($strName, $mixValue)
{
switch ($strName) {
case 'AdditionalConditions':
try {
return $this->conAdditionalConditions = QType::Cast($mixValue, 'QQCondition');
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'AdditionalClauses':
try {
return $this->clsAdditionalClauses = QType::Cast($mixValue, QType::ArrayType);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
try {
parent::__set($strName, $mixValue);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
}