コード例 #1
0
ファイル: BaseStateQuery.php プロジェクト: peterAK/pgs-sts
 /**
  * Filter the query by a related Store object
  *
  * @param   Store|PropelObjectCollection $store  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 StateQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByStore($store, $comparison = null)
 {
     if ($store instanceof Store) {
         return $this->addUsingAlias(StatePeer::ID, $store->getStateId(), $comparison);
     } elseif ($store instanceof PropelObjectCollection) {
         return $this->useStoreQuery()->filterByPrimaryKeys($store->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByStore() only accepts arguments of type Store or PropelCollection');
     }
 }