コード例 #1
0
ファイル: PlayerQuery.php プロジェクト: haus23/dtp.model
 /**
  * Exclude object from result
  *
  * @param   ChildPlayer $player Object to remove from the list of results
  *
  * @return $this|ChildPlayerQuery The current query, for fluid interface
  */
 public function prune($player = null)
 {
     if ($player) {
         $this->addUsingAlias(PlayerTableMap::COL_ID, $player->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
ファイル: TipQuery.php プロジェクト: haus23/dtp.model
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Player object
  *
  * @param \Haus23\Dtp\Model\Player|ObjectCollection $player 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 ChildTipQuery The current query, for fluid interface
  */
 public function filterByPlayer($player, $comparison = null)
 {
     if ($player instanceof \Haus23\Dtp\Model\Player) {
         return $this->addUsingAlias(TipTableMap::COL_PLAYER_ID, $player->getId(), $comparison);
     } elseif ($player instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TipTableMap::COL_PLAYER_ID, $player->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPlayer() only accepts arguments of type \\Haus23\\Dtp\\Model\\Player or Collection');
     }
 }
コード例 #3
0
ファイル: Tip.php プロジェクト: haus23/dtp.model
 /**
  * Declares an association between this object and a ChildPlayer object.
  *
  * @param  ChildPlayer $v
  * @return $this|\Haus23\Dtp\Model\Tip The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPlayer(ChildPlayer $v = null)
 {
     if ($v === null) {
         $this->setPlayerId(NULL);
     } else {
         $this->setPlayerId($v->getId());
     }
     $this->aPlayer = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPlayer object, it will not be re-added.
     if ($v !== null) {
         $v->addTip($this);
     }
     return $this;
 }