code: public static function findByIdOrAlias($varId, array $arrOptions=array())
  	{
  		$isAlias = !preg_match('/^[1-9]\d*$/', $varId);
  
  		// Try to load from the registry
  		if (!$isAlias && empty($arrOptions))
  		{
  			$objModel = Registry::getInstance()->fetch(static::$strTable, $varId);
  
  			if ($objModel !== null)
  			{
  				return $objModel;
  			}
  		}
  
  		$t = static::$strTable;
  
  		$arrOptions = array_merge
  		(
  			array
  			(
  				'limit'  => 1,
  				'column' => $isAlias ? array("$t.alias=?") : array("$t.id=?"),
  				'value'  => $varId,
  				'return' => 'Model'
  			),
  
  			$arrOptions
  		);
  
  		return static::find($arrOptions);
  	}
docs: Find a single record by its ID or alias
  
  @param mixed $varId      The ID or alias
  @param array $arrOptions An optional options array
  
  @return static The model or null if the result is empty