コード例 #1
0
ファイル: Players.php プロジェクト: scornfield/StrayAdmin
 /**
  * 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->aMlbTeamRef) {
         $this->aMlbTeamRef->removePlayers($this);
     }
     if (null !== $this->aCardRef) {
         $this->aCardRef->removePlayers($this);
     }
     if (null !== $this->aDivisionRef) {
         $this->aDivisionRef->removePlayers($this);
     }
     if (null !== $this->aPositionRef) {
         $this->aPositionRef->removePlayers($this);
     }
     if (null !== $this->aTeams) {
         $this->aTeams->removePlayers($this);
     }
     $this->id = null;
     $this->lastn = null;
     $this->bats = null;
     $this->bday = null;
     $this->age = null;
     $this->mlb = null;
     $this->draft_year = null;
     $this->position = null;
     $this->card = null;
     $this->d_e = null;
     $this->lg = null;
     $this->mwbl = null;
     $this->category = null;
     $this->comment = null;
     $this->mwbl_link = null;
     $this->mlb_link = null;
     $this->mwbl_link_enabled = null;
     $this->mlb_link_enabled = null;
     $this->create_ts = null;
     $this->maint_ts = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
コード例 #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildCardRef $cardRef Object to remove from the list of results
  *
  * @return $this|ChildCardRefQuery The current query, for fluid interface
  */
 public function prune($cardRef = null)
 {
     if ($cardRef) {
         $this->addUsingAlias(CardRefTableMap::COL_CARD, $cardRef->getCard(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #3
0
 /**
  * Filter the query by a related \CardRef object
  *
  * @param \CardRef|ObjectCollection $cardRef 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 ChildPlayersQuery The current query, for fluid interface
  */
 public function filterByCardRef($cardRef, $comparison = null)
 {
     if ($cardRef instanceof \CardRef) {
         return $this->addUsingAlias(PlayersTableMap::COL_CARD, $cardRef->getCard(), $comparison);
     } elseif ($cardRef instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PlayersTableMap::COL_CARD, $cardRef->toKeyValue('PrimaryKey', 'Card'), $comparison);
     } else {
         throw new PropelException('filterByCardRef() only accepts arguments of type \\CardRef or Collection');
     }
 }