/** * 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(RoutePeer::ROU_UID, $pks, Criteria::IN); $objs = RoutePeer::doSelect($criteria, $con); } return $objs; }
/** * @param $field * @param null $value * @return \Route[] */ public static function findAllBy($field, $value = null) { $field = is_array($field) ? $field : array($field => $value); $c = new Criteria('workflow'); foreach ($field as $key => $value) { $c->add($key, $value, Criteria::EQUAL); } return RoutePeer::doSelect($c); }