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