/** * Declares an association between this object and a ChildPlatform object. * * @param ChildPlatform $v * @return $this|\RatingHeader The current object (for fluent API support) * @throws PropelException */ public function setPlatform(ChildPlatform $v = null) { if ($v === null) { $this->setPlatformId(NULL); } else { $this->setPlatformId($v->getId()); } $this->aPlatform = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPlatform object, it will not be re-added. if ($v !== null) { $v->addRatingHeader($this); } return $this; }
/** * Filter the query by a related \Platform object * * @param \Platform|ObjectCollection $platform 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 ChildRatingHeaderQuery The current query, for fluid interface */ public function filterByPlatform($platform, $comparison = null) { if ($platform instanceof \Platform) { return $this->addUsingAlias(RatingHeaderTableMap::COL_PLATFORM_ID, $platform->getId(), $comparison); } elseif ($platform instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(RatingHeaderTableMap::COL_PLATFORM_ID, $platform->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByPlatform() only accepts arguments of type \\Platform or Collection'); } }
/** * Exclude object from result * * @param ChildPlatform $platform Object to remove from the list of results * * @return $this|ChildPlatformQuery The current query, for fluid interface */ public function prune($platform = null) { if ($platform) { $this->addUsingAlias(PlatformTableMap::COL_ID, $platform->getId(), Criteria::NOT_EQUAL); } return $this; }