コード例 #1
0
 /**
  * Returns all stores as AddonsStore objects.
  *
  * @return array of AddonsStore objects
  */
 public static function listStores()
 {
     $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME);
     return AddonsStorePeer::doSelect($criteria);
 }
コード例 #2
0
 /**
  * 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(AddonsStorePeer::STORE_ID, $pks, Criteria::IN);
         $objs = AddonsStorePeer::doSelect($criteria, $con);
     }
     return $objs;
 }