public setAttribute ( string $name, mixed $value ) | ||
$name | string | the attribute name |
$value | mixed | the attribute value. |
public function setAttribute($name, $value)
{
if ($this->hasAttribute($name)) {
$this->{$name} = $value;
} else {
throw new InvalidParamException(get_class($this) . ' ' . \Yii::t('skeeks/cms', 'has no attribute named "{name}".', ['name' => $name]));
}
}