framework/validators/CDefaultValueValidator.php
protected function validateAttribute($object,$attribute)
	{
		if(!$this->setOnEmpty)
			$object->$attribute=$this->value;
		else
		{
			$value=$object->$attribute;
			if($value===null || $value==='')
				$object->$attribute=$this->value;
		}
	}
protected function validateAttribute($object,$attribute)
	{
		if(!$this->setOnEmpty)
			$object->$attribute=$this->value;
		else
		{
			$value=$object->$attribute;
			if($value===null || $value==='')
				$object->$attribute=$this->value;
		}
	}
protected function validateAttribute ( $ object , $ attribute ) { if ( ! $ this -> setOnEmpty ) $ object -> $ attribute = $ this -> value ; else { $ value = $ object -> $ attribute ; if ( $ value === null || $ value === '' ) $ object -> $ attribute = $ this -> value ; } }
Validates the attribute of the object.
@param CModel $object the object being validated
@param string $attribute the attribute being validated
Validates the attribute of the object .