/**
* Returns a value indicating whether the named attribute has been changed.
* @param string $name the name of the attribute
* @return boolean whether the attribute has been changed
*/
public function isAttributeChanged($name, $depth = 2)
{
if (is_array($this->getAttribute($name))) {
$new = $this->getAttribute($name);
$old = $this->getOldAttribute($name);
if ($depth < 1) {
$depth = 1;
}
return self::isArrayChanged($new, $old, $depth);
} else {
return BaseActiveRecord::isAttributeChanged($name);
}
}