/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volumne/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->aTransaction instanceof Persistent) { $this->aTransaction->clearAllReferences($deep); } if ($this->aBookingType instanceof Persistent) { $this->aBookingType->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aTransaction = null; $this->aBookingType = null; }
/** * @param BookingType $bookingType The bookingType object to add. */ protected function doAddBookingType($bookingType) { $this->collBookingTypes[] = $bookingType; $bookingType->setAccount($this); }
public static function fromBookingType(BookingType $bookingType, PropelPDO $con = null) { return $bookingType->toArray() + array('Color' => self::getTypeColor($bookingType->getIdentifier())); }
/** * Filter the query by a related BookingType object * * @param BookingType|PropelObjectCollection $bookingType The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return BookingQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByBookingType($bookingType, $comparison = null) { if ($bookingType instanceof BookingType) { return $this->addUsingAlias(BookingPeer::BOOKING_TYPE_ID, $bookingType->getId(), $comparison); } elseif ($bookingType instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(BookingPeer::BOOKING_TYPE_ID, $bookingType->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByBookingType() only accepts arguments of type BookingType or PropelCollection'); } }
/** * Exclude object from result * * @param BookingType $bookingType Object to remove from the list of results * * @return BookingTypeQuery The current query, for fluid interface */ public function prune($bookingType = null) { if ($bookingType) { $this->addUsingAlias(BookingTypePeer::ID, $bookingType->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param BookingType $obj A BookingType object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null BookingTypePeer::$instances[$key] = $obj; } }
/** * Filter the query by a related BookingType object * * @param BookingType|PropelObjectCollection $bookingType the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return AccountQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByBookingType($bookingType, $comparison = null) { if ($bookingType instanceof BookingType) { return $this->addUsingAlias(AccountPeer::ID, $bookingType->getAccountId(), $comparison); } elseif ($bookingType instanceof PropelObjectCollection) { return $this->useBookingTypeQuery()->filterByPrimaryKeys($bookingType->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByBookingType() only accepts arguments of type BookingType or PropelCollection'); } }