/** * Declares an association between this object and a ChildCardRef object. * * @param ChildCardRef $v * @return $this|\Players The current object (for fluent API support) * @throws PropelException */ public function setCardRef(ChildCardRef $v = null) { if ($v === null) { $this->setCard(NULL); } else { $this->setCard($v->getCard()); } $this->aCardRef = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildCardRef object, it will not be re-added. if ($v !== null) { $v->addPlayers($this); } return $this; }
/** * Exclude object from result * * @param ChildCardRef $cardRef Object to remove from the list of results * * @return $this|ChildCardRefQuery The current query, for fluid interface */ public function prune($cardRef = null) { if ($cardRef) { $this->addUsingAlias(CardRefTableMap::COL_CARD, $cardRef->getCard(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \CardRef object * * @param \CardRef|ObjectCollection $cardRef The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildPlayersQuery The current query, for fluid interface */ public function filterByCardRef($cardRef, $comparison = null) { if ($cardRef instanceof \CardRef) { return $this->addUsingAlias(PlayersTableMap::COL_CARD, $cardRef->getCard(), $comparison); } elseif ($cardRef instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(PlayersTableMap::COL_CARD, $cardRef->toKeyValue('PrimaryKey', 'Card'), $comparison); } else { throw new PropelException('filterByCardRef() only accepts arguments of type \\CardRef or Collection'); } }