本文整理汇总了PHP中CFormModel::__set方法的典型用法代码示例。如果您正苦于以下问题:PHP CFormModel::__set方法的具体用法?PHP CFormModel::__set怎么用?PHP CFormModel::__set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFormModel
的用法示例。
在下文中一共展示了CFormModel::__set方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __set
public function __set($name, $value)
{
if (isset($this->_data[$name])) {
return $this->_data[$name] = $value;
}
parent::__set($name, $value);
}
示例2: __set
public function __set($name, $value)
{
if (isset($this->_properties[$name])) {
$this->_properties[$name] = $value;
} else {
parent::__set($name, $value);
}
}
示例3: __set
/**
* __set
*
* @param mixed $name
* @param mixed $val
* @access public
* @return void
*/
public function __set($name, $val)
{
if (!empty($this->_dynamicFields[$name])) {
$this->_dynamicData[$name] = $val;
} else {
parent::__set($name, $val);
}
}
示例4: __set
public function __set($name, $value)
{
$this->{$name} = $value;
try {
parent::__set($name, $value);
} catch (Exception $e) {
}
}
示例5: __set
public function __set($name, $value)
{
try {
parent::__set($name, $value);
} catch (Exception $e) {
$this->__tempVar[$name] = $value;
}
}
示例6: __set
public function __set($attribute, $value)
{
if (in_array($attribute, array_keys($this->_fields))) {
return $this->_fields[$attribute] = $value;
} else {
return parent::__set($attribute, $value);
}
}
示例7: __set
/**
* PHP setter magic method.
* This method is overridden so that any attribute can be accessed.
* @param string $name property name
* @param mixed $value property value
* @return mixed|void
* @throws CException
*/
public function __set($name, $value)
{
try {
parent::__set($name, $value);
} catch (Exception $e) {
$this->_attributes[$name] = $value;
return;
}
}
示例8: __set
public function __set($name, $value)
{
if (isset($this->_params[$name])) {
if ($this->_params[$name]['type'] == DataType::BOOLEAN && is_string($value)) {
$value = $value === '1';
}
$this->_params[$name]['value'] = $value;
return;
}
parent::__set($name, $value);
}
示例9: __set
public function __set($name, $value)
{
$module = Yii::app()->controller->module;
switch ($name) {
case $module->userIdColumn:
$this->_id = $value;
break;
case $module->userNameColumn:
$this->_name = $value;
break;
default:
parent::__set($name, $value);
}
}
示例10: __set
public function __set($name, $value) {
if (isset($this->_config[$name]))
$this->_config[$name] = $value;
else
parent::__set($name, $value);
}
示例11: __set
/**
* __set
*
* @param mixed $name
* @param mixed $val
* @access public
* @return void
*/
public function __set($name, $val)
{
if (isset($this->_dynamicFields[$name])) {
Yii::log("Setting {$name} to " . json_encode($val) . " \n", 'trace', self::LOG_CAT);
$this->_dynamicData[$name] = is_null($val) ? '' : $val;
} else {
parent::__set($name, $val);
}
}
示例12: __set
public function __set($attr, $value)
{
try {
parent::__set($attr, $value);
} catch (CException $e) {
$this->dynAttributes[$attr] = $value;
}
}
示例13: __set
public function __set($name, $value)
{
if (isset($this->data[$name])) {
$this->data[$name] = $value;
} else {
parent::__set($name, $value);
}
}