本文整理汇总了PHP中Widget::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::__set方法的具体用法?PHP Widget::__set怎么用?PHP Widget::__set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Widget
的用法示例。
在下文中一共展示了Widget::__set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __set
/**
* Add specific attributes
*
* @param string $strKey The attribute key
* @param mixed $varValue The attribute value
*/
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 'min':
case 'max':
case 'step':
case 'placeholder':
$this->arrAttributes[$strKey] = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例2: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'mSize':
if ($this->multiple) {
$this->arrAttributes['size'] = $varValue;
}
break;
case 'options':
$this->arrOptions = deserialize($varValue);
break;
case 'multiple':
if (strlen($varValue)) {
$this->arrAttributes[$strKey] = 'multiple';
}
break;
case 'mandatory':
$this->arrConfiguration['mandatory'] = $varValue ? true : false;
break;
case 'rgxp':
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例3: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'mSize':
if ($this->multiple) {
$this->arrAttributes['size'] = $varValue;
}
break;
case 'efgLookupOptions':
$this->import('Formdata');
$this->arrConfiguration['efgLookupOptions'] = $varValue;
$arrOptions = $this->Formdata->prepareWidgetOptions($this->arrConfiguration);
$this->arrOptions = $arrOptions;
break;
case 'multiple':
if (strlen($varValue)) {
$this->arrAttributes[$strKey] = 'multiple';
}
break;
case 'mandatory':
$this->arrConfiguration['mandatory'] = $varValue ? true : false;
break;
case 'rgxp':
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例4: __set
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'maxlength':
$this->arrAttributes[$strKey] = $varValue > 0 ? $varValue : '';
break;
case 'mandatory':
if (VERSION == 2.9 || VERSION == 2.1) {
$this->arrConfiguration['mandatory'] = $varValue ? true : false;
} else {
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;
}
}
示例5: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
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 'rows':
$this->intRows = $varValue;
break;
case 'cols':
$this->intCols = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例6: __set
/**
* Add specific attributes
*
* @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;
case 'options':
$this->arrUnits = \StringUtil::deserialize($varValue);
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例7: __set
/**
* Add specific attributes
*
* @param string $strKey The attribute name
* @param mixed $varValue The attribute value
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'singleSRC':
$this->arrConfiguration['singleSRC'] = $varValue;
break;
case 'imageSubmit':
$this->arrConfiguration['imageSubmit'] = $varValue ? true : false;
break;
case 'name':
$this->arrAttributes['name'] = $varValue;
break;
case 'label':
$this->slabel = $varValue;
break;
case 'required':
case 'mandatory':
case 'minlength':
case 'maxlength':
// Ignore
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例8: __set
/**
* Add specific attributes
*
* @param string $strKey
* @param mixed $varValue
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'mandatory':
if ($varValue) {
$this->arrAttributes['required'] = 'required';
} else {
unset($this->arrAttributes['required']);
}
parent::__set($strKey, $varValue);
break;
case 'size':
if ($this->multiple) {
$this->arrAttributes['size'] = $varValue;
}
break;
case 'multiple':
if ($varValue) {
$this->arrAttributes['multiple'] = 'multiple';
}
break;
case 'options':
$this->arrOptions = \StringUtil::deserialize($varValue);
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例9: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
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;
case 'size':
$arrSize = deserialize($varValue);
$this->intRows = $arrSize[0];
$this->intCols = $arrSize[1];
break;
case 'rows':
$this->intRows = $varValue;
break;
case 'cols':
$this->intCols = $varValue;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例10: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'maxlength':
// Do not add as attribute (see #3094)
$this->arrConfiguration['maxlength'] = $varValue;
break;
case 'mandatory':
if ($varValue) {
$this->arrAttributes['required'] = 'required';
} else {
unset($this->arrAttributes['required']);
}
parent::__set($strKey, $varValue);
break;
case 'fSize':
if ($varValue > 0) {
$this->arrAttributes['size'] = $varValue;
}
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例11: __set
/**
* Add specific attributes
*
* @param string $strKey The attribute name
* @param mixed $varValue The attribute value
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'mandatory':
if ($varValue) {
$this->arrAttributes['required'] = 'required';
} else {
unset($this->arrAttributes['required']);
}
parent::__set($strKey, $varValue);
break;
case 'mSize':
if ($this->multiple) {
$this->arrAttributes['size'] = $varValue;
}
break;
case 'multiple':
if ($varValue != '') {
$this->arrAttributes['multiple'] = 'multiple';
}
break;
case 'options':
$this->arrOptions = deserialize($varValue);
break;
case 'rgxp':
case 'minlength':
case 'maxlength':
// Ignore
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例12: __set
/**
* Add specific attributes
*
* @param string
* @param mixed
*/
public function __set($key, $value)
{
switch ($key) {
default:
parent::__set($key, $value);
break;
}
}
示例13: __set
/**
* Add specific attributes
*
* @param string $strKey
* @param mixed $varValue
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'options':
$this->arrOptions = deserialize($varValue);
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例14: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'mandatory':
$this->arrConfiguration['mandatory'] = $varValue ? true : false;
break;
default:
parent::__set($strKey, $varValue);
break;
}
}
示例15: __set
/**
* Add specific attributes
* @param string
* @param mixed
*/
public function __set($strKey, $varValue)
{
switch ($strKey) {
case 'required':
case 'mandatory':
// Is set by default
break;
default:
parent::__set($strKey, $varValue);
break;
}
}