Location: PHPKode > projects > DIY Blog > diy-blog/classes/diy-blog/model/UserPeer.php
<?php

  // include base peer class
  require_once 'diy-blog/model/om/BaseUserPeer.php';

  // include object class
  include_once 'diy-blog/model/User.php';

/**
 * A custom peer class for User.
 * Originally generated by Propel. A method is added to get a class name by its key.
 *
 * @package	diy-blog.model
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class UserPeer extends BaseUserPeer
{

	public static function getOMClass(ResultSet $rs = null, $colnum = null)
	{
		//print_r($rs);print $colnum;
		//$classKey = $rs->getString(self::TYPE);
		$classKey = $rs->getString($colnum + 2);

		if ($classKey == self::CLASSKEY_ADMINUSER) return self::CLASSNAME_ADMINUSER;
		if ($classKey == self::CLASSKEY_LIMITEDUSER) return self::CLASSNAME_LIMITEDUSER;
		if ($classKey == self::CLASSKEY_GUESTUSER) return self::CLASSNAME_GUESTUSER;

		throw new PropelException('Unknown class: '. $classKey);
	}

} // UserPeer
Return current item: DIY Blog