<?php

/**
 * Subclass for representing a row from the 'tblbloghost' table.
 *
 *
 *
 * @package lib.model
 */
class Tblbloghost extends BaseTblbloghost
{
	/**
	 * Initializes internal state of Tblbloghost object.
	 * @see        parent::__construct()
	 */
	public function __construct()
	{
		// Make sure that parent constructor is always invoked, since that
		// is where any default values for this object are set.
		parent::__construct();
	}

	public function save(PropelPDO $con = null)
	{
	  if ($this->isColumnModified(TblbloghostPeer::BH_HOST)) {
	    $md5 = md5($this->getBhHost());
	    $this->setBhHostcode(substr($md5, 0, 2));
	  }
		parent::save($con);
	}

}
