/** * Retrieve a single object by pkey. * * @param string $pk the primary key. * @param PropelPDO $con the connection to use * @return blockedEmail */ public static function retrieveByPK($pk, PropelPDO $con = null) { if (null !== ($obj = blockedEmailPeer::getInstanceFromPool((string) $pk))) { return $obj; } $criteria = new Criteria(blockedEmailPeer::DATABASE_NAME); $criteria->add(blockedEmailPeer::EMAIL, $pk); $v = blockedEmailPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; }