コード例 #1
0
ファイル: ContinentQuery.php プロジェクト: keeko/core
 /**
  * Exclude object from result
  *
  * @param   ChildContinent $continent Object to remove from the list of results
  *
  * @return $this|ChildContinentQuery The current query, for fluid interface
  */
 public function prune($continent = null)
 {
     if ($continent) {
         $this->addUsingAlias(ContinentTableMap::COL_ID, $continent->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
ファイル: CountryQuery.php プロジェクト: keeko/core
 /**
  * Filter the query by a related \keeko\core\model\Continent object
  *
  * @param \keeko\core\model\Continent|ObjectCollection $continent 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 ChildCountryQuery The current query, for fluid interface
  */
 public function filterByContinent($continent, $comparison = null)
 {
     if ($continent instanceof \keeko\core\model\Continent) {
         return $this->addUsingAlias(CountryTableMap::COL_CONTINENT_ID, $continent->getId(), $comparison);
     } elseif ($continent instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CountryTableMap::COL_CONTINENT_ID, $continent->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByContinent() only accepts arguments of type \\keeko\\core\\model\\Continent or Collection');
     }
 }
コード例 #3
0
ファイル: Country.php プロジェクト: keeko/core
 /**
  * Declares an association between this object and a ChildContinent object.
  *
  * @param  ChildContinent $v
  * @return $this|\keeko\core\model\Country The current object (for fluent API support)
  * @throws PropelException
  */
 public function setContinent(ChildContinent $v = null)
 {
     if ($v === null) {
         $this->setContinentId(NULL);
     } else {
         $this->setContinentId($v->getId());
     }
     $this->aContinent = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildContinent object, it will not be re-added.
     if ($v !== null) {
         $v->addCountry($this);
     }
     return $this;
 }