framework/db/BaseActiveRecord.php
public function getOldAttribute($name)
    {
        return isset($this->_oldAttributes[$name]) ? $this->_oldAttributes[$name] : null;
    }
public function getOldAttribute($name)
    {
        return isset($this->_oldAttributes[$name]) ? $this->_oldAttributes[$name] : null;
    }
Returns the old value of the named attribute.
If this record is the result of a query and the attribute is not loaded,
`null` will be returned.
@param string $name the attribute name
@return mixed the old attribute value. `null` if the attribute is not loaded before
or does not exist.
@see hasAttribute()