コード例 #1
0
 public static function getAllCommentsForResource($resource, $con = null)
 {
     $c = new Criteria();
     $c->add(sfEmendCommentPeer::URL, $resource);
     $c->add(sfEmendCommentPeer::IS_PUBLIC, 1);
     return sfEmendCommentPeer::doSelect($c, $con);
 }
コード例 #2
0
 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(sfEmendCommentPeer::ID, $pks, Criteria::IN);
         $objs = sfEmendCommentPeer::doSelect($criteria, $con);
     }
     return $objs;
 }