コード例 #1
0
ファイル: Games.php プロジェクト: nirkbirk/site
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aCompaniesRelatedByPublisherId) {
         $this->aCompaniesRelatedByPublisherId->removeGamesRelatedByPublisherId($this);
     }
     if (null !== $this->aCompaniesRelatedByDeveloperId) {
         $this->aCompaniesRelatedByDeveloperId->removeGamesRelatedByDeveloperId($this);
     }
     $this->id = null;
     $this->name = null;
     $this->title = null;
     $this->description = null;
     $this->publisher_id = null;
     $this->developer_id = null;
     $this->gb_id = null;
     $this->gb_url = null;
     $this->gb_image = null;
     $this->gb_thumb = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
コード例 #2
0
ファイル: GamesQuery.php プロジェクト: nirkbirk/site
 /**
  * Filter the query by a related \Companies object
  *
  * @param \Companies|ObjectCollection $companies 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 ChildGamesQuery The current query, for fluid interface
  */
 public function filterByCompaniesRelatedByDeveloperId($companies, $comparison = null)
 {
     if ($companies instanceof \Companies) {
         return $this->addUsingAlias(GamesTableMap::COL_DEVELOPER_ID, $companies->getId(), $comparison);
     } elseif ($companies instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GamesTableMap::COL_DEVELOPER_ID, $companies->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCompaniesRelatedByDeveloperId() only accepts arguments of type \\Companies or Collection');
     }
 }
コード例 #3
0
ファイル: CompaniesQuery.php プロジェクト: nirkbirk/site
 /**
  * Exclude object from result
  *
  * @param   ChildCompanies $companies Object to remove from the list of results
  *
  * @return $this|ChildCompaniesQuery The current query, for fluid interface
  */
 public function prune($companies = null)
 {
     if ($companies) {
         $this->addUsingAlias(CompaniesTableMap::COL_ID, $companies->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }