本文整理汇总了PHP中Widget::__get方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::__get方法的具体用法?PHP Widget::__get怎么用?PHP Widget::__get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Widget
的用法示例。
在下文中一共展示了Widget::__get方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __get
/**
* Return a parameter
*
* @param string $strKey The parameter key
*
* @return mixed The parameter value
*/
public function __get($strKey)
{
if ($strKey == 'options') {
return $this->arrOptions;
}
return parent::__get($strKey);
}
示例2: __get
/**
* Return an object property
*
* @param string $strKey The property name
*
* @return string The property value
*/
public function __get($strKey)
{
switch ($strKey) {
case 'required':
case 'mandatory':
return false;
}
return parent::__get($strKey);
}
示例3: __get
/**
* Return a parameter
* @return string
* @throws Exception
*/
public function __get($strKey)
{
switch ($strKey) {
case 'options':
return $this->arrOptions;
break;
default:
return parent::__get($strKey);
break;
}
}
示例4: __get
/**
* Return a parameter
*
* @param string $strKey The parameter key
*
* @return mixed The parameter value
*/
public function __get($strKey)
{
switch ($strKey) {
case 'value':
// Hide the Punycode format (see #2750)
if ($this->rgxp == 'email' || $this->rgxp == 'friendly' || $this->rgxp == 'url') {
return \Idna::decode($this->varValue);
} else {
return $this->varValue;
}
break;
case 'type':
if ($this->hideInput) {
return 'password';
}
// Use the HTML5 types (see #4138) but not the date, time and datetime types (see #5918)
switch ($this->rgxp) {
case 'digit':
// Allow floats (see #7257)
if (!isset($this->arrAttributes['step'])) {
$this->addAttribute('step', 'any');
}
// NO break; here
// NO break; here
case 'natural':
return 'number';
break;
case 'phone':
return 'tel';
break;
case 'email':
return 'email';
break;
case 'url':
return 'url';
break;
}
return 'text';
break;
default:
return parent::__get($strKey);
break;
}
}
示例5: __get
/**
* Return a parameter
*
* @param string $strKey The parameter key
*
* @return mixed The parameter value
*/
public function __get($strKey)
{
switch ($strKey) {
case 'cols':
return $this->intCols;
break;
case 'rows':
return $this->intRows;
break;
case 'value':
return specialchars(str_replace('\\n', "\n", $this->varValue));
break;
default:
return parent::__get($strKey);
break;
}
}
示例6: __get
/**
* Return an object property
*
* @param string $strKey
*
* @return mixed
*/
public function __get($strKey)
{
if (isset($this->arrData[$strKey])) {
return $this->arrData[$strKey];
}
return parent::__get($strKey);
}
示例7: __get
/**
* Return a parameter
*
* @param string $strKey The parameter key
*
* @return mixed The parameter value
*/
public function __get($strKey)
{
switch ($strKey) {
case 'name':
return $this->strCaptchaKey;
break;
case 'question':
return $this->strQuestion;
break;
default:
return parent::__get($strKey);
break;
}
}
示例8: __get
public function __get($strKey)
{
switch ($strKey) {
case 'value':
/**
* reformat array if we have only one field
* from array[]['fieldname'] = value
* to array[] = value
* so we have the same behavoir like multiple-checkbox fields
*/
if ($this->flatArray) {
$arrNew = array();
foreach ($this->varValue as $val) {
$arrNew[] = $val[key($this->columnFields)];
}
return $arrNew;
} else {
return parent::__get($strKey);
}
break;
default:
return parent::__get($strKey);
break;
}
}
示例9: __get
/**
* Return a parameter
*
* @return string $strKey
*/
public function __get($strKey)
{
switch ($strKey) {
case 'currentRecord':
return \Input::get('id');
case 'params':
return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['params'];
case 'foreignTable':
return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTable'];
case 'foreignField':
$foreignField = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignField'];
if (empty($foreignField)) {
$foreignField = 'pid';
}
return $foreignField;
case 'foreignTableCallback':
return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTableCallback'];
default:
return parent::__get($strKey);
}
}
示例10: __get
/**
* Return a parameter
*
* @param string $strKey The parameter key
*
* @return mixed The parameter value
*/
public function __get($strKey)
{
switch ($strKey) {
case 'value':
if (is_array($this->varValue)) {
return array($this->varValue[0], \Idna::decode($this->varValue[1]));
} else {
return array('', \Idna::decode($this->varValue));
}
break;
case 'type':
return 'text';
break;
default:
return parent::__get($strKey);
break;
}
}
示例11: __get
/**
* Return an object property.
*
* Supported keys:
*
* * sourceName: the name of the data container for the item elements.
* * fieldType : the input type. Either "radio" or "checkbox".
* * titleIcon: the icon to use in the title section.
* * mandatory: the field value must not be empty.
*
* @param string $strKey The property name.
*
* @return string The property value.
*/
public function __get($strKey)
{
switch ($strKey) {
case 'sourceName':
return $this->sourceName;
case 'fieldType':
return $this->fieldType;
case 'titleIcon':
return $this->titleIcon;
case 'mandatory':
return $this->arrConfiguration['mandatory'];
case 'orderField':
return $this->orderField;
default:
}
return parent::__get($strKey);
}