示例#1
0
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $slug The slug to find
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveBySlug($slug = null, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(sfPlopPagePeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $obj = null;
     if ($slug) {
         $criteria = new Criteria(sfPlopPagePeer::DATABASE_NAME);
         $criteria->add(sfPlopPagePeer::SLUG, $slug);
         $obj = sfPlopPagePeer::doSelectOne($criteria, $con);
     }
     return $obj;
 }