public static function findByUri($uri, $findAll = false) { $c = new Criteria(); $c->add(PrefixPeer::URI, $uri); $c->addAscendingOrderByColumn(PrefixPeer::RANK); if ($findAll) { return PrefixPeer::doSelect($c); } else { return PrefixPeer::doSelectOne($c); } }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param Connection $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(PrefixPeer::PREFIX, $pks, Criteria::IN); $objs = PrefixPeer::doSelect($criteria, $con); } return $objs; }