public function reset ($name)
	{
		
		// If the attribute doesn't exists
		
		if (!$this->attributeExists ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute does not exist!');
		}
		
		// If attribute reset is disabled
		
		if (!$this->attributeReset ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute reset is disabled!');
		}
		
		// If there is no default attribute value remove the value
		
		if (!array_key_exists ('default', static::$attributes[$name]))
		{
			unset ($this->attributeValues[$name]);
		}
		
		// Else there is a default attribute value so set it
		
		else
		{
			$this->iset ($name, static::$attributes[$name]['default'], FALSE);
		}
		
	}
public function reset ($name)
	{
		
		// If the attribute doesn't exists
		
		if (!$this->attributeExists ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute does not exist!');
		}
		
		// If attribute reset is disabled
		
		if (!$this->attributeReset ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute reset is disabled!');
		}
		
		// If there is no default attribute value remove the value
		
		if (!array_key_exists ('default', static::$attributes[$name]))
		{
			unset ($this->attributeValues[$name]);
		}
		
		// Else there is a default attribute value so set it
		
		else
		{
			$this->iset ($name, static::$attributes[$name]['default'], FALSE);
		}
		
	}
public function reset ( $ name ) { // If the attribute doesn't exists if ( ! $ this -> attributeExists ( $ name ) ) { throw new Exception ( get_called_class ( ) . '->' . $ name . ' attribute does not exist!' ) ; } // If attribute reset is disabled if ( ! $ this -> attributeReset ( $ name ) ) { throw new Exception ( get_called_class ( ) . '->' . $ name . ' attribute reset is disabled!' ) ; } // If there is no default attribute value remove the value if ( ! array_key_exists ( 'default' , static :: $ attributes [ $ name ] ) ) { unset ( $ this -> attributeValues [ $ name ] ) ; } // Else there is a default attribute value so set it else { $ this -> iset ( $ name , static :: $ attributes [ $ name ] [ 'default' ] , FALSE ) ; } }
Reset an attribute value to its default
@param string $name Attribute name
@throws Exception
@return void
Reset an attribute value to its default